refactor(04): remove type from 04

This commit is contained in:
puriphatt 2024-09-04 09:48:29 +07:00
parent 2e72cb3071
commit eec5325806
4 changed files with 420 additions and 326 deletions

View file

@ -271,7 +271,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
// Product
async function fetchStatsProduct(opts?: { productTypeId?: string }) {
async function fetchStatsProduct(opts?: { productGroupId?: string }) {
const params = new URLSearchParams();
for (const [k, v] of Object.entries(opts || {})) {
@ -296,7 +296,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
query?: string;
page?: number;
pageSize?: number;
productTypeId?: string;
productGroupId?: string;
status?: string;
},
flow?: {
@ -428,7 +428,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
query?: string;
page?: number;
pageSize?: number;
productTypeId?: string;
productGroupId?: string;
status?: string;
},
flow?: {
@ -545,7 +545,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
serviceId: string,
data: Partial<ServiceCreate & { status: string }>,
) {
const { image, code, productTypeId, ...payload } = data;
const { image, code, productGroupId, ...payload } = data;
if (payload.status === 'CREATED') {
delete payload.status;
@ -736,7 +736,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
query?: string;
page?: number;
pageSize?: number;
productTypeId?: string;
productGroupId?: string;
status?: string;
},
flow?: {

View file

@ -14,7 +14,7 @@ export interface TreeProduct {
}
export interface Service {
productTypeId: string;
productGroupId: string;
updatedAt: string;
updatedBy: UpdatedBy;
createdAt: string;
@ -62,7 +62,7 @@ export interface ServiceCreate {
code: string;
image?: File;
status?: Status;
productTypeId: string;
productGroupId: string;
registeredBranchId: string | null;
}
@ -112,7 +112,7 @@ export interface ServiceById {
code: string;
id: string;
imageUrl: 'string';
productTypeId: string;
productGroupId: string;
registeredBranchId: string;
}
@ -136,12 +136,14 @@ export interface WorkItems {
}
export interface ProductList {
expenseType: string;
vatIncluded: boolean;
remark: string;
updatedAt: string;
updatedBy: UpdatedBy;
createdAt: string;
createdBy: CreatedBy;
productTypeId: string;
productGroupId: string;
status: Status;
serviceCharge: number;
agentPrice: number;
@ -156,8 +158,10 @@ export interface ProductList {
}
export interface ProductCreate {
expenseType: string;
vatIncluded: boolean;
registeredBranchId: string;
productTypeId: string;
productGroupId: string;
remark: string;
serviceCharge: number;
agentPrice: number;
@ -171,7 +175,7 @@ export interface ProductCreate {
}
export interface ProductUpdate {
productTypeId: string;
productGroupId: string;
remark: string;
serviceCharge: number;
agentPrice: number;