Skip to content

Commit

Permalink
feat(product): add meta to category
Browse files Browse the repository at this point in the history
  • Loading branch information
KhBaterdene committed Feb 13, 2023
1 parent f8dcfd6 commit b41be74
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/ui-products/src/components/CategoryForm.tsx
Expand Up @@ -97,6 +97,11 @@ class CategoryForm extends React.Component<Props, State> {
/>
</FormGroup>

<FormGroup>
<ControlLabel>Meta</ControlLabel>
<FormControl {...formProps} name="meta" defaultValue={object.meta} />
</FormGroup>

<FormGroup>
<ControlLabel>Description</ControlLabel>
<FormControl
Expand Down
2 changes: 2 additions & 0 deletions packages/ui-products/src/graphql/mutations.ts
Expand Up @@ -26,6 +26,7 @@ const productCategoryParamsDef = `
$description: String,
$attachment: AttachmentInput,
$status: String,
$meta: String
`;

const productParams = `
Expand Down Expand Up @@ -56,6 +57,7 @@ const productCategoryParams = `
description: $description,
attachment: $attachment,
status: $status,
meta: $meta
`;

const productAdd = `
Expand Down
1 change: 1 addition & 0 deletions packages/ui-products/src/graphql/queries.ts
Expand Up @@ -105,6 +105,7 @@ const productCategories = `
parentId
description
status
meta
attachment {
name
url
Expand Down
1 change: 1 addition & 0 deletions packages/ui-products/src/types.ts
Expand Up @@ -60,6 +60,7 @@ export interface IProductCategory {
createdAt: Date;
productCount: number;
isRoot: boolean;
meta: string;
}

export type MutationVariables = {
Expand Down

0 comments on commit b41be74

Please sign in to comment.