parent
d3b8de26d7
commit
750c3a089b
4 changed files with 17 additions and 4 deletions
|
|
@ -161,6 +161,10 @@ export class ProfileFamilyCoupleEmployeeTempController extends Controller {
|
|||
if (!profile) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||
}
|
||||
await this.ProfileFamilyCouple.update(
|
||||
{ profileEmployeeId: profile.id },
|
||||
{ couple: false },
|
||||
);
|
||||
familyCouple.coupleCitizenId = Extension.CheckCitizen(String(body.coupleCitizenId));
|
||||
familyCouple.createdUserId = req.user.sub;
|
||||
familyCouple.createdFullName = req.user.name;
|
||||
|
|
@ -168,6 +172,7 @@ export class ProfileFamilyCoupleEmployeeTempController extends Controller {
|
|||
familyCouple.lastUpdateFullName = req.user.name;
|
||||
familyCouple.createdAt = new Date();
|
||||
familyCouple.lastUpdatedAt = new Date();
|
||||
familyCouple.couple = true;
|
||||
await this.ProfileFamilyCouple.save(familyCouple);
|
||||
|
||||
profile.relationship = familyCouple.relationship; //update profileEmployee.relationship
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue