|
|
@@ -522,10 +522,8 @@ export class CorrectiveOrderFormComponent implements OnInit {
|
|
|
}else{
|
|
|
let employeesArr: EmployeesListItem[] = [];
|
|
|
for(const employee of employees.response){
|
|
|
- let idEnc = await this._encService.encrypt(`${employee.ID_EMPLOYEE}`);
|
|
|
-
|
|
|
- employee.NAME = `${employee.NAME} (${employee.ID_EMPLOYEE})`;
|
|
|
- employee.ID_EMPLOYEE = idEnc;
|
|
|
+ let idDec = await this._encService.decrypt(employee.ID_EMPLOYEE);
|
|
|
+ employee.NAME = `${employee.NAME} (${idDec})`;
|
|
|
|
|
|
if(employee.STATUS == 'Activo'){
|
|
|
employeesArr.push(employee);
|
|
|
@@ -562,20 +560,18 @@ export class CorrectiveOrderFormComponent implements OnInit {
|
|
|
}else{
|
|
|
let subcontratistsArr: SubcontratistItem[] = [];
|
|
|
for(const subcontratist of subcontratists.response){
|
|
|
- let idEnc = await this._encService.encrypt(`${subcontratist.ID_SUBCONTRATIST}`);
|
|
|
+ let idDec = await this._encService.decrypt(subcontratist.ID_SUBCONTRATIST);
|
|
|
|
|
|
if(this.correctiveWorkOrder != null){
|
|
|
let idResponsibleArr = this.correctiveWorkOrder.ID_RESPONSABLE.split('(').reverse();
|
|
|
let idResponsibleStr = idResponsibleArr[0].replace(')', '');
|
|
|
|
|
|
- if(this.correctiveWorkOrder.TIPO_RESPONSABLE == 'Subcontratista' && subcontratist.ID_SUBCONTRATIST == idResponsibleStr){
|
|
|
- this.orderFormGroup.controls['responsibleUserControl'].setValue(`${idEnc}|subcontratist`);
|
|
|
+ if(this.correctiveWorkOrder.TIPO_RESPONSABLE == 'Subcontratista' && idDec == idResponsibleStr){
|
|
|
+ this.orderFormGroup.controls['responsibleUserControl'].setValue(`${subcontratist.ID_SUBCONTRATIST}|subcontratist`);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- subcontratist.NAME = `${subcontratist.NAME} (${subcontratist.ID_SUBCONTRATIST})`;
|
|
|
- subcontratist.ID_SUBCONTRATIST = idEnc;
|
|
|
-
|
|
|
+ subcontratist.NAME = `${subcontratist.NAME} (${idDec})`;
|
|
|
if(subcontratist.STATUS == 'Activo'){
|
|
|
subcontratistsArr.push(subcontratist);
|
|
|
}
|
|
|
@@ -609,10 +605,8 @@ export class CorrectiveOrderFormComponent implements OnInit {
|
|
|
if(!this.hasError){
|
|
|
let workTeamsArr: any[] = [];
|
|
|
for(const workTeam of workTeams.response){
|
|
|
- let idEnc = await this._encService.encrypt(`${workTeam.WORKTEAM_ID}`);
|
|
|
-
|
|
|
- workTeam.NAME = `${workTeam.NAME} (${workTeam.WORKTEAM_ID})`;
|
|
|
- workTeam.WORKTEAM_ID = idEnc;
|
|
|
+ let idDec = await this._encService.decrypt(workTeam.WORKTEAM_ID);
|
|
|
+ workTeam.NAME = `${workTeam.NAME} (${idDec})`;
|
|
|
|
|
|
if(workTeam.STATUS == 'Activo'){
|
|
|
workTeamsArr.push(workTeam);
|