feat: also delete branch that not sent on update
This commit is contained in:
parent
00dff0814f
commit
0635ef062d
1 changed files with 3 additions and 0 deletions
|
|
@ -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 },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue