h-selfdelivery-admin-panel-p/src/app/pages/divisions/divisions.component.html

48 lines
1.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1>Подразделения</h1>
<h2 *ngIf="chooseName; else ClientNull">Выбран: {{chooseName}}</h2>
<ng-template #ClientNull>
<h2 style="color:red">Выберите клиента</h2>
</ng-template>
<div *ngIf="new_div;else new_Division">
<button (click)="createDivision()">Добавить</button>
<p-table [value]="divisions">
<ng-template pTemplate="header">
<tr style="position:sticky !important; top: 0">
<th style="width:35%">ID</th>
<th style="width:35%">Наименование подразделения</th>
<th></th>
<th></th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-Division>
<!--*ngIf="color()" style="color: red" [ngClass]="{ui-button-danger: true}"-->
<tr>
<td style="width:35%">{{Division.id}}</td>
<td style="width:35%">{{Division.name}}</td>
<td><button (click)="changeDivision1(Division.id, Division.name)">Изменить</button></td>
<td><button (click)="deleteDivision(Division.id)">Удалить</button></td>
</tr>
</ng-template>
</p-table>
</div>
<ng-template #new_Division>
<button (click)="getDivisions()">К списку</button>
<p-table>
<ng-template pTemplate="header">
<tr>
<th>Введите наименование подразделения:</th>
<th><input type="text" style="width: 400px; height: 30px; font-size:20px"></th>
</tr>
</ng-template>
</p-table>
<div *ngIf="create; else change">
<button (click)="createDivision2()">Создать</button>
</div>
<ng-template #change>
<button (click)="changeDivision()">Сохранить</button>
</ng-template>
</ng-template>