Fix crud dropdown
This commit is contained in:
parent
d3534d26eb
commit
9e1fb59ac5
@ -93,15 +93,14 @@
|
|||||||
<label for="description">Description</label>
|
<label for="description">Description</label>
|
||||||
<textarea id="description" pInputTextarea [(ngModel)]="product.description" required rows="3" cols="20"></textarea>
|
<textarea id="description" pInputTextarea [(ngModel)]="product.description" required rows="3" cols="20"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="status">Inventory Status</label>
|
<label for="status">Inventory Status</label>
|
||||||
<p-dropdown id="status" [options]="statuses" optionLabel="label" [(ngModel)]="product.inventoryStatus">
|
<p-dropdown [(ngModel)]="product.inventoryStatus" inputId="inventoryStatus" optionValue="label" [options]="statuses" placeholder="Select">
|
||||||
<ng-template pTemplate="selectedItem">
|
<ng-template pTemplate="selectedItem">
|
||||||
<span *ngIf="product && product.inventoryStatus" [class]="'product-badge status-' + product.inventoryStatus.value.toLowerCase()">{{product.inventoryStatus.value}}</span>
|
<span *ngIf="product && product.inventoryStatus" [class]="'product-badge status-' + product.inventoryStatus.toString().toLowerCase()">{{product.inventoryStatus}}</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template let-status pTemplate="status">
|
<ng-template let-option pTemplate="item">
|
||||||
<span [class]="'product-badge status-' + status.value.toLowerCase()">{{status.label}}</span>
|
<span [class]="'product-badge status-' + option.value">{{option.label}}</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</p-dropdown>
|
</p-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user