feat: add option to share product inside one group

This commit is contained in:
Methapon Metanipat 2024-10-28 16:52:53 +07:00
parent b9ec4eadc7
commit a7edde9e5d
2 changed files with 8 additions and 0 deletions

View file

@ -105,6 +105,12 @@ export class ProductController extends Controller {
registeredBranch: { OR: permissionCondCompany(req.user) }, registeredBranch: { OR: permissionCondCompany(req.user) },
}, },
}, },
{
productGroup: {
shared: true,
registeredBranch: { OR: permissionCondCompany(req.user) },
},
},
], ],
}, },
}); });

View file

@ -33,6 +33,7 @@ type ProductGroupCreate = {
detail: string; detail: string;
remark: string; remark: string;
status?: Status; status?: Status;
shared?: boolean;
registeredBranchId: string; registeredBranchId: string;
}; };
@ -41,6 +42,7 @@ type ProductGroupUpdate = {
detail?: string; detail?: string;
remark?: string; remark?: string;
status?: "ACTIVE" | "INACTIVE"; status?: "ACTIVE" | "INACTIVE";
shared?: boolean;
registeredBranchId?: string; registeredBranchId?: string;
}; };