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