2023-10-05 16:04:08 +07:00
|
|
|
<div class="p-4">
|
|
|
|
|
<form class="grid grid-cols-3 gap-4 mb-4" [formGroup]="recipeDetail">
|
|
|
|
|
<div
|
|
|
|
|
class="block col-span-1 p-6 bg-white border border-gray-200 rounded-lg shadow"
|
|
|
|
|
>
|
2023-10-06 09:11:01 +07:00
|
|
|
<div *ngIf="isLoaded; else indicator" [@inOutAnimation]>
|
2023-10-06 15:33:10 +07:00
|
|
|
<div class="flex flex-wrap">
|
|
|
|
|
<h5 class="mb-2 text-xl font-bold text-gray-900">
|
2023-10-19 15:45:24 +07:00
|
|
|
{{ recipeMetaData!.name }}
|
2023-10-06 15:33:10 +07:00
|
|
|
</h5>
|
|
|
|
|
<h5 class="mb-2 px-3 text-xl font-bold text-gray-900">|</h5>
|
|
|
|
|
<h5 class="mb-2 text-xl font-bold text-gray-900">
|
2023-10-19 15:45:24 +07:00
|
|
|
{{ recipeMetaData!.productCode }}
|
2023-10-06 15:33:10 +07:00
|
|
|
</h5>
|
|
|
|
|
</div>
|
2023-10-06 09:11:01 +07:00
|
|
|
<div class="flex items-center mb-2">
|
2023-10-06 15:33:10 +07:00
|
|
|
<div class="flex items-center">
|
|
|
|
|
<p class="text-sm text-gray-500">Last Modify</p>
|
2023-10-06 09:11:01 +07:00
|
|
|
<p class="ml-2 text-sm text-gray-900">
|
2023-10-19 15:45:24 +07:00
|
|
|
{{ recipeMetaData!.lastModified | date : "dd/MM/yyyy HH:mm:ss" }}
|
2023-10-06 09:11:01 +07:00
|
|
|
</p>
|
|
|
|
|
</div>
|
2023-10-05 16:04:08 +07:00
|
|
|
</div>
|
2023-10-06 09:11:01 +07:00
|
|
|
<div class="flex p-3 items-center justify-center w-full">
|
|
|
|
|
<img
|
|
|
|
|
class="rounded-lg shadow"
|
|
|
|
|
src="/assets/{{ 'bn_hot_america_no' }}.png"
|
|
|
|
|
/>
|
2023-10-05 16:04:08 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div
|
2023-10-06 09:11:01 +07:00
|
|
|
class="block col-span-2 p-6 bg-white border border-gray-200 rounded-lg shadow min-h-[300px]"
|
2023-10-05 16:04:08 +07:00
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
*ngIf="isLoaded; else indicator"
|
2023-10-06 09:11:01 +07:00
|
|
|
[@inOutAnimation]
|
2023-10-18 13:57:13 +07:00
|
|
|
class="grid-cols-2 w-full flex flex-col gap-2"
|
2023-10-05 16:04:08 +07:00
|
|
|
>
|
|
|
|
|
<div class="flex items-center">
|
2023-10-18 13:57:13 +07:00
|
|
|
<label class="label text-base mr-3 w-max"
|
2023-10-05 16:04:08 +07:00
|
|
|
><span class="label-text text-base mr-3 w-max">Name:</span></label
|
|
|
|
|
>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
class="input input-sm input-bordered input-ghost w-full"
|
|
|
|
|
formControlName="name"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center">
|
2023-10-18 13:57:13 +07:00
|
|
|
<label class="label">
|
|
|
|
|
<span class="label-text text-base mr-3 w-max"
|
|
|
|
|
>Other Name:</span
|
|
|
|
|
></label
|
|
|
|
|
>
|
2023-10-05 16:04:08 +07:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
class="input input-sm input-bordered input-ghost w-full"
|
|
|
|
|
formControlName="otherName"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center">
|
2023-10-18 13:57:13 +07:00
|
|
|
<label class="label"
|
|
|
|
|
><span class="lable-text text-base mr-3 w-max"
|
|
|
|
|
>Description:</span
|
|
|
|
|
></label
|
|
|
|
|
>
|
2023-10-05 16:04:08 +07:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
class="input input-sm input-bordered input-ghost w-full"
|
|
|
|
|
formControlName="description"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center">
|
2023-10-18 13:57:13 +07:00
|
|
|
<label class="label"
|
|
|
|
|
><span class="label-text text-base mr-3 w-max"
|
|
|
|
|
>Other Description:</span
|
|
|
|
|
></label
|
|
|
|
|
>
|
2023-10-05 16:04:08 +07:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
class="input input-sm input-bordered input-ghost w-full"
|
|
|
|
|
formControlName="otherDescription"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2023-10-18 13:57:13 +07:00
|
|
|
<div class="flex flex-col gap-2">
|
2023-10-18 17:06:56 +07:00
|
|
|
<div class="form-control w-44">
|
|
|
|
|
<label class="flex gap-2 cursor-pointer label">
|
2023-10-05 16:04:08 +07:00
|
|
|
<span class="label-text">Is Use?</span>
|
|
|
|
|
<input type="checkbox" class="toggle" formControlName="isUse" />
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
2023-10-18 17:06:56 +07:00
|
|
|
<div class="form-control w-44">
|
|
|
|
|
<label class="flex gap-2 cursor-pointer label">
|
2023-10-05 16:04:08 +07:00
|
|
|
<span class="label-text">Is Show?</span>
|
|
|
|
|
<input type="checkbox" class="toggle" formControlName="isShow" />
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
2023-10-18 17:06:56 +07:00
|
|
|
<div class="form-control w-44">
|
|
|
|
|
<label class="flex gap-2 cursor-pointer label">
|
2023-10-05 16:04:08 +07:00
|
|
|
<span class="label-text">Is Disable?</span>
|
|
|
|
|
<input type="checkbox" class="toggle" formControlName="disable" />
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-10-18 13:57:13 +07:00
|
|
|
<div
|
|
|
|
|
class="col-span-3 min-h-[500px] max-h-[500px] overflow-auto mb-4 rounded bg-white border border-gray-200 shadow"
|
|
|
|
|
>
|
2023-10-19 15:45:24 +07:00
|
|
|
<app-recipe-list [recipeListData]="matForRecipeList"></app-recipe-list>
|
2023-10-05 16:04:08 +07:00
|
|
|
</div>
|
|
|
|
|
<div class="grid grid-cols-2 gap-4 mb-4">
|
|
|
|
|
<div
|
|
|
|
|
class="flex items-center justify-center rounded bg-gray-50 h-28 dark:bg-gray-800"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-2xl text-gray-400 dark:text-gray-500">
|
|
|
|
|
<svg
|
|
|
|
|
class="w-3.5 h-3.5"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
fill="none"
|
|
|
|
|
viewBox="0 0 18 18"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-linecap="round"
|
|
|
|
|
stroke-linejoin="round"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
d="M9 1v16M1 9h16"
|
|
|
|
|
/>
|
|
|
|
|
</svg>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="flex items-center justify-center rounded bg-gray-50 h-28 dark:bg-gray-800"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-2xl text-gray-400 dark:text-gray-500">
|
|
|
|
|
<svg
|
|
|
|
|
class="w-3.5 h-3.5"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
fill="none"
|
|
|
|
|
viewBox="0 0 18 18"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-linecap="round"
|
|
|
|
|
stroke-linejoin="round"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
d="M9 1v16M1 9h16"
|
|
|
|
|
/>
|
|
|
|
|
</svg>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="flex items-center justify-center rounded bg-gray-50 h-28 dark:bg-gray-800"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-2xl text-gray-400 dark:text-gray-500">
|
|
|
|
|
<svg
|
|
|
|
|
class="w-3.5 h-3.5"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
fill="none"
|
|
|
|
|
viewBox="0 0 18 18"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-linecap="round"
|
|
|
|
|
stroke-linejoin="round"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
d="M9 1v16M1 9h16"
|
|
|
|
|
/>
|
|
|
|
|
</svg>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="flex items-center justify-center rounded bg-gray-50 h-28 dark:bg-gray-800"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-2xl text-gray-400 dark:text-gray-500">
|
|
|
|
|
<svg
|
|
|
|
|
class="w-3.5 h-3.5"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
fill="none"
|
|
|
|
|
viewBox="0 0 18 18"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-linecap="round"
|
|
|
|
|
stroke-linejoin="round"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
d="M9 1v16M1 9h16"
|
|
|
|
|
/>
|
|
|
|
|
</svg>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="flex items-center justify-center h-48 mb-4 rounded bg-gray-50 dark:bg-gray-800"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-2xl text-gray-400 dark:text-gray-500">
|
|
|
|
|
<svg
|
|
|
|
|
class="w-3.5 h-3.5"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
fill="none"
|
|
|
|
|
viewBox="0 0 18 18"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-linecap="round"
|
|
|
|
|
stroke-linejoin="round"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
d="M9 1v16M1 9h16"
|
|
|
|
|
/>
|
|
|
|
|
</svg>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="grid grid-cols-2 gap-4">
|
|
|
|
|
<div
|
|
|
|
|
class="flex items-center justify-center rounded bg-gray-50 h-28 dark:bg-gray-800"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-2xl text-gray-400 dark:text-gray-500">
|
|
|
|
|
<svg
|
|
|
|
|
class="w-3.5 h-3.5"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
fill="none"
|
|
|
|
|
viewBox="0 0 18 18"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-linecap="round"
|
|
|
|
|
stroke-linejoin="round"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
d="M9 1v16M1 9h16"
|
|
|
|
|
/>
|
|
|
|
|
</svg>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="flex items-center justify-center rounded bg-gray-50 h-28 dark:bg-gray-800"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-2xl text-gray-400 dark:text-gray-500">
|
|
|
|
|
<svg
|
|
|
|
|
class="w-3.5 h-3.5"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
fill="none"
|
|
|
|
|
viewBox="0 0 18 18"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-linecap="round"
|
|
|
|
|
stroke-linejoin="round"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
d="M9 1v16M1 9h16"
|
|
|
|
|
/>
|
|
|
|
|
</svg>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="flex items-center justify-center rounded bg-gray-50 h-28 dark:bg-gray-800"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-2xl text-gray-400 dark:text-gray-500">
|
|
|
|
|
<svg
|
|
|
|
|
class="w-3.5 h-3.5"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
fill="none"
|
|
|
|
|
viewBox="0 0 18 18"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-linecap="round"
|
|
|
|
|
stroke-linejoin="round"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
d="M9 1v16M1 9h16"
|
|
|
|
|
/>
|
|
|
|
|
</svg>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="flex items-center justify-center rounded bg-gray-50 h-28 dark:bg-gray-800"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-2xl text-gray-400 dark:text-gray-500">
|
|
|
|
|
<svg
|
|
|
|
|
class="w-3.5 h-3.5"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
fill="none"
|
|
|
|
|
viewBox="0 0 18 18"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-linecap="round"
|
|
|
|
|
stroke-linejoin="round"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
d="M9 1v16M1 9h16"
|
|
|
|
|
/>
|
|
|
|
|
</svg>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2023-10-06 15:33:10 +07:00
|
|
|
class="sticky bottom-0 col-span-3 flex justify-end bg-white rounded-full drop-shadow-2xl p-3"
|
2023-10-05 16:04:08 +07:00
|
|
|
>
|
|
|
|
|
<button
|
|
|
|
|
(click)="onPressConfirmClose()"
|
|
|
|
|
class="btn btn-error w-36 text-white mr-2"
|
|
|
|
|
>
|
|
|
|
|
Cancel
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
(click)="onPressConfirmSave()"
|
|
|
|
|
class="btn btn-success w-36 text-white"
|
2023-10-06 09:11:01 +07:00
|
|
|
[disabled]="!isValueChanged"
|
2023-10-05 16:04:08 +07:00
|
|
|
>
|
|
|
|
|
Save
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
2023-10-18 13:57:13 +07:00
|
|
|
<ng-template #indicator>
|
|
|
|
|
<div class="flex w-full h-full justify-center items-center">
|
|
|
|
|
<span class="loading loading-spinner w-20"></span>
|
|
|
|
|
</div>
|
|
|
|
|
</ng-template>
|
2023-10-05 16:04:08 +07:00
|
|
|
<confirm-modal
|
|
|
|
|
[title]="confirmSave.title"
|
|
|
|
|
[message]="confirmSave.message"
|
|
|
|
|
[confirmCallBack]="confirmSave.confirmCallBack"
|
|
|
|
|
[show]="showConfirmSaveModal"
|
|
|
|
|
></confirm-modal>
|
|
|
|
|
|
|
|
|
|
<confirm-modal
|
|
|
|
|
[title]="confirmClose.title"
|
|
|
|
|
[message]="confirmClose.message"
|
|
|
|
|
[confirmCallBack]="confirmClose.confirmCallBack"
|
|
|
|
|
[show]="showConfirmCloseModal"
|
|
|
|
|
></confirm-modal>
|
2023-10-05 13:07:56 +07:00
|
|
|
</div>
|