From 0815dd19eeaf42c9dd6d67d7dc7b7d9a3e17faae Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Thu, 4 Jul 2024 11:38:32 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=20=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/product-service/types.ts | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/stores/product-service/types.ts b/src/stores/product-service/types.ts index e6f07cfb..4e319d09 100644 --- a/src/stores/product-service/types.ts +++ b/src/stores/product-service/types.ts @@ -1,5 +1,5 @@ import { Status } from '../types'; -import { Pagination } from 'src/stores/types'; +import { Pagination, UpdatedBy, CreatedBy } from 'src/stores/types'; export type ServiceAndProduct = | (Service & { type: 'service' }) @@ -8,9 +8,9 @@ export type ServiceAndProduct = export interface Service { productTypeId: string; updatedAt: string; - updatedBy: string; + updatedBy: UpdatedBy; createdAt: string; - createdBy: string; + createdBy: CreatedBy; status: Status; attributes: Attributes; detail: string; @@ -19,6 +19,7 @@ export interface Service { id: string; work: Work[]; imageUrl: string; + registeredBranchId: string; } export interface WorkCreate { @@ -54,6 +55,7 @@ export interface ServiceCreate { image?: File; status?: Status; productTypeId: string; + registeredBranchId: string; } export interface Attributes { @@ -69,9 +71,9 @@ export type AdditionalType = 'string' | 'number' | 'date' | 'array'; export interface ServiceById { work: (Work & { productOnWork: ProductOnWork[] })[]; updatedAt: string; - updatedBy: string; + updatedBy: UpdatedBy; createdAt: string; - createdBy: string; + createdBy: CreatedBy; status: Status; attributes: Attributes; detail: string; @@ -80,14 +82,16 @@ export interface ServiceById { id: string; imageUrl: 'string'; productTypeId: string; + registeredBranchId: string; } export interface ProductOnWork { product: ProductList; + registeredBranchId: string; updatedAt: string; - updatedBy: string; + updatedBy: UpdatedBy; createdAt: string; - createdBy: string; + createdBy: CreatedBy; productId: string; workId: string; order: number; @@ -103,9 +107,9 @@ export interface WorkItems { export interface ProductList { remark: string; updatedAt: string; - updatedBy: string; + updatedBy: UpdatedBy; createdAt: string; - createdBy: string; + createdBy: CreatedBy; productTypeId: string; status: Status; serviceCharge: number; @@ -117,9 +121,11 @@ export interface ProductList { code: string; id: string; imageUrl: string; + registeredBranchId: string; } export interface ProductCreate { + registeredBranchId: string; productTypeId: string; remark: string; serviceCharge: number; @@ -154,9 +160,9 @@ export type ProductGroup = { detail: string; remark: string; status: Status; - createdBy: string; + createdBy: CreatedBy; createdAt: string; - updatedBy: string; + updatedBy: UpdatedBy; updatedAt: string; _count: { product: number; type: number; service: number }; };