accesos-perfil.component.html 552 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<table>
  <thead>
    <tr>
      <th></th>
      <th *ngFor="let menu of menus">{{ menu.name }}</th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let profile of profiles; let profileIndex = index">
      <th>{{ profile.name }}</th>
      <td *ngFor="let menu of menus; let menuIndex = index">
        <input type="checkbox" [(ngModel)]="permissionsMatrix[profileIndex][menuIndex]"
          (change)="togglePermission(profileIndex, menuIndex)">
      </td>
    </tr>
  </tbody>
</table>

<button (click)="savePermissions()">Guardar Permisos</button>