no message
This commit is contained in:
parent
25b5d58f2a
commit
53787597fd
54 changed files with 219 additions and 332 deletions
|
|
@ -153,13 +153,11 @@ export class ProfileAbilityController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileAbilityHistory();
|
const history = new ProfileAbilityHistory();
|
||||||
history.profileAbilityId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.profileAbilityRepo.save(data);
|
||||||
this.profileAbilityRepo.save(data),
|
history.profileAbilityId = data.id;
|
||||||
(history.profileAbilityId = data.id),
|
await this.profileAbilityHistoryRepo.save(history);
|
||||||
this.profileAbilityHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -155,13 +155,11 @@ export class ProfileAbilityEmployeeController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileAbilityHistory();
|
const history = new ProfileAbilityHistory();
|
||||||
history.profileAbilityId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.profileAbilityRepo.save(data);
|
||||||
this.profileAbilityRepo.save(data),
|
history.profileAbilityId = data.id;
|
||||||
(history.profileAbilityId = data.id),
|
await this.profileAbilityHistoryRepo.save(history);
|
||||||
this.profileAbilityHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -155,13 +155,11 @@ export class ProfileAbilityEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileAbilityHistory();
|
const history = new ProfileAbilityHistory();
|
||||||
history.profileAbilityId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.profileAbilityRepo.save(data);
|
||||||
this.profileAbilityRepo.save(data),
|
history.profileAbilityId = data.id;
|
||||||
(history.profileAbilityId = data.id),
|
await this.profileAbilityHistoryRepo.save(history);
|
||||||
this.profileAbilityHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -165,13 +165,11 @@ export class ProfileAssessmentsController extends Controller {
|
||||||
};
|
};
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileAssessmentHistory();
|
const history = new ProfileAssessmentHistory();
|
||||||
history.profileAssessmentId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.profileAssessmentsRepository.save(data);
|
||||||
this.profileAssessmentsRepository.save(data),
|
history.profileAssessmentId = data.id;
|
||||||
(history.profileAssessmentId = data.id),
|
await this.profileAssessmentsHistoryRepository.save(history);
|
||||||
this.profileAssessmentsHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -167,13 +167,11 @@ export class ProfileAssessmentsEmployeeController extends Controller {
|
||||||
};
|
};
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileAssessmentHistory();
|
const history = new ProfileAssessmentHistory();
|
||||||
history.profileAssessmentId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.profileAssessmentsRepository.save(data);
|
||||||
this.profileAssessmentsRepository.save(data),
|
history.profileAssessmentId = data.id;
|
||||||
(history.profileAssessmentId = data.id),
|
await this.profileAssessmentsHistoryRepository.save(history);
|
||||||
this.profileAssessmentsHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -167,13 +167,11 @@ export class ProfileAssessmentsEmployeeTempController extends Controller {
|
||||||
};
|
};
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileAssessmentHistory();
|
const history = new ProfileAssessmentHistory();
|
||||||
history.profileAssessmentId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.profileAssessmentsRepository.save(data);
|
||||||
this.profileAssessmentsRepository.save(data),
|
history.profileAssessmentId = data.id;
|
||||||
(history.profileAssessmentId = data.id),
|
await this.profileAssessmentsHistoryRepository.save(history);
|
||||||
this.profileAssessmentsHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -143,13 +143,11 @@ export class ProfileCertificateController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileCertificateHistory();
|
const history = new ProfileCertificateHistory();
|
||||||
history.profileCertificateId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.certificateRepo.save(data);
|
||||||
this.certificateRepo.save(data),
|
history.profileCertificateId = data.id;
|
||||||
(history.profileCertificateId = data.id),
|
await this.certificateHistoryRepo.save(history);
|
||||||
this.certificateHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -143,13 +143,11 @@ export class ProfileCertificateEmployeeController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileCertificateHistory();
|
const history = new ProfileCertificateHistory();
|
||||||
history.profileCertificateId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.certificateRepo.save(data);
|
||||||
this.certificateRepo.save(data),
|
history.profileCertificateId = data.id;
|
||||||
(history.profileCertificateId = data.id),
|
await this.certificateHistoryRepo.save(history);
|
||||||
this.certificateHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -143,13 +143,11 @@ export class ProfileCertificateEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileCertificateHistory();
|
const history = new ProfileCertificateHistory();
|
||||||
history.profileCertificateId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.certificateRepo.save(data);
|
||||||
this.certificateRepo.save(data),
|
history.profileCertificateId = data.id;
|
||||||
(history.profileCertificateId = data.id),
|
await this.certificateHistoryRepo.save(history);
|
||||||
this.certificateHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -141,13 +141,11 @@ export class ProfileChangeNameController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileChangeNameHistory();
|
const history = new ProfileChangeNameHistory();
|
||||||
history.profileChangeNameId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.changeNameRepository.save(data);
|
||||||
this.changeNameRepository.save(data),
|
history.profileChangeNameId = data.id;
|
||||||
(history.profileChangeNameId = data.id),
|
await this.changeNameHistoryRepository.save(history);
|
||||||
this.changeNameHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
profile.firstName = body.firstName ?? profile.firstName;
|
profile.firstName = body.firstName ?? profile.firstName;
|
||||||
profile.lastName = body.lastName ?? profile.lastName;
|
profile.lastName = body.lastName ?? profile.lastName;
|
||||||
|
|
|
||||||
|
|
@ -142,13 +142,11 @@ export class ProfileChangeNameEmployeeController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileChangeNameHistory();
|
const history = new ProfileChangeNameHistory();
|
||||||
history.profileChangeNameId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.changeNameRepository.save(data);
|
||||||
this.changeNameRepository.save(data),
|
history.profileChangeNameId = data.id;
|
||||||
(history.profileChangeNameId = data.id),
|
await this.changeNameHistoryRepository.save(history);
|
||||||
this.changeNameHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
profile.firstName = body.firstName ?? profile.firstName;
|
profile.firstName = body.firstName ?? profile.firstName;
|
||||||
profile.lastName = body.lastName ?? profile.lastName;
|
profile.lastName = body.lastName ?? profile.lastName;
|
||||||
|
|
|
||||||
|
|
@ -142,13 +142,11 @@ export class ProfileChangeNameEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileChangeNameHistory();
|
const history = new ProfileChangeNameHistory();
|
||||||
history.profileChangeNameId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.changeNameRepository.save(data);
|
||||||
this.changeNameRepository.save(data),
|
history.profileChangeNameId = data.id;
|
||||||
(history.profileChangeNameId = data.id),
|
await this.changeNameHistoryRepository.save(history);
|
||||||
this.changeNameHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
profile.firstName = body.firstName ?? profile.firstName;
|
profile.firstName = body.firstName ?? profile.firstName;
|
||||||
profile.lastName = body.lastName ?? profile.lastName;
|
profile.lastName = body.lastName ?? profile.lastName;
|
||||||
|
|
|
||||||
|
|
@ -84,13 +84,11 @@ export class ProfileChildrenController extends Controller {
|
||||||
data.childrenCitizenId = Extension.CheckCitizen(String(data.childrenCitizenId));
|
data.childrenCitizenId = Extension.CheckCitizen(String(data.childrenCitizenId));
|
||||||
|
|
||||||
const history = new ProfileChildrenHistory();
|
const history = new ProfileChildrenHistory();
|
||||||
history.profileChildrenId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.childrenRepository.save(data);
|
||||||
this.childrenRepository.save(data),
|
history.profileChildrenId = data.id;
|
||||||
(history.profileChildrenId = data.id),
|
await this.childrenHistoryRepository.save(history);
|
||||||
this.childrenHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,13 +90,11 @@ export class ProfileChildrenEmployeeController extends Controller {
|
||||||
data.childrenCitizenId = Extension.CheckCitizen(String(data.childrenCitizenId));
|
data.childrenCitizenId = Extension.CheckCitizen(String(data.childrenCitizenId));
|
||||||
|
|
||||||
const history = new ProfileChildrenHistory();
|
const history = new ProfileChildrenHistory();
|
||||||
history.profileChildrenId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.childrenRepository.save(data);
|
||||||
this.childrenRepository.save(data),
|
history.profileChildrenId = data.id;
|
||||||
(history.profileChildrenId = data.id),
|
await this.childrenHistoryRepository.save(history);
|
||||||
this.childrenHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,15 +88,12 @@ export class ProfileChildrenEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
data.childrenCitizenId = Extension.CheckCitizen(String(data.childrenCitizenId));
|
data.childrenCitizenId = Extension.CheckCitizen(String(data.childrenCitizenId));
|
||||||
|
|
||||||
const history = new ProfileChildrenHistory();
|
const history = new ProfileChildrenHistory();
|
||||||
history.profileChildrenId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.childrenRepository.save(data);
|
||||||
this.childrenRepository.save(data),
|
history.profileChildrenId = data.id;
|
||||||
(history.profileChildrenId = data.id),
|
await this.childrenHistoryRepository.save(history);
|
||||||
this.childrenHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -145,15 +145,12 @@ export class ProfileDisciplineController extends Controller {
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
|
|
||||||
const history = new ProfileDisciplineHistory();
|
const history = new ProfileDisciplineHistory();
|
||||||
history.profileDisciplineId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.disciplineRepository.save(data);
|
||||||
this.disciplineRepository.save(data),
|
history.profileDisciplineId = data.id;
|
||||||
(history.profileDisciplineId = data.id),
|
await this.disciplineHistoryRepository.save(history);
|
||||||
this.disciplineHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,15 +136,12 @@ export class ProfileDisciplineEmployeeController extends Controller {
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
|
|
||||||
const history = new ProfileDisciplineHistory();
|
const history = new ProfileDisciplineHistory();
|
||||||
history.profileDisciplineId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.disciplineRepository.save(data);
|
||||||
this.disciplineRepository.save(data),
|
history.profileDisciplineId = data.id;
|
||||||
(history.profileDisciplineId = data.id),
|
await this.disciplineHistoryRepository.save(history);
|
||||||
this.disciplineHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,15 +136,12 @@ export class ProfileDisciplineEmployeeTempController extends Controller {
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
|
|
||||||
const history = new ProfileDisciplineHistory();
|
const history = new ProfileDisciplineHistory();
|
||||||
history.profileDisciplineId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.disciplineRepository.save(data);
|
||||||
this.disciplineRepository.save(data),
|
history.profileDisciplineId = data.id;
|
||||||
(history.profileDisciplineId = data.id),
|
await this.disciplineHistoryRepository.save(history);
|
||||||
this.disciplineHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -150,13 +150,11 @@ export class ProfileDutyController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileDutyHistory();
|
const history = new ProfileDutyHistory();
|
||||||
history.profileDutyId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.dutyRepository.save(data);
|
||||||
this.dutyRepository.save(data),
|
history.profileDutyId = data.id;
|
||||||
(history.profileDutyId = data.id),
|
await this.dutyHistoryRepository.save(history);
|
||||||
this.dutyHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,13 +111,11 @@ export class ProfileDutyEmployeeController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileDutyHistory();
|
const history = new ProfileDutyHistory();
|
||||||
history.profileDutyId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.dutyRepository.save(data);
|
||||||
this.dutyRepository.save(data),
|
history.profileDutyId = data.id;
|
||||||
(history.profileDutyId = data.id),
|
await this.dutyHistoryRepository.save(history);
|
||||||
this.dutyHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,13 +111,11 @@ export class ProfileDutyEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileDutyHistory();
|
const history = new ProfileDutyHistory();
|
||||||
history.profileDutyId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.dutyRepository.save(data);
|
||||||
this.dutyRepository.save(data),
|
history.profileDutyId = data.id;
|
||||||
(history.profileDutyId = data.id),
|
await this.dutyHistoryRepository.save(history);
|
||||||
this.dutyHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -200,15 +200,12 @@ export class ProfileEducationsController extends Controller {
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
|
|
||||||
const history = new ProfileEducationHistory();
|
const history = new ProfileEducationHistory();
|
||||||
history.profileEducationId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.profileEducationRepo.save(data);
|
||||||
this.profileEducationRepo.save(data),
|
history.profileEducationId = data.id;
|
||||||
(history.profileEducationId = data.id),
|
await this.profileEducationHistoryRepo.save(history);
|
||||||
this.profileEducationHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -203,13 +203,11 @@ export class ProfileEducationsEmployeeController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileEducationHistory();
|
const history = new ProfileEducationHistory();
|
||||||
history.profileEducationId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.profileEducationRepo.save(data);
|
||||||
this.profileEducationRepo.save(data),
|
history.profileEducationId = data.id;
|
||||||
(history.profileEducationId = data.id),
|
await this.profileEducationHistoryRepo.save(history);
|
||||||
this.profileEducationHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -203,13 +203,11 @@ export class ProfileEducationsEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileEducationHistory();
|
const history = new ProfileEducationHistory();
|
||||||
history.profileEducationId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.profileEducationRepo.save(data);
|
||||||
this.profileEducationRepo.save(data),
|
history.profileEducationId = data.id;
|
||||||
(history.profileEducationId = data.id),
|
await this.profileEducationHistoryRepo.save(history);
|
||||||
this.profileEducationHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -237,14 +237,12 @@ export class ProfileFamilyCoupleController extends Controller {
|
||||||
|
|
||||||
profile.relationship = familyCouple.relationship; //update profileEmployee.relationship
|
profile.relationship = familyCouple.relationship; //update profileEmployee.relationship
|
||||||
const history = new ProfileFamilyCoupleHistory();
|
const history = new ProfileFamilyCoupleHistory();
|
||||||
history.profileFamilyCoupleId = familyCouple.id;
|
Object.assign(history, { ...familyCouple, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.profileRepo.save(profile);
|
||||||
this.profileRepo.save(profile),
|
await this.ProfileFamilyCouple.save(familyCouple);
|
||||||
this.ProfileFamilyCouple.save(familyCouple),
|
history.profileFamilyCoupleId = familyCouple.id;
|
||||||
(history.profileFamilyCoupleId = familyCouple.id),
|
await this.ProfileFamilyCoupleHistory.save(history);
|
||||||
this.ProfileFamilyCoupleHistory.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess(familyCouple.id);
|
return new HttpSuccess(familyCouple.id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -237,14 +237,12 @@ export class ProfileFamilyCoupleEmployeeController extends Controller {
|
||||||
|
|
||||||
profile.relationship = familyCouple.relationship; //update profileEmployee.relationship
|
profile.relationship = familyCouple.relationship; //update profileEmployee.relationship
|
||||||
const history = new ProfileFamilyCoupleHistory();
|
const history = new ProfileFamilyCoupleHistory();
|
||||||
history.profileFamilyCoupleId = familyCouple.id;
|
Object.assign(history, { ...familyCouple, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.profileRepo.save(profile);
|
||||||
this.profileRepo.save(profile),
|
await this.ProfileFamilyCouple.save(familyCouple);
|
||||||
this.ProfileFamilyCouple.save(familyCouple),
|
history.profileFamilyCoupleId = familyCouple.id;
|
||||||
(history.profileFamilyCoupleId = familyCouple.id),
|
await this.ProfileFamilyCoupleHistory.save(history);
|
||||||
this.ProfileFamilyCoupleHistory.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess(familyCouple.id);
|
return new HttpSuccess(familyCouple.id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -238,14 +238,12 @@ export class ProfileFamilyCoupleEmployeeTempController extends Controller {
|
||||||
|
|
||||||
profile.relationship = familyCouple.relationship; //update profileEmployee.relationship
|
profile.relationship = familyCouple.relationship; //update profileEmployee.relationship
|
||||||
const history = new ProfileFamilyCoupleHistory();
|
const history = new ProfileFamilyCoupleHistory();
|
||||||
history.profileFamilyCoupleId = familyCouple.id;
|
Object.assign(history, { ...familyCouple, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.profileRepo.save(profile);
|
||||||
this.profileRepo.save(profile),
|
await this.ProfileFamilyCouple.save(familyCouple);
|
||||||
this.ProfileFamilyCouple.save(familyCouple),
|
history.profileFamilyCoupleId = familyCouple.id;
|
||||||
(history.profileFamilyCoupleId = familyCouple.id),
|
await this.ProfileFamilyCoupleHistory.save(history);
|
||||||
this.ProfileFamilyCoupleHistory.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess(familyCouple.id);
|
return new HttpSuccess(familyCouple.id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,13 +222,11 @@ export class ProfileFamilyFatherController extends Controller {
|
||||||
familyFather.lastUpdateFullName = req.user.name;
|
familyFather.lastUpdateFullName = req.user.name;
|
||||||
|
|
||||||
const history = new ProfileFamilyFatherHistory();
|
const history = new ProfileFamilyFatherHistory();
|
||||||
history.profileFamilyFatherId = familyFather.id;
|
Object.assign(history, { ...familyFather, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.ProfileFamilyFather.save(familyFather);
|
||||||
this.ProfileFamilyFather.save(familyFather),
|
history.profileFamilyFatherId = familyFather.id;
|
||||||
(history.profileFamilyFatherId = familyFather.id),
|
await this.ProfileFamilyFatherHistory.save(history);
|
||||||
this.ProfileFamilyFatherHistory.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess(familyFather.id);
|
return new HttpSuccess(familyFather.id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,13 +222,11 @@ export class ProfileFamilyFatherEmployeeController extends Controller {
|
||||||
familyFather.lastUpdateFullName = req.user.name;
|
familyFather.lastUpdateFullName = req.user.name;
|
||||||
|
|
||||||
const history = new ProfileFamilyFatherHistory();
|
const history = new ProfileFamilyFatherHistory();
|
||||||
history.profileFamilyFatherId = familyFather.id;
|
Object.assign(history, { ...familyFather, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.ProfileFamilyFather.save(familyFather);
|
||||||
this.ProfileFamilyFather.save(familyFather),
|
history.profileFamilyFatherId = familyFather.id;
|
||||||
(history.profileFamilyFatherId = familyFather.id),
|
await this.ProfileFamilyFatherHistory.save(history);
|
||||||
this.ProfileFamilyFatherHistory.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess(familyFather.id);
|
return new HttpSuccess(familyFather.id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,13 +222,11 @@ export class ProfileFamilyFatherEmployeeTempController extends Controller {
|
||||||
familyFather.lastUpdateFullName = req.user.name;
|
familyFather.lastUpdateFullName = req.user.name;
|
||||||
|
|
||||||
const history = new ProfileFamilyFatherHistory();
|
const history = new ProfileFamilyFatherHistory();
|
||||||
history.profileFamilyFatherId = familyFather.id;
|
Object.assign(history, { ...familyFather, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.ProfileFamilyFather.save(familyFather);
|
||||||
this.ProfileFamilyFather.save(familyFather),
|
history.profileFamilyFatherId = familyFather.id;
|
||||||
(history.profileFamilyFatherId = familyFather.id),
|
await this.ProfileFamilyFatherHistory.save(history);
|
||||||
this.ProfileFamilyFatherHistory.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess(familyFather.id);
|
return new HttpSuccess(familyFather.id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,13 +222,11 @@ export class ProfileFamilyMotherController extends Controller {
|
||||||
familyMother.lastUpdateFullName = req.user.name;
|
familyMother.lastUpdateFullName = req.user.name;
|
||||||
|
|
||||||
const history = new ProfileFamilyMotherHistory();
|
const history = new ProfileFamilyMotherHistory();
|
||||||
history.profileFamilyMotherId = familyMother.id;
|
Object.assign(history, { ...familyMother, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.ProfileFamilyMother.save(familyMother);
|
||||||
this.ProfileFamilyMother.save(familyMother),
|
history.profileFamilyMotherId = familyMother.id;
|
||||||
(history.profileFamilyMotherId = familyMother.id),
|
await this.ProfileFamilyMotherHistory.save(history);
|
||||||
this.ProfileFamilyMotherHistory.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess(familyMother.id);
|
return new HttpSuccess(familyMother.id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,13 +222,11 @@ export class ProfileFamilyMotherEmployeeController extends Controller {
|
||||||
familyMother.lastUpdateFullName = req.user.name;
|
familyMother.lastUpdateFullName = req.user.name;
|
||||||
|
|
||||||
const history = new ProfileFamilyMotherHistory();
|
const history = new ProfileFamilyMotherHistory();
|
||||||
history.profileFamilyMotherId = familyMother.id;
|
Object.assign(history, { ...familyMother, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.ProfileFamilyMother.save(familyMother);
|
||||||
this.ProfileFamilyMother.save(familyMother),
|
history.profileFamilyMotherId = familyMother.id;
|
||||||
(history.profileFamilyMotherId = familyMother.id),
|
await this.ProfileFamilyMotherHistory.save(history);
|
||||||
this.ProfileFamilyMotherHistory.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess(familyMother.id);
|
return new HttpSuccess(familyMother.id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,13 +222,11 @@ export class ProfileFamilyMotherEmployeeTempController extends Controller {
|
||||||
familyMother.lastUpdateFullName = req.user.name;
|
familyMother.lastUpdateFullName = req.user.name;
|
||||||
|
|
||||||
const history = new ProfileFamilyMotherHistory();
|
const history = new ProfileFamilyMotherHistory();
|
||||||
history.profileFamilyMotherId = familyMother.id;
|
Object.assign(history, { ...familyMother, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.ProfileFamilyMother.save(familyMother);
|
||||||
this.ProfileFamilyMother.save(familyMother),
|
history.profileFamilyMotherId = familyMother.id;
|
||||||
(history.profileFamilyMotherId = familyMother.id),
|
await this.ProfileFamilyMotherHistory.save(history);
|
||||||
this.ProfileFamilyMotherHistory.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess(familyMother.id);
|
return new HttpSuccess(familyMother.id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -160,13 +160,11 @@ export class ProfileHonorController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileHonorHistory();
|
const history = new ProfileHonorHistory();
|
||||||
history.profileHonorId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.honorRepo.save(data);
|
||||||
this.honorRepo.save(data),
|
history.profileHonorId = data.id;
|
||||||
(history.profileHonorId = data.id),
|
await this.honorHistoryRepo.save(history);
|
||||||
this.honorHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,13 +164,11 @@ export class ProfileHonorEmployeeController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileHonorHistory();
|
const history = new ProfileHonorHistory();
|
||||||
history.profileHonorId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.honorRepo.save(data);
|
||||||
this.honorRepo.save(data),
|
history.profileHonorId = data.id;
|
||||||
(history.profileHonorId = data.id),
|
await this.honorHistoryRepo.save(history);
|
||||||
this.honorHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,13 +164,11 @@ export class ProfileHonorEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileHonorHistory();
|
const history = new ProfileHonorHistory();
|
||||||
history.profileHonorId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.honorRepo.save(data);
|
||||||
this.honorRepo.save(data),
|
history.profileHonorId = data.id;
|
||||||
(history.profileHonorId = data.id),
|
await this.honorHistoryRepo.save(history);
|
||||||
this.honorHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -195,13 +195,11 @@ export class ProfileInsigniaController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileInsigniaHistory();
|
const history = new ProfileInsigniaHistory();
|
||||||
history.profileInsigniaId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.insigniaRepo.save(data);
|
||||||
this.insigniaRepo.save(data),
|
history.profileInsigniaId = data.id;
|
||||||
(history.profileInsigniaId = data.id),
|
await this.insigniaHistoryRepo.save(history);
|
||||||
this.insigniaHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -198,13 +198,11 @@ export class ProfileInsigniaEmployeeController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileInsigniaHistory();
|
const history = new ProfileInsigniaHistory();
|
||||||
history.profileInsigniaId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.insigniaRepo.save(data);
|
||||||
this.insigniaRepo.save(data),
|
history.profileInsigniaId = data.id;
|
||||||
(history.profileInsigniaId = data.id),
|
await this.insigniaHistoryRepo.save(history);
|
||||||
this.insigniaHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -198,13 +198,11 @@ export class ProfileInsigniaEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileInsigniaHistory();
|
const history = new ProfileInsigniaHistory();
|
||||||
history.profileInsigniaId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.insigniaRepo.save(data);
|
||||||
this.insigniaRepo.save(data),
|
history.profileInsigniaId = data.id;
|
||||||
(history.profileInsigniaId = data.id),
|
await this.insigniaHistoryRepo.save(history);
|
||||||
this.insigniaHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -275,13 +275,11 @@ export class ProfileLeaveController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileLeaveHistory();
|
const history = new ProfileLeaveHistory();
|
||||||
history.profileLeaveId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.leaveRepo.save(data);
|
||||||
this.leaveRepo.save(data),
|
history.profileLeaveId = data.id;
|
||||||
(history.profileLeaveId = data.id),
|
await this.leaveHistoryRepo.save(history);
|
||||||
this.leaveHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,13 +96,11 @@ export class ProfileLeaveEmployeeController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileLeaveHistory();
|
const history = new ProfileLeaveHistory();
|
||||||
history.profileLeaveId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.leaveRepo.save(data);
|
||||||
this.leaveRepo.save(data),
|
history.profileLeaveId = data.id;
|
||||||
(history.profileLeaveId = data.id),
|
await this.leaveHistoryRepo.save(history);
|
||||||
this.leaveHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,13 +96,11 @@ export class ProfileLeaveEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileLeaveHistory();
|
const history = new ProfileLeaveHistory();
|
||||||
history.profileLeaveId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.leaveRepo.save(data);
|
||||||
this.leaveRepo.save(data),
|
history.profileLeaveId = data.id;
|
||||||
(history.profileLeaveId = data.id),
|
await this.leaveHistoryRepo.save(history);
|
||||||
this.leaveHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -118,13 +118,11 @@ export class ProfileNopaidController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileNopaidHistory();
|
const history = new ProfileNopaidHistory();
|
||||||
history.profileNopaidId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.nopaidRepository.save(data);
|
||||||
this.nopaidRepository.save(data),
|
history.profileNopaidId = data.id;
|
||||||
(history.profileNopaidId = data.id),
|
await this.nopaidHistoryRepository.save(history);
|
||||||
this.nopaidHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,13 +89,11 @@ export class ProfileNopaidEmployeeController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileNopaidHistory();
|
const history = new ProfileNopaidHistory();
|
||||||
history.profileNopaidId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.nopaidRepository.save(data);
|
||||||
this.nopaidRepository.save(data),
|
history.profileNopaidId = data.id;
|
||||||
(history.profileNopaidId = data.id),
|
await this.nopaidHistoryRepository.save(history);
|
||||||
this.nopaidHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,13 +89,11 @@ export class ProfileNopaidEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileNopaidHistory();
|
const history = new ProfileNopaidHistory();
|
||||||
history.profileNopaidId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.nopaidRepository.save(data);
|
||||||
this.nopaidRepository.save(data),
|
history.profileNopaidId = data.id;
|
||||||
(history.profileNopaidId = data.id),
|
await this.nopaidHistoryRepository.save(history);
|
||||||
this.nopaidHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,13 +115,11 @@ export class ProfileOtherController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileOtherHistory();
|
const history = new ProfileOtherHistory();
|
||||||
history.profileOtherId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.otherRepository.save(data);
|
||||||
this.otherRepository.save(data),
|
history.profileOtherId = data.id;
|
||||||
(history.profileOtherId = data.id),
|
await this.otherHistoryRepository.save(history);
|
||||||
this.otherHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,13 +86,11 @@ export class ProfileOtherEmployeeController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileOtherHistory();
|
const history = new ProfileOtherHistory();
|
||||||
history.profileOtherId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.otherRepository.save(data);
|
||||||
this.otherRepository.save(data),
|
history.profileOtherId = data.id;
|
||||||
(history.profileOtherId = data.id),
|
await this.otherHistoryRepository.save(history);
|
||||||
this.otherHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,13 +86,11 @@ export class ProfileOtherEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileOtherHistory();
|
const history = new ProfileOtherHistory();
|
||||||
history.profileOtherId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.otherRepository.save(data);
|
||||||
this.otherRepository.save(data),
|
history.profileOtherId = data.id;
|
||||||
(history.profileOtherId = data.id),
|
await this.otherHistoryRepository.save(history);
|
||||||
this.otherHistoryRepository.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -168,13 +168,11 @@ export class ProfileSalaryController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
history.profileSalaryId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.salaryRepo.save(data);
|
||||||
this.salaryRepo.save(data),
|
history.profileSalaryId = data.id;
|
||||||
(history.profileSalaryId = data.id),
|
await this.salaryHistoryRepo.save(history);
|
||||||
this.salaryHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,13 +97,11 @@ export class ProfileSalaryEmployeeController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
history.profileSalaryId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.salaryRepo.save(data);
|
||||||
this.salaryRepo.save(data),
|
history.profileSalaryId = data.id;
|
||||||
(history.profileSalaryId = data.id),
|
await this.salaryHistoryRepo.save(history);
|
||||||
this.salaryHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,13 +97,11 @@ export class ProfileSalaryEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
history.profileSalaryId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.salaryRepo.save(data);
|
||||||
this.salaryRepo.save(data),
|
history.profileSalaryId = data.id;
|
||||||
(history.profileSalaryId = data.id),
|
await this.salaryHistoryRepo.save(history);
|
||||||
this.salaryHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -161,13 +161,11 @@ export class ProfileTrainingController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileTrainingHistory();
|
const history = new ProfileTrainingHistory();
|
||||||
history.profileTrainingId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.trainingRepo.save(data);
|
||||||
this.trainingRepo.save(data),
|
history.profileTrainingId = data.id;
|
||||||
(history.profileTrainingId = data.id),
|
await this.trainingHistoryRepo.save(history);
|
||||||
this.trainingHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,13 +164,11 @@ export class ProfileTrainingEmployeeController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileTrainingHistory();
|
const history = new ProfileTrainingHistory();
|
||||||
history.profileTrainingId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.trainingRepo.save(data);
|
||||||
this.trainingRepo.save(data),
|
history.profileTrainingId = data.id;
|
||||||
(history.profileTrainingId = data.id),
|
await this.trainingHistoryRepo.save(history);
|
||||||
this.trainingHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,13 +164,11 @@ export class ProfileTrainingEmployeeTempController extends Controller {
|
||||||
|
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileTrainingHistory();
|
const history = new ProfileTrainingHistory();
|
||||||
history.profileTrainingId = data.id;
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
||||||
await Promise.all([
|
await this.trainingRepo.save(data);
|
||||||
this.trainingRepo.save(data),
|
history.profileTrainingId = data.id;
|
||||||
(history.profileTrainingId = data.id),
|
await this.trainingHistoryRepo.save(history);
|
||||||
this.trainingHistoryRepo.save(history),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue