Commit a793c094 by Natthaphat

แก้ bg-readonly

parent 7c12a7e4
......@@ -75,7 +75,7 @@
</span>
</label>
<input type="text" id="input-label" class="ti-form-input w-1/2"
[ngClass]="{'bg-input-readonly':currentModal=='edit'}" [readonly]="currentModal=='edit'"
[ngClass]="{'!bg-input-readonly':currentModal=='edit'}" [readonly]="currentModal=='edit'"
[(ngModel)]="competencyCourse.select.competencyCourseId">
<label for="detail_th" class="ti-form-label mt-2rem">ชื่อหลักสูตร (ไทย)<span
class="text-danger">*</span></label>
......
......@@ -78,7 +78,7 @@
</span>
</label>
<input type="text" id="input-label" class="ti-form-input w-1/2"
[ngClass]="{'bg-input-readonly':currentModal=='edit'}" [readonly]="currentModal=='edit'"
[ngClass]="{'!bg-input-readonly':currentModal=='edit'}" [readonly]="currentModal=='edit'"
[(ngModel)]="competoncy_type.competencyTypeId">
<label for="detail_th" class="ti-form-label mt-1rem">ชื่อประเภท (ไทย)<span class="text-danger">*</span></label>
<input type="text" id="detail_th" class="ti-form-input w-2/3" [(ngModel)]="competoncy_type.tdesc">
......@@ -109,85 +109,6 @@
</mat-dialog-actions>
</ng-template>
<!-- <div id="type-registration-component-page-modal" class="hs-overlay hidden ti-modal">
<div class="hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)]">
<div class="max-h-full overflow-hidden ti-modal-content">
<div class="ti-modal-header">
<h3 class="text-xxl font-bold text-primary">
{{currentModal=='add'?'เพิ่มประเภทสมรรถนะ':'แก้ไขประเภทสมรรถนะ'}}
</h3>
<div class="flex justify-end">
<button type="button" class="hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay="#type-registration-component-page-modal">
<span class="sr-only">Close</span>
<i class="ti ti-circle-x fs-xxl"></i>
</button>
</div>
</div>
<div class="ti-modal-center">
<div class="flex justify-end" style="padding-right: 1rem;">
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(click)="clearData(currentModal)">
<svg class="svg-indigo" width="16" height="16" viewBox="0 0 64.00 64.00"
xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#595BEA" stroke-width="3.84"
transform="rotate(45)matrix(-1, 0, 0, 1, 0, 0)">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<path d="M15 49A24 24 0 0 1 32 8"></path>
<path d="M49 15a24 24 0 0 1-17 41"></path>
<polyline points="15.03 40 15.03 48.97 8 48.97"></polyline>
<polyline points="48.97 24 48.97 15.03 56 15.03"></polyline>
</g>
</svg>
Clear
</button>
</div>
</div>
</div>
<div class="ti-modal-body" style="padding-top: 0px;">
<label for="input-label" class="ti-form-label mt-1rem">รหัส<span class="text-danger">* <ng-container
*ngIf="currentModal=='add'&&checkPrimary()">
รหัสซ้ำ
</ng-container></span></label>
<input type="text" id="input-label" class="ti-form-input w-1/2"
[ngClass]="{'bg-input-readonly':currentModal=='edit'}" [readonly]="currentModal=='edit'"
[(ngModel)]="competoncy_type.competencyTypeId">
<label for="detail_th" class="ti-form-label mt-1rem">ชื่อประเภท (ไทย)<span
class="text-danger">*</span></label>
<input type="text" id="detail_th" class="ti-form-input w-2/3" [(ngModel)]="competoncy_type.tdesc">
<label for="detail_eng" class="ti-form-label mt-1rem">ชื่อประเภท (อังกฤษ)</label>
<input type="text" id="detail_eng" class="ti-form-input w-2/3" [(ngModel)]="competoncy_type.edesc">
<label for="detail_eng" class="ti-form-label mt-1rem">ชื่อย่อ<span class="text-danger">*</span></label>
<input type="text" id="detail_eng" class="ti-form-input w-2/3" [(ngModel)]="competoncy_type.shortName">
<label for="detail_eng" class="ti-form-label mt-1rem">ระดับความคาดหวัง <span
class="text-danger">*</span></label>
<input type="text" id="detail_eng" class="ti-form-input" style="width: 200px;"
oninput="this.value = this.value.replace(/\D/g, '')" [(ngModel)]="competoncy_type.expectationLevel">
<label for="detail_eng" class="ti-form-label mt-1rem">น้ำหนัก</label>
<input type="text" id="detail_eng" class="ti-form-input" style="width: 200px;"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="competoncy_type.weight">
<div class="flex justify-end mt-2rem mb-1rem">
<button type="button"
class="hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
data-hs-overlay="#type-registration-component-page-modal">
ย้อนกลับ
</button>
<button type="button" class="ti-btn ti-btn-success"
data-hs-overlay="#type-registration-component-page-alert-modal"
[class.ti-btn-disabled]="!competoncy_type.competencyTypeId||!competoncy_type.tdesc||!competoncy_type.shortName||(currentModal=='add'&&checkPrimary())"
[disabled]="!competoncy_type.competencyTypeId||!competoncy_type.tdesc||!competoncy_type.shortName||(currentModal=='add'&&checkPrimary())">
บันทึกข้อมูล
</button>
</div>
</div>
</div>
</div>
</div> -->
<div id="type-registration-component-page-alert-modal" class="hs-overlay hidden ti-modal">
<div class="hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center">
<div class="max-h-full overflow-hidden ti-modal-content w-full">
......
......@@ -75,7 +75,7 @@
</span>
</label>
<input type="text" id="input-label" class="ti-form-input w-1/2"
[ngClass]="{'bg-input-readonly':currentModal=='edit'}" [readonly]="currentModal=='edit'"
[ngClass]="{'!bg-input-readonly':currentModal=='edit'}" [readonly]="currentModal=='edit'"
[(ngModel)]="assessment.select.assessmentId">
<label for="detail_th" class="ti-form-label mt-1rem">ชื่อเครื่องมือประเมิน (ไทย)<span
class="text-danger">*</span></label>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment