<div class="container">
  <div class="row">
    <div class="content-block">
      <h2 class="title">權限設定</h2>
      <form role="form">
        <div class="form-group">
          <label for="roleName">權限名稱</label>
          <input type="text" class="form-control" value={{selectedRole.RoleName}} readonly>
        </div>
        <div class="table-responsive">
          <table class="table table-hover">
            <thead>
              <tr>
                <th>所屬模組</th>
                <th>頁面名稱</th>
                <th>權限狀態</th>
              </tr>
            </thead>
            <tbody>
              <tr *ngFor="let p of premissionList">
                <td>{{p.PageModule}}</td>
                <td>{{p.PageName}}</td>
                <td>
                  <label class="switch switch-text switch-warning-outline-alt switch-lg">
                    <input type="checkbox" class="switch-input" id="{{p.PageId}}" name="{{p.PageId}}" [checked]="p.Enable"
                      (click)="onCheckEnable(p)">
                    <span class="switch-label" data-on="啟用" data-off="停用"></span>
                    <span class="switch-handle"></span>
                  </label>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
        <div class="btn-footer">
          <button type="button" class="btn btn-block btn-danger" (click)="backPreviousPage()">回上一頁</button>
        </div>
      </form>
    </div>
  </div>
</div>
