diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index 0004ca486..6a078e9a9 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -340,6 +340,13 @@ function changeFormData() { isSave.value = props.data != null ?? true; } +function inputEdit(val:boolean){ + return { + "full-width cursor-pointer ": val, + "full-width cursor-pointer inputgreen": !val, + }; +} + onMounted(() => { mainStore.rowsAdd = []; getListChannel(); @@ -624,10 +631,9 @@ onMounted(() => { ref="dateReceivedRef" outlined dense - :input-style="isReadonly ? { color: 'black' }:{color:'teal'}" + :class="inputEdit(isReadonly)" :readonly="isReadonly" hide-bottom-space - class="full-width datepicker" :model-value=" formData.dateReceived != null ? date2Thai(formData.dateReceived) @@ -701,9 +707,8 @@ onMounted(() => { for="inputDateconsideration" ref="dateConsiderationRef" outlined - :input-style="isReadonly ? { color: 'black' }:{color:'teal'}" + :class="inputEdit(isReadonly)" dense - class="full-width datepicker" :model-value=" formData.dateConsideration != null ? date2Thai(formData.dateConsideration) @@ -774,11 +779,10 @@ onMounted(() => { for="inputDatewarn" ref="dateNotificationRef" outlined - :input-style="isReadonly ? { color: 'black' }:{color:'teal'}" + :class="inputEdit(isReadonly)" dense :readonly="isReadonly" hide-bottom-space - class="full-width datepicker" :model-value=" formData.dateNotification != null ? date2Thai(formData.dateNotification) diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue index 880fa2d8a..8fd204c67 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue @@ -487,6 +487,19 @@ function calendarOpen() { calendarModal.value = true; } +function inputEdit(val: boolean) { + if (formData.investigationExtendHistory.length > 0) { + return { + "full-width cursor-pointer ": val, + }; + } else { + return { + "full-width cursor-pointer ": val, + "full-width cursor-pointer inputgreen": !val, + }; + } +} + onMounted(async () => { mainStore.rowsAdd = []; getOc(); @@ -854,15 +867,8 @@ onMounted(async () => {