still have some bug about select file

This commit is contained in:
Kenta420 2023-10-20 17:51:07 +07:00
commit ad32fe38ea
11 changed files with 325 additions and 130 deletions

View file

@ -9,7 +9,7 @@
<div class="flex flex-col">
<span
>Recipe Version {{ recipes?.MachineSetting?.configNumber }} |
{{ fileName }}</span
{{ currentFile }}</span
>
</div>
<div class="flex flex-col ml-5">
@ -23,16 +23,17 @@
<div
class="modal-box max-w-[600px] overflow-visible flex flex-col justify-center items-center gap-5"
>
<h3 class="font-bold text-lg">เลือก Recipe ไฟล์</h3>
<h3 class="font-bold text-lg">Select Recipe File</h3>
<div class="flex flex-row gap-5">
<div class="dropdown dropdown-end">
<input
type="text"
tabindex="0"
placeholder="เลือก Recipe File"
placeholder="Select Country"
class="input input-bordered input-sm w-full max-w-xs"
(input)="setRecipeVersion($event)"
(focus)="getRecipeVersions()"
[value]="currentCountryFilter.getValue()"
(input)="setCountryFilter($event)"
(focus)="getRecipeCountries()"
/>
<div
class="dropdown-content z-[1000] min-w-[200px] max-h-[500px] overflow-y-auto"
@ -41,34 +42,32 @@
tabindex="0"
class="menu p-2 shadow bg-base-100 rounded-box w-auto"
>
<li *ngFor="let recipeVersion of recipeVersions">
<a (click)="loadRecipe(recipeVersion)">{{
recipeVersion
<li *ngFor="let country of recipeCountryFiltered">
<a (click)="countrySelected(country)">{{
country
}}</a>
</li>
</ul>
</div>
</div>
<div class="dropdown dropdown-end">
<div *ngIf="isCountrySelected" class="dropdown dropdown-end">
<input
type="text"
tabindex="0"
tabindex="1"
placeholder="เลือก Recipe File"
class="input input-bordered input-sm w-full max-w-xs"
(input)="setRecipeVersion($event)"
(focus)="getRecipeVersions()"
(input)="setFileFilter($event)"
(focus)="getRecipeFileCountries()"
/>
<div
class="dropdown-content z-[1000] min-w-[200px] max-h-[500px] overflow-y-auto"
>
<ul
tabindex="0"
tabindex="1"
class="menu p-2 shadow bg-base-100 rounded-box w-auto"
>
<li *ngFor="let recipeVersion of recipeVersions">
<a (click)="loadRecipe(recipeVersion)">{{
recipeVersion
}}</a>
<li *ngFor="let file of recipeFileCountries">
<a (click)="loadRecipe(file)">{{ file }}</a>
</li>
</ul>
</div>
@ -257,4 +256,11 @@
</div>
</div>
</div>
<button
class="btn btn-circle fixed z-100 bottom-5 right-1"
(click)="scrollToTop()"
>
^
</button>
</main>