Ontica/Empiria.Land.Intranet

View on GitHub
src/app/views/transactions/transaction-editor/requested-services/requested-service-list.component.html

Summary

Maintainability
Test Coverage
<div class="section-title">Conceptos</div>

<div class="tab-container mat-elevation-z1">
  <table mat-table [dataSource]="dataSource">
    <ng-container matColumnDef="number">
      <th mat-header-cell *matHeaderCellDef> # </th>
      <td mat-cell *matCellDef="let row; let i = index;"> <strong>{{i + 1}}</strong> </td>
    </ng-container>
    <ng-container matColumnDef="typeName">
      <th mat-header-cell *matHeaderCellDef> Concepto </th>
      <td mat-cell *matCellDef="let row"> {{ row.typeName }} </td>
    </ng-container>
    <ng-container matColumnDef="taxableBase">
      <th mat-header-cell *matHeaderCellDef class="text-align-right"> Base gravable </th>
      <td mat-cell *matCellDef="let row" class="text-align-right"> {{ row.taxableBase | currency }} </td>
    </ng-container>
    <ng-container matColumnDef="quantity">
      <th mat-header-cell *matHeaderCellDef class="text-align-right"> Cantidad </th>
      <td mat-cell *matCellDef="let row" class="text-align-right"> {{ row.quantity }} </td>
    </ng-container>
    <ng-container matColumnDef="unitName">
      <th mat-header-cell *matHeaderCellDef> Unidad medida </th>
      <td mat-cell *matCellDef="let row"> {{ row.unitName }} </td>
    </ng-container>
    <ng-container matColumnDef="legalBasis">
      <th mat-header-cell *matHeaderCellDef> Fundamento </th>
      <td mat-cell *matCellDef="let row"> {{ row.legalBasis }} </td>
    </ng-container>
    <ng-container matColumnDef="notes">
      <th mat-header-cell *matHeaderCellDef> Observaciones </th>
      <td mat-cell *matCellDef="let row"> {{ row.notes }} </td>
    </ng-container>
    <ng-container matColumnDef="treasuryCode">
      <th mat-header-cell *matHeaderCellDef> Código tesorería </th>
      <td mat-cell *matCellDef="let row"> {{ row.treasuryCode }} </td>
    </ng-container>
    <ng-container matColumnDef="subtotal">
      <th mat-header-cell *matHeaderCellDef class="text-align-right"> Importe </th>
      <td mat-cell *matCellDef="let row" class="text-align-right"> {{ row.subtotal | currency }} </td>
    </ng-container>
    <ng-container matColumnDef="action">
      <th mat-header-cell *matHeaderCellDef> </th>
      <td mat-cell *matCellDef="let row" class="column-action">
        <button mat-icon-button
          title="Eliminar concepto"
          (click)="removeService(row);">
          <mat-icon>
            delete
          </mat-icon>
        </button>
      </td>
    </ng-container>

    <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
    <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
  </table>

  <div *ngIf="dataSource.data.length === 0" class="text-not-found" [style.paddingTop.rem]="0.5">
    <p>No se han agregado conceptos.</p>
  </div>

</div>