Skip to content

Commit

Permalink
feat: refactor production creation and edition
Browse files Browse the repository at this point in the history
  • Loading branch information
belsman committed Aug 19, 2024
1 parent 169aab8 commit 8277aca
Show file tree
Hide file tree
Showing 4 changed files with 302 additions and 62 deletions.
10 changes: 5 additions & 5 deletions packages/core/graphql/src/lib/documents/fragments/product.gql
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ fragment ProductFragment on IoRestorecommerceProductProduct {
name
description
taxIds
gtin
manufacturerId
originCountryId
categoryId
prototypeId
taricCode
category {
id
name
description
}
physical {
variants {
id
Expand Down
76 changes: 35 additions & 41 deletions packages/core/graphql/src/lib/generated/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5499,13 +5499,12 @@ export type CatalogProductMutateMutation = {
name?: string | null;
description?: string | null;
taxIds?: Array<string> | null;
gtin?: string | null;
manufacturerId?: string | null;
originCountryId?: string | null;
categoryId?: string | null;
prototypeId?: string | null;
taricCode?: string | null;
category?: {
__typename?: 'IoRestorecommerceProductCategoryProductCategory';
id?: string | null;
name?: string | null;
description?: string | null;
} | null;
physical?: {
__typename?: 'IoRestorecommerceProductPhysicalProduct';
variants?: Array<{
Expand Down Expand Up @@ -5687,13 +5686,12 @@ export type CatalogProductReadQuery = {
name?: string | null;
description?: string | null;
taxIds?: Array<string> | null;
gtin?: string | null;
manufacturerId?: string | null;
originCountryId?: string | null;
categoryId?: string | null;
prototypeId?: string | null;
taricCode?: string | null;
category?: {
__typename?: 'IoRestorecommerceProductCategoryProductCategory';
id?: string | null;
name?: string | null;
description?: string | null;
} | null;
physical?: {
__typename?: 'IoRestorecommerceProductPhysicalProduct';
variants?: Array<{
Expand Down Expand Up @@ -6251,13 +6249,12 @@ export type OrderFragmentFragment = {
name?: string | null;
description?: string | null;
taxIds?: Array<string> | null;
gtin?: string | null;
manufacturerId?: string | null;
originCountryId?: string | null;
categoryId?: string | null;
prototypeId?: string | null;
taricCode?: string | null;
category?: {
__typename?: 'IoRestorecommerceProductCategoryProductCategory';
id?: string | null;
name?: string | null;
description?: string | null;
} | null;
physical?: {
__typename?: 'IoRestorecommerceProductPhysicalProduct';
variants?: Array<{
Expand Down Expand Up @@ -6880,13 +6877,12 @@ export type ProductFragmentFragment = {
name?: string | null;
description?: string | null;
taxIds?: Array<string> | null;
gtin?: string | null;
manufacturerId?: string | null;
originCountryId?: string | null;
categoryId?: string | null;
prototypeId?: string | null;
taricCode?: string | null;
category?: {
__typename?: 'IoRestorecommerceProductCategoryProductCategory';
id?: string | null;
name?: string | null;
description?: string | null;
} | null;
physical?: {
__typename?: 'IoRestorecommerceProductPhysicalProduct';
variants?: Array<{
Expand Down Expand Up @@ -8696,13 +8692,12 @@ export type OrderingOrderMutateMutation = {
name?: string | null;
description?: string | null;
taxIds?: Array<string> | null;
gtin?: string | null;
manufacturerId?: string | null;
originCountryId?: string | null;
categoryId?: string | null;
prototypeId?: string | null;
taricCode?: string | null;
category?: {
__typename?: 'IoRestorecommerceProductCategoryProductCategory';
id?: string | null;
name?: string | null;
description?: string | null;
} | null;
physical?: {
__typename?: 'IoRestorecommerceProductPhysicalProduct';
variants?: Array<{
Expand Down Expand Up @@ -9325,13 +9320,12 @@ export type OrderingOrderReadQuery = {
name?: string | null;
description?: string | null;
taxIds?: Array<string> | null;
gtin?: string | null;
manufacturerId?: string | null;
originCountryId?: string | null;
categoryId?: string | null;
prototypeId?: string | null;
taricCode?: string | null;
category?: {
__typename?: 'IoRestorecommerceProductCategoryProductCategory';
id?: string | null;
name?: string | null;
description?: string | null;
} | null;
physical?: {
__typename?: 'IoRestorecommerceProductPhysicalProduct';
variants?: Array<{
Expand Down Expand Up @@ -10026,12 +10020,12 @@ export const ProductFragmentFragmentDoc = gql`
name
description
taxIds
gtin
manufacturerId
originCountryId
categoryId
prototypeId
taricCode
category {
id
name
description
}
physical {
variants {
id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ import { buildProductSchema } from '../jss-forms';
template: `
<ng-container *ngIf="vm$ | async as vm">
<div class="mt-2">
<app-module-product-creation-form />
<!-- <rc-crud-create
<rc-crud-create
[schema]="schema"
[create]="create"
/> -->
/>
</div>
</ng-container>
`,
Expand Down
Loading

0 comments on commit 8277aca

Please sign in to comment.