diff --git a/src/modules/09_leave/components/1_Work/TableList.vue b/src/modules/09_leave/components/1_Work/TableList.vue index 8096f9634..cb04f3d6d 100644 --- a/src/modules/09_leave/components/1_Work/TableList.vue +++ b/src/modules/09_leave/components/1_Work/TableList.vue @@ -12,6 +12,8 @@ import DialogEdit from "@/modules/09_leave/components/1_Work/DialogEdit.vue"; import { useCounterMixin } from "@/stores/mixin"; import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore"; +import { checkPermission } from "@/utils/permissions"; + /** useStore */ const mixin = useCounterMixin(); const workStore = useWorklistDataStore(); @@ -132,16 +134,31 @@ onMounted(() => { > - + {{ col.label }} - - + + + รายละเอียด + + { icon="edit" @click.prevent="onClickEdit(props.row)" > - แก้ไข + แก้ไขข้อมูล - + {{ (currentPage - 1) * Number(pagination.rowsPerPage) + @@ -189,7 +201,6 @@ onMounted(() => { {{ col.value }} - diff --git a/src/modules/09_leave/components/3_WorkTime/DialogForm.vue b/src/modules/09_leave/components/3_WorkTime/DialogForm.vue index a4f3c41a2..c36ba2ca0 100644 --- a/src/modules/09_leave/components/3_WorkTime/DialogForm.vue +++ b/src/modules/09_leave/components/3_WorkTime/DialogForm.vue @@ -20,7 +20,7 @@ const $q = useQuasar(); const mixin = useCounterMixin(); const { dialogConfirm, success, messageError } = mixin; - +const isRead = defineModel("isRead", { required: true }); /** propsData จาก RoundMain */ const props = defineProps({ modal: { @@ -145,6 +145,7 @@ async function putRoundDuty(id: string) { //** Function ปิด Popup */ function close() { props.closeDialog?.(); + isRead.value = false; } /***/ @@ -183,7 +184,9 @@ watch( props.editCheck === 'add' ? 'เพิ่มรอบการปฏิบัติงาน' : props.detailData - ? `แก้ไขรอบ ${props.detailData.round}` + ? isRead + ? `รายละเอียดรอบ ${props.detailData.round}` + : `แก้ไขรอบ ${props.detailData.round}` : '' " :close="close" @@ -199,7 +202,7 @@ watch( เวลา Default - + สถานะการใช้งาน - + - - + + (useAttrs()); const modal = ref(false); +const isRead = ref(false); const detailData = ref(); const editCheck = ref(""); @@ -83,6 +85,20 @@ function openModal(data: any, check: string) { } } +/** + * + * @param data ข้อมูลรอบการปฏิบัติงาน + * @param check action แก้ไข,เพิ่ม + */ +function openModalDetail(data: any, check: string) { + modal.value = true; + editCheck.value = check; + if (check === "edit") { + isRead.value = true; + detailData.value = data; + } +} + /** Function ปิด popup รายละเอียดและการเพิ่ม*/ function closeDialog() { modal.value = false; @@ -109,9 +125,10 @@ onMounted(() => { { > - { - - + + + รายละเอียด + + แก้ไขข้อมูล + + - - + >ลบข้อมูล + { เวลา Default - + { :editCheck="editCheck" :detailData="detailData" :fetchData="fetchListRoind" + v-model:isRead="isRead" />
เวลา Default
สถานะการใช้งาน