Forráskód Böngészése

etiquetas de internacionalizacion actualizadas para workflow y task management y subsecuentes, en workflow aun faltan en ciertos apartados que aun no han sido tocados

EmilianoOrtiz 1 hónapja
szülő
commit
dc5065107c
15 módosított fájl, 261 hozzáadás és 131 törlés
  1. 24 24
      src/app/components/process-management/task-management/form-task/form-task.component.html
  2. 2 2
      src/app/components/process-management/task-management/form-task/form-task.component.ts
  3. 22 22
      src/app/components/process-management/task-management/task-details/task-details.component.html
  4. 7 5
      src/app/components/process-management/task-management/task-details/task-details.component.ts
  5. 1 1
      src/app/components/process-management/task-management/task-management.component.html
  6. 3 3
      src/app/components/process-management/task-management/task-management.component.ts
  7. 7 7
      src/app/components/process-management/workflow-management/change-status-workflow/change-status-workflow.component.html
  8. 3 1
      src/app/components/process-management/workflow-management/change-status-workflow/change-status-workflow.component.ts
  9. 3 3
      src/app/components/process-management/workflow-management/form-workflow/form-workflow.component.html
  10. 1 1
      src/app/components/process-management/workflow-management/form-workflow/form-workflow.component.ts
  11. 12 12
      src/app/components/process-management/workflow-management/workflow-details/workflow-details.component.html
  12. 6 4
      src/app/components/process-management/workflow-management/workflow-details/workflow-details.component.ts
  13. 12 12
      src/app/components/process-management/workflow-management/workflow-management.component.html
  14. 3 3
      src/app/components/process-management/workflow-management/workflow-management.component.ts
  15. 155 31
      src/app/services/internationalization/internationalization.service.ts

+ 24 - 24
src/app/components/process-management/task-management/form-task/form-task.component.html

@@ -8,40 +8,40 @@
   <form class="override_content_flex" [formGroup]="formGroup">
     <div class="col-flex-12">
       <mat-form-field appearance="outline" class="w-100">
-        <mat-label>Nombre de la Tarea</mat-label>
+        <mat-label>{{ interService.get('nombre_de_la_tarea') }}</mat-label>
         <input
           matInput
           type="text"
           formControlName="NOMBRE_TAREA"
-          placeholder="Ingrese el nombre de la tarea"
+          [placeholder]="interService.get('ingrese_nombre_tarea')"
           maxlength="50"
         />
         <mat-icon matSuffix>task_alt</mat-icon>
         @if (formGroup.controls['NOMBRE_TAREA'].hasError('required')) {
-        <mat-error> El campo <b>Nombre de la Tarea</b> es requerido </mat-error>
+        <mat-error> {{ interService.get('el_campo') }} <b>{{ interService.get('nombre_de_la_tarea') }}</b> {{ interService.get('es_requerido') }} </mat-error>
         }
       </mat-form-field>
     </div>
 
     <div class="col-flex-12">
       <mat-form-field appearance="outline" class="w-100">
-        <mat-label>Descripción</mat-label>
+        <mat-label>{{ interService.get('descripcion') }}</mat-label>
         <textarea
           matInput
           formControlName="DESCRIPCION"
           maxlength="500"
-          placeholder="Ingrese la descripción de la tarea"
+          [placeholder]="interService.get('ingrese_descripcion_tarea')"
         ></textarea>
         <mat-icon matSuffix>subject</mat-icon>
         @if (formGroup.controls['DESCRIPCION'].hasError('required')) {
-        <mat-error> El campo <b>Descripción</b> es requerido </mat-error>
+        <mat-error> {{ interService.get('el_campo') }} <b>{{ interService.get('descripcion') }}</b> {{ interService.get('es_requerido') }} </mat-error>
         }
       </mat-form-field>
     </div>
 
     <div class="col-flex-12">
       <mat-form-field appearance="outline" class="w-100">
-        <mat-label>Secuencia</mat-label>
+        <mat-label>{{ interService.get('secuencia') }}</mat-label>
         <input matInput type="number" formControlName="SECUENCIA" readonly />
         <mat-icon matSuffix>format_list_numbered</mat-icon>
       </mat-form-field>
@@ -49,14 +49,14 @@
 
     <div class="col-flex-12">
       <mat-checkbox formControlName="REQUIERE_VALIDACION">
-        Requiere Validación
+        {{ interService.get('requiere_validacion') }}
       </mat-checkbox>
     </div>
 
     @if (formGroup.controls['REQUIERE_VALIDACION'].value) {
     <div class="col-flex-12">
       <mat-form-field appearance="outline" class="w-100">
-        <mat-label>Usuario Validador</mat-label>
+        <mat-label>{{ interService.get('usuario_validador') }}</mat-label>
         <mat-select formControlName="USUARIO_VALIDADOR">
           @for (user of arrUsers; track user) {
           <mat-option [value]="user"
@@ -73,7 +73,7 @@
 
     <div class="col-flex-12">
       <mat-form-field appearance="outline" class="w-100">
-        <mat-label>Usuarios a Notificar</mat-label>
+        <mat-label>{{ interService.get('usuarios_notificar') }}</mat-label>
         <mat-select formControlName="USUARIOS_NOTIFICAR" multiple>
           @for (user of arrUsers; track user) {
           <mat-option [value]="user"
@@ -90,15 +90,15 @@
     @if (formGroup.controls['REQUIERE_VALIDACION'].value) {
     <div class="col-flex-12">
       <mat-form-field appearance="outline" class="w-100">
-        <mat-label>Regla de Validación</mat-label>
+        <mat-label>{{ interService.get('regla_validacion') }}</mat-label>
         <mat-select formControlName="REGLA_VALIDACION">
-          <mat-option value="Esperar">Esperar</mat-option>
-          <mat-option value="Ejecutar">Ejecutar</mat-option>
+          <mat-option value="Esperar">{{ interService.get('esperar') }}</mat-option>
+          <mat-option value="Ejecutar">{{ interService.get('ejecutar') }}</mat-option>
         </mat-select>
         <mat-icon matSuffix>gavel</mat-icon>
         @if (formGroup.controls['REGLA_VALIDACION'].hasError('required')) {
         <mat-error>
-          El campo <b>Regla de Validación</b> es requerido
+          {{ interService.get('el_campo') }} <b>{{ interService.get('regla_validacion') }}</b> {{ interService.get('es_requerido') }}
         </mat-error>
         }
       </mat-form-field>
@@ -107,7 +107,7 @@
     @if (formGroup.controls['REGLA_VALIDACION'].value === 'Ejecutar') {
     <div class="col-flex-12">
       <mat-form-field appearance="outline" class="w-100">
-        <mat-label>Workflow a Ejecutar</mat-label>
+        <mat-label>{{ interService.get('workflow_ejecutar') }}</mat-label>
         <mat-select formControlName="ID_WORKFLOW_EJECUTAR">
           @for (workflow of arrActiveWorkflows; track workflow) {
           <mat-option [value]="workflow.ID_WORKFLOW">{{ workflow.NOMBRE_WORKFLOW }}</mat-option>
@@ -121,12 +121,12 @@
 
     <mat-divider class="mt-20 mb-10"></mat-divider>
     <div class="col-flex-12 mb-10">
-      <h4 class="m-0">Función relacionada que ejecuta la tarea</h4>
+      <h4 class="m-0">{{ interService.get('funcion_relacionada_tarea') }}</h4>
     </div>
 
     <div class="col-flex-12">
       <mat-form-field appearance="outline" class="w-100">
-        <mat-label>Módulo</mat-label>
+        <mat-label>{{ interService.get('modulo') }}</mat-label>
         <mat-select formControlName="ID_MODULO">
           @for (module of arrModules; track module) {
           <mat-option [value]="module.ID_MODULO">{{
@@ -136,14 +136,14 @@
         </mat-select>
         <mat-icon matSuffix>folder</mat-icon>
         @if (formGroup.controls['ID_MODULO'].hasError('required')) {
-        <mat-error> El campo <b>Módulo</b> es requerido </mat-error>
+        <mat-error> {{ interService.get('el_campo') }} <b>{{ interService.get('modulo') }}</b> {{ interService.get('es_requerido') }} </mat-error>
         }
       </mat-form-field>
     </div>
 
     <div class="col-flex-12">
       <mat-form-field appearance="outline" class="w-100">
-        <mat-label>Submódulo</mat-label>
+        <mat-label>{{ interService.get('submodulo') }}</mat-label>
         <mat-select formControlName="ID_SUBMODULO">
           @for (submodule of arrSubmodules; track submodule) {
           <mat-option [value]="submodule.IDSUBMODULO">{{
@@ -153,14 +153,14 @@
         </mat-select>
         <mat-icon matSuffix>folder_open</mat-icon>
         @if (formGroup.controls['ID_SUBMODULO'].hasError('required')) {
-        <mat-error> El campo <b>Submódulo</b> es requerido </mat-error>
+        <mat-error> {{ interService.get('el_campo') }} <b>{{ interService.get('submodulo') }}</b> {{ interService.get('es_requerido') }} </mat-error>
         }
       </mat-form-field>
     </div>
 
     <div class="col-flex-12">
       <mat-form-field appearance="outline" class="w-100">
-        <mat-label>Función</mat-label>
+        <mat-label>{{ interService.get('funcion') }}</mat-label>
         <mat-select formControlName="ID_FUNCION">
           @for (func of arrFunctions; track func) {
           <mat-option [value]="func.IDFUNCION">{{
@@ -170,7 +170,7 @@
         </mat-select>
         <mat-icon matSuffix>functions</mat-icon>
         @if (formGroup.controls['ID_FUNCION'].hasError('required')) {
-        <mat-error> El campo <b>Función</b> es requerido </mat-error>
+        <mat-error> {{ interService.get('el_campo') }} <b>{{ interService.get('funcion') }}</b> {{ interService.get('es_requerido') }} </mat-error>
         }
       </mat-form-field>
     </div>
@@ -178,12 +178,12 @@
   }
 </mat-dialog-content>
 <mat-dialog-actions align="end">
-  <button mat-button [mat-dialog-close]="false">Cerrar</button>
+  <button mat-button [mat-dialog-close]="false">{{ interService.get('cerrar') }}</button>
   <button
     mat-button
     [disabled]="formGroup.invalid || isLoading"
     (click)="save()"
   >
-    Guardar
+    {{ interService.get('guardar') }}
   </button>
 </mat-dialog-actions>

+ 2 - 2
src/app/components/process-management/task-management/form-task/form-task.component.ts

@@ -417,7 +417,7 @@ export class FormTaskComponent implements OnInit {
     ).then(
       (responseData: ResponseData) => {
         if (!responseData.error) {
-          this.resourcesService.openSnackBar(`¡Registro exitoso!`);
+          this.resourcesService.openSnackBar(this.interService.get('registro_exitoso_tarea'));
           this._dialogRef.close(true);
         } else {
           this.resourcesService.openSnackBar(`${responseData.msg}`);
@@ -487,7 +487,7 @@ export class FormTaskComponent implements OnInit {
     ).then(
       (responseData: ResponseData) => {
         if (!responseData.error) {
-          this.resourcesService.openSnackBar(`¡Modificación exitosa!`);
+          this.resourcesService.openSnackBar(this.interService.get('modificacion_exitosa_tarea'));
           this._dialogRef.close(true);
         } else {
           this.resourcesService.openSnackBar(`${responseData.msg}`);

+ 22 - 22
src/app/components/process-management/task-management/task-details/task-details.component.html

@@ -1,6 +1,6 @@
 <div class="dialog-container">
   <div class="dialog-header">
-    <h2>Detalles de la Tarea</h2>
+    <h2>{{ interService.get('detalles_tarea') }}</h2>
     <button mat-icon-button (click)="close()">
       <mat-icon>close</mat-icon>
     </button>
@@ -9,68 +9,68 @@
   @if (isLoading) {
   <div class="loading-container">
     <mat-progress-spinner diameter="50"></mat-progress-spinner>
-    <p>Cargando información...</p>
+    <p>{{ interService.get('cargando_informacion') }}</p>
   </div>
   } @else if (task) {
   <div class="dialog-content">
     <div class="detail-row">
-      <strong>ID:</strong>
+      <strong>{{ interService.get('id') }}:</strong>
       <span>{{ task.ID_TAREA }}</span>
     </div>
     <div class="detail-row">
-      <strong>Nombre:</strong>
+      <strong>{{ interService.get('nombre') }}:</strong>
       <span>{{ task.NOMBRE_TAREA }}</span>
     </div>
     <div class="detail-row">
-      <strong>Descripción:</strong>
+      <strong>{{ interService.get('descripcion') }}:</strong>
       <span>{{ task.DESCRIPCION }}</span>
     </div>
     <div class="detail-row">
-      <strong>Secuencia:</strong>
+      <strong>{{ interService.get('secuencia') }}:</strong>
       <span>{{ task.SECUENCIA }}</span>
     </div>
     <div class="detail-row">
-      <strong>Requiere Validación:</strong>
+      <strong>{{ interService.get('requiere_validacion') }}:</strong>
       <span>
         <mat-icon
           [style.color]="task.REQUIERE_VALIDACION === 1 ? '#4CAF50' : '#757575'"
         >
           {{ task.REQUIERE_VALIDACION === 1 ? "check_circle" : "cancel" }}
         </mat-icon>
-        {{ task.REQUIERE_VALIDACION === 1 ? "Sí" : "No" }}
+        {{ task.REQUIERE_VALIDACION === 1 ? interService.get('si') : interService.get('no') }}
       </span>
     </div>
     <div class="detail-row">
-      <strong>Usuario Validador:</strong>
-      <span>{{ task.USUARIO_VALIDADOR || "N/A" }}</span>
+      <strong>{{ interService.get('usuario_validador') }}:</strong>
+      <span>{{ task.USUARIO_VALIDADOR || interService.get('na') }}</span>
     </div>
     <div class="detail-row">
-      <strong>Regla de Validación:</strong>
-      <span>{{ task.REGLAS_VALIDACION || "N/A" }}</span>
+      <strong>{{ interService.get('regla_validacion') }}:</strong>
+      <span>{{ task.REGLAS_VALIDACION || interService.get('na') }}</span>
     </div>
     <div class="detail-row">
-      <strong>Módulo:</strong>
-      <span>{{ task.ID_MODULO || "N/A" }}</span>
+      <strong>{{ interService.get('modulo') }}:</strong>
+      <span>{{ task.ID_MODULO || interService.get('na') }}</span>
     </div>
     <div class="detail-row">
-      <strong>Función:</strong>
-      <span>{{ task.ID_FUNCION || "N/A" }}</span>
+      <strong>{{ interService.get('funcion') }}:</strong>
+      <span>{{ task.ID_FUNCION || interService.get('na') }}</span>
     </div>
     <div class="detail-row">
-      <strong>Estado:</strong>
+      <strong>{{ interService.get('estado') }}:</strong>
       <span>{{ task.ESTADO }}</span>
     </div>
     <div class="detail-row">
-      <strong>Usuario Registro:</strong>
-      <span>{{ task.USUARIO_REGISTRO || "N/A" }}</span>
+      <strong>{{ interService.get('usuario_registro') }}:</strong>
+      <span>{{ task.USUARIO_REGISTRO || interService.get('na') }}</span>
     </div>
     <div class="detail-row">
-      <strong>Fecha Registro:</strong>
+      <strong>{{ interService.get('fecha_registro') }}:</strong>
       <span>{{ formatDate(task.FECHA_REGISTRO) }}</span>
     </div>
     @if (task.FECHA_MODIFICA) {
     <div class="detail-row">
-      <strong>Fecha Modifica:</strong>
+      <strong>{{ interService.get('fecha_modifica') }}:</strong>
       <span>{{ formatDate(task.FECHA_MODIFICA) }}</span>
     </div>
     }
@@ -78,6 +78,6 @@
   }
 
   <div class="dialog-actions">
-    <button mat-button (click)="close()">Cerrar</button>
+    <button mat-button (click)="close()">{{ interService.get('cerrar') }}</button>
   </div>
 </div>

+ 7 - 5
src/app/components/process-management/task-management/task-details/task-details.component.ts

@@ -2,6 +2,7 @@ import { Component, Inject, OnInit } from '@angular/core';
 import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
 import { ProcessManagementService } from '../../../../services/process-management/process-management.service';
 import { ResourcesService } from '../../../../services/resources.service';
+import { InternationalizationService } from '../../../../services/internationalization/internationalization.service';
 import {
   Task,
   ResponseDataTask,
@@ -23,7 +24,8 @@ export class TaskDetailsComponent implements OnInit {
     public dialogRef: MatDialogRef<TaskDetailsComponent>,
     @Inject(MAT_DIALOG_DATA) public data: { idTask: number },
     private _processManagementService: ProcessManagementService,
-    private _resourcesService: ResourcesService
+    private _resourcesService: ResourcesService,
+    public interService: InternationalizationService
   ) {}
 
   async ngOnInit() {
@@ -63,7 +65,7 @@ export class TaskDetailsComponent implements OnInit {
   }
 
   public formatDate(dateString: string): string {
-    if (!dateString) return 'N/A';
+    if (!dateString) return this.interService.get('na');
     
     const date = new Date(dateString);
     const now = new Date();
@@ -71,9 +73,9 @@ export class TaskDetailsComponent implements OnInit {
     const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
 
     if (diffDays <= 7) {
-      if (diffDays === 0) return 'Hoy';
-      if (diffDays === 1) return 'Hace 1 día';
-      return `Hace ${diffDays} días`;
+      if (diffDays === 0) return this.interService.get('hoy');
+      if (diffDays === 1) return this.interService.get('hace_1_dia');
+      return this.interService.get('hace_dias').replace('{0}', diffDays.toString());
     } else {
       return date.toLocaleDateString('es-ES');
     }

+ 1 - 1
src/app/components/process-management/task-management/task-management.component.html

@@ -174,7 +174,7 @@
           <tr class="mat-row" *matNoDataRow>
             <td class="mat-cell p-20 align-center" colspan="8">
               <object data="assets/img/empty_data.svg" width="150"></object>
-              <h2>Sin datos</h2>
+              <h2>{{ interService.get("sin_datos") }}</h2>
             </td>
           </tr>
         </table>

+ 3 - 3
src/app/components/process-management/task-management/task-management.component.ts

@@ -152,8 +152,8 @@ export class TaskManagementComponent implements OnInit, AfterViewInit {
       .open(AlertComponent, {
         disableClose: true,
         data: {
-          title: `Confirmar`,
-          description: `¿Está seguro de eliminar la tarea?`,
+          title: this.interService.get('confirmar'),
+          description: this.interService.get('esta_seguro_eliminar_tarea'),
           icon: `warning`,
         },
       })
@@ -175,7 +175,7 @@ export class TaskManagementComponent implements OnInit, AfterViewInit {
     ).then(
       async (responseData: ResponseData) => {
         if (!responseData.error) {
-          this.resourcesService.openSnackBar(`¡Eliminación Exitosa!`);
+          this.resourcesService.openSnackBar(this.interService.get('eliminacion_exitosa'));
           await this.getTasks();
         } else {
           this.resourcesService.openSnackBar(`${responseData.msg}`);

+ 7 - 7
src/app/components/process-management/workflow-management/change-status-workflow/change-status-workflow.component.html

@@ -1,25 +1,25 @@
-<h2 mat-dialog-title>Cambiar Estado</h2>
+<h2 mat-dialog-title>{{ interService.get('cambiar_estado') }}</h2>
 <mat-dialog-content>
-  <p>¿Está seguro de cambiar el estado a <strong>{{ newStatus }}</strong>?</p>
+  <p [innerHTML]="interService.get('esta_seguro_cambiar_estado').replace('{0}', '<strong>' + newStatus + '</strong>')"></p>
   
   <form [formGroup]="formGroup">
     <mat-form-field appearance="outline" class="w-100">
-      <mat-label>Comentario del cambio</mat-label>
+      <mat-label>{{ interService.get('comentario_cambio') }}</mat-label>
       <textarea 
         matInput 
         formControlName="COMENTARIO_CAMBIO" 
         maxlength="500" 
-        placeholder="Explique el motivo del cambio de estado...">
+        [placeholder]="interService.get('explique_motivo_cambio_estado')">
       </textarea>
       @if (formGroup.controls['COMENTARIO_CAMBIO'].hasError('required')) {
         <mat-error>
-          El campo <b>Comentario del cambio</b> es requerido
+          {{ interService.get('el_campo') }} <b>{{ interService.get('comentario_cambio') }}</b> {{ interService.get('es_requerido') }}
         </mat-error>
       }
     </mat-form-field>
   </form>
 </mat-dialog-content>
 <mat-dialog-actions align="end">
-  <button mat-button (click)="close()">Cancelar</button>
-  <button mat-button [disabled]="formGroup.invalid" (click)="save()">Confirmar</button>
+  <button mat-button (click)="close()">{{ interService.get('cancelar') }}</button>
+  <button mat-button [disabled]="formGroup.invalid" (click)="save()">{{ interService.get('confirmar') }}</button>
 </mat-dialog-actions>

+ 3 - 1
src/app/components/process-management/workflow-management/change-status-workflow/change-status-workflow.component.ts

@@ -1,6 +1,7 @@
 import { Component, Inject } from '@angular/core';
 import { FormControl, FormGroup, Validators } from '@angular/forms';
 import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
+import { InternationalizationService } from '../../../../services/internationalization/internationalization.service';
 
 @Component({
   selector: 'app-change-status-workflow',
@@ -14,7 +15,8 @@ export class ChangeStatusWorkflowComponent {
 
   constructor(
     public dialogRef: MatDialogRef<ChangeStatusWorkflowComponent>,
-    @Inject(MAT_DIALOG_DATA) public data: { currentStatus: string }
+    @Inject(MAT_DIALOG_DATA) public data: { currentStatus: string },
+    public interService: InternationalizationService
   ) {
     this.newStatus = data.currentStatus === 'Activo' ? 'Eliminado' : 'Activo';
     this.formGroup = new FormGroup({

+ 3 - 3
src/app/components/process-management/workflow-management/form-workflow/form-workflow.component.html

@@ -34,11 +34,11 @@
       @if (isEditMode) {
         <div class="col-flex-12">
           <mat-form-field appearance="outline" class="w-100">
-            <mat-label>Comentario del cambio</mat-label>
-            <textarea matInput formControlName="COMENTARIO_CAMBIO" maxlength="500" placeholder="Explique el motivo del cambio..."></textarea>
+            <mat-label>{{ interService.get('comentario_cambio') }}</mat-label>
+            <textarea matInput formControlName="COMENTARIO_CAMBIO" maxlength="500" [placeholder]="interService.get('explique_motivo_cambio')"></textarea>
             @if (formGroup.controls['COMENTARIO_CAMBIO'].hasError('required')) {
               <mat-error>
-                {{ interService.get('el_campo') }} <b>Comentario del cambio</b> {{ interService.get('es_requerido') }}
+                {{ interService.get('el_campo') }} <b>{{ interService.get('comentario_cambio') }}</b> {{ interService.get('es_requerido') }}
               </mat-error>
             }
           </mat-form-field>

+ 1 - 1
src/app/components/process-management/workflow-management/form-workflow/form-workflow.component.ts

@@ -100,7 +100,7 @@ export class FormWorkflowComponent implements OnInit {
           Object.keys(responseData.response).length === 0
         ) {
           this.resourcesService.openSnackBar(
-            `No se pudo encontrar información para editar.`
+            this.interService.get('no_pudo_encontrar_informacion')
           );
           this._dialogRef.close(false);
         } else {

+ 12 - 12
src/app/components/process-management/workflow-management/workflow-details/workflow-details.component.html

@@ -1,6 +1,6 @@
 <div class="dialog-container">
   <div class="dialog-header">
-    <h2>Detalles del Workflow</h2>
+    <h2>{{ interService.get('detalles_workflow') }}</h2>
     <button mat-icon-button (click)="close()">
       <mat-icon>close</mat-icon>
     </button>
@@ -8,59 +8,59 @@
 
   <div class="dialog-content">
     <div class="detail-row">
-      <strong>ID:</strong>
+      <strong>{{ interService.get('id') }}:</strong>
       <span>{{ workflowData.ID_WORKFLOW }}</span>
     </div>
 
     <div class="detail-row">
-      <strong>Nombre:</strong>
+      <strong>{{ interService.get('nombre') }}:</strong>
       <span>{{ workflowData.NOMBRE_WORKFLOW }}</span>
     </div>
 
     <div class="detail-row">
-      <strong>Descripción:</strong>
+      <strong>{{ interService.get('descripcion') }}:</strong>
       <span>{{ workflowData.DESCRIPCION }}</span>
     </div>
 
     <div class="detail-row">
-      <strong>Módulos:</strong>
+      <strong>{{ interService.get('modulos') }}:</strong>
       <span>{{ workflowData.MODULOS }}</span>
     </div>
 
     <div class="detail-row">
-      <strong>Predeterminado:</strong>
+      <strong>{{ interService.get('predeterminado') }}:</strong>
       <span>
         <mat-icon
           [style.color]="workflowData.PREDETERMINADO ? '#4CAF50' : '#757575'"
         >
           {{ workflowData.PREDETERMINADO ? "check_circle" : "cancel" }}
         </mat-icon>
-        {{ workflowData.PREDETERMINADO ? "Sí" : "No" }}
+        {{ workflowData.PREDETERMINADO ? interService.get('si') : interService.get('no') }}
       </span>
     </div>
 
     <div class="detail-row">
-      <strong>Versión:</strong>
+      <strong>{{ interService.get('version') }}:</strong>
       <span>{{ workflowData.VERSION }}</span>
     </div>
 
     <div class="detail-row">
-      <strong>Estado:</strong>
+      <strong>{{ interService.get('estado') }}:</strong>
       <span>{{ workflowData.ESTADO }}</span>
     </div>
 
     <div class="detail-row">
-      <strong>Usuario modifica:</strong>
+      <strong>{{ interService.get('usuario_modifica') }}:</strong>
       <span>{{ workflowData.USUARIO_MODIFICA }}</span>
     </div>
 
     <div class="detail-row">
-      <strong>Fecha modifica:</strong>
+      <strong>{{ interService.get('fecha_modifica') }}:</strong>
       <span>{{ formatDate(workflowData.FECHA_MODIFICA) }}</span>
     </div>
   </div>
 
   <div class="dialog-actions">
-    <button mat-button (click)="close()">Cerrar</button>
+    <button mat-button (click)="close()">{{ interService.get('cerrar') }}</button>
   </div>
 </div>

+ 6 - 4
src/app/components/process-management/workflow-management/workflow-details/workflow-details.component.ts

@@ -1,5 +1,6 @@
 import { Component, Inject } from '@angular/core';
 import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
+import { InternationalizationService } from '../../../../services/internationalization/internationalization.service';
 import { Workflow } from '../../../../interfaces/process-managementv/workflow-management.interface';
 
 @Component({
@@ -13,7 +14,8 @@ export class WorkflowDetailsComponent {
 
   constructor(
     public dialogRef: MatDialogRef<WorkflowDetailsComponent>,
-    @Inject(MAT_DIALOG_DATA) public data: { workflowData: Workflow }
+    @Inject(MAT_DIALOG_DATA) public data: { workflowData: Workflow },
+    public interService: InternationalizationService
   ) {
     this.workflowData = data.workflowData;
     console.log(this.workflowData);
@@ -39,9 +41,9 @@ export class WorkflowDetailsComponent {
     const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
 
     if (diffDays <= 7) {
-      if (diffDays === 0) return 'Hoy';
-      if (diffDays === 1) return 'Hace 1 día';
-      return `Hace ${diffDays} días`;
+      if (diffDays === 0) return this.interService.get('hoy');
+      if (diffDays === 1) return this.interService.get('hace_1_dia');
+      return this.interService.get('hace_dias').replace('{0}', diffDays.toString());
     } else {
       return `${year}-${month}-${day}`;
     }

+ 12 - 12
src/app/components/process-management/workflow-management/workflow-management.component.html

@@ -93,7 +93,7 @@
             </td>
           </ng-container>
           <ng-container matColumnDef="MODULOS">
-            <th mat-header-cell *matHeaderCellDef mat-sort-header>Módulos</th>
+            <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ interService.get('modulos') }}</th>
             <td mat-cell *matCellDef="let element">{{ element.MODULOS }}</td>
           </ng-container>
           <ng-container matColumnDef="PREDETERMINADO">
@@ -103,7 +103,7 @@
               mat-sort-header
               style="text-align: center"
             >
-              Predeterminado
+              {{ interService.get('predeterminado') }}
             </th>
             <td mat-cell *matCellDef="let element" style="text-align: center">
               <mat-icon
@@ -120,7 +120,7 @@
               mat-sort-header
               style="text-align: center"
             >
-              Versión
+              {{ interService.get('version') }}
             </th>
             <td mat-cell *matCellDef="let element" style="text-align: center">
               {{ element.VERSION || "N/A" }}
@@ -141,12 +141,12 @@
             </td>
           </ng-container>
           <ng-container matColumnDef="HISTORIAL">
-            <th mat-header-cell *matHeaderCellDef>Historial</th>
+            <th mat-header-cell *matHeaderCellDef>{{ interService.get('historial') }}</th>
             <td mat-cell *matCellDef="let element">
               <button
                 mat-icon-button
                 (click)="viewWorkflowHistory(element.ID_WORKFLOW)"
-                [matTooltip]="'Ver historial de cambios'"
+                [matTooltip]="interService.get('ver_historial_cambios')"
               >
                 <mat-icon>history</mat-icon>
               </button>
@@ -175,20 +175,20 @@
                     <mat-icon>edit</mat-icon> {{ interService.get("editar") }}
                   </button>
                   <button mat-menu-item (click)="viewWorkflowDetails(element.ID_WORKFLOW)">
-                    <mat-icon>visibility</mat-icon> Ver detalles
+                    <mat-icon>visibility</mat-icon> {{ interService.get('ver_detalles') }}
                   </button>
                   <button mat-menu-item (click)="getTaskByWorkflow(element.ID_WORKFLOW)">
-                    <mat-icon>add</mat-icon> Registrar tareas
+                    <mat-icon>add</mat-icon> {{ interService.get('registrar_tareas') }}
                   </button>
                   <button mat-menu-item (click)="activateWorkflowFromDraft(element)">
-                    <mat-icon>toggle_on</mat-icon> Activar
+                    <mat-icon>toggle_on</mat-icon> {{ interService.get('activar') }}
                   </button>
                 }
                 
                 <!-- Acciones para estado Activo -->
                 @if (element.ESTADO === 'Activo') {
                   <button mat-menu-item (click)="viewWorkflowDetails(element.ID_WORKFLOW)">
-                    <mat-icon>visibility</mat-icon> Ver detalles
+                    <mat-icon>visibility</mat-icon> {{ interService.get('ver_detalles') }}
                   </button>
                   <button mat-menu-item (click)="getTaskByWorkflow(element.ID_WORKFLOW)">
                     <mat-icon>task</mat-icon> {{ interService.get("ver_tareas") }}
@@ -197,14 +197,14 @@
                     <mat-icon>account_tree</mat-icon> {{ interService.get("ver_flujo") }}
                   </button>
                   <button mat-menu-item (click)="changeWorkflowStatus(element)">
-                    <mat-icon>toggle_off</mat-icon> Desactivar
+                    <mat-icon>toggle_off</mat-icon> {{ interService.get('desactivar') }}
                   </button>
                 }
                 
                 <!-- Acciones para estado Desactivado -->
                 @if (element.ESTADO === 'Desactivado') {
                   <button mat-menu-item (click)="changeWorkflowStatus(element)">
-                    <mat-icon>toggle_on</mat-icon> Activar
+                    <mat-icon>toggle_on</mat-icon> {{ interService.get('activar') }}
                   </button>
                 }
               </mat-menu>
@@ -217,7 +217,7 @@
           <tr class="mat-row" *matNoDataRow>
             <td class="mat-cell p-20 align-center" colspan="9">
               <object data="assets/img/empty_data.svg" width="150"></object>
-              <h2>Sin datos</h2>
+              <h2>{{ interService.get('sin_datos') }}</h2>
             </td>
           </tr>
         </table>

+ 3 - 3
src/app/components/process-management/workflow-management/workflow-management.component.ts

@@ -226,7 +226,7 @@ export class WorkflowManagementComponent implements OnInit, AfterViewInit {
     ).then(
       async (responseData: ResponseData) => {
         if (!responseData.error) {
-          this.resourcesService.openSnackBar(`¡Cambio de estado exitoso!`);
+          this.resourcesService.openSnackBar(this.interService.get('cambio_estado_exitoso'));
           await this.getWorkflows();
         } else {
           this.resourcesService.openSnackBar(`${responseData.msg}`);
@@ -283,14 +283,14 @@ export class WorkflowManagementComponent implements OnInit, AfterViewInit {
         if (!responseData.error) {
           if (responseData.response.length === 0) {
             this.resourcesService.openSnackBar(
-              'No se puede activar el workflow. Debe tener al menos una tarea registrada.'
+              this.interService.get('no_puede_activar_workflow')
             );
           } else {
             this.changeWorkflowStatus(element);
           }
         } else {
           this.resourcesService.openSnackBar(
-            `Error al verificar tareas: ${responseData.msg}`
+            this.interService.get('error_verificar_tareas').replace('{0}', responseData.msg)
           );
         }
       },

+ 155 - 31
src/app/services/internationalization/internationalization.service.ts

@@ -2,17 +2,15 @@ import { Injectable } from '@angular/core';
 import { ResourcesService } from '../resources.service';
 
 @Injectable({
-  providedIn: 'root'
+  providedIn: 'root',
 })
 export class InternationalizationService {
   public words: Map<string, string>;
   private arrAvailableLanguages: Array<string>;
   private arrLanguageWords: Array<any>;
 
-  constructor(
-    public resourcesService: ResourcesService,
-  ) { 
-    this.arrAvailableLanguages = ['ES','IN'];
+  constructor(public resourcesService: ResourcesService) {
+    this.arrAvailableLanguages = ['ES', 'IN'];
     this.words = new Map<string, string>();
 
     this.arrLanguageWords = [
@@ -50,11 +48,15 @@ export class InternationalizationService {
         first_page_label: 'Primera página',
         last_page_label: 'Última página',
         _de_: ' de ',
-        cargando_informacion_flujos: 'Cargando información de los flujos de trabajo',
-        cargando_informacion_formulario: 'Cargando la información del formulario',
+        cargando_informacion_flujos:
+          'Cargando información de los flujos de trabajo',
+        cargando_informacion_formulario:
+          'Cargando la información del formulario',
         cargando_informacion_tareas: 'Cargando la información de las tareas',
-        cargando_informacion_solicitudes: 'Cargando la información de las solicitudes',
-        cargando_informacion_notificaciones: 'Cargando la información de las notificaciones',
+        cargando_informacion_solicitudes:
+          'Cargando la información de las solicitudes',
+        cargando_informacion_notificaciones:
+          'Cargando la información de las notificaciones',
         descripcion: 'Descripción',
         es_automatico: '¿Es automático?',
         fue_automatico: '¿Fue automático?',
@@ -68,19 +70,26 @@ export class InternationalizationService {
         opcion_no_disponible: 'Opción no disponible',
         clic_desplegar: 'Clic para desplegar',
         confirmacion: 'Confirmación',
-        register_description_alert: '¿Está seguro de registrar el flujo de trabajo?',
-        update_description_alert: '¿Está seguro de modificar el flujo de trabajo?',
-        delete_description_alert: '¿Está seguro de eliminar el flujo de trabajo?',
-        update_request_alert: '¿Está seguro de modificar el estado de la solicitud?',
+        register_description_alert:
+          '¿Está seguro de registrar el flujo de trabajo?',
+        update_description_alert:
+          '¿Está seguro de modificar el flujo de trabajo?',
+        delete_description_alert:
+          '¿Está seguro de eliminar el flujo de trabajo?',
+        update_request_alert:
+          '¿Está seguro de modificar el estado de la solicitud?',
         register_task_alert: '¿Está seguro de registrar la tarea?',
-        update_task_alert: '¿Está seguro de modificar la tarea? Todas las ejecuciones activas del flujo de trabajo se reiniciarán.',
+        update_task_alert:
+          '¿Está seguro de modificar la tarea? Todas las ejecuciones activas del flujo de trabajo se reiniciarán.',
         registro_flujo_trabajo: 'Registro de flujo de trabajo',
         modificacion_flujo_trabajo: 'Modificación de flujo de trabajo',
         nombre_flujo_trabajo: 'Nombre del flujo de trabajo',
-        placeholder_nombre_flujo_trabajo: 'Ingrese el nombre del flujo de trabajo...',
+        placeholder_nombre_flujo_trabajo:
+          'Ingrese el nombre del flujo de trabajo...',
         el_campo: 'El campo',
         es_requerido: 'es requerido',
-        placeholder_descripcion: 'Ingrese la descripción del flujo de trabajo...',
+        placeholder_descripcion:
+          'Ingrese la descripción del flujo de trabajo...',
         no_tarea: 'No. Tarea',
         no_flujo: 'No. Flujo',
         nombre_tarea: 'Nombre tarea',
@@ -97,7 +106,8 @@ export class InternationalizationService {
         usuario_solo_notificar: 'Usuarios para solo notificar',
         cambio_flujo_trabajo: 'Cambio de flujo de trabajo',
         cambiar_usuario: 'Cambiar al usuario',
-        siempre_esperar_validacion_usuario: 'Siempre esperar validación del usuario',
+        siempre_esperar_validacion_usuario:
+          'Siempre esperar validación del usuario',
         cambiar_otro_usuario: 'Cambiar al siguiente usuario',
         ejecutar_otro_flujo_trabajo: 'Ejecutar otro flujo de trabajo',
         tarea: 'Tarea',
@@ -120,8 +130,10 @@ export class InternationalizationService {
         buscar: 'Buscar',
         busqueda_solicitudes: 'Búsquedas de solicitudes',
         busqueda_notificaciones: 'Búsquedas de notificaciones',
-        numero_ejecucion_flujo_trabajo: 'Número de ejecución del flujo de trabajo',
-        estado_ejecucion_flujo_trabajo: 'Estado de ejecución del flujo de trabajo',
+        numero_ejecucion_flujo_trabajo:
+          'Número de ejecución del flujo de trabajo',
+        estado_ejecucion_flujo_trabajo:
+          'Estado de ejecución del flujo de trabajo',
         numero_ejecucion_tarea: 'Número de ejecución de la tarea',
         estado_ejecucion_tarea: 'Estado de ejecución de la tarea',
         nombre_proceso: 'Nombre del proceso',
@@ -145,7 +157,8 @@ export class InternationalizationService {
         numero_secuencia: 'Número de secuencia',
 
         reset_configuration: 'Restaurar configuración',
-        reset_description_alert: '¿Está seguro de restablecer la configuración por defecto de todos los flujos de trabajo?',
+        reset_description_alert:
+          '¿Está seguro de restablecer la configuración por defecto de todos los flujos de trabajo?',
         register_task: 'Registrar tarea',
         update_task: 'Actualizar tarea',
         module: 'Módulo relacionado',
@@ -163,6 +176,58 @@ export class InternationalizationService {
         nombre_workflow: 'Nombre del Workflow',
         campo_requerido: 'Este campo es requerido',
         registrar: 'Registrar',
+        sin_datos: 'Sin datos',
+        confirmar: 'Confirmar',
+        esta_seguro_eliminar_tarea: '¿Está seguro de eliminar la tarea?',
+        eliminacion_exitosa: '¡Eliminación Exitosa!',
+        ingrese_nombre_tarea: 'Ingrese el nombre de la tarea',
+        ingrese_descripcion_tarea: 'Ingrese la descripción de la tarea',
+        usuario_validador: 'Usuario Validador',
+        usuarios_notificar: 'Usuarios a Notificar',
+        esperar: 'Esperar',
+        ejecutar: 'Ejecutar',
+        workflow_ejecutar: 'Workflow a Ejecutar',
+        funcion_relacionada_tarea: 'Función relacionada que ejecuta la tarea',
+        modulo: 'Módulo',
+        submodulo: 'Submódulo',
+        funcion: 'Función',
+        registro_exitoso_tarea: '¡Registro exitoso!',
+        modificacion_exitosa_tarea: '¡Modificación exitosa!',
+        detalles_tarea: 'Detalles de la Tarea',
+        id: 'ID',
+        nombre: 'Nombre',
+        si: 'Sí',
+        no: 'No',
+        na: 'N/A',
+        usuario_registro: 'Usuario Registro',
+        fecha_registro: 'Fecha Registro',
+        fecha_modifica: 'Fecha Modifica',
+        hoy: 'Hoy',
+        hace_1_dia: 'Hace 1 día',
+        hace_dias: 'Hace {0} días',
+        modulos: 'Módulos',
+        predeterminado: 'Predeterminado',
+        version: 'Versión',
+        historial: 'Historial',
+        ver_historial_cambios: 'Ver historial de cambios',
+        ver_detalles: 'Ver detalles',
+        registrar_tareas: 'Registrar tareas',
+        activar: 'Activar',
+        desactivar: 'Desactivar',
+        cambio_estado_exitoso: '¡Cambio de estado exitoso!',
+        no_puede_activar_workflow:
+          'No se puede activar el workflow. Debe tener al menos una tarea registrada.',
+        error_verificar_tareas: 'Error al verificar tareas: {0}',
+        no_pudo_encontrar_informacion:
+          'No se pudo encontrar información para editar.',
+        comentario_cambio: 'Comentario del cambio',
+        explique_motivo_cambio: 'Explique el motivo del cambio...',
+        detalles_workflow: 'Detalles del Workflow',
+        usuario_modifica: 'Usuario modifica',
+        cambiar_estado: 'Cambiar Estado',
+        esta_seguro_cambiar_estado: '¿Está seguro de cambiar el estado a {0}?',
+        explique_motivo_cambio_estado:
+          'Explique el motivo del cambio de estado...',
       },
       {
         S002V01M03GEPR: 'Process management',
@@ -219,9 +284,11 @@ export class InternationalizationService {
         register_description_alert: 'Are you sure to record the workflow?',
         update_description_alert: 'Are you sure about modifying the workflow?',
         delete_description_alert: 'Are you sure to delete the workflow?',
-        update_request_alert: 'Are you sure to change the status of the request?',
+        update_request_alert:
+          'Are you sure to change the status of the request?',
         register_task_alert: 'Are you sure to register the task?',
-        update_task_alert: 'Are you sure about modifying the task? All active workflow runs will be restarted.',
+        update_task_alert:
+          'Are you sure about modifying the task? All active workflow runs will be restarted.',
         registro_flujo_trabajo: 'Workflow registration',
         modificacion_flujo_trabajo: 'Workflow Modification',
         nombre_flujo_trabajo: 'Workflow name',
@@ -293,7 +360,8 @@ export class InternationalizationService {
         numero_secuencia: 'Sequence number',
 
         reset_configuration: 'Restore settings',
-        reset_description_alert: 'Are you sure you want to reset all workflows to default settings?',
+        reset_description_alert:
+          'Are you sure you want to reset all workflows to default settings?',
         register_task: 'Add task',
         update_task: 'Update task',
         module: 'Related module',
@@ -311,22 +379,76 @@ export class InternationalizationService {
         nombre_workflow: 'Workflow Name',
         campo_requerido: 'This field is required',
         registrar: 'Register',
-      }
+        sin_datos: 'No data',
+        confirmar: 'Confirm',
+        esta_seguro_eliminar_tarea: 'Are you sure you want to delete the task?',
+        eliminacion_exitosa: 'Successful Deletion!',
+        ingrese_nombre_tarea: 'Enter the task name',
+        ingrese_descripcion_tarea: 'Enter the task description',
+        usuario_validador: 'Validator User',
+        usuarios_notificar: 'Users to Notify',
+        esperar: 'Wait',
+        ejecutar: 'Execute',
+        workflow_ejecutar: 'Workflow to Execute',
+        funcion_relacionada_tarea: 'Related function that executes the task',
+        modulo: 'Module',
+        submodulo: 'Submodule',
+        funcion: 'Function',
+        registro_exitoso_tarea: 'Successful registration!',
+        modificacion_exitosa_tarea: 'Successful modification!',
+        detalles_tarea: 'Task Details',
+        id: 'ID',
+        nombre: 'Name',
+        si: 'Yes',
+        no: 'No',
+        na: 'N/A',
+        usuario_registro: 'Registration User',
+        fecha_registro: 'Registration Date',
+        fecha_modifica: 'Modification Date',
+        hoy: 'Today',
+        hace_1_dia: '1 day ago',
+        hace_dias: '{0} days ago',
+        modulos: 'Modules',
+        predeterminado: 'Default',
+        version: 'Version',
+        historial: 'History',
+        ver_historial_cambios: 'View change history',
+        ver_detalles: 'View details',
+        registrar_tareas: 'Register tasks',
+        activar: 'Activate',
+        desactivar: 'Deactivate',
+        cambio_estado_exitoso: 'Status change successful!',
+        no_puede_activar_workflow:
+          'Cannot activate workflow. Must have at least one registered task.',
+        error_verificar_tareas: 'Error verifying tasks: {0}',
+        no_pudo_encontrar_informacion: 'Could not find information to edit.',
+        comentario_cambio: 'Change comment',
+        explique_motivo_cambio: 'Explain the reason for the change...',
+        detalles_workflow: 'Workflow Details',
+        usuario_modifica: 'User modifies',
+        cambiar_estado: 'Change Status',
+        esta_seguro_cambiar_estado:
+          'Are you sure you want to change the status to {0}?',
+        explique_motivo_cambio_estado:
+          'Explain the reason for the status change...',
+      },
     ];
-    
+
     this.checkLanguage();
   }
-  
+
   private checkLanguage() {
     let language: string | null = localStorage.getItem('language');
-    
+
     if (language === null) {
       localStorage.setItem('language', 'ES');
       language = 'ES';
-    } 
+    }
 
-    if ( !this.arrAvailableLanguages.includes(language) ) {
-      this.resourcesService.openSnackBar('El idioma seleccionado no está disponible.');
+    if (!this.arrAvailableLanguages.includes(language)) {
+      this.resourcesService.openSnackBar(
+        'El idioma seleccionado no está disponible.'
+      );
       language = 'ES';
     }
 
@@ -334,7 +456,9 @@ export class InternationalizationService {
   }
 
   public generateObjectLanguage(language: string) {
-    const indexLanguage = this.arrAvailableLanguages.findIndex((aviable: string) => aviable === language);
+    const indexLanguage = this.arrAvailableLanguages.findIndex(
+      (aviable: string) => aviable === language
+    );
     const elementLenguage = this.arrLanguageWords[indexLanguage];
     const arrKeys: Array<string> = Object.keys(elementLenguage);
     const propertyValues: Array<string> = Object.values(elementLenguage);