21 lines
1.3 KiB
HTML
21 lines
1.3 KiB
HTML
<div class="min-h-[120px]">
|
|
<ng-container *ngIf="isProductLoading()">
|
|
<div class="flex items-center justify-center h-[72px] p-4 text-gray-500 border border-gray-300 rounded-md">
|
|
<svg class="animate-spin -ml-1 mr-3 h-5 w-5 text-blue-500" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
</svg>
|
|
Loading...
|
|
</div>
|
|
</ng-container>
|
|
<ng-container *ngIf="!isProductLoading()">
|
|
<div class="mb-2 font-medium text-gray-700">Select Product</div>
|
|
<select
|
|
[ngModel]="selectedProduct()"
|
|
(ngModelChange)="onProductChange($event)"
|
|
class="block w-full h-[42px] px-4 py-2 text-gray-700 bg-white border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
|
<option [ngValue]="null">Select a product</option>
|
|
<option *ngFor="let product of products()" [ngValue]="product">{{ product.title }} - {{ product.price | currency : 'EUR' : 'symbol' : '1.2-2' }}</option>
|
|
</select>
|
|
</ng-container>
|
|
</div> |