|
|
@@ -20,8 +20,8 @@
|
|
|
<div class="flex-row items-center">
|
|
|
<mat-form-field style="width: 75%; margin-left: 20px; margin-right: 20px; margin-top: 5px;">
|
|
|
<mat-label>Mostrar:</mat-label>
|
|
|
- <mat-select value="Activos" (selectionChange)="option($event.value)">
|
|
|
- <mat-option value="Activos">Activos</mat-option>
|
|
|
+ <mat-select value="Todos" (selectionChange)="option($event.value)">
|
|
|
+ <mat-option value="Todos">Todos</mat-option>
|
|
|
<mat-option value="Eliminados">Eliminados</mat-option>
|
|
|
</mat-select>
|
|
|
</mat-form-field>
|
|
|
@@ -75,8 +75,9 @@
|
|
|
<th mat-header-cell *matHeaderCellDef> Estado</th>
|
|
|
<td mat-cell *matCellDef="let periodo">
|
|
|
<span
|
|
|
- [ngClass]="{'badge-active': periodo.estatus == 'Activo' , 'badge-inactive' : periodo.estatus == 'Eliminado'}">
|
|
|
- {{periodo.estatus === 'Eliminado' ? 'Eliminado' : 'Activo'}}
|
|
|
+ [ngClass]="{'badge-active': periodo.estatus == 'Activo' , 'badge-inactive' : periodo.estatus == 'Inactivo', 'badge-disabled' : periodo.estatus == 'Eliminado'}">
|
|
|
+ {{periodo.estatus === 'Eliminado' ? 'Eliminado' : periodo.estatus === 'Inactivo' ?
|
|
|
+ 'Inactivo' : 'Activo'}}
|
|
|
</span>
|
|
|
</td>
|
|
|
|
|
|
@@ -88,15 +89,34 @@
|
|
|
<div class="flex-row items-center">
|
|
|
<!-- <button class="action-edit" mat-fab color="Primary"
|
|
|
(click)="openDialog(periodo)"><mat-icon class="icon">edit</mat-icon></button> -->
|
|
|
- <!-- <button class="action-delete" mat-fab color="Primary" #tooltip="matTooltip" matTooltip="Cambiar estado a 'Eliminado'"
|
|
|
- matTooltipPosition="right"
|
|
|
- (click)="deleteLevel(periodo.idNivel)"><mat-icon class="icon">unpublished</mat-icon></button> -->
|
|
|
- <p class="ml-10" #tooltip="matTooltip"
|
|
|
+ <button
|
|
|
+ [ngClass]="{'action-publish': periodo.estatus === 'Inactivo' || periodo.estatus === 'Eliminado' || periodo.estatus === 'Activo', 'disabled-button': periodo.estatus === 'Eliminado' || periodo.estatus === 'Activo'}"
|
|
|
+ mat-fab color="Primary"
|
|
|
+ [disabled]="periodo.estatus === 'Eliminado' || periodo.estatus === 'Activo'"
|
|
|
+ #tooltip="matTooltip"
|
|
|
+ [matTooltip]="periodo.estatus === 'Activo' ? 'Colocar como periodo Inactivo' : periodo.estatus === 'Eliminado' ? 'No se puede activar si el estatus es Eliminado' : 'Colocar como periodo Activo'"
|
|
|
+ matTooltipPosition="right" (click)="activarPeriodo(periodo.idPeriodo)">
|
|
|
+ <mat-icon class="icon">
|
|
|
+ check
|
|
|
+ </mat-icon>
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <!-- Quiero que tenga un estilo deshabilitado si el status sea eliminado o activo -->
|
|
|
+ <button class="action-edit" mat-fab color="Primary" #tooltip="matTooltip"
|
|
|
+ matTooltip="Editar información" matTooltipPosition="right">
|
|
|
+ <mat-icon class="icon">edit</mat-icon>
|
|
|
+ </button>
|
|
|
+ <button class="action-delete" mat-fab color="Primary" #tooltip="matTooltip"
|
|
|
+ matTooltip="Cambiar estado a 'Eliminado'" matTooltipPosition="right"
|
|
|
+ (click)="deleteLevel(periodo.idNivel)">
|
|
|
+ <mat-icon class="icon">delete</mat-icon>
|
|
|
+ </button>
|
|
|
+ <!-- <p class="ml-10" #tooltip="matTooltip"
|
|
|
[matTooltip]="periodo.estado === 'Activo' ? 'Cambiar estado a Eliminado' : 'Cambiar estado a Activo'"
|
|
|
matTooltipPosition="right" style="transform: scale(1.2);">
|
|
|
<mat-slide-toggle [checked]="periodo.estado === 'Activo'" (click)="periodo.estado === 'Activo' ?
|
|
|
deleteLevel(periodo.idNivel): enableLevel(periodo.idNivel)"></mat-slide-toggle>
|
|
|
- </p>
|
|
|
+ </p> -->
|
|
|
</div>
|
|
|
</td>
|
|
|
</ng-container>
|
|
|
@@ -112,4 +132,4 @@
|
|
|
</div>
|
|
|
<mat-paginator [pageSizeOptions]="[5, 10, 15]" showFirstLastButtons class="mat-elevation-z8"></mat-paginator>
|
|
|
</div>
|
|
|
-</div>
|
|
|
+</div>
|