Merge branch 'develop' into dev-tee
# Conflicts: # src/modules/05_leave/router.ts
This commit is contained in:
commit
0a1eab7e63
7 changed files with 136 additions and 8 deletions
|
|
@ -151,11 +151,11 @@ const props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
default: () => new Date().getMonth(),
|
default: () => new Date().getMonth(),
|
||||||
},
|
},
|
||||||
refreshData: {
|
// refreshData: {
|
||||||
//หน้า main มีการอัพเดทค่าให้ refresh data
|
// //หน้า main มีการอัพเดทค่าให้ refresh data
|
||||||
type: Boolean,
|
// type: Boolean,
|
||||||
required: true,
|
// required: true,
|
||||||
},
|
// },
|
||||||
fetchDataSummaryCalendar: {
|
fetchDataSummaryCalendar: {
|
||||||
//ฟังก์ชันอัพเดทสรุปวันหยุด
|
//ฟังก์ชันอัพเดทสรุปวันหยุด
|
||||||
type: Function,
|
type: Function,
|
||||||
|
|
@ -177,7 +177,9 @@ onMounted(async () => {
|
||||||
* ค่า props(วันเดือนปีที่เลือก) ตอนอัพเดท ค่าฏิทินให้อัพเดทใหม่
|
* ค่า props(วันเดือนปีที่เลือก) ตอนอัพเดท ค่าฏิทินให้อัพเดทใหม่
|
||||||
*/
|
*/
|
||||||
watch(props, async (count, prevCount) => {
|
watch(props, async (count, prevCount) => {
|
||||||
|
const calen = fullCalendar.value.getApi()
|
||||||
const date = new Date(props.dateYear, props.dateMonth)
|
const date = new Date(props.dateYear, props.dateMonth)
|
||||||
|
calen.gotoDate(date)
|
||||||
})
|
})
|
||||||
const cancel = async (text: string) => {
|
const cancel = async (text: string) => {
|
||||||
title.value = text
|
title.value = text
|
||||||
|
|
|
||||||
24
src/modules/05_leave/componenst/Forms/01_SickForm.vue
Normal file
24
src/modules/05_leave/componenst/Forms/01_SickForm.vue
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
const props = defineProps({
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว
|
||||||
|
<ul>
|
||||||
|
<li>เขียนที่</li>
|
||||||
|
<li>ลาตั้งแต่วันที่</li>
|
||||||
|
<li>ลาถึงวันที่</li>
|
||||||
|
<li>ลาครั้งสุดท้ายในประเภทนั้น ๆ เมื่อวันที่ (Auto)</li>
|
||||||
|
<li>จำนวนวันที่ลา (Auto)</li>
|
||||||
|
</ul>
|
||||||
|
<p>*หมายเหตุ (กรณีลาป่วยและลากิจ สามารถเลือกให้ลาครึ่งวันเช้า หรือครึ่งวันบ่ายได้)
|
||||||
|
ที่อยู่ที่ติดต่อได้ระหว่างลา (อาจดึงมาจากที่อยู่ปัจจุบันโดยอัตโนมัติ
|
||||||
|
แต่ให้ผู้ใช้งานแก้ไขได้)</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
const props = defineProps({
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
ลาไปช่วยเหลือภริยาที่คลอดบุตร
|
||||||
|
<ul>
|
||||||
|
<li>เขียนที่</li>
|
||||||
|
<li>ชื่อภรรยา</li>
|
||||||
|
<li>วันที่คลอด</li>
|
||||||
|
<li>ลาตั้งแต่วันที่</li>
|
||||||
|
<li>ลาถึงวันที่</li>
|
||||||
|
<li>จำนวนวันที่ลา (frontend คำนวนให้ Auto)</li>
|
||||||
|
<li>ที่อยู่ที่ติดต่อได้ระหว่างลา (textarea)</li>
|
||||||
|
<li>หมายเลขโทรศัพท์</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
*หมายเหตุ ที่อยู่ที่ติดต่อได้ระหว่างลา (อาจดึงมาจากที่อยู่ปัจจุบันโดยอัตโนมัติ แต่ให้ผู้ใช้งานแก้ไขได้)
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
@ -5,6 +5,8 @@ const leave = () => import("@/modules/05_leave/views/Main.vue")
|
||||||
|
|
||||||
const addAbsence = () => import("@/modules/05_leave/views/AddPage.vue")
|
const addAbsence = () => import("@/modules/05_leave/views/AddPage.vue")
|
||||||
|
|
||||||
|
const samplePage = () => import("@/modules/05_leave/views/SampleForm.vue")
|
||||||
|
|
||||||
/* const Checkout = () => import("@/modules/04_checkin/views/Checkout.vue");
|
/* const Checkout = () => import("@/modules/04_checkin/views/Checkout.vue");
|
||||||
*/
|
*/
|
||||||
export default [
|
export default [
|
||||||
|
|
@ -26,4 +28,13 @@ export default [
|
||||||
Key: [7],
|
Key: [7],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/leave/sample",
|
||||||
|
name: "sample-page",
|
||||||
|
component: samplePage,
|
||||||
|
meta: {
|
||||||
|
Auth: true,
|
||||||
|
Key: [7],
|
||||||
|
},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<subCalendarComponent v-if="currentTab === 'calendar'" />
|
<subCalendarComponent :dateYear="dateMonth.year" :dateMonth="dateMonth.month" v-if="currentTab === 'calendar'" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
|
||||||
64
src/modules/05_leave/views/SampleForm.vue
Normal file
64
src/modules/05_leave/views/SampleForm.vue
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { reactive, ref, watch } from "vue";
|
||||||
|
|
||||||
|
import SickForm from "@/modules/05_leave/componenst/Forms/01_SickForm.vue";
|
||||||
|
import HelpWifeBirthForm from "@/modules/05_leave/componenst/Forms/04_HelpWifeBirthForm.vue";
|
||||||
|
|
||||||
|
const type = ref<number>(0);
|
||||||
|
const typeOption = reactive([
|
||||||
|
{ id: 0, name: "" },
|
||||||
|
{ id: 1, name: "ลาป่วย" },
|
||||||
|
{ id: 2, name: "ลากิจ" },
|
||||||
|
{ id: 3, name: "ลาคลอด" },
|
||||||
|
{ id: 4, name: "ลาไปช่วยเหลือภริยาที่คลอดบุตร" },
|
||||||
|
]);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => type.value,
|
||||||
|
() => {
|
||||||
|
// save store
|
||||||
|
console.log("ประเภทการลา===>", type.value);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="col-12 row justify-center">
|
||||||
|
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||||
|
<div class="toptitle text-white col-12 row items-center">
|
||||||
|
<q-btn
|
||||||
|
icon="mdi-arrow-left"
|
||||||
|
unelevated
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
color="primary"
|
||||||
|
class="q-mr-sm"
|
||||||
|
/>
|
||||||
|
<div>ยื่นใบลา</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<q-card bordered>
|
||||||
|
<div class="col-12 row q-col-gutter-md q-pa-md">
|
||||||
|
<div class="col-xs-12 col-sm-12">
|
||||||
|
<form class="col-12">
|
||||||
|
<q-select
|
||||||
|
filled
|
||||||
|
v-model="type"
|
||||||
|
:options="typeOption"
|
||||||
|
label="ประเภทการลา"
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
/>
|
||||||
|
|
||||||
|
<SickForm v-if="type == 1 || type == 2 || type == 3" />
|
||||||
|
<HelpWifeBirthForm v-if="type == 4" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
@ -96,8 +96,8 @@ const doLogout = () => {
|
||||||
dense inline-label class="text-grey-5 tabsHome">
|
dense inline-label class="text-grey-5 tabsHome">
|
||||||
<q-tab class="border-100" name="dashboard" label="หน้าแรก" icon="mdi-view-dashboard-outline"
|
<q-tab class="border-100" name="dashboard" label="หน้าแรก" icon="mdi-view-dashboard-outline"
|
||||||
@click="router.push(`/`)" />
|
@click="router.push(`/`)" />
|
||||||
<q-tab class="border-100" name="Checkin" label="ลงเวลางาน" icon="mdi-map-marker-check-outline"
|
<!-- <q-tab class="border-100" name="Checkin" label="ลงเวลางาน" icon="mdi-map-marker-check-outline"
|
||||||
@click="router.push(`/check-in`)" />
|
@click="router.push(`/check-in`)" /> -->
|
||||||
<q-tab class="border-100" name="leave" label="การลา" icon="mdi-calendar-blank-outline"
|
<q-tab class="border-100" name="leave" label="การลา" icon="mdi-calendar-blank-outline"
|
||||||
@click="router.push(`/leave`)" />
|
@click="router.push(`/leave`)" />
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue