Skip to content

Commit

Permalink
Merge pull request #45 from restorecommerce/feature/products-invoices…
Browse files Browse the repository at this point in the history
…-and-fulfillment

Feature/products invoices and fulfillment
  • Loading branch information
yosvelquintero authored Apr 10, 2024
2 parents 06deccd + ee354d0 commit ce5ff37
Show file tree
Hide file tree
Showing 141 changed files with 5,079 additions and 403 deletions.
96 changes: 96 additions & 0 deletions packages/core/config/src/lib/constants/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,114 @@ export const ROUTER: Readonly<IRouterConstant> = {
link: '/products',
title: 'Products',
getLink: () => ['', 'products'],
children: {
index: {
path: 'index',
link: '/products/index',
getLink: () => ['', 'products', 'index'],
title: 'Products',
},
create: {
path: 'create',
link: '/products/create',
title: 'Create Product',
getLink: () => ['', 'products', 'create'],
},
view: {
path: ':id/view',
link: '/products/:id/view',
title: 'Product',
getLink: (params?: { id?: number | string }) =>
params?.id
? ['', 'products', params.id, 'view']
: ['', 'products'],
},
edit: {
path: ':id/edit',
link: '/products/:id/edit',
title: 'Edit Product',
getLink: (params?: { id?: number | string }) =>
params?.id
? ['', 'products', params.id, 'edit']
: ['', 'products'],
},
},
},
invoices: {
path: 'invoices',
link: '/invoices',
title: 'Invoices',
getLink: () => ['', 'invoices'],
children: {
index: {
path: 'index',
link: '/invoices/index',
getLink: () => ['', 'invoices', 'index'],
title: 'Invoices',
},
create: {
path: 'create',
link: '/invoices/create',
title: 'Create Invoice',
getLink: () => ['', 'invoices', 'create'],
},
view: {
path: ':id/view',
link: '/invoices/:id/view',
title: 'Invoice',
getLink: (params?: { id?: number | string }) =>
params?.id
? ['', 'invoices', params.id, 'view']
: ['', 'invoices'],
},
edit: {
path: ':id/edit',
link: '/invoices/:id/edit',
title: 'Edit Invoice',
getLink: (params?: { id?: number | string }) =>
params?.id
? ['', 'invoices', params.id, 'edit']
: ['', 'invoices'],
},
},
},
fulfillments: {
path: 'fulfillments',
link: '/fulfillments',
title: 'Fulfillments',
getLink: () => ['', 'fulfillments'],
children: {
index: {
path: 'index',
link: '/fulfillments/index',
getLink: () => ['', 'fulfillments', 'index'],
title: 'Fulfillments',
},
create: {
path: 'create',
link: '/fulfillments/create',
title: 'Create Fulfillment',
getLink: () => ['', 'fulfillments', 'create'],
},
view: {
path: ':id/view',
link: '/fulfillments/:id/view',
title: 'Fulfillment',
getLink: (params?: { id?: number | string }) =>
params?.id
? ['', 'fulfillments', params.id, 'view']
: ['', 'fulfillments'],
},
edit: {
path: ':id/edit',
link: '/fulfillments/:id/edit',
title: 'Edit Product',
getLink: (params?: { id?: number | string }) =>
params?.id
? ['', 'fulfillments', params.id, 'edit']
: ['', 'fulfillments'],
},
},
},
layout: {
path: 'layout',
Expand Down
3 changes: 3 additions & 0 deletions packages/core/config/src/lib/constants/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ export const STORE: Readonly<IStoreConstant> = {
appState: 'appStateV1',
authnState: 'authnStateV1',
countryState: 'countryStateV1',
fulfillmentState: 'fulfillmentStateV1',
invoiceState: 'invoiceStateV1',
localeState: 'localeStateV1',
orderState: 'orderStateV1',
productState: 'productStateV1',
routerState: 'routerStateV1',
timezoneState: 'timezoneStateV1',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
mutation CatalogProductDelete(
$input: IIoRestorecommerceResourcebaseDeleteRequest!
) {
catalog {
product {
Delete(input: $input) {
details {
operationStatus {
code
message
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
mutation CatalogProductMutate($input: IIoRestorecommerceProductProductList!) {
catalog {
product {
Mutate(input: $input) {
details {
operationStatus {
code
message
}
items {
payload {
...ProductFragment
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
query CatalogProductRead($input: IIoRestorecommerceResourcebaseReadRequest!) {
catalog {
product {
Read(input: $input) {
details {
operationStatus {
code
message
}
items {
payload {
...ProductFragment
}
}
totalCount
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
fragment FulfillmentFragment on IoRestorecommerceFulfillmentFulfillment {
id
customerId
shopId
userId
meta {
...MetaFragment
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
fragment InvoiceFragment on IoRestorecommerceInvoiceInvoice {
id
customerId
shopId
userId
meta {
...MetaFragment
}
}
27 changes: 27 additions & 0 deletions packages/core/graphql/src/lib/documents/fragments/product.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
fragment ProductFragment on IoRestorecommerceProductProduct {
id
active
product {
name
description
physical {
variants {
id
name
images {
id
index
filename
caption
contentType
height
width
url
}
}
}
}
meta {
...MetaFragment
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
mutation FulfillmentFulfillmentDelete(
$input: IIoRestorecommerceResourcebaseDeleteRequest!
) {
fulfillment {
fulfillment {
Delete(input: $input) {
details {
operationStatus {
code
message
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
mutation FulfillmentFulfillmentMutate(
$input: IIoRestorecommerceFulfillmentFulfillmentList!
) {
fulfillment {
fulfillment {
Mutate(input: $input) {
details {
operationStatus {
code
message
}
items {
payload {
...FulfillmentFragment
}
}
totalCount
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
query FulfillmentFulfillmentRead(
$input: IIoRestorecommerceResourcebaseReadRequest!
) {
fulfillment {
fulfillment {
Read(input: $input) {
details {
operationStatus {
code
message
}
items {
payload {
...FulfillmentFragment
}
}
totalCount
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ query IdentityUserFind($input: IIoRestorecommerceUserFindRequest!) {
message
}
items {
status {
code
message
}
payload {
...UserFragment
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
mutation InvoicingInvoiceDelete(
$input: IIoRestorecommerceResourcebaseDeleteRequest!
) {
invoicing {
invoice {
Delete(input: $input) {
details {
operationStatus {
code
message
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
mutation InvoicingInvoiceMutate($input: IIoRestorecommerceInvoiceInvoiceList!) {
invoicing {
invoice {
Mutate(input: $input) {
details {
operationStatus {
code
message
}
items {
payload {
...InvoiceFragment
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
query InvoicingInvoiceRead($input: IIoRestorecommerceResourcebaseReadRequest!) {
invoicing {
invoice {
Read(input: $input) {
details {
operationStatus {
code
message
}
items {
payload {
...InvoiceFragment
}
}
totalCount
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ query MasterDataAddressRead(
message
}
items {
status {
code
message
}
payload {
...AddressFragment
}
}
totalCount
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ query MasterDataCountryRead(
message
}
items {
status {
code
message
}
payload {
...CountryFragment
}
}
totalCount
}
}
}
Expand Down
Loading

0 comments on commit ce5ff37

Please sign in to comment.