conformidad.componente.html 38.2 KB
Newer Older
1 2 3
<div class="flex justify-center w-full my-5">
  <div class="border border-black w-[90vw] md:w-3/4 flex justify-center items-center shadow-lg h-12 rounded-lg bg-yellow-300">
    <label class="font-bold text-lg md:text-2xl">HOJA DE RUTA</label>
4 5 6
  </div>
</div>

7
<div class="body flex flex-col items-center text-[13px] md:text-[18px] relative mx-2 my-5 pb-5 md:mx-0">
8

9 10 11 12 13
  <div class="flex flex-col items-center text-xs md:text-base mx-2 my-5 pb-5 md:mx-0">
    <mat-card appearance="outlined" class="mt-4 flex flex-col gap-2.5 text-[#222] shadow-xl w-full md:w-[75vw]">
      <mat-card-header class="flex flex-col items-start w-full">
        <label class="text-base md:text-lg font-bold">DATOS PERSONALES</label>
      </mat-card-header>
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
      <mat-card-content class="w-full my-2.5" [formGroup]="datos_personal">
        <!------------------------------------------------------------------------- DATOS GENERALES ------------------------------------------------------------------------------>
        <div class="flex flex-row gap-4 mb-4">
          <div class="basis-2/4">
            <div class="flex flex-row gap-x-2" *ngFor="let personal of listPersonal">
              <mat-form-field class="w-full" appearance="outline" floatLabel="always">
                <mat-label>Técnico responsable</mat-label>
                <mat-select formControlName="tecnicoPersonal{{personal.index}}" placeholder="[Seleccionar técnico]" (selectionChange)="onEventoSeleccionTecnico($event,personal)" required>
                  <mat-option *ngFor="let option of this.personal_list" [value]="option?.codper">
                    {{option?.personal}}
                  </mat-option>
                </mat-select>
              </mat-form-field>
              <mat-form-field class="w-full" appearance="outline" floatLabel="always">
                <mat-label>Especialidad</mat-label>
                <input formControlName="areaPersonal{{personal.index}}" matInput placeholder="[Área designada]" value="" readonly>
              </mat-form-field>
            </div>

             <!-- agregar botones de agregar o disminuir Tecnico responsable -->
            <div class="flex flex-row gap-x-2">
              <div class="example-button-container">
                <button (click)="onEventoAgregarPersonal()" mat-fab aria-label="Example icon button with a delete icon">
                  <mat-icon>add</mat-icon>
                </button>
              </div>
              <div class="example-button-container">
                <button (click)="onEventoQuitarPersonal()" mat-fab aria-label="Example icon button with a heart icon">
                  <mat-icon>delete</mat-icon>
                </button>
              </div>
              <mat-label class="font-bold text-blue-600 text-lg" [ngClass]="{'fade-out': personalFading}" [innerText]="personalText"></mat-label>
            </div>
          </div>

          <div class="basis-2/4">
            <div class="flex flex-row gap-x-2">
              <mat-form-field class="w-full" appearance="outline" floatLabel="always">
                <mat-label>Sede designada</mat-label>
                <mat-select formControlName="sedePersonal" placeholder="[Seleccionar sede]" required>
                  <mat-option *ngFor="let option of this.sede_list" [value]="option?.value">
                    {{option?.viewValue}}
                  </mat-option>
                </mat-select>
              </mat-form-field>

              <mat-form-field class="w-full" appearance="outline" floatLabel="always">
                <mat-label>Rango de fechas</mat-label>
                <mat-date-range-input  [rangePicker]="picker">
                  <input matStartDate formControlName="minFechaTrabajo" placeholder="Fecha inicial" readonly >
                  <input matEndDate formControlName="maxFechaTrabajo" placeholder="Fecha Fin" readonly>
                </mat-date-range-input>
                <mat-datepicker-toggle matIconSuffix [for]="picker" [disabled]="datos_personal.controls['minFechaTrabajo'].disabled"></mat-datepicker-toggle>
                <mat-date-range-picker #picker></mat-date-range-picker>
              </mat-form-field>
            </div>
          </div>
71
        </div>
72 73 74 75 76
        <!------------------------------------------------------------------------- DATOS GENERALES ------------------------------------------------------------------------------>


        <!------------------------------------------------------------------------- LISTADO DE PASAJES ---------------------------------------------------------------------------->
        <!-- <div class="flex flex-row gap-4">
77
          <div class="sm:basis-3/12 w-full">
78
            <mat-form-field class="w-full sm:w-[20rem]" appearance="outline" floatLabel="always">
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
              <mat-label>Pasaje designado : </mat-label>
              <input matInput formControlName="pasajeTotal" placeholder="Calculo final del pasaje" value="" readonly>
            </mat-form-field>
          </div>

          <div class="sm:basis-9/12 w-full">
            <div class="grid gap-4 grid-cols-1 sm:grid-cols-2">
              <mat-label class="text-[1.1em] font-bold mb-4 flex items-center">LISTADO DE PASAJES
                <mat-icon>attach_money</mat-icon>
              </mat-label>
              <button mat-raised-button [ngStyle]="{'visibility': activarPasajes ? 'visible' : 'hidden'}" [disabled]="!activarPasajes" (click)="onEventoNuevoPasaje($event)">
                <mat-icon>add</mat-icon>
                <b>Agregar pasaje</b>
              </button>
            </div>

            <div class="overflow-x-auto">
              <table mat-table [dataSource]="dataSource" class="mat-elevation-z8 w-full">
                <ng-container matColumnDef="lugarOrigen">
                  <th mat-header-cell *matHeaderCellDef class="w-1/5"> LUGAR DE ORIGEN </th>
                  <td mat-cell *matCellDef="let element">
                    <ng-container *ngIf="element.isNew; else displayOrigen">
                      <mat-form-field [formGroup]="datos_lugarOrigen" appearance="outline">
                        <mat-select formControlName="lugarOrigen{{element.index}}" placeholder="[Seleccionar de origen]" required>
103 104
                          <mat-option *ngFor="let option of this.sede_list" [value]="option?.value">
                            {{option?.viewValue}}
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
                          </mat-option>
                        </mat-select>
                      </mat-form-field>
                    </ng-container>
                    <ng-template #displayOrigen>
                      {{element.lugarOrigen}}
                    </ng-template>
                  </td>
                </ng-container>

                <ng-container matColumnDef="lugarDestino">
                  <th mat-header-cell *matHeaderCellDef class="w-1/5"> LUGAR DESTINO </th>
                  <td mat-cell *matCellDef="let element">
                    <ng-container *ngIf="element.isNew; else displayOrigen">
                      <mat-form-field appearance="outline">
                        <input matInput placeholder="[Lugar de Destino]" [value]="lugarDestinoPasaje" readonly>
                      </mat-form-field>
                    </ng-container>
                    <ng-template #displayOrigen>
                      {{element.lugarDestino}}
                    </ng-template>
                  </td>
                </ng-container>

                <ng-container matColumnDef="monto">
                  <th mat-header-cell *matHeaderCellDef class="w-1/10"> MONTO </th>
                  <td mat-cell *matCellDef="let element">
                    <ng-container *ngIf="element.isNew; else displayOrigen">
                      <mat-form-field [formGroup]="datos_pasajeAcumulado" appearance="outline">
134
                        <input matInput formControlName="montoPasaje{{element.index}}" soloNumeros="decimal" placeholder="[Monto]" value="" maxlength="6" (blur)="formatMontoPasaje(this.datos_pasajeAcumulado,'montoPasaje'+element.index)">
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
                      </mat-form-field>
                    </ng-container>
                    <ng-template #displayOrigen>
                      {{element.monto}}
                    </ng-template>
                  </td>
                </ng-container>

                <ng-container matColumnDef="fecha">
                  <th mat-header-cell *matHeaderCellDef class="w-1/5"> FECHA </th>
                  <td mat-cell *matCellDef="let element">
                    <ng-container *ngIf="element.isNew; else displayOrigen">
                      <mat-form-field [formGroup]="datos_fechaPasaje" appearance="outline">
                        <input matInput [matDatepicker]="fechaPasaje" formControlName="fechaPasaje{{element.index}}" [min]="minFechaLimite" [max]="maxFechaLimite">
                        <mat-hint>DD/MM/YYYY</mat-hint>
                        <mat-datepicker-toggle matIconSuffix [for]="fechaPasaje"></mat-datepicker-toggle>
                        <mat-datepicker #fechaPasaje></mat-datepicker>
                      </mat-form-field>
                    </ng-container>
                    <ng-template #displayOrigen>
                      {{formatoFecha(element.fecha)}}
                    </ng-template>
                  </td>
                </ng-container>

                <ng-container matColumnDef="accion">
                  <th mat-header-cell *matHeaderCellDef class="w-3/10"> ACCIÓN </th>
                  <td mat-cell *matCellDef="let element">
                    <ng-container *ngIf="element.acciones; else sinAcciones">
                      <ng-container *ngIf="element.isNew; else accionesEditar">
                        <button mat-icon-button (click)="onEventoConfirmarPasaje($event, element)">
                          <mat-icon>check_circle</mat-icon>
                        </button>
                        <button mat-icon-button (click)="onEventoCancelarPasaje($event, element)">
                          <mat-icon>cancel</mat-icon>
                        </button>
                      </ng-container>
                      <ng-template #accionesEditar>
                        <button mat-icon-button (click)="onEventoEditarPasaje($event, element)">
                          <mat-icon>edit</mat-icon>
                        </button>
                        <button mat-icon-button (click)="onEventoEliminarPasaje($event, element)">
                          <mat-icon>delete</mat-icon>
                        </button>
                      </ng-template>
                    </ng-container>
                    <ng-template #sinAcciones></ng-template>
                  </td>
                </ng-container>

                <tr mat-header-row *matHeaderRowDef="columnasPasaje"></tr>
                <tr mat-row *matRowDef="let row; columns: columnasPasaje;"></tr>
              </table>
            </div>
          </div>
190 191 192
        </div> -->
        <!------------------------------------------------------------------------- LISTADO DE PASAJES ---------------------------------------------------------------------------->

193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
      </mat-card-content>
    </mat-card>
  </div>
  <mat-card appearance="outlined" class="mt-4 flex flex-col gap-2.5 text-[#222] !shadow-xl w-[95vw] sm:w-[90vw] md:w-[75vw]">
    <mat-card-header class="flex flex-col items-start w-full">
      <label class="text-[1.1em] font-bold">
        SERVICIOS PRESTADOS
      </label>
    </mat-card-header>
    <mat-card-content class="w-full my-2.5">
      <div class="div-serviocisPrestados divisionGeneral" [formGroup]="datos_servicio">
        <div class="servicio-descripcion">
          <div class="flex flex-col md:flex-row gap-5 pb-5">
            <div class="w-full md:w-1/5">
              <mat-form-field class="w-full" appearance="outline" floatLabel="always">
                <mat-label>Listado de Requerimientos</mat-label>
                <input type="text" placeholder="Buscar requerimiento" matInput #inputBusqueda formControlName="busquedaReq" [matAutocomplete]="auto" maxlength="9"
                       (input)="onBusquedaRequerimiento($event)">
                <mat-autocomplete #auto="matAutocomplete" (optionSelected)="onEventSeleccion($event)">
                  <mat-option *ngFor="let option of requerimientosFiltrados" [value]="option.codigo">
                    {{ option.numero }}
                  </mat-option>
                </mat-autocomplete>
              </mat-form-field>
217
              <mat-label class="font-bold text-blue-600 text-lg" [ngClass]="{'fade-out': isFading}" [innerText]="labelText"></mat-label>
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360
            </div>

            <div class="grid grid-cols-2 md:grid-cols-5 gap-4 w-full md:w-4/5">
              <div class="contenedorRequerimiento" *ngFor="let card of listRequerimientos">
                <mat-card>
                  <mat-card-content>
                    <mat-card-subtitle class="text-base font-bold">{{ card.titulo }}</mat-card-subtitle>
                    <div class="w-fit py-2 px-3 flex space-x-4">
                      <button mat-fab aria-label="Eliminar" matTooltip="Eliminar" matTooltipPosition="above" (click)="deleteRequerimiento(card.id)">
                        <mat-icon class="mat-icon-small">delete</mat-icon>
                      </button>

                      <button mat-fab aria-label="Información" matTooltip="Información" matTooltipPosition="above" (click)="infoRequerimiento(card.codigo)">
                        <mat-icon class="mat-icon-small">info</mat-icon>
                      </button>
                    </div>
                  </mat-card-content>
                </mat-card>
              </div>
            </div>
          </div>

          <div class="grid grid-cols-1 md:grid-cols-2 gap-5">
            <div>
              <mat-form-field class="w-full">
                <mat-label>DESCRIPCIÓN DEL PROBLEMA</mat-label>
                <textarea matInput placeholder="Breve descripción sobre los problemas encontrados en la sede" formControlName="descripcionServicio"
                          cdkTextareaAutosize cdkAutosizeMinRows="3" cdkAutosizeMaxRows="10" [required]="false"></textarea>
              </mat-form-field>
            </div>
            <div>
              <mat-form-field class="w-full">
                <mat-label>DESCRIPCIÓN DE LA CAUSA</mat-label>
                <textarea matInput placeholder="Breve descripción sobre las causas del problema" formControlName="causaServicio"
                          cdkTextareaAutosize cdkAutosizeMinRows="3" cdkAutosizeMaxRows="10" [required]="false"></textarea>
              </mat-form-field>
            </div>
          </div>
        </div>

        <div class="grid grid-flow-col md:grid-cols-2 gap-5">
          <div>
            <div><b class="md:text-[1rem] text-[1em] text-black/60">EVIDENCIAS DEL PROBLEMA: *</b></div>
            <button mat-fab class="!w-full" [color]="'blue'" (click)="file1.click()">
              <mat-label>SUBIR EVIDENCIA DEL PROBLEMA</mat-label>
              <mat-icon>file_open</mat-icon>
            </button>
            <input type="file" #file1 (change)="onEventoSubirArchivo($event)" class="hidden" multiple accept="image/png">
            <br>
            <div *ngFor="let archivo of archivosEvidencia; let i = index" class="flex mt-2">
              <div *ngIf="archivo.tipoEvidencia === 1" class="flex w-full">
                <p class="w-2/4">{{ (archivo.file.name + ' (' + (archivo.file.size / 1000) + ' KB)') | truncate:30:true }}</p>
                <div class="w-2/4 grid grid-cols-3 gap-4">
                  <button (click)="gestionArchivos(i,1,archivo.file)"><mat-icon>info</mat-icon></button>
                  <button (click)="seleccionarInput(i,1)"><mat-icon>edit</mat-icon></button>
                  <input type="file" #fileEditar1 (change)="gestionArchivos(i,2,$event)" class="hidden" multiple accept="image/png">
                  <button (click)="gestionArchivos(i,3)"><mat-icon>delete</mat-icon></button>
                </div>
              </div>
            </div>
          </div>

          <div>
            <div><b class="md:text-[1rem] text-[1em] text-black/60">EVIDENCIAS DE SOLUCIONES: *</b></div>
            <button mat-fab class="!w-full" [color]="'blue'" (click)="file2.click()">
              <mat-label>SUBIR EVIDENCIA DE LA SOLUCIÓN</mat-label>
              <mat-icon>file_open</mat-icon>
            </button>
            <input type="file" #file2 (change)="onEventoSubirArchivo($event,2)" class="hidden" multiple accept="image/png">
            <br>
            <div *ngFor="let archivo of archivosEvidencia; let i = index" class="flex mt-2">
              <div *ngIf="archivo.tipoEvidencia === 2" class="flex w-full">
                <p class="w-2/4">{{ (archivo.file.name + ' (' + (archivo.file.size / 1000) + ' KB)') | truncate:30:true }}</p>
                <div class="w-2/4 grid grid-cols-3 gap-4">
                  <button (click)="gestionArchivos(i,1,archivo.file,2)"><mat-icon>info</mat-icon></button>
                  <button (click)="seleccionarInput(i,2)"><mat-icon>edit</mat-icon></button>
                  <input type="file" #fileEditar2 (change)="gestionArchivos(i,2,$event,2)" class="hidden" multiple accept="image/png">
                  <button (click)="gestionArchivos(i,3,2)"><mat-icon>delete</mat-icon></button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </mat-card-content>
  </mat-card>

  <mat-card appearance="outlined" class="mt-4 flex flex-col gap-2.5 text-[#222] !shadow-xl w-[90vw] sm:w-[85vw] md:w-[75vw]">
    <mat-card-header class="flex flex-col items-start w-full">
      <label class="text-[1.1em] font-bold">
        TRABAJOS PRESTADOS
      </label>
    </mat-card-header>
    <mat-card-content class="w-full my-2.5">
      <div class="div-trabajosPrestados divisionGeneral" [formGroup]="datos_trabajo">
        <label class="font-bold text-[1.2rem]">TIPO DE TRABAJO:</label>
        <mat-form-field class="w-full md:w-1/2">
          <mat-label>Seleccionar tipo de trabajo</mat-label>
          <mat-select formControlName="tipoTrabajo">
            @for (tipoT of listTipoTrabajo; track tipoT) {
              <mat-option [value]="tipoT.value">{{ tipoT.viewValue }}</mat-option>
            }
          </mat-select>
        </mat-form-field>

        <div class="w-full mt-5">
          <mat-form-field class="w-full">
            <mat-label>DESCRIPCIÓN DEL TRABAJO</mat-label>
            <textarea matInput placeholder="Breve descripción del trabajo realizado" formControlName="descripcionTrabajo"
                      cdkTextareaAutosize cdkAutosizeMinRows="3" cdkAutosizeMaxRows="10" [required]="false"></textarea>
          </mat-form-field>
        </div>
      </div>
    </mat-card-content>
  </mat-card>

  <mat-card appearance="outlined" class="mt-4 flex flex-col gap-2.5 text-[#222] !shadow-xl w-[90vw] sm:w-[85vw] md:w-[75vw]" [formGroup]="existeMaterialS">
    <mat-card-header class="flex justify-center items-center gap-x-4 w-full mb-4">
      <mat-label class="flex items-center text-[1.1em] font-bold">
        MATERIAL SOBRANTE
      </mat-label>
      <mat-button-toggle-group formControlName="existeMaterial" aria-label="Existe material sobrante" value="0">
        <mat-button-toggle value="1">SI</mat-button-toggle>
        <mat-button-toggle value="0">NO</mat-button-toggle>
      </mat-button-toggle-group>
    </mat-card-header>

    <!-- Mostrar componente solo si existeMaterial es "1" -->
    <ng-container *ngIf="existeMaterialS.get('existeMaterial')?.value === '1'">
      <!-- Componente a mostrar -->
      <mat-card-content class="w-full">
        <ordensalida-component></ordensalida-component>
      </mat-card-content>
    </ng-container>
  </mat-card>

  <div class="mt-4 flex flex-col">
    <button mat-fab extended (click)="gestionConformidad()">
      <mat-icon>app_registration</mat-icon>
      REGISTRO CONFORMIDAD
    </button>
  </div>
  <!--
361
    <mat-card appearance="outlined" class="mt-4 flex flex-col gap-2.5 text-[#222] !shadow-xl w-[90vw] md:w-[75vw]">
362 363
        <mat-card-header class="flex flex-col items-start w-full">
        <label class="text-[1.1em] font-bold">
364 365 366
          DATOS PERSONALES
        </label>
      </mat-card-header>
367
      <mat-card-content class="w-full my-2.5">
368 369
          <div class="flex flex-row gap-x-4" [formGroup]="datos_personal">
            <mat-form-field class="basis-1/4" appearance="outline" floatLabel="always">
370
              <mat-label>Técnico responsable</mat-label>
371
              <mat-select formControlName="tecnicoPersonal" placeholder="[Seleccionar técnico]" (selectionChange)="onEventoSeleccionTecnico($event)" required>
372 373 374 375 376
                <mat-option *ngFor="let option of this.personal_list" [value]="option?.codper">
                  {{option?.personal}}
                </mat-option>
              </mat-select>
            </mat-form-field>
377
            <mat-form-field class="basis-1/4" appearance="outline" floatLabel="always">
378 379 380
              <mat-label>Área designada</mat-label>
              <input formControlName="areaPersonal" matInput placeholder="[Área designada]" value="" readonly>
            </mat-form-field>
381
            <mat-form-field class="basis-1/4" appearance="outline" floatLabel="always">
382
              <mat-label>Sede designada : </mat-label>
383 384 385 386 387 388
              <mat-select formControlName="sedePersonal" placeholder="[Seleccionar sede]" required>
                <mat-option *ngFor="let option of this.sede_list" [value]="option?.codlocal">
                  {{option?.deslocal}}
                </mat-option>
              </mat-select>
            </mat-form-field>
389
            <mat-form-field class="basis-1/4" appearance="outline" floatLabel="always">
390 391 392 393 394 395 396 397 398 399 400
              <mat-label>Rango de fechas :  </mat-label>
              <mat-date-range-input  [rangePicker]="picker">
                <input matStartDate formControlName="minFechaTrabajo" placeholder="Fecha inicial" readonly >
                <input matEndDate formControlName="maxFechaTrabajo" placeholder="Fecha Fin" readonly>
              </mat-date-range-input>
              <mat-datepicker-toggle matIconSuffix [for]="picker" [disabled]="datos_personal.controls['minFechaTrabajo'].disabled"></mat-datepicker-toggle>
              <mat-date-range-picker #picker></mat-date-range-picker>

            </mat-form-field>
          </div>

401 402 403
          <div class="flex flex-row gap-x-4">
            <div class="basis-3/12">
              <mat-form-field [formGroup]="datos_personal" style="width: 20rem" appearance="outline" floatLabel="always">
404 405 406 407
                <mat-label>Pasaje designado : </mat-label>
                <input matInput formControlName="pasajeTotal"  placeholder="Calculo final del pasaje" value="" readonly>
              </mat-form-field>
            </div>
408
            <div class="basis-9/12 ">
409 410 411
              <div class="grid gap-4 grid-cols-2">
                <mat-label class="text-[1.1em] font-bold mb-4" style="display: flex;align-items: center;margin: unset">LISTADO DE PASAJES <mat-icon>attach_money</mat-icon> </mat-label>
                <button mat-raised-button  [ngStyle]="{'visibility': activarPasajes ? 'visible' : 'hidden'}" [disabled]="!activarPasajes" (click)="onEventoNuevoPasaje($event)">
412
                  <mat-icon>add</mat-icon>
413 414 415 416 417 418
                  <b>Agregar pasaje</b>
                </button>
              </div>
              <div>
                <table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
                  <ng-container matColumnDef="lugarOrigen">
419
                    <th mat-header-cell *matHeaderCellDef style="width: 20%"> LUGAR DE ORIGEN </th>
420 421
                    <td mat-cell *matCellDef="let element">
                      <ng-container *ngIf="element.isNew; else displayOrigen">
422
                        <mat-form-field [formGroup]="datos_lugarOrigen" appearance="outline" floatLabel="always">
423 424 425 426 427 428 429 430 431 432 433 434 435 436
                          <mat-select formControlName="lugarOrigen{{element.index}}" placeholder="[Seleccionar de origen]" required>
                            <mat-option *ngFor="let option of this.sede_list" [value]="option?.codlocal">
                              {{option?.deslocal}}
                            </mat-option>
                          </mat-select>
                        </mat-form-field>
                      </ng-container>
                      <ng-template #displayOrigen>
                        {{element.lugarOrigen}}
                      </ng-template>
                    </td>
                  </ng-container>

                  <ng-container matColumnDef="lugarDestino">
437
                    <th mat-header-cell *matHeaderCellDef style="width: 20%"> LUGAR DESTINO </th>
438 439
                    <td mat-cell *matCellDef="let element">
                      <ng-container *ngIf="element.isNew; else displayOrigen">
440
                        <mat-form-field appearance="outline">
441 442 443 444 445 446 447 448 449 450
                          <input matInput placeholder="[Lugar de Destino]" [value]="lugarDestinoPasaje" readonly>
                        </mat-form-field>
                      </ng-container>
                      <ng-template #displayOrigen>
                        {{element.lugarDestino}}
                      </ng-template>
                    </td>
                  </ng-container>

                  <ng-container matColumnDef="monto">
451
                    <th mat-header-cell *matHeaderCellDef style="width: 10%"> MONTO </th>
452 453
                    <td mat-cell *matCellDef="let element">
                      <ng-container *ngIf="element.isNew; else displayOrigen">
454
                        <mat-form-field [formGroup]="datos_pasajeAcumulado" appearance="outline">
455
                          <input matInput formControlName="montoPasaje{{element.index}}" soloNumeros placeholder="[Monto]" value="" maxlength="2">
456 457 458 459 460 461 462 463 464
                        </mat-form-field>
                      </ng-container>
                      <ng-template #displayOrigen>
                        {{element.monto}}
                      </ng-template>
                    </td>
                  </ng-container>

                  <ng-container matColumnDef="fecha">
465
                    <th mat-header-cell *matHeaderCellDef style="width: 20%;"> FECHA </th>
466 467
                    <td mat-cell *matCellDef="let element">
                      <ng-container *ngIf="element.isNew; else displayOrigen">
468
                        <mat-form-field [formGroup]="datos_fechaPasaje" appearance="outline">
469 470 471 472 473 474 475 476 477 478 479 480 481
                          <input matInput [matDatepicker]="fechaPasaje" formControlName="fechaPasaje{{element.index}}" [min]="minFechaLimite" [max]="maxFechaLimite">
                          <mat-hint>DD/MM/YYYY</mat-hint>
                          <mat-datepicker-toggle matIconSuffix [for]="fechaPasaje"></mat-datepicker-toggle>
                          <mat-datepicker #fechaPasaje></mat-datepicker>
                        </mat-form-field>
                      </ng-container>
                      <ng-template #displayOrigen>
                        {{formatoFecha(element.fecha)}}
                      </ng-template>
                    </td>
                  </ng-container>

                  <ng-container matColumnDef="accion">
482
                    <th mat-header-cell *matHeaderCellDef style="width: 30%;"> ACCIÓN </th>
483
                    <td mat-cell *matCellDef="let element">
484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500
                      <ng-container *ngIf="element.acciones; else sinAcciones">
                        <ng-container *ngIf="element.isNew; else accionesEditar">
                          <button mat-icon-button (click)="onEventoConfirmarPasaje($event, element)">
                            <mat-icon>check_circle</mat-icon>
                          </button>
                          <button mat-icon-button (click)="onEventoCancelarPasaje($event, element)">
                            <mat-icon>cancel</mat-icon>
                          </button>
                        </ng-container>
                        <ng-template #accionesEditar>
                            <button mat-icon-button (click)="onEventoEditarPasaje($event, element)">
                              <mat-icon>edit</mat-icon>
                            </button>
                            <button mat-icon-button (click)="onEventoEliminarPasaje($event, element)">
                              <mat-icon>delete</mat-icon>
                            </button>
                        </ng-template>
501
                      </ng-container>
502
                      <ng-template #sinAcciones>
503 504 505 506 507 508 509 510
                      </ng-template>
                    </td>
                  </ng-container>
                  <tr mat-header-row *matHeaderRowDef="columnasPasaje"></tr>
                  <tr mat-row *matRowDef="let row; columns: columnasPasaje;"></tr>
                </table>
              </div>
            </div>
511
          </div>
512
          </mat-card-content>
513
    </mat-card>
514
    -->
515
  <!---------------------------------------------------------------------- SERVICIOS PRESTADOS  ---------------------------------------------------------------------->
516 517 518
  <!--<mat-card appearance="outlined" class="mt-4 flex flex-col gap-2.5 text-[#222] !shadow-xl w-[90vw] md:w-[75vw]">
    <mat-card-header class="flex flex-col items-start w-full">
      <label class="text-[1.1em] font-bold">
519 520 521
        SERVICIOS PRESTADOS
      </label>
    </mat-card-header>
522
    <mat-card-content class="w-full my-2.5">
523 524
      <div class="div-serviocisPrestados divisionGeneral"  [formGroup]="datos_servicio">
        <div class="servicio-descripcion">
525
          <div class="flex flex-row gap-5 pb-5">
526

527
            <div class="basis-1/5">
528
            <mat-form-field style="width: 15rem" appearance="outline" floatLabel="always">
529
              <mat-label>Listado de Requerimientos</mat-label>
530
              <input type="text" placeholder="Buscar requerimiento" matInput #inputBusqueda formControlName="busquedaReq" [matAutocomplete]="auto" maxlength="9"
531 532
                     (input)="onBusquedaRequerimiento($event)">
              <mat-autocomplete #auto="matAutocomplete" (optionSelected)="onEventSeleccion($event)" >
533
                <mat-option *ngFor="let option of requerimientosFiltrados" [value]="option.codigo">
534 535 536 537
                  {{ option.numero }}
                </mat-option>
              </mat-autocomplete>
            </mat-form-field>
538 539
            <mat-label [ngClass]="{'fade-out': isFading}" [innerText]="labelText"></mat-label>
            </div>
540

541
            <div class="grid grid-cols-5 gap-4 basis-4/5">
542
              <div class="contenedorRequerimiento" *ngFor="let card of listRequerimientos" style="display: flex">
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557
                <mat-card>
                  <mat-card-content>
                      <mat-card-subtitle style="font-size: 1rem;font-weight: bold;align-content: center">{{ card.titulo }}</mat-card-subtitle>
                      <div class="w-fit py-2 px-3 flex space-x-4">
                        <button mat-fab aria-label="Eliminar"  matTooltip="Eliminar" matTooltipPosition="above" (click)="deleteRequerimiento(card.id)">
                          <mat-icon class="mat-icon-small">delete</mat-icon>
                        </button>

                        <button mat-fab aria-label="Información" matTooltip="Información" matTooltipPosition="above" (click)="infoRequerimiento(card.codigo)">
                          <mat-icon class="mat-icon-small">info</mat-icon>
                        </button>
                      </div>
                  </mat-card-content>
                </mat-card>
              </div>
558
            </div>
559
          </div>
560

561 562 563
          <div class="grid grid-flow-col md:grid-cols-2 gap-5" >
            <div>
              <mat-form-field class="example-full-width">
564
                <mat-label>DESCRIPCIÓN DEL PROBLEMA </mat-label>
565
                <textarea matInput placeholder="Breve descripción sobrel los problemas encontrados en la sede" formControlName="descripcionServicio"
566 567
                          cdkTextareaAutosize
                          cdkAutosizeMinRows="3"
568 569
                          cdkAutosizeMaxRows="10"
                          [required]="false"></textarea>
570 571 572 573
              </mat-form-field>
            </div>
            <div>
              <mat-form-field class="example-full-width">
574
                <mat-label>DESCRIPCIÓN DE LA CAUSA </mat-label>
575
                <textarea matInput placeholder="Breve descripción sobre las causas del problema" formControlName="causaServicio"
576 577
                          cdkTextareaAutosize
                          cdkAutosizeMinRows="3"
578 579
                          cdkAutosizeMaxRows="10"
                          [required]="false"></textarea>
580 581 582
              </mat-form-field>
            </div>
          </div>
583 584 585
        </div>

        <div class="grid grid-flow-col md:grid-cols-2 gap-5">
586
          <div class="">
587
            <div> <b class="md:text-[1rem] text-[1em] text-black/60">EVIDENCIAS DEL PROBLEMAS : *</b> </div>
588 589 590 591 592
            <div>
              <button mat-fab class="!w-full"
                      [color]="'blue'"
                      (click)="file1.click()">
                <mat-label> SUBIR EVIDENCIA DEL PROBLEMA </mat-label>
593
                <mat-icon class="font-size: 48px; height: 48px; width: 48px">file_open</mat-icon>
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608
              </button>
              <input type="file" #file1 (change)="onEventoSubirArchivo($event)" class="hidden" multiple accept="image/png" />
            </div>
            <br>
            <div *ngFor="let archivo of archivosEvidencia; let i = index" class="flex">
              <div *ngIf="archivo.tipoEvidencia === 1" class="flex w-full">
                <div class="w-2/4"><p>{{ (archivo.file.name + ' (' + (archivo.file.size / 1000) + ' KB)') | truncate:30:true  }}</p></div>
                <div class="w-2/4 grid grid-cols-3 gap-4 justify-center" >
                  <button type="button" (click)="gestionArchivos(i,1,archivo.file)"><mat-icon class="mat-icon-small">info</mat-icon></button>
                  <button type="button" (click)="seleccionarInput(i,1)"><mat-icon class="mat-icon-small">edit</mat-icon></button>
                  <input type="file" #fileEditar1 (change)="gestionArchivos(i,2,$event)" class="hidden" multiple accept="image/png" />
                  <button type="button" (click)="gestionArchivos(i,3)"><mat-icon class="mat-icon-small">delete</mat-icon></button>
                </div>
              </div>
            </div>
609
          </div>
610

611
          <div class="">
612
            <div> <b class="md:text-[1rem] text-[1em] text-black/60">EVIDENCIAS DE SOLUCIONES : *</b> </div>
613 614 615 616 617
            <div>
              <button mat-fab class="!w-full"
                      [color]="'blue'"
                      (click)="file2.click()">
                <mat-label>SUBIR EVIDENCIA DE LA SOLUCIÓN</mat-label>
618
                <mat-icon>file_open</mat-icon>
619 620 621 622 623 624 625 626 627 628 629 630 631 632 633
              </button>
              <input type="file" #file2 (change)="onEventoSubirArchivo($event,2)" class="hidden" multiple accept="image/png">
            </div>
            <br>
            <div *ngFor="let archivo of archivosEvidencia; let i = index" class="flex">
              <div *ngIf="archivo.tipoEvidencia === 2" class="flex w-full">
                <div class="w-2/4"><p>{{ (archivo.file.name + ' (' + (archivo.file.size / 1000) + ' KB)') | truncate:30:true  }}</p></div>
                <div class="w-2/4 grid grid-cols-3 gap-4 justify-center" >
                  <button type="button" (click)="gestionArchivos(i,1,archivo.file,2)"><mat-icon class="mat-icon-small">info</mat-icon></button>
                  <button type="button" (click)="seleccionarInput(i,2)"><mat-icon class="mat-icon-small">edit</mat-icon></button>
                  <input type="file" #fileEditar2 (change)="gestionArchivos(i,2,$event,2)" class="hidden" multiple accept="image/png" />
                  <button type="button" (click)="gestionArchivos(i,3,2)"><mat-icon class="mat-icon-small">delete</mat-icon></button>
                </div>
              </div>
            </div>
634
          </div>
635
        </div>
636

637 638
      </div>
    </mat-card-content>
639
  </mat-card>-->
640
  <!---------------------------------------------------------------------- SERVICIOS PRESTADOS  ---------------------------------------------------------------------->
641

642
  <!---------------------------------------------------------------------- TRABAJOS PRESTADOS  ---------------------------------------------------------------------->
643

644 645 646
  <!--<mat-card appearance="outlined" class="mt-4 flex flex-col gap-2.5 text-[#222] !shadow-xl w-[90vw] md:w-[75vw]">
    <mat-card-header class="flex flex-col items-start w-full">
      <label class="text-[1.1em] font-bold">
647 648 649
        TRABAJOS PRESTADOS
      </label>
    </mat-card-header>
650
    <mat-card-content class="w-full my-2.5">
651 652 653 654 655 656 657 658 659
      <div class="div-trabajosPrestados  divisionGeneral" [formGroup]="datos_trabajo">
        <label style="font-weight: bold; font-size: 1.2rem; font-family: 'inherit'">TIPO DE TRABAJO : </label>
        <mat-form-field class="select-tipoTrabajo">
          <mat-label>Seleccionar tipo de trabajo</mat-label>
          <mat-select formControlName="tipoTrabajo">
            @for (tipoT of listTipoTrabajo; track tipoT) {
              <mat-option [value]="tipoT.value">{{tipoT.viewValue}}</mat-option>
            }
          </mat-select>
660 661 662
        </mat-form-field>
        <br>
        <mat-form-field class="example-full-width">
663 664
          <mat-label>DESCRIPCIÓN DEL TRABAJO</mat-label>
          <textarea matInput placeholder="Breve descripciòn del trabajo realizado" formControlName="descripcionTrabajo" [required]="false"></textarea>
665 666
        </mat-form-field>
      </div>
667
    </mat-card-content>
668
  </mat-card> -->
669

670 671
  <!---------------------------------------------------------------------- TRABAJOS PRESTADOS  ---------------------------------------------------------------------->

672
  <!--<mat-card appearance="outlined" class="mt-4 flex flex-col gap-2.5 text-[#222] !shadow-xl w-[90vw] md:w-[75vw]" [formGroup]="existeMaterialS">
673 674 675 676
    <mat-card-header class="justify-center content-center gap-x-4 w-full mb-4">
      <mat-label class="flex items-center text-[1.1em] font-bold">
        MATERIAL SOBRANTE
      </mat-label>
677
      <mat-button-toggle-group formControlName="existeMaterial" aria-label="Existe material sobrante" value="0">
678
        <mat-button-toggle value="1">SI</mat-button-toggle>
679
        <mat-button-toggle value="0">NO</mat-button-toggle>
680 681 682
      </mat-button-toggle-group>
    </mat-card-header>

683
    <ng-container *ngIf="existeMaterialS.get('existeMaterial')?.value === '1'">
684 685 686 687
      <mat-card-content>
      <ordensalida-component></ordensalida-component>
      </mat-card-content>
    </ng-container>
688

689
  </mat-card>
690

691 692 693 694 695
  <div class="mt-4 flex flex-col">
    <button mat-fab extended (click)="gestionConformidad()">
      <mat-icon>app_registration</mat-icon>
      REGISTRO CONFORMIDAD
    </button>
696
  </div>-->
697 698


699 700 701 702 703
</div>