diff --git a/src/modules/09_leave/components/1_Work/DialogDetail.vue b/src/modules/09_leave/components/1_Work/DialogDetail.vue
index 7d26b171f..2abcf4389 100644
--- a/src/modules/09_leave/components/1_Work/DialogDetail.vue
+++ b/src/modules/09_leave/components/1_Work/DialogDetail.vue
@@ -2,15 +2,21 @@
import { ref, reactive, watch } from "vue";
import http from "@/plugins/http";
import config from "@/app.config";
+import { useQuasar } from "quasar";
import type { FormDetail } from "@/modules/09_leave/interface/response/work";
/** importStores */
import { useCounterMixin } from "@/stores/mixin";
+import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
/** useStore */
const mixin = useCounterMixin();
-const { date2Thai, showLoader, hideLoader } = mixin;
+const stores = useWorklistDataStore();
+const { date2Thai, showLoader, hideLoader, messageError } = mixin;
+const { convertSatatus } = stores;
+
+const $q = useQuasar(); //ใช้ noti quasar
/** props จาก TableList */
const props = defineProps({
@@ -22,7 +28,7 @@ const props = defineProps({
type: Object,
require: true,
},
- colse: {
+ close: {
type: Function,
require: true,
},
@@ -63,9 +69,7 @@ async function fetchDetailByid(id: string) {
formData.checkInImg = data.checkInImg;
formData.checkInLat = data.checkInLat ? data.checkInLat : "";
formData.checkInLon = data.checkInLon ? data.checkInLon : "";
- formData.checkInLocation = data.checkInLocation
- ? data.checkInLocation
- : "-";
+ formData.checkInLocation = data.checkInPOI ? data.checkInPOI : "-";
formData.checkInTime = data.checkInTime ? data.checkInTime : "-";
formData.checkOutDate = data.checkOutDate && date2Thai(data.checkOutDate);
formData.checkOutImg = data.checkOutImg;
@@ -76,27 +80,32 @@ async function fetchDetailByid(id: string) {
: "-";
formData.checkOutTime = data.checkOutTime ? data.checkOutTime : "-";
formData.fullName = data.fullName;
- formData.checkOutLocation = data.checkOutLocation
- ? data.checkOutLocation
- : "-";
+ formData.checkOutLocation = data.checkOutPOI ? data.checkOutPOI : "-";
formData.checkInDescription = data.checkInDescription
? data.checkInDescription
: "-";
formData.checkOutDescription = data.checkOutDescription
? data.checkOutDescription
: "-";
- formData.checkInStatus = data.checkInStatus;
- formData.checkOutStatus = data.checkOutStatus;
+ formData.checkInStatus = data.checkInStatus
+ ? convertSatatus(data.checkInStatus)
+ : "-";
+ formData.checkOutStatus = data.checkOutStatus
+ ? convertSatatus(data.checkOutStatus)
+ : "-";
+ })
+ .catch((err) => {
+ messageError($q, err);
+ closePopup();
})
- .catch((err) => {})
.finally(() => {
hideLoader();
});
}
/** Function ปิด popup */
-function colsePopup() {
- props.colse ? props.colse() : false;
+function closePopup() {
+ props.close ? props.close() : false;
}
watch(
@@ -122,7 +131,7 @@ watch(
round
dense
style="color: #eb0505; background-color: #ffdede"
- @click="colsePopup"
+ @click="closePopup"
/>
@@ -152,14 +161,26 @@ watch(
-
+
- สถานะ
+ สถานะเวลาเข้างาน
+
{{ formData.checkInStatus }}
+
+
+
+ สถานะเวลาออก
+ {{ formData.checkOutStatus }}
+
+
+
diff --git a/src/modules/09_leave/components/1_Work/Tab1.vue b/src/modules/09_leave/components/1_Work/Tab1.vue
index 2339d2e13..fd1245107 100644
--- a/src/modules/09_leave/components/1_Work/Tab1.vue
+++ b/src/modules/09_leave/components/1_Work/Tab1.vue
@@ -143,20 +143,22 @@ async function fetchListTimeRecord() {
(e: DataResTime) => ({
id: e.id,
fullName: e.fullName,
- checkInDate: e.checkInDate && date2Thai(e.checkInDate),
+ checkInDate: e.checkInDate ? date2Thai(e.checkInDate) : "-",
checkInTime: e.checkInTime,
checkInLocation: e.checkInLocation,
checkInLat: e.checkInLat,
checkInLon: e.checkInLon,
- checkInStatus:
- e.checkInStatus && workStore.convertSatatus(e.checkInStatus),
- checkOutDate: e.checkOutDate && date2Thai(e.checkOutDate),
- checkOutLocation: e.checkOutLocation,
- checkOutTime: e.checkOutTime,
- checkOutLat: e.checkOutLat,
- checkOutLon: e.checkOutLon,
- checkOutStatus:
- e.checkOutStatus && workStore.convertSatatus(e.checkOutStatus),
+ checkInStatus: e.checkInStatus
+ ? workStore.convertSatatus(e.checkInStatus)
+ : "-",
+ checkOutDate: e.checkOutDate ? date2Thai(e.checkOutDate) : "-",
+ checkOutLocation: e.checkOutLocation ? e.checkOutLocation : "-",
+ checkOutTime: e.checkOutTime ? e.checkOutTime : "-",
+ checkOutLat: e.checkOutLocation ? e.checkOutLat : "",
+ checkOutLon: e.checkOutLocation ? e.checkOutLon : "",
+ checkOutStatus: e.checkOutStatus
+ ? workStore.convertSatatus(e.checkOutStatus)
+ : "-",
})
);
rows.value = datalist;
@@ -204,6 +206,7 @@ onMounted(async () => {
:rowsPerPage="rowsPerPage"
:maxPage="maxPage"
@update:pagination="updatePaging"
+ :tab="'1'"
/>
diff --git a/src/modules/09_leave/components/1_Work/Tab2.vue b/src/modules/09_leave/components/1_Work/Tab2.vue
index 6592f8278..901a3e4c4 100644
--- a/src/modules/09_leave/components/1_Work/Tab2.vue
+++ b/src/modules/09_leave/components/1_Work/Tab2.vue
@@ -1,5 +1,6 @@
@@ -223,19 +338,20 @@ watch(
class="rounded-borders"
indicator-color="primary"
active-bg-color="teal-1"
- active-class="text-primary"
+ active-color="primary"
+ active-class="bg-teal-1"
>
-
-
+
+
-
+
-
+
([]);
-const modal = ref(false);
const $q = useQuasar();
+
const id = ref(route.params.id as string);
const type = ref("");
-const myForm = ref(null); //form data input
-const edit = ref(false);
-const dateInvestigate = ref(new Date());
-const dateAllegation = ref(new Date());
-const dateEvident = ref(new Date());
-
-const fileDocDataUpload = ref([]);
-
+const modal = ref(false);
+const rows = ref([]);
const modalPerson = ref(false);
+/** search data table*/
+const filter = ref("");
+
function toggleModal() {
modalPerson.value = !modalPerson.value;
}
@@ -132,6 +130,7 @@ const columnsPerson = ref([
},
]);
+/** formData*/
const formData = reactive({
respondentType: "",
organizationId: "",
@@ -163,6 +162,10 @@ const formData = reactive({
// organizationId: "",
// consideredAgency: "",
});
+const disciplineDisciplinary_DocSummaryEvidences = ref([]);
+const disciplineDisciplinary_DocRecordAccusers = ref([]);
+const disciplineDisciplinary_DocWitnessess = ref([]);
+const disciplineDisciplinary_DocOthers = ref([]);
/** ตัวแปร ref สำหรับแสดง validate */
const respondentTypeRef = ref
-
+ -->
+
([]);
const columns = ref([]);
-
function fetchComplainstAdd(data: ArrayPerson[]) {
rowsAdd.value = data;
}
@@ -119,8 +118,7 @@ export const useComplainstDataStore = defineStore(
function filterSelector(val: string, update: Function, type: string) {
update(() => {
const needle = val.toLowerCase();
-
- if (type === "filtercomplainantType") {
+ if (type === "filterrespondentType") {
complainantoptions.value = complainantoptionsMain.value.filter(
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
);
diff --git a/src/modules/11_discipline/store/InvestigateDisStore.ts b/src/modules/11_discipline/store/InvestigateDisStore.ts
index 28ab40b61..6c3587d35 100644
--- a/src/modules/11_discipline/store/InvestigateDisStore.ts
+++ b/src/modules/11_discipline/store/InvestigateDisStore.ts
@@ -47,10 +47,10 @@ export const useInvestigateDisStore = defineStore(
title: e.title,
respondentType: convertRespondentType(e.respondentType),
offenseDetails: convertFault(e.offenseDetails),
- disciplinaryFaultLevel: e.disciplinaryFaultLevel,
- disciplinaryCaseFault: e.disciplinaryCaseFault,
- status: e.status,
- createdAt: date2Thai(e.createdAt),
+ disciplinaryFaultLevel: e.disciplinaryFaultLevel ?? "-",
+ disciplinaryCaseFault: e.disciplinaryCaseFault ?? "-",
+ status: e.status ?? "-",
+ createdAt: e.createdAt ? date2Thai(e.createdAt) : "-",
}));
rows.value = datalist;
@@ -90,6 +90,8 @@ export const useInvestigateDisStore = defineStore(
return "ความผิดวินัยไม่ร้ายแรง";
case "DEADLY":
return "ความผิดวินัยร้ายแรง";
+ default:
+ return "-";
}
}
function convertSatatus(val: string) {
@@ -306,6 +308,7 @@ export const useInvestigateDisStore = defineStore(
optionsTypefault,
optionsfaultLevel,
fecthDirector,
+
visibleColumns,
columns,
visibleColumnsDirector,