feat: also delete branch that not sent on update

This commit is contained in:
Methapon2001 2024-04-22 17:09:37 +07:00
parent 00dff0814f
commit 0635ef062d

View file

@ -254,6 +254,9 @@ export class CustomerController extends Controller {
data: { data: {
...payload, ...payload,
branch: { branch: {
deleteMany: {
id: { notIn: customerBranch?.map((v) => v.id) || [] },
},
updateMany: updateMany:
customerBranch?.map((v) => ({ customerBranch?.map((v) => ({
where: { id: v.id }, where: { id: v.id },