refactor: add registered branch to product group

This commit is contained in:
Methapon Metanipat 2024-09-10 13:35:53 +07:00
parent 01c5592f7d
commit 67d360c92b
5 changed files with 92 additions and 144 deletions

View file

@ -45,7 +45,7 @@ const useMyBranch = defineStore('useMyBranchStore', () => {
}
async function fetchListMyBranch(userId: string) {
const res = await api.get<Pagination<Branch[]>>(`/user/${userId}/branch`, {
const res = await api.get<Pagination<Branch[]>>(`/branch`, {
headers: {
'X-Rtid': flowStore.rtid,
},

View file

@ -195,11 +195,12 @@ export type ProductGroup = {
detail: string;
remark: string;
status: Status;
registeredBranchId: string;
createdBy: CreatedBy;
createdAt: string;
updatedBy: UpdatedBy;
updatedAt: string;
_count: { product: number; type: number; service: number };
_count: { product: number; service: number };
};
export interface ProductGroupCreate {
@ -207,6 +208,7 @@ export interface ProductGroupCreate {
detail: string;
name: string;
code: string;
registeredBranchId: string;
}
export interface ProductGroupUpdate {
@ -215,4 +217,5 @@ export interface ProductGroupUpdate {
name: string;
code: string;
status: Status;
registeredBranchId?: string;
}