no message

This commit is contained in:
kittapath 2024-08-13 20:01:53 +07:00
parent 25b5d58f2a
commit 53787597fd
54 changed files with 219 additions and 332 deletions

View file

@ -237,14 +237,12 @@ export class ProfileFamilyCoupleController extends Controller {
profile.relationship = familyCouple.relationship; //update profileEmployee.relationship
const history = new ProfileFamilyCoupleHistory();
history.profileFamilyCoupleId = familyCouple.id;
Object.assign(history, { ...familyCouple, id: undefined });
await Promise.all([
this.profileRepo.save(profile),
this.ProfileFamilyCouple.save(familyCouple),
(history.profileFamilyCoupleId = familyCouple.id),
this.ProfileFamilyCoupleHistory.save(history),
]);
await this.profileRepo.save(profile);
await this.ProfileFamilyCouple.save(familyCouple);
history.profileFamilyCoupleId = familyCouple.id;
await this.ProfileFamilyCoupleHistory.save(history);
return new HttpSuccess(familyCouple.id);
}