Files
fr.Genesis_V1/src/app/modules/case/bills/bills.component.html
T
2026-10-22 16:15:16 +02:00

109 lines
5.3 KiB
HTML

<div class="body" *ngIf="spinner == true">
<mat-spinner></mat-spinner>
</div>
<div class="body" *ngIf="spinner == false">
<div class="body_action">
<div class="body_action-section">
<button mat-fab color="warn" [routerLink]="['/case']">
<mat-icon>arrow_back</mat-icon>
</button>
<h2 style="margin-left: 5%">Regresar</h2>
</div>
<div class="body_action-section_two">
<p>
<strong>Cliente: </strong>{{caseFee ? caseFee !== [] ? caseFee[0].businessname : this.infoCase!.businessname : this.infoCase!.client.businessname}}
</p>
<p>
<strong>Caso: </strong>{{caseFee ? caseFee !== [] ? caseFee[0].case : this.infoCase!.name : this.infoCase!.name}}
</p>
</div>
<div class="body_action-section_three">
<button mat-mini-fab color="primary" matTooltip="Agregar Actividad" (click)="addActivities()">
<mat-icon>add</mat-icon>
</button>
<button mat-mini-fab color="primary" matTooltip="Filtrar" (click)="filterActivities()">
<mat-icon>search</mat-icon>
</button>
<button mat-mini-fab color="primary" matTooltip="Exportar Excel" (click)="exportFile()" [disabled]="export">
<mat-icon>download</mat-icon>
</button>
</div>
</div>
<div class="body_table">
<mat-form-field appearance="standard">
<mat-label>Filter</mat-label>
<input matInput (keyup)="applyFilter($event)" placeholder="Ex. Mia" #input>
</mat-form-field>
<div class="mat-elevation-z8">
<table mat-table [dataSource]="dataSource" matSort class="body_table-table">
<ng-container matColumnDef="id">
<th mat-header-cell *matHeaderCellDef mat-sort-header> ID</th>
<td mat-cell *matCellDef="let row"> {{row.id}} </td>
<td mat-footer-cell *matFooterCellDef><strong></strong></td>
</ng-container>
<ng-container matColumnDef="description">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Descripcion</th>
<td mat-cell *matCellDef="let row"> {{row.prevdescription}}</td>
<td mat-footer-cell *matFooterCellDef></td>
</ng-container>
<ng-container matColumnDef="created">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Fecha de Creacioón</th>
<td mat-cell *matCellDef="let row"> {{row.created}}</td>
<td mat-footer-cell *matFooterCellDef></td>
</ng-container>
<ng-container matColumnDef="displayName">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Responsable</th>
<td mat-cell *matCellDef="let row"> {{row.name}} {{row.lastname}} ({{row.acronym}})</td>
<td mat-footer-cell *matFooterCellDef></td>
</ng-container>
<ng-container matColumnDef="debe">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Debe</th>
<td mat-cell *matCellDef="let row"> {{row.id_paytype == 3 ? (row.amount | money) : '-'}} </td>
<td mat-footer-cell *matFooterCellDef>
${{(infoCase ? 0 : (caseFee[0].debe === null ? 0 : caseFee[0].debe)) | money}}</td>
</ng-container>
<ng-container matColumnDef="haber">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Haber</th>
<td mat-cell *matCellDef="let row"> {{row.id_paytype == 2 ? (row.amount | money) : '-'}} </td>
<td mat-footer-cell *matFooterCellDef>
${{(infoCase ? 0 : (caseFee[0].haber === null ? 0 : caseFee[0].haber)) | money}}</td>
</ng-container>
<!-- <ng-container matColumnDef="credit">-->
<!-- <th mat-header-cell *matHeaderCellDef mat-sort-header> Haber</th>-->
<!-- <td mat-cell *matCellDef="let row"> {{row.id_paytype === 2 ? row.total : '-' }} </td>-->
<!-- <td mat-footer-cell *matFooterCellDef> ${{accountStatus.credito}}</td>-->
<!-- </ng-container>-->
<ng-container matColumnDef="edit">
<th mat-header-cell *matHeaderCellDef mat-sort-header></th>
<td mat-cell *matCellDef="let row">
<button mat-icon-button (click)="addActivities(row)" matTooltip="Editar" matTooltipPosition="right">
<mat-icon>edit</mat-icon>
</button>
</td>
<td mat-footer-cell *matFooterCellDef><strong>TOTAL</strong></td>
</ng-container>
<ng-container matColumnDef="delete">
<th mat-header-cell *matHeaderCellDef mat-sort-header></th>
<td mat-cell *matCellDef="let row">
<button mat-icon-button (click)="deleteActivity(row.id)" matTooltip="Eliminar"
matTooltipPosition="right">
<mat-icon>delete</mat-icon>
</button>
</td>
<td mat-footer-cell *matFooterCellDef>{{(infoCase ? 0 : (caseFee[0].total === null ? 0 : caseFee[0].total)) | money}}
$
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
<tr mat-footer-row *matFooterRowDef="displayedColumns"></tr>
<tr class="mat-row" *matNoDataRow>
<td class="mat-cell" colspan="4">No data matching the filter "{{input.value}}"</td>
</tr>
</table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50]" (page)="onPageChange($event)"></mat-paginator>
</div>
</div>
</div>