feat: also update customer status to active

This commit is contained in:
Methapon2001 2024-06-11 09:42:42 +07:00
parent aa7d865352
commit e82f3f37b2

View file

@ -392,6 +392,16 @@ export class EmployeeController extends Controller {
data: { status: Status.ACTIVE },
});
await prisma.customer.updateMany({
where: {
branch: {
some: { id: customerBranchId },
},
status: Status.CREATED,
},
data: { status: Status.ACTIVE },
});
this.setStatus(HttpStatus.CREATED);
return Object.assign(record, {