mesmsv.component.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <mat-card class="card-small mat-elevation-z8 animated fadeIn fast centre">
  2. <mat-progress-bar *ngIf="loading" mode="indeterminate"></mat-progress-bar>
  3. <mat-grid-list cols="12" rowHeight="85px">
  4. <mat-grid-tile colspan="12">
  5. <mat-card-title>Solicitud de Vacaciones</mat-card-title>
  6. </mat-grid-tile>
  7. <form [formGroup]="formGroup">
  8. <mat-grid-tile colspan="12" *ngIf="perfil !== 1">
  9. <mat-form-field appearance="standard" class="input-text">
  10. <mat-label>Número de Empleado</mat-label>
  11. <input matInput placeholder="Ingrese el nombre" formControlName="numero_empleado" />
  12. <mat-icon matSuffix>tag</mat-icon>
  13. </mat-form-field>
  14. </mat-grid-tile>
  15. <mat-grid-tile colspan="8" *ngIf="perfil === 1">
  16. <mat-form-field appearance="standard" class="input-text" style="width: 83%; padding: 0 !important;" *ngIf="!otro_usuario?.value">
  17. <mat-label>Número de Empleado</mat-label>
  18. <input matInput placeholder="Ingrese el nombre" formControlName="numero_empleado" />
  19. <mat-icon matSuffix>tag</mat-icon>
  20. </mat-form-field>
  21. <mat-form-field appearance="standard" class="example-full-width" style="width: 83%;" *ngIf="otro_usuario?.value" >
  22. <mat-label>Seleccione el empleado</mat-label>
  23. <input type="text" matInput [formControl]="myControl" [matAutocomplete]="auto" (ngModelChange)="cambioEmpleado()">
  24. <mat-autocomplete autoActiveFirstOption #auto="matAutocomplete">
  25. <mat-option *ngFor="let option of filteredOptions | async" [value]="option">
  26. {{option }}
  27. </mat-option>
  28. </mat-autocomplete>
  29. </mat-form-field>
  30. </mat-grid-tile>
  31. <mat-grid-tile colspan="4" *ngIf="perfil === 1">
  32. <section class="example-section">
  33. <mat-checkbox class="example-margin" formControlName="otro_usuario" (ngModelChange)="changeChBx()">Habiliar
  34. para otro usuario</mat-checkbox>
  35. </section>
  36. </mat-grid-tile>
  37. <mat-grid-tile colspan="12">
  38. <mat-form-field appearance="standard" class="input-text">
  39. <mat-label>Fechas solicitadas </mat-label>
  40. <mat-date-range-input [min]="minDate" [rangePicker]="picker" required [disabled]="disabledFechas" >
  41. <input matStartDate placeholder="Fecha Inicial" [value]="fecha_inicio" formControlName="fecha_inicio" />
  42. <input matEndDate placeholder="Fecha Final" [value]="fecha_fin" formControlName="fecha_fin" />
  43. </mat-date-range-input>
  44. <mat-datepicker-toggle matSuffix [for]="picker" ></mat-datepicker-toggle>
  45. <mat-date-range-picker class="text" #picker [dateClass]="dateClass" ></mat-date-range-picker>
  46. <mat-error *ngIf="fecha_inicio!.invalid && fecha_fin!.invalid">{{
  47. fecha_inicio!.hasError("required")
  48. ? "Debe ingresar este campo"
  49. : ""
  50. }}
  51. </mat-error>
  52. </mat-form-field>
  53. </mat-grid-tile>
  54. <mat-grid-tile colspan="12">
  55. <mat-form-field appearance="standard" class="input-text">
  56. <mat-label>Días Vacacionales</mat-label>
  57. <input matInput type="number" min="1" formControlName="dias_vacacionales" [value]="calcular_dias()" (keyup)="applyFilter($event)" />
  58. <mat-icon matSuffix>date_range</mat-icon>
  59. </mat-form-field>
  60. </mat-grid-tile>
  61. <mat-grid-tile colspan="12">
  62. <button mat-raised-button (click)="openDialog()" class="secondary"
  63. [disabled]="formGroup.invalid || envioForm.status">
  64. {{ envioForm.text }}
  65. </button>
  66. </mat-grid-tile>
  67. </form>
  68. </mat-grid-list>
  69. </mat-card>