Merge branch 'develop' of https://github.com/Frappet/bma-ehr-frontend into develop
This commit is contained in:
commit
8d5c6fcb61
12 changed files with 208 additions and 236 deletions
|
|
@ -16,8 +16,9 @@ export default {
|
||||||
/**ลบ ช่องทางการร้องเรียน
|
/**ลบ ช่องทางการร้องเรียน
|
||||||
* @param id type
|
* @param id type
|
||||||
*/
|
*/
|
||||||
complaintListOp:()=>`${disciplineMain}/complaint_Channel`,
|
complaintListOp: () => `${disciplineMain}/complaint_Channel`,
|
||||||
complaintChannelbyId: (id: string) => `${disciplineMain}/complaint_Channel/${id}`,
|
complaintChannelbyId: (id: string) =>
|
||||||
|
`${disciplineMain}/complaint_Channel/${id}`,
|
||||||
complaintAdd: () => `${disciplineMain}/complaint`,
|
complaintAdd: () => `${disciplineMain}/complaint`,
|
||||||
complaintbyId: (id: string) => `${disciplineMain}/complaint/${id}`,
|
complaintbyId: (id: string) => `${disciplineMain}/complaint/${id}`,
|
||||||
complaintReject: (id: string) => `${disciplineMain}/complaint/reject/${id}`,
|
complaintReject: (id: string) => `${disciplineMain}/complaint/reject/${id}`,
|
||||||
|
|
@ -46,7 +47,7 @@ export default {
|
||||||
investigateReject: (id: string) => `${investigate}/reject/${id}`,
|
investigateReject: (id: string) => `${investigate}/reject/${id}`,
|
||||||
investigateResume: (id: string) => `${investigate}/resume/${id}`,
|
investigateResume: (id: string) => `${investigate}/resume/${id}`,
|
||||||
investigateApprove: (id: string) => `${investigate}/approve/${id}`,
|
investigateApprove: (id: string) => `${investigate}/approve/${id}`,
|
||||||
|
investigateCalendar: () => `${investigate}/calendar`,
|
||||||
|
|
||||||
/** ระบบวินัยเรื่องสอบสวน */
|
/** ระบบวินัยเรื่องสอบสวน */
|
||||||
disciplineDisciplinary: () => `${discipline}`,
|
disciplineDisciplinary: () => `${discipline}`,
|
||||||
|
|
@ -62,16 +63,18 @@ export default {
|
||||||
disciplinaryResume: (id: string) => `${discipline}/resume/${id}`,
|
disciplinaryResume: (id: string) => `${discipline}/resume/${id}`,
|
||||||
disciplinaryApprove: (id: string) => `${discipline}/approve/${id}`,
|
disciplinaryApprove: (id: string) => `${discipline}/approve/${id}`,
|
||||||
disciplinarySuspend: (id: string) => `${discipline}/suspend/${id}`,
|
disciplinarySuspend: (id: string) => `${discipline}/suspend/${id}`,
|
||||||
|
disciplinaryCalendar: () => `${discipline}/calendar`,
|
||||||
|
|
||||||
/** รายการผลการพิจารณาทางวินัย*/
|
/** รายการผลการพิจารณาทางวินัย*/
|
||||||
listResult: () => `${disciplineMain}/result`,
|
listResult: () => `${disciplineMain}/result`,
|
||||||
listResultById: (id: string) => `${disciplineMain}/result/${id}`,
|
listResultById: (id: string) => `${disciplineMain}/result/${id}`,
|
||||||
|
|
||||||
/** ผู้ถูกพักราชการ */
|
/** ผู้ถูกพักราชการ */
|
||||||
suspendMain:(page: number, pageSize: number, keyword: string) => `${suspend}?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
suspendMain: (page: number, pageSize: number, keyword: string) =>
|
||||||
|
`${suspend}?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||||
suspendById: (id: string) => `${suspend}/${id}`,
|
suspendById: (id: string) => `${suspend}/${id}`,
|
||||||
|
|
||||||
suspendReport: () => `${suspend}/report`,
|
suspendReport: () => `${suspend}/report`,
|
||||||
|
|
||||||
reportresult:(id:string)=>`${disciplineMain}/result/report/${id}`,
|
reportresult: (id: string) => `${disciplineMain}/result/report/${id}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -624,7 +624,7 @@ onMounted(() => {
|
||||||
ref="dateReceivedRef"
|
ref="dateReceivedRef"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
:input-style="isReadonly ? { color: 'teal' }:{color:'black'}"
|
:input-style="isReadonly ? { color: 'black' }:{color:'teal'}"
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="full-width datepicker"
|
class="full-width datepicker"
|
||||||
|
|
@ -701,7 +701,7 @@ onMounted(() => {
|
||||||
for="inputDateconsideration"
|
for="inputDateconsideration"
|
||||||
ref="dateConsiderationRef"
|
ref="dateConsiderationRef"
|
||||||
outlined
|
outlined
|
||||||
:input-style="isReadonly ? { color: 'teal' }:{color:'black'}"
|
:input-style="isReadonly ? { color: 'black' }:{color:'teal'}"
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker"
|
class="full-width datepicker"
|
||||||
:model-value="
|
:model-value="
|
||||||
|
|
@ -774,7 +774,7 @@ onMounted(() => {
|
||||||
for="inputDatewarn"
|
for="inputDatewarn"
|
||||||
ref="dateNotificationRef"
|
ref="dateNotificationRef"
|
||||||
outlined
|
outlined
|
||||||
:input-style="isReadonly ? { color: 'teal' }:{color:'black'}"
|
:input-style="isReadonly ? { color: 'black' }:{color:'teal'}"
|
||||||
dense
|
dense
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
|
||||||
|
|
@ -14,39 +14,26 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="props.modal" persistent>
|
<q-dialog v-model="props.modal">
|
||||||
<q-card style="min-width: 60vw">
|
<q-card style="min-width: 60vw">
|
||||||
<q-toolbar>
|
<q-toolbar>
|
||||||
<q-toolbar-title class="text-subtitle2 text-bold">ปฎิทิน</q-toolbar-title>
|
<q-toolbar-title class="text-subtitle2 text-bold"
|
||||||
<q-btn
|
>ปฎิทิน</q-toolbar-title
|
||||||
icon="close"
|
>
|
||||||
unelevated
|
<q-btn
|
||||||
round
|
icon="close"
|
||||||
dense
|
unelevated
|
||||||
@click="props.close"
|
round
|
||||||
style="color: #ff8080; background-color: #ffdede"
|
dense
|
||||||
/>
|
@click="props.close"
|
||||||
</q-toolbar>
|
style="color: #ff8080; background-color: #ffdede"
|
||||||
<q-separator />
|
/>
|
||||||
<q-card-section class="q-pa-md bg-grey-1">
|
</q-toolbar>
|
||||||
<Calendar/>
|
|
||||||
</q-card-section>
|
|
||||||
<!-- <q-separator /> -->
|
|
||||||
|
|
||||||
<!-- <div class="row justify-end q-px-md q-py-sm items-center">
|
|
||||||
<q-btn
|
|
||||||
dense
|
|
||||||
color="public"
|
|
||||||
id="onSubmit"
|
|
||||||
class="q-px-md q-py-xs"
|
|
||||||
@click="savePost"
|
|
||||||
>
|
|
||||||
|
|
||||||
<div>{{ props.btnTitle }}</div>
|
<q-separator />
|
||||||
|
<q-card-section class="q-pa-md bg-grey-1 scroll">
|
||||||
<q-tooltip>{{ props.btnTitle }}</q-tooltip>
|
<Calendar />
|
||||||
</q-btn>
|
</q-card-section>
|
||||||
</div> -->
|
</q-card>
|
||||||
</q-card>
|
</q-dialog>
|
||||||
</q-dialog>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
|
||||||
|
|
@ -7,17 +7,22 @@ import timeGridPlugin from "@fullcalendar/timegrid";
|
||||||
import interactionPlugin from "@fullcalendar/interaction";
|
import interactionPlugin from "@fullcalendar/interaction";
|
||||||
import allLocales from "@fullcalendar/core/locales-all";
|
import allLocales from "@fullcalendar/core/locales-all";
|
||||||
import listPlugin from "@fullcalendar/list";
|
import listPlugin from "@fullcalendar/list";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
|
import type { DataDateMonthObject } from "@/modules/09_leave/interface/response/leave";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { monthYear2Thai } = mixin;
|
const { monthYear2Thai, showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
import type { DataDateMonthObject } from "@/modules/09_leave/interface/response/leave";
|
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
/**
|
/**
|
||||||
* Option ของปฏิทิน
|
* Option ของปฏิทิน
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const fullCalendar = ref<any>(); //ref calendar
|
const fullCalendar = ref<any>(); //ref calendar
|
||||||
const calendarOptions = ref<CalendarOptions>({
|
const calendarOptions = ref<CalendarOptions>({
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
@ -47,64 +52,7 @@ const calendarOptions = ref<CalendarOptions>({
|
||||||
eventBorderColor: "#50a5fc",
|
eventBorderColor: "#50a5fc",
|
||||||
displayEventTime: false,
|
displayEventTime: false,
|
||||||
editable: true,
|
editable: true,
|
||||||
events: [
|
events: [],
|
||||||
{
|
|
||||||
groupId: "3",
|
|
||||||
title: "ลากิจส่วนตัว",
|
|
||||||
start: "2023-10-10",
|
|
||||||
allDay: true,
|
|
||||||
status: "done",
|
|
||||||
color: "#E3FDDA",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
groupId: "3",
|
|
||||||
title: "ลากิจส่วนตัว",
|
|
||||||
start: "2023-11-10",
|
|
||||||
allDay: true,
|
|
||||||
status: "done",
|
|
||||||
color: "#E3FDDA",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
groupId: "3",
|
|
||||||
title: "ลากิจส่วนตัว",
|
|
||||||
start: "2023-10-11",
|
|
||||||
allDay: true,
|
|
||||||
status: "done",
|
|
||||||
color: "#E3FDDA",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
groupId: "3",
|
|
||||||
title: "ลากิจส่วนตัว",
|
|
||||||
start: "2023-10-12",
|
|
||||||
allDay: true,
|
|
||||||
status: "done",
|
|
||||||
color: "#E3FDDA",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
groupId: "3",
|
|
||||||
title: "ลากิจส่วนตัว",
|
|
||||||
start: "2023-10-13",
|
|
||||||
allDay: true,
|
|
||||||
status: "done",
|
|
||||||
color: "#E3FDDA",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
groupId: "2",
|
|
||||||
title: "ลาป่วย",
|
|
||||||
start: "2023-10-19",
|
|
||||||
allDay: true,
|
|
||||||
status: "proceed",
|
|
||||||
color: "#e4f3ff",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
groupId: "1",
|
|
||||||
title: "ลาป่วย",
|
|
||||||
start: "2023-10-20",
|
|
||||||
allDay: true,
|
|
||||||
status: "new",
|
|
||||||
color: "#FFF1CC",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -123,41 +71,64 @@ const reason = ref("ยกเลิกการลา");
|
||||||
const model = ref(null);
|
const model = ref(null);
|
||||||
const modeCancel = ref(true);
|
const modeCancel = ref(true);
|
||||||
|
|
||||||
|
async function fetchCalendar() {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.post(config.API.investigateCalendar(), {
|
||||||
|
year: dateMonth.value.year,
|
||||||
|
mounth: dateMonth.value.month,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
const data = [
|
||||||
|
{
|
||||||
|
groupId: "2",
|
||||||
|
title: "ลากิจส่วนตัว",
|
||||||
|
start: "2023-12-12",
|
||||||
|
end: "2024-01-02",
|
||||||
|
allDay: true,
|
||||||
|
status: "done",
|
||||||
|
color: "#E3FDDA",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
calendarOptions.value.events = data;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
if (fullCalendar !== undefined) {
|
||||||
|
const calen = fullCalendar.value.getApi();
|
||||||
|
const date = new Date(dateMonth.value.year, dateMonth.value.month);
|
||||||
|
calen.gotoDate(date);
|
||||||
|
}
|
||||||
|
hideLoader();
|
||||||
|
}, 1000);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
||||||
*/
|
*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (fullCalendar !== undefined) {
|
fetchCalendar();
|
||||||
const calen = fullCalendar.value.getApi();
|
|
||||||
const date = new Date(dateMonth.value.year, dateMonth.value.month);
|
|
||||||
calen.gotoDate(date);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** function เปลี่ยนปฎิทิน*/
|
||||||
function changCalendar() {
|
function changCalendar() {
|
||||||
const calen = fullCalendar.value.getApi();
|
fetchCalendar();
|
||||||
const date = new Date(dateMonth.value.year, dateMonth.value.month);
|
|
||||||
calen.gotoDate(date);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ค่า props(วันเดือนปีที่เลือก) ตอนอัพเดท ค่าฏิทินให้อัพเดทใหม่
|
|
||||||
*/
|
|
||||||
// watch(props, async (count, prevCount) => {
|
|
||||||
// const calen = fullCalendar.value.getApi();
|
|
||||||
// const date = new Date(props.dateYear, props.dateMonth);
|
|
||||||
// calen.gotoDate(date);
|
|
||||||
// });
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชั่นยกเลิก model
|
* ฟังก์ชั่นยกเลิก model
|
||||||
* @param text
|
* @param text
|
||||||
*/
|
*/
|
||||||
const cancel = async (text: string) => {
|
async function cancel(text: string) {
|
||||||
title.value = text;
|
title.value = text;
|
||||||
modalCancel.value = true;
|
modalCancel.value = true;
|
||||||
modeCancel.value = true;
|
modeCancel.value = true;
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชั่นเปิด model
|
* ฟังก์ชั่นเปิด model
|
||||||
* @param text
|
* @param text
|
||||||
|
|
@ -168,26 +139,6 @@ const view = async (text: string) => {
|
||||||
modeCancel.value = false;
|
modeCancel.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// filter calendar left
|
|
||||||
const filterLists = ref<any[]>([
|
|
||||||
{
|
|
||||||
id: "x1",
|
|
||||||
name: "นางสาววารุณี แต้มคู",
|
|
||||||
color: "green",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "x2",
|
|
||||||
name: "นางสาวสมศรี ใจดี",
|
|
||||||
color: "grey",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "x3",
|
|
||||||
name: "นายสมชาย สุขใจ",
|
|
||||||
color: "grey",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const filterVal = ref(["x1"]);
|
|
||||||
|
|
||||||
const dateMonth = ref<DataDateMonthObject>({
|
const dateMonth = ref<DataDateMonthObject>({
|
||||||
month: new Date().getMonth(),
|
month: new Date().getMonth(),
|
||||||
year: new Date().getFullYear(),
|
year: new Date().getFullYear(),
|
||||||
|
|
@ -261,7 +212,7 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
||||||
<div class="textHover col-10" @click="view(arg.event.title)">
|
<div class="textHover col-10" @click="view(arg.event.title)">
|
||||||
{{ arg.event.title }}
|
{{ arg.event.title }}
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
dense
|
dense
|
||||||
v-if="arg.event.groupId == 1"
|
v-if="arg.event.groupId == 1"
|
||||||
icon="mdi-close"
|
icon="mdi-close"
|
||||||
|
|
@ -269,12 +220,12 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
||||||
round
|
round
|
||||||
size="8px"
|
size="8px"
|
||||||
@click="cancel(arg.event.title)"
|
@click="cancel(arg.event.title)"
|
||||||
/>
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</FullCalendar>
|
</FullCalendar>
|
||||||
<div class="row q-col-gutter-lg justify-end q-pb-lg">
|
<div class="row q-col-gutter-lg justify-end q-pb-lg">
|
||||||
<div class="items-center row">
|
<!-- <div class="items-center row">
|
||||||
<q-icon
|
<q-icon
|
||||||
size="10px"
|
size="10px"
|
||||||
color="light-green"
|
color="light-green"
|
||||||
|
|
@ -282,8 +233,8 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
/>
|
/>
|
||||||
<span class="text-caption text-grey-8">สถานะอนุมัติ</span>
|
<span class="text-caption text-grey-8">สถานะอนุมัติ</span>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="items-center row">
|
<!-- <div class="items-center row">
|
||||||
<q-icon
|
<q-icon
|
||||||
size="10px"
|
size="10px"
|
||||||
color="red-6"
|
color="red-6"
|
||||||
|
|
@ -291,7 +242,7 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
/>
|
/>
|
||||||
<span class="text-caption text-grey-8">สถานะไม่อนุมัติ</span>
|
<span class="text-caption text-grey-8">สถานะไม่อนุมัติ</span>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="items-center row">
|
<div class="items-center row">
|
||||||
<q-icon
|
<q-icon
|
||||||
size="10px"
|
size="10px"
|
||||||
|
|
@ -299,11 +250,9 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
||||||
name="mdi-circle"
|
name="mdi-circle"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
/>
|
/>
|
||||||
<span class="text-caption text-grey-8"
|
<span class="text-caption text-grey-8">สืบสวน</span>
|
||||||
>สถานะอยู่ระหว่างดำเนินการ</span
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="items-center row">
|
<!-- <div class="items-center row">
|
||||||
<q-icon
|
<q-icon
|
||||||
size="10px"
|
size="10px"
|
||||||
color="orange"
|
color="orange"
|
||||||
|
|
@ -311,7 +260,7 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
/>
|
/>
|
||||||
<span class="text-caption text-grey-8">สถานะใหม่</span>
|
<span class="text-caption text-grey-8">สถานะใหม่</span>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ function getData() {
|
||||||
.get(config.API.investigateById(id.value))
|
.get(config.API.investigateById(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const dataList = res.data.result;
|
const dataList = res.data.result;
|
||||||
console.log(dataList)
|
console.log(dataList);
|
||||||
data.id = dataList.id;
|
data.id = dataList.id;
|
||||||
data.idComplaint = dataList.idComplaint;
|
data.idComplaint = dataList.idComplaint;
|
||||||
data.respondentType = dataList.respondentType;
|
data.respondentType = dataList.respondentType;
|
||||||
|
|
@ -160,7 +160,7 @@ function getData() {
|
||||||
data.investigationStatusResult = dataList.investigationStatusResult;
|
data.investigationStatusResult = dataList.investigationStatusResult;
|
||||||
data.investigationExtendStatus = dataList.investigationExtendStatus;
|
data.investigationExtendStatus = dataList.investigationExtendStatus;
|
||||||
data.investigationDaysExtend = dataList.investigationDaysExtend;
|
data.investigationDaysExtend = dataList.investigationDaysExtend;
|
||||||
console.log(dataList)
|
console.log(dataList);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -222,7 +222,7 @@ function sentConfirmNoPerson() {
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
getData();
|
getData();
|
||||||
router.push(`/discipline/investigatefacts`)
|
router.push(`/discipline/investigatefacts`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -261,13 +261,12 @@ function confirmEndInvestigate() {
|
||||||
http
|
http
|
||||||
.get(config.API.investigateReject(id.value))
|
.get(config.API.investigateReject(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
success($q, "ยุติเรื่องสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
success($q, "ยุติเรื่องสำเร็จ");
|
|
||||||
await getData();
|
await getData();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -407,4 +406,4 @@ watch(
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background-color: #f0f3f3;
|
background-color: #f0f3f3;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -765,7 +765,7 @@ onMounted(async () => {
|
||||||
for="#date"
|
for="#date"
|
||||||
class="full-width cursor-pointer"
|
class="full-width cursor-pointer"
|
||||||
ref="dateRef"
|
ref="dateRef"
|
||||||
:input-style="isReadonly ? { color: 'teal' }:{color:'black'}"
|
:input-style="isReadonly ? { color: 'black' }:{color:'teal'}"
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -852,7 +852,7 @@ onMounted(async () => {
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
for="#dateEnd"
|
for="#dateEnd"
|
||||||
:input-style="isReadonly ? { color: 'teal' }:{color:'black'}"
|
:input-style="isReadonly ? { color: 'black' }:{color:'teal'}"
|
||||||
ref="dateEndRef"
|
ref="dateEndRef"
|
||||||
class="full-width cursor-pointer"
|
class="full-width cursor-pointer"
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, defineProps } from "vue";
|
import { ref, defineProps } from "vue";
|
||||||
import Calendar from "@/modules/11_discipline/components/2_InvestigateFacts/Calendar.vue";
|
import Calendar from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Calendar.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modal: {
|
modal: {
|
||||||
|
|
@ -14,26 +14,28 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="props.modal" persistent>
|
<q-dialog v-model="props.modal" persistent>
|
||||||
<q-card style="min-width: 60vw">
|
<q-card style="min-width: 60vw">
|
||||||
<q-toolbar>
|
<q-toolbar>
|
||||||
<q-toolbar-title class="text-subtitle2 text-bold">ปฎิทิน</q-toolbar-title>
|
<q-toolbar-title class="text-subtitle2 text-bold"
|
||||||
<q-btn
|
>ปฎิทิน</q-toolbar-title
|
||||||
icon="close"
|
>
|
||||||
unelevated
|
<q-btn
|
||||||
round
|
icon="close"
|
||||||
dense
|
unelevated
|
||||||
@click="props.close"
|
round
|
||||||
style="color: #ff8080; background-color: #ffdede"
|
dense
|
||||||
/>
|
@click="props.close"
|
||||||
</q-toolbar>
|
style="color: #ff8080; background-color: #ffdede"
|
||||||
<q-separator />
|
/>
|
||||||
<q-card-section class="q-pa-md bg-grey-1">
|
</q-toolbar>
|
||||||
<Calendar/>
|
<q-separator />
|
||||||
</q-card-section>
|
<q-card-section class="q-pa-md bg-grey-1 scroll">
|
||||||
<!-- <q-separator /> -->
|
<Calendar />
|
||||||
|
</q-card-section>
|
||||||
<!-- <div class="row justify-end q-px-md q-py-sm items-center">
|
<!-- <q-separator /> -->
|
||||||
|
|
||||||
|
<!-- <div class="row justify-end q-px-md q-py-sm items-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
color="public"
|
color="public"
|
||||||
|
|
@ -47,6 +49,6 @@ const props = defineProps({
|
||||||
<q-tooltip>{{ props.btnTitle }}</q-tooltip>
|
<q-tooltip>{{ props.btnTitle }}</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div> -->
|
</div> -->
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,18 @@ import timeGridPlugin from "@fullcalendar/timegrid";
|
||||||
import interactionPlugin from "@fullcalendar/interaction";
|
import interactionPlugin from "@fullcalendar/interaction";
|
||||||
import allLocales from "@fullcalendar/core/locales-all";
|
import allLocales from "@fullcalendar/core/locales-all";
|
||||||
import listPlugin from "@fullcalendar/list";
|
import listPlugin from "@fullcalendar/list";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
|
import type { DataDateMonthObject } from "@/modules/09_leave/interface/response/leave";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { monthYear2Thai } = mixin;
|
const { monthYear2Thai, showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
import type { DataDateMonthObject } from "@/modules/09_leave/interface/response/leave";
|
const $q = useQuasar();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Option ของปฏิทิน
|
* Option ของปฏิทิน
|
||||||
|
|
@ -123,21 +128,48 @@ const reason = ref("ยกเลิกการลา");
|
||||||
const model = ref(null);
|
const model = ref(null);
|
||||||
const modeCancel = ref(true);
|
const modeCancel = ref(true);
|
||||||
|
|
||||||
|
async function fetchCalendar() {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.post(config.API.disciplinaryCalendar(), {
|
||||||
|
year: dateMonth.value.year,
|
||||||
|
mouth: dateMonth.value.month,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
if (fullCalendar !== undefined) {
|
||||||
|
const calen = fullCalendar.value.getApi();
|
||||||
|
const date = new Date(dateMonth.value.year, dateMonth.value.month);
|
||||||
|
calen.gotoDate(date);
|
||||||
|
}
|
||||||
|
hideLoader();
|
||||||
|
}, 1000);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
||||||
*/
|
*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (fullCalendar !== undefined) {
|
fetchCalendar();
|
||||||
const calen = fullCalendar.value.getApi();
|
// if (fullCalendar !== undefined) {
|
||||||
const date = new Date(dateMonth.value.year, dateMonth.value.month);
|
// const calen = fullCalendar.value.getApi();
|
||||||
calen.gotoDate(date);
|
// const date = new Date(dateMonth.value.year, dateMonth.value.month);
|
||||||
}
|
// calen.gotoDate(date);
|
||||||
|
// }
|
||||||
});
|
});
|
||||||
|
|
||||||
function changCalendar() {
|
function changCalendar() {
|
||||||
const calen = fullCalendar.value.getApi();
|
fetchCalendar();
|
||||||
const date = new Date(dateMonth.value.year, dateMonth.value.month);
|
// const calen = fullCalendar.value.getApi();
|
||||||
calen.gotoDate(date);
|
// const date = new Date(dateMonth.value.year, dateMonth.value.month);
|
||||||
|
// calen.gotoDate(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -274,7 +306,7 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
||||||
</template>
|
</template>
|
||||||
</FullCalendar>
|
</FullCalendar>
|
||||||
<div class="row q-col-gutter-lg justify-end q-pb-lg">
|
<div class="row q-col-gutter-lg justify-end q-pb-lg">
|
||||||
<div class="items-center row">
|
<!-- <div class="items-center row">
|
||||||
<q-icon
|
<q-icon
|
||||||
size="10px"
|
size="10px"
|
||||||
color="light-green"
|
color="light-green"
|
||||||
|
|
@ -282,8 +314,8 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
/>
|
/>
|
||||||
<span class="text-caption text-grey-8">สถานะอนุมัติ</span>
|
<span class="text-caption text-grey-8">สถานะอนุมัติ</span>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="items-center row">
|
<!-- <div class="items-center row">
|
||||||
<q-icon
|
<q-icon
|
||||||
size="10px"
|
size="10px"
|
||||||
color="red-6"
|
color="red-6"
|
||||||
|
|
@ -291,7 +323,7 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
/>
|
/>
|
||||||
<span class="text-caption text-grey-8">สถานะไม่อนุมัติ</span>
|
<span class="text-caption text-grey-8">สถานะไม่อนุมัติ</span>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="items-center row">
|
<div class="items-center row">
|
||||||
<q-icon
|
<q-icon
|
||||||
size="10px"
|
size="10px"
|
||||||
|
|
@ -299,11 +331,9 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
||||||
name="mdi-circle"
|
name="mdi-circle"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
/>
|
/>
|
||||||
<span class="text-caption text-grey-8"
|
<span class="text-caption text-grey-8">สอบสวน</span>
|
||||||
>สถานะอยู่ระหว่างดำเนินการ</span
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="items-center row">
|
<!-- <div class="items-center row">
|
||||||
<q-icon
|
<q-icon
|
||||||
size="10px"
|
size="10px"
|
||||||
color="orange"
|
color="orange"
|
||||||
|
|
@ -311,7 +341,7 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
/>
|
/>
|
||||||
<span class="text-caption text-grey-8">สถานะใหม่</span>
|
<span class="text-caption text-grey-8">สถานะใหม่</span>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -228,12 +228,14 @@ function confirmEndInvestigate() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.disciplinaryReject(id.value))
|
.get(config.API.disciplinaryReject(id.value))
|
||||||
.then((res) => {})
|
.then((res) => {
|
||||||
|
success($q, "ยุติเรื่องสำเร็จ");
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
success($q, "ยุติเรื่องสำเร็จ");
|
|
||||||
fetchDetailDisciplinary();
|
fetchDetailDisciplinary();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -690,7 +690,7 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
:input-style="
|
:input-style="
|
||||||
isReadonly ? { color: 'teal' } : { color: 'black' }
|
isReadonly ? { color: 'black' } : { color: 'teal' }
|
||||||
"
|
"
|
||||||
class="col-xs-12 col-sm-4"
|
class="col-xs-12 col-sm-4"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -742,7 +742,7 @@ onMounted(async () => {
|
||||||
ref="disciplinaryDateAllegationRef"
|
ref="disciplinaryDateAllegationRef"
|
||||||
outlined
|
outlined
|
||||||
:input-style="
|
:input-style="
|
||||||
isReadonly ? { color: 'teal' } : { color: 'black' }
|
isReadonly ? { color: 'black' } : { color: 'teal' }
|
||||||
"
|
"
|
||||||
dense
|
dense
|
||||||
class="col-xs-12 col-sm-4"
|
class="col-xs-12 col-sm-4"
|
||||||
|
|
@ -830,8 +830,8 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
:input-style="
|
:input-style="
|
||||||
isReadonly
|
isReadonly
|
||||||
? { color: 'teal' }
|
? { color: 'black' }
|
||||||
: { color: 'black' }
|
: { color: 'teal' }
|
||||||
"
|
"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -924,8 +924,8 @@ onMounted(async () => {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:input-style="
|
:input-style="
|
||||||
isReadonly
|
isReadonly
|
||||||
? { color: 'teal' }
|
? { color: 'black' }
|
||||||
: { color: 'black' }
|
: { color: 'teal' }
|
||||||
"
|
"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
borderless
|
borderless
|
||||||
|
|
@ -986,7 +986,7 @@ onMounted(async () => {
|
||||||
class="full-width"
|
class="full-width"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:input-style="
|
:input-style="
|
||||||
isReadonly ? { color: 'teal' } : { color: 'black' }
|
isReadonly ? { color: 'black' } : { color: 'teal' }
|
||||||
"
|
"
|
||||||
:model-value="
|
:model-value="
|
||||||
formData.disciplinaryDateEvident != null
|
formData.disciplinaryDateEvident != null
|
||||||
|
|
@ -1038,7 +1038,7 @@ onMounted(async () => {
|
||||||
ref="disciplinaryDateResultRef"
|
ref="disciplinaryDateResultRef"
|
||||||
outlined
|
outlined
|
||||||
:input-style="
|
:input-style="
|
||||||
isReadonly ? { color: 'teal' } : { color: 'black' }
|
isReadonly ? { color: 'black' } : { color: 'teal' }
|
||||||
"
|
"
|
||||||
dense
|
dense
|
||||||
class="full-width"
|
class="full-width"
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs } from "vue";
|
import { ref, useAttrs } from "vue";
|
||||||
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
|
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
|
||||||
import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
import CalandarDialog from "@/modules/11_discipline/components/3_InvestigateDisciplinary/CalandarDialog.vue";
|
||||||
|
|
||||||
const calendarModal = ref<boolean>(false);
|
const calendarModal = ref<boolean>(false);
|
||||||
const calendarModalclose = () =>(calendarModal.value = !calendarModal.value)
|
const calendarModalclose = () => (calendarModal.value = !calendarModal.value);
|
||||||
const table = ref<any>(null);
|
const table = ref<any>(null);
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<any>(null);
|
||||||
const attrs = ref<any>(useAttrs());
|
const attrs = ref<any>(useAttrs());
|
||||||
|
|
@ -73,19 +73,19 @@ function resetFilter() {
|
||||||
<template>
|
<template>
|
||||||
<div class="q-pb-sm row q-col-gutter-sm">
|
<div class="q-pb-sm row q-col-gutter-sm">
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
name="calendar"
|
name="calendar"
|
||||||
round
|
round
|
||||||
size="12px"
|
size="12px"
|
||||||
flat
|
flat
|
||||||
icon="mdi-calendar-month"
|
icon="mdi-calendar-month"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="calendarOpen"
|
@click="calendarOpen"
|
||||||
>
|
>
|
||||||
<q-tooltip>ปฏิทิน</q-tooltip>
|
<q-tooltip>ปฏิทิน</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<!-- ค้นหาข้อความใน table -->
|
<!-- ค้นหาข้อความใน table -->
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -148,10 +148,7 @@ function resetFilter() {
|
||||||
<slot v-bind="props" name="columns"></slot>
|
<slot v-bind="props" name="columns"></slot>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
<CalandarDialog
|
<CalandarDialog :modal="calendarModal" :close="calendarModalclose" />
|
||||||
:modal="calendarModal"
|
|
||||||
:close="calendarModalclose"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { useComplainstDataStore } from "@/modules/11_discipline/store/Complaints
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const { dialogConfirm } = mixin;
|
const { dialogConfirm,dialogMessageNotify } = mixin;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
|
|
@ -60,6 +60,9 @@ const initialPagination = ref<any>({
|
||||||
});
|
});
|
||||||
|
|
||||||
function onclickSend() {
|
function onclickSend() {
|
||||||
|
if(selected.value.length === 0){
|
||||||
|
dialogMessageNotify($q,'กรุณาเลือกอย่างน้อย 1 บุคคล')
|
||||||
|
}else{
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
|
@ -70,7 +73,7 @@ function onclickSend() {
|
||||||
`ยืนยันการ${props.title}`,
|
`ยืนยันการ${props.title}`,
|
||||||
`ต้องการยืนยันการ${props.title}หรือไม่`
|
`ต้องการยืนยันการ${props.title}หรือไม่`
|
||||||
);
|
);
|
||||||
}
|
}}
|
||||||
|
|
||||||
function onClickClose() {
|
function onClickClose() {
|
||||||
props.close?.();
|
props.close?.();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue