瀏覽代碼

Modificaciones Finales

JeanBenitez 2 年之前
父節點
當前提交
561c0aabad

+ 1 - 1
sistema-mantenimiento-front/src/app/components/personal-management/employee/employee-form/employee-form.component.html

@@ -249,7 +249,7 @@
 
 
                 <ng-container matColumnDef="update" style="width:25%!important;">
                 <ng-container matColumnDef="update" style="width:25%!important;">
                     <th mat-header-cell *matHeaderCellDef > Actualizar documento </th>
                     <th mat-header-cell *matHeaderCellDef > Actualizar documento </th>
-                    <td mat-cell *matCellDef="let element"> {{element.update}} </td>
+                    <td mat-cell *matCellDef="let element"> {{element.update === '' ? 'No Aplica' : element.update}} </td>
                 </ng-container>
                 </ng-container>
 
 
                 <ng-container matColumnDef="action">
                 <ng-container matColumnDef="action">

+ 8 - 0
sistema-mantenimiento-front/src/app/components/personal-management/employee/employee-form/employee-form.component.ts

@@ -307,6 +307,12 @@ export class EmployeeFormComponent implements OnInit {
   public saveDocumentToUpdate(event: string) {
   public saveDocumentToUpdate(event: string) {
     this.nameUpdateDocument = event;
     this.nameUpdateDocument = event;
     this.disableDocumentButtons();
     this.disableDocumentButtons();
+
+  }
+
+  private removeItem(documentName:string) {
+    let arrDocuments = this.documentsEmployee.filter((element:string) => element !==  documentName);
+    this.documentsEmployee = arrDocuments
   }
   }
 
 
   private disableDocumentButtons() {
   private disableDocumentButtons() {
@@ -406,6 +412,7 @@ private enableDocumentButtons(){
     this.dataSource = new MatTableDataSource(this.documents);
     this.dataSource = new MatTableDataSource(this.documents);
     event.target.value = '';
     event.target.value = '';
     // Limpia el select de los documentos
     // Limpia el select de los documentos
+    this.removeItem(this.nameUpdateDocument);
     this.nameUpdateDocument = "";
     this.nameUpdateDocument = "";
     this.enableDocumentButtons()
     this.enableDocumentButtons()
     this.updateDocuments.setValue("");
     this.updateDocuments.setValue("");
@@ -428,6 +435,7 @@ private enableDocumentButtons(){
       this.officeDoc = [];
       this.officeDoc = [];
     }
     }
     this.refactorTable(element.index);
     this.refactorTable(element.index);
+    this.documentsEmployee.push(element.update);
   }
   }
 
 
   private refactorTable(index: number) {
   private refactorTable(index: number) {

+ 1 - 1
sistema-mantenimiento-front/src/app/components/personal-management/subcontratist/subcontratist-form/subcontratist-form.component.ts

@@ -232,7 +232,7 @@ private readOnlyForm(){
       TAX: this.tax.value == null ? null : await this._encService.encriptar(this.tax.value.trim()),
       TAX: this.tax.value == null ? null : await this._encService.encriptar(this.tax.value.trim()),
       STREET: this.street.value.trim(),
       STREET: this.street.value.trim(),
       EXTERIOR_NUMBER: this.exteriorNumber.value.toString().trim(),
       EXTERIOR_NUMBER: this.exteriorNumber.value.toString().trim(),
-      INTERIOR_NUMBER: this.interiorNumber.value == null || this.interiorNumber.value == null ? null : this.interiorNumber.value.toString().trim(),
+      INTERIOR_NUMBER: this.interiorNumber.value == null  ? '' : this.interiorNumber.value.toString().trim(),
       SUBURB: this.suburb.value,
       SUBURB: this.suburb.value,
       CITY: this.city.value,
       CITY: this.city.value,
       POSTAL_CODE: this.postalCode.value.toString().trim(),
       POSTAL_CODE: this.postalCode.value.toString().trim(),

+ 5 - 1
sistema-mantenimiento-front/src/app/components/personal-management/work-team/work-team-form/work-team-form.component.html

@@ -28,11 +28,15 @@
     </p>
     </p>
     <div *ngIf="enable == '0'">
     <div *ngIf="enable == '0'">
       <h3 style="font-weight:bold; margin-bottom: 0px;">Miembros del equipo</h3>
       <h3 style="font-weight:bold; margin-bottom: 0px;">Miembros del equipo</h3>
-      <mat-list>
+      <mat-list *ngIf="members.length > 0">
         <mat-list-item *ngFor="let member of members" style="margin: 0px">
         <mat-list-item *ngFor="let member of members" style="margin: 0px">
           <span matListItemTitle>{{ member.NAME }}</span>
           <span matListItemTitle>{{ member.NAME }}</span>
         </mat-list-item>
         </mat-list-item>
       </mat-list>
       </mat-list>
+
+      <div *ngIf="members.length === 0">
+        <span>No hay miembros actualmente.</span>
+      </div>
     </div>
     </div>
   </div>
   </div>
 </mat-dialog-content>
 </mat-dialog-content>