feat: also update customer status to active
This commit is contained in:
parent
aa7d865352
commit
e82f3f37b2
1 changed files with 10 additions and 0 deletions
|
|
@ -392,6 +392,16 @@ export class EmployeeController extends Controller {
|
||||||
data: { status: Status.ACTIVE },
|
data: { status: Status.ACTIVE },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await prisma.customer.updateMany({
|
||||||
|
where: {
|
||||||
|
branch: {
|
||||||
|
some: { id: customerBranchId },
|
||||||
|
},
|
||||||
|
status: Status.CREATED,
|
||||||
|
},
|
||||||
|
data: { status: Status.ACTIVE },
|
||||||
|
});
|
||||||
|
|
||||||
this.setStatus(HttpStatus.CREATED);
|
this.setStatus(HttpStatus.CREATED);
|
||||||
|
|
||||||
return Object.assign(record, {
|
return Object.assign(record, {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue