|
|
@@ -7,12 +7,7 @@
|
|
|
Agregue sus documentos en las secciones requeridas
|
|
|
</h2>
|
|
|
|
|
|
- <!-- Para la carga de solo archivos excel
|
|
|
- <div>
|
|
|
- <h2 mat-dialog-title class="prevent-select" style="font-size: 15px; padding-left: 50px;"><mat-icon style="width: 30px; color: rgb(150, 150, 150); margin-top: 25px; ">folder_copy</mat-icon>sube aquí tu plantilla de documentación</h2>
|
|
|
-
|
|
|
-
|
|
|
- <input
|
|
|
+ <input
|
|
|
type="file"
|
|
|
name="file"
|
|
|
id="file"
|
|
|
@@ -20,93 +15,11 @@
|
|
|
class="hidden"
|
|
|
accept=".xlsx,.xls,.zip"
|
|
|
(change)="checkFile($event)">
|
|
|
- <div
|
|
|
- class="drag-drop-area"
|
|
|
- style="width: 40%; height: 0px;"
|
|
|
- [class.drag-over]="isDragOver"
|
|
|
- [class.has-file]="hasExcelFile"
|
|
|
- (dragover)="onDragOver($event)"
|
|
|
- (dragleave)="onDragLeave($event)"
|
|
|
- (drop)="onDrop($event)"
|
|
|
- (click)="openFileUploader()"
|
|
|
- *ngIf="!isUploading">
|
|
|
-
|
|
|
- <div class="drag-drop-content">
|
|
|
- <mat-icon class="upload-icon" style="margin-top: 5px; margin-right: 360px; position: absolute;">
|
|
|
- {{ hasExcelFile ? 'refresh' : 'table_chart ' }}
|
|
|
- </mat-icon>
|
|
|
-
|
|
|
- <p class="drag-drop-text" *ngIf="!hasExcelFile" style="margin-left: 27px;">
|
|
|
- <strong>Presione aquí o arrastre el archivo requerido</strong><br>
|
|
|
- <span>Solo archivos .xlsx, .xls (máximo 75MB)</span>
|
|
|
- </p>
|
|
|
-
|
|
|
- <p class="drag-drop-text" *ngIf="hasExcelFile">
|
|
|
- <strong>Haga clic aquí o arrastre un nuevo archivo Excel</strong><br>
|
|
|
- <span>Para reemplazar el archivo actual</span>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
-Para la carga de archivos tipo zip
|
|
|
-
|
|
|
- <div>
|
|
|
- <h2 mat-dialog-title class="prevent-select" style="font-size: 15px; padding-left: 50px;"><mat-icon style="width: 30px; color: rgb(150, 150, 150); margin-top: 25px; "> folder_copy</mat-icon>sube aquí tu archivo zip</h2>
|
|
|
-
|
|
|
-
|
|
|
- <input
|
|
|
- type="file"
|
|
|
- name="file"
|
|
|
- id="file"
|
|
|
- #file
|
|
|
- class="hidden"
|
|
|
- accept=".zip,.docx"
|
|
|
- (change)="checkFile($event)">
|
|
|
- <div
|
|
|
- class="drag-drop-area"
|
|
|
- style="width: 40%; height: 0px;"
|
|
|
- [class.drag-over]="isDragOver"
|
|
|
- [class.has-file]="hasZipFile"
|
|
|
- (dragover)="onDragOver($event)"
|
|
|
- (dragleave)="onDragLeave($event)"
|
|
|
- (drop)="onDrop($event)"
|
|
|
- (click)="openFileUploader()"
|
|
|
- *ngIf="!isUploading">
|
|
|
-
|
|
|
- <div class="drag-drop-content">
|
|
|
- <mat-icon class="upload-icon" style="margin-top: 5px; margin-right: 360px; position: absolute;">
|
|
|
- {{ hasZipFile ? 'refresh' : 'folder_zip' }}
|
|
|
- </mat-icon>
|
|
|
-
|
|
|
- <p class="drag-drop-text" *ngIf="!hasZipFile" style="margin-left: 27px;">
|
|
|
- <strong>Presione aquí o arrastre el archivo requerido</strong><br>
|
|
|
- <span>Solo archivos ZIP (máximo 250MB)</span>
|
|
|
- </p>
|
|
|
-
|
|
|
- <p class="drag-drop-text" *ngIf=" hasZipFile">
|
|
|
- <strong>Haga clic aquí o arrastre un nuevo archivo Excel</strong><br>
|
|
|
- <span>Para reemplazar el archivo actual</span>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
-
|
|
|
-
|
|
|
- <input
|
|
|
- type="file"
|
|
|
- name="file"
|
|
|
- id="file"
|
|
|
- #file
|
|
|
- class="hidden"
|
|
|
- accept=".xlsx,.xls,.zip"
|
|
|
- (change)="checkFile($event)">
|
|
|
|
|
|
<div
|
|
|
class="drag-drop-area"
|
|
|
[class.drag-over]="isDragOver"
|
|
|
- [class.has-file]="hasExcelFile || hasZipFile"
|
|
|
+ [class.has-file]="hasAnyFile"
|
|
|
(dragover)="onDragOver($event)"
|
|
|
(dragleave)="onDragLeave($event)"
|
|
|
(drop)="onDrop($event)"
|
|
|
@@ -120,47 +33,40 @@ Para la carga de archivos tipo zip
|
|
|
|
|
|
<p class="drag-drop-text" *ngIf="!hasExcelFile || !hasZipFile">
|
|
|
<strong>Haga clic aquí o arrastre aquí los archivos requeridos</strong><br>
|
|
|
- <span>Solo archivos .xlsx, .xls (máximo 10MB) y ZIP (máximo 50MB)</span>
|
|
|
+ <span>Solo archivos .xlsx, .xls (máximo {{MAX_FILE_SIZE_MB}}MB) y ZIP (máximo {{MAX_ZIP_SIZE_MB}}MB)</span>
|
|
|
</p>
|
|
|
|
|
|
<p class="drag-drop-text" *ngIf="hasExcelFile && hasZipFile">
|
|
|
- <strong>Haga clic aquí o arrastre un nuevo archivo Excel</strong><br>
|
|
|
- <span>Para reemplazar el archivo actual</span>
|
|
|
+ <strong>Haga clic aquí o arrastre nuevos archivos</strong><br>
|
|
|
+ <span>Para reemplazar los archivos actuales</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
<div *ngIf="isUploading" class="upload-progress drag-drop-area uploading">
|
|
|
<mat-spinner diameter="30"></mat-spinner>
|
|
|
- <p style="margin-top: 10px;">Subiendo archivo</p>
|
|
|
+ <p style="margin-top: 10px;">Subiendo archivo {{currentFileType === 'excel' ? 'Excel' : 'ZIP'}}...</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div mat-dialog-content class="prevent-select">
|
|
|
-
|
|
|
<div class="is-loading animated fadeIn fast" *ngIf="isLoading" style="text-align: center; padding: 20px;">
|
|
|
<mat-spinner></mat-spinner>
|
|
|
- <h3 style="margin-top: 10px;">Procesando archivo Excel...</h3>
|
|
|
+ <h3 style="margin-top: 10px;">Procesando archivos...</h3>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
<div class="has-error animated fadeIn fast" *ngIf="hasError" style="text-align: center; padding: 20px;">
|
|
|
<mat-icon class="red_primary_font" style="font-size: 48px; margin-bottom: 10px;">error</mat-icon>
|
|
|
<h3 style="font-weight: bold; font-style: italic;">{{ errorMessage }}</h3>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
- <div *ngIf="hasZipFile || hasExcelFile && !isLoading" class="files-container">
|
|
|
+ <div *ngIf="hasAnyFile && !isLoading" class="files-container">
|
|
|
<h3 style="margin: 20px 0; display: flex; align-items: center;">
|
|
|
- <mat-icon style="margin-right: 8px; color: #2e7d32;">
|
|
|
- {{ hasExcelFile ? 'table_chart' : 'folder_zip' }}
|
|
|
- </mat-icon>
|
|
|
- {{ hasExcelFile ? 'Archivo Excel cargado:' : 'Archivo ZIP cargado:' }}
|
|
|
+ <mat-icon style="margin-right: 8px; color: #2e7d32;">description</mat-icon>
|
|
|
+ Archivos cargados
|
|
|
</h3>
|
|
|
|
|
|
<table mat-table matSort class="animated fadeIn" [dataSource]="dataSource">
|
|
|
-
|
|
|
<ng-container matColumnDef="nombre_del_archivo">
|
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
|
<mat-icon>description</mat-icon>
|
|
|
@@ -176,7 +82,6 @@ Para la carga de archivos tipo zip
|
|
|
</td>
|
|
|
</ng-container>
|
|
|
|
|
|
-
|
|
|
<ng-container matColumnDef="tamano_del_archivo">
|
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
|
<mat-icon>storage</mat-icon>
|
|
|
@@ -184,15 +89,12 @@ Para la carga de archivos tipo zip
|
|
|
</th>
|
|
|
<td mat-cell *matCellDef="let element">
|
|
|
{{ element.tamano_del_archivo }}
|
|
|
- <span *ngIf="element.tipo_archivo === 'zip' && zipInfo" style="color: #666; font-size: 12px;">
|
|
|
- <br>({{ zipInfo }})
|
|
|
- </span>
|
|
|
</td>
|
|
|
</ng-container>
|
|
|
|
|
|
<ng-container matColumnDef="tipo_archivo">
|
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
|
- <mat-icon>storage</mat-icon>
|
|
|
+ <mat-icon>category</mat-icon>
|
|
|
Tipo de archivo
|
|
|
</th>
|
|
|
<td mat-cell *matCellDef="let element">
|
|
|
@@ -205,32 +107,29 @@ Para la carga de archivos tipo zip
|
|
|
</td>
|
|
|
</ng-container>
|
|
|
|
|
|
-
|
|
|
<ng-container matColumnDef="acciones">
|
|
|
<th mat-header-cell *matHeaderCellDef>Acciones</th>
|
|
|
<td mat-cell *matCellDef="let element">
|
|
|
<div class="action-buttons">
|
|
|
-
|
|
|
<button
|
|
|
- mat-icon-button
|
|
|
- color="primary"
|
|
|
- style="border-radius: 10px; margin-right: 5px;"
|
|
|
- class="pink_primary_background white_font"
|
|
|
- [matTooltip]="element.tipo_archivo === 'excel' ? 'Previsualizar Excel' : 'Previsualizar ZIP'"
|
|
|
- (click)="element.tipo_archivo === 'excel' ? previewExcelFile() : previewZipFile()"
|
|
|
- [disabled]="isLoading || isUploading">
|
|
|
+ mat-icon-button
|
|
|
+ color="primary"
|
|
|
+ style="border-radius: 10px; margin-right: 5px;"
|
|
|
+ class="pink_primary_background white_font"
|
|
|
+ [matTooltip]="element.tipo_archivo === 'excel' ? 'Previsualizar Excel' : 'Previsualizar ZIP'"
|
|
|
+ (click)="element.tipo_archivo === 'excel' ? previewExcelFile() : previewZipFile()"
|
|
|
+ [disabled]="isLoading || isUploading">
|
|
|
<mat-icon>visibility</mat-icon>
|
|
|
</button>
|
|
|
|
|
|
-
|
|
|
<button
|
|
|
- mat-icon-button
|
|
|
- color="warn"
|
|
|
- style="border-radius: 10px;"
|
|
|
- class="red_primary_background white_font"
|
|
|
- [matTooltip]="element.tipo_archivo === 'excel' ? 'Eliminar archivo Excel' : 'Eliminar archivo ZIP'"
|
|
|
- (click)="element.tipo_archivo === 'excel' ? removeExcelFile() : removeZipFile()"
|
|
|
- [disabled]="isLoading || isUploading">
|
|
|
+ mat-icon-button
|
|
|
+ color="warn"
|
|
|
+ style="border-radius: 10px;"
|
|
|
+ class="red_primary_background white_font"
|
|
|
+ [matTooltip]="element.tipo_archivo === 'excel' ? 'Eliminar archivo Excel' : 'Eliminar archivo ZIP'"
|
|
|
+ (click)="element.tipo_archivo === 'excel' ? removeExcelFile() : removeZipFile()"
|
|
|
+ [disabled]="isLoading || isUploading">
|
|
|
<mat-icon>delete</mat-icon>
|
|
|
</button>
|
|
|
</div>
|
|
|
@@ -238,136 +137,135 @@ Para la carga de archivos tipo zip
|
|
|
</ng-container>
|
|
|
|
|
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
|
- <tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
|
|
+ <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
|
|
|
- <!--Para la previsualización de los documentos procesados-->
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <div *ngIf="!hasExcelFile && !isLoading && !isUploading && !hasZipFile" class="no-files-message" style="height: 120px; text-align: center; padding: 20px;">
|
|
|
- <mat-icon style=" color: #9e9e9e; margin-bottom: 10px;">upload_file</mat-icon>
|
|
|
+ <div *ngIf="!hasAnyFile && !isLoading && !isUploading" class="no-files-message" style="height: 120px; text-align: center; padding: 20px;">
|
|
|
+ <mat-icon style="color: #9e9e9e; margin-bottom: 10px;">upload_file</mat-icon>
|
|
|
<p style="color: #666; font-size: 14px; margin-bottom: 5px;">
|
|
|
<strong>No hay archivos cargados</strong>
|
|
|
</p>
|
|
|
<p style="color: #999; font-size: 12px;">
|
|
|
- Use el área de arriba para cargar su archivo Excel (.xlsx o .xls) o ZIP
|
|
|
+ Use el área de arriba para cargar su archivo Excel (.xlsx o .xls) y ZIP
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+
|
|
|
+<div *ngIf="hasValidationResults" class="validation-results" style="margin-top: 20px; padding: 15px; border-radius: 8px;"
|
|
|
+ [ngClass]="validationClass">
|
|
|
+
|
|
|
+ <div style="display: flex; align-items: center; margin-bottom: 10px;">
|
|
|
+ <mat-icon [style.color]="validationResult?.valid ? '#4caf50' : '#f44336'" style="margin-right: 10px; font-size: 24px;">
|
|
|
+ {{ validationResult?.valid ? 'check_circle' : 'error' }}
|
|
|
+ </mat-icon>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <p style="margin: 5px 0; color: #666;">
|
|
|
+ {{ validationSummary }}
|
|
|
+ </p>
|
|
|
+
|
|
|
+ <div *ngIf="!validationResult?.valid" style="margin-top: 10px;">
|
|
|
+ <button mat-button color="primary" (click)="showValidationDetails()" style="font-size: 12px;">
|
|
|
+ <mat-icon style="font-size: 16px; height: 16px; width: 16px;">info</mat-icon>
|
|
|
+ Ver detalles completos
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div *ngIf="validationResult?.valid && !showProcessedResults" style="margin-top: 10px; padding: 10px; background: rgba(76, 175, 80, 0.1); border-radius: 4px;">
|
|
|
+ <p style="margin: 0; color: #2e7d32; font-weight: 500;">
|
|
|
+ <mat-icon style="vertical-align: middle; margin-right: 5px; color: #4caf50;">info</mat-icon>
|
|
|
+ Los archivos están listos para ser procesados y guardados permanentemente.
|
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
-<!-- Sección de acciones del diálogo -->
|
|
|
-<mat-dialog-actions align="end" style="padding: 16px;">
|
|
|
+<!-- Sección de documentos procesados -->
|
|
|
+<div *ngIf="showProcessedResults" class="processed-results" style="margin-top: 20px; padding: 15px; background: rgba(76, 175, 80, 0.1); border-radius: 8px; border-left: 4px solid #4caf50;">
|
|
|
+ <div style="display: flex; align-items: center; margin-bottom: 10px;">
|
|
|
+ <mat-icon style="margin-right: 10px; color: #4caf50; font-size: 24px;">task_alt</mat-icon>
|
|
|
+ <h4 style="margin: 0; color: #2e7d32;">Procesamiento Completado</h4>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <p style="margin: 5px 0; color: #2e7d32;">
|
|
|
+ <strong>{{ processedDocumentsCount }}</strong> documentos han sido procesados y guardados exitosamente.
|
|
|
+ </p>
|
|
|
+
|
|
|
+ <div style="margin-top: 10px;">
|
|
|
+ <button mat-button color="primary" (click)="showFinalSummary()" style="font-size: 12px;">
|
|
|
+ <mat-icon style="font-size: 16px; height: 16px; width: 16px;">summarize</mat-icon>
|
|
|
+ Ver resumen completo
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+<!-- Dialog actions -->
|
|
|
+<mat-dialog-actions align="end" style="padding: 16px; border-top: 1px solid #eee;">
|
|
|
<button
|
|
|
- mat-button
|
|
|
+ mat-button
|
|
|
(click)="cancelar()"
|
|
|
style="margin-right: 8px;"
|
|
|
- [disabled]="isLoading || isUploading || isValidating">
|
|
|
+ [disabled]="isLoading || isUploading || isValidating || isProcessing">
|
|
|
<mat-icon>close</mat-icon>
|
|
|
Cancelar
|
|
|
</button>
|
|
|
|
|
|
- <!-- Botón para mostrar resumen antes de validar -->
|
|
|
<button
|
|
|
- mat-button
|
|
|
- color="accent"
|
|
|
- *ngIf="canValidate && !validationResult"
|
|
|
- (click)="showValidationSummary()"
|
|
|
- [disabled]="isLoading || isUploading || isValidating"
|
|
|
- style="margin-right: 8px;">
|
|
|
- <mat-icon>info</mat-icon>
|
|
|
- Ver Resumen
|
|
|
+ mat-button
|
|
|
+ color="primary"
|
|
|
+ (click)="clearAllData()"
|
|
|
+ style="margin-right: 8px;"
|
|
|
+ [disabled]="!hasAnyFile || isLoading || isUploading || isValidating || isProcessing">
|
|
|
+ <mat-icon>delete_sweep</mat-icon>
|
|
|
+ Limpiar todo
|
|
|
</button>
|
|
|
-
|
|
|
- <!-- Botón principal de validación y procesamiento -->
|
|
|
+
|
|
|
+ <!-- Botón para reiniciar validación (solo si ya hay resultados) -->
|
|
|
<button
|
|
|
- mat-raised-button
|
|
|
- color="primary"
|
|
|
- class="blue_send_background white_font"
|
|
|
- *ngIf="canValidate"
|
|
|
- (click)="validateAndProcessDocuments()"
|
|
|
- [disabled]="isLoading || isUploading || isValidating">
|
|
|
- <mat-icon>{{ isValidating ? 'hourglass_empty' : 'verified' }}</mat-icon>
|
|
|
- {{ isValidating ? 'Validando...' : 'Validar y Procesar' }}
|
|
|
+ mat-button
|
|
|
+ color="warn"
|
|
|
+ (click)="resetValidation()"
|
|
|
+ style="margin-right: 8px;"
|
|
|
+ *ngIf="hasValidationResults"
|
|
|
+ [disabled]="isLoading || isUploading || isValidating || isProcessing">
|
|
|
+ <mat-icon>refresh</mat-icon>
|
|
|
+ Nueva validación
|
|
|
</button>
|
|
|
|
|
|
- <!-- Botón para cuando solo hay archivos pero no se puede validar -->
|
|
|
+ <!-- Botón de validar (solo si no hay resultados de validación) -->
|
|
|
<button
|
|
|
- mat-raised-button
|
|
|
- color="warn"
|
|
|
- *ngIf="hasAnyFile && !canValidate"
|
|
|
- [disabled]="true"
|
|
|
- matTooltip="{{ requirementsMessage }}">
|
|
|
- <mat-icon>warning</mat-icon>
|
|
|
- {{ requirementsMessage }}
|
|
|
+ mat-raised-button
|
|
|
+ color="primary"
|
|
|
+ class="blue_send_background white_font"
|
|
|
+ (click)="validateAndProcessDocuments()"
|
|
|
+ style="margin-right: 8px;"
|
|
|
+ *ngIf="!hasValidationResults"
|
|
|
+ [disabled]="!canValidate || isLoading || isUploading">
|
|
|
+ <mat-icon>{{ isValidating ? 'hourglass_empty' : 'verified' }}</mat-icon>
|
|
|
+ {{ isValidating ? 'Validando...' : 'Validar archivos' }}
|
|
|
</button>
|
|
|
-</mat-dialog-actions>
|
|
|
-
|
|
|
-<!-- Sección de estado de validación (opcional, para mostrar progreso) -->
|
|
|
-<div *ngIf="isValidating" class="validation-progress" style="padding: 16px; text-align: center;">
|
|
|
- <mat-progress-bar mode="indeterminate"></mat-progress-bar>
|
|
|
- <p style="margin-top: 8px; color: #666;">{{ currentStep }}</p>
|
|
|
-</div>
|
|
|
|
|
|
-<!-- Sección de resultados de validación -->
|
|
|
-<div *ngIf="validationResult" class="validation-results" style="padding: 16px;">
|
|
|
- <mat-card [ngClass]="validationClass">
|
|
|
- <mat-card-header>
|
|
|
- <mat-icon mat-card-avatar [style.color]="validationResult.isValid ? '#4caf50' : '#f44336'">
|
|
|
- {{ validationResult.isValid ? 'check_circle' : 'error' }}
|
|
|
- </mat-icon>
|
|
|
- <mat-card-title>
|
|
|
- {{ validationResult.isValid ? 'Validación Exitosa' : 'Validación con Observaciones' }}
|
|
|
- </mat-card-title>
|
|
|
- <mat-card-subtitle>{{ validationSummary }}</mat-card-subtitle>
|
|
|
- </mat-card-header>
|
|
|
-
|
|
|
- <mat-card-content>
|
|
|
- <!-- Documentos faltantes -->
|
|
|
- <div *ngIf="validationResult.missingFiles.length > 0" style="margin-bottom: 16px;">
|
|
|
- <h4 style="color: #f44336; margin-bottom: 8px;">
|
|
|
- <mat-icon style="vertical-align: middle; margin-right: 4px;">warning</mat-icon>
|
|
|
- Documentos Faltantes ({{ validationResult.missingFiles.length }})
|
|
|
- </h4>
|
|
|
- <mat-chip-listbox>
|
|
|
- <mat-chip *ngFor="let missing of validationResult.missingFiles"
|
|
|
- style="margin: 2px; background-color: #ffebee; color: #c62828;">
|
|
|
- {{ missing }}
|
|
|
- </mat-chip>
|
|
|
- </mat-chip-listbox>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- Archivos extra -->
|
|
|
- <div *ngIf="validationResult.extraFiles.length > 0" style="margin-bottom: 16px;">
|
|
|
- <h4 style="color: #ff9800; margin-bottom: 8px;">
|
|
|
- <mat-icon style="vertical-align: middle; margin-right: 4px;">info</mat-icon>
|
|
|
- Archivos Extra ({{ validationResult.extraFiles.length }})
|
|
|
- </h4>
|
|
|
- <mat-chip-listbox>
|
|
|
- <mat-chip *ngFor="let extra of validationResult.extraFiles"
|
|
|
- style="margin: 2px; background-color: #fff3e0; color: #ef6c00;">
|
|
|
- {{ extra }}
|
|
|
- </mat-chip>
|
|
|
- </mat-chip-listbox>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- Estadísticas -->
|
|
|
- <div class="validation-stats" style="display: flex; justify-content: space-between; margin-top: 16px;">
|
|
|
- <div style="text-align: center;">
|
|
|
- <strong style="color: #4caf50;">{{ validationResult.validationDetails.matchedCount }}</strong>
|
|
|
- <br><small>Encontrados</small>
|
|
|
- </div>
|
|
|
- <div style="text-align: center;">
|
|
|
- <strong style="color: #f44336;">{{ validationResult.missingFiles.length }}</strong>
|
|
|
- <br><small>Faltantes</small>
|
|
|
- </div>
|
|
|
- <div style="text-align: center;">
|
|
|
- <strong style="color: #ff9800;">{{ validationResult.extraFiles.length }}</strong>
|
|
|
- <br><small>Extra</small>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </mat-card-content>
|
|
|
- </mat-card>
|
|
|
-</div>
|
|
|
+ <!-- Botón de procesar (solo si la validación fue exitosa y no se han procesado) -->
|
|
|
+ <button
|
|
|
+ mat-raised-button
|
|
|
+ color="accent"
|
|
|
+ class="green_send_background white_font"
|
|
|
+ (click)="processDocuments()"
|
|
|
+ *ngIf="showProcessButton"
|
|
|
+ [disabled]="!canProcessDocuments || isLoading || isUploading">
|
|
|
+ <mat-icon>{{ isProcessing ? 'hourglass_empty' : 'save' }}</mat-icon>
|
|
|
+ {{ isProcessing ? 'Procesando...' : 'Procesar documentos' }}
|
|
|
+ </button>
|
|
|
|
|
|
+ <!-- Botón de cerrar (solo si ya se procesaron los documentos) -->
|
|
|
+ <button
|
|
|
+ mat-raised-button
|
|
|
+ color="primary"
|
|
|
+ class="blue_send_background white_font"
|
|
|
+ (click)="dialogRef.close({ success: true, processedCount: processedDocumentsCount })"
|
|
|
+ *ngIf="showProcessedResults"
|
|
|
+ [disabled]="isLoading || isUploading || isValidating || isProcessing">
|
|
|
+ <mat-icon>check_circle</mat-icon>
|
|
|
+ Finalizar ({{ processedDocumentsCount }} procesados)
|
|
|
+ </button>
|
|
|
+</mat-dialog-actions>
|