Merge branch 'develop' into dev-tee

This commit is contained in:
setthawutttty 2023-10-05 10:01:49 +07:00
commit fd34ae4083
7 changed files with 94 additions and 37 deletions

View file

@ -374,34 +374,34 @@ const menuList = readonly<any[]>([
},
],
},
{
key: 9,
icon: "mdi-calendar",
activeIcon: "mdi-calendar",
label: "การลา",
path: "leave",
role: "coin",
children: [
{
key: 9.1,
label: "รายการลงเวลาปฏิบัติงาน",
path: "/work-list",
role: "coin",
},
{
key: 9.2,
label: "รายการลา",
path: "/leave-list",
role: "coin",
},
{
key: 9.3,
label: "รายงานสถิติ",
path: "/statistics-report",
role: "coin",
},
],
},
// {
// key: 9,
// icon: "mdi-calendar",
// activeIcon: "mdi-calendar",
// label: "การลา",
// path: "leave",
// role: "coin",
// children: [
// {
// key: 9.1,
// label: "รายการลงเวลาปฏิบัติงาน",
// path: "/work-list",
// role: "coin",
// },
// {
// key: 9.2,
// label: "รายการลา",
// path: "/leave-list",
// role: "coin",
// },
// {
// key: 9.3,
// label: "รายงานสถิติ",
// path: "/statistics-report",
// role: "coin",
// },
// ],
// },
]);
const tabList = readonly<tabType[]>([

View file

@ -153,8 +153,8 @@ onMounted(async () => {
<template>
<div class="toptitle text-dark col-12 row items-center">
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm"
@click="router.push(`/appoint-promote`)" />
รายละเอยดการแตงต-เลอน {{ title.fullname }}
@click="router.push(`/appoint-employee`)" />
รายละเอยดการแตงตกจางประจำ {{ title.fullname }}
</div>
<q-card bordered class="row col-12 text-dark">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">

View file

@ -122,7 +122,7 @@ const createdAppoint = async () => {
};
showLoader();
await http
.put(config.API.apppointmentReport(Type), data)
.put(config.API.appointEmployeeOrder(Type), data)
.then(() => {
success($q, "บันทึกสำเร็จ");
})

View file

@ -73,6 +73,7 @@ const Otherdata = ref<OtherdataInterface>({
const avatar = ref<string>("");
const educationOld = ref<string>("");
const militaryDate = ref<Date | null>(null);
const leaveDate = ref<Date | null>(null);
//-----(fetch data by id)-----//
const fecthOther = async () => {
@ -110,6 +111,7 @@ const fecthOther = async () => {
reason.value = data.reason ?? "";
educationOld.value = data.educationOld ?? "-";
militaryDate.value = data.militaryDate ?? null;
leaveDate.value = data.leaveDate ?? null;
})
.catch((e) => {
messageError($q, e);
@ -152,6 +154,7 @@ const saveOther = async () => {
amountOld: Number(salary.value),
educationOld: educationOld.value,
militaryDate: militaryDate.value,
leaveDate: leaveDate.value,
};
await http
.put(config.API.otherByid(paramsId.toString()), data)
@ -398,7 +401,7 @@ onMounted(async () => {
</div>
</div>
<div class="col-12"><q-separator /></div>
<div class="col-xs-6 col-sm-6 row items-center">
<div class="col-xs-6 col-sm-4 row items-center">
<div class="col-12">
<datepicker
menu-class-name="modalfix"
@ -443,7 +446,56 @@ onMounted(async () => {
</datepicker>
</div>
</div>
<div class="col-xs-6 col-sm-6 row items-center">
<div class="col-xs-6 col-sm-4 row items-center">
<div class="col-12">
<datepicker
menu-class-name="modalfix"
:readonly="!edit"
v-model="leaveDate"
:locale="'th'"
autoApply
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
:model-value="
leaveDate !== null ? date2Thai(leaveDate) : null
"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันออกจากราชการเมื่อ'}`,
]"
hide-bottom-space
:label="`${'ออกจากราชการเมื่อ'}`"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
:style="
edit
? 'color: var(--q-primary)'
: 'color: var(--q-grey)'
"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</div>
<div class="col-xs-6 col-sm-4 row items-center">
<div class="col-12">
<datepicker
menu-class-name="modalfix"

View file

@ -152,6 +152,7 @@ const fecthlistOthet = async () => {
fullname: `${r.prefix ?? ""}${r.firstname ?? ""} ${r.lastname ?? ""}`,
amountOld: r.amountOld,
positionDate: r.positionDate,
leaveDate: r.leaveDate,
}));
rows2.value = rows.value.filter(
(e: listMain) =>
@ -162,7 +163,8 @@ const fecthlistOthet = async () => {
e.positionLevelOld &&
e.positionNumberOld &&
e.amountOld !== null &&
e.positionDate
e.positionDate &&
e.leaveDate !== null
);
})
.catch((e) => {

View file

@ -158,7 +158,7 @@ const openModalOrder = () => {
r.posNo &&
r.salary !== null &&
r.organization &&
r.createdAt
r.date
);
rows2.value = row;
};
@ -175,7 +175,7 @@ const getData = async () => {
dateText:
r.createdAt !== null ? date2Thai(new Date(r.createdAt)) : "-",
createdAt: r.createdAt !== null ? new Date(r.createdAt) : null,
date: new Date(),
date: r.date,
firstName: r.firstName ?? "",
id: r.id ?? "",
isActive: r.isActive ? r.isActive : false,

View file

@ -21,7 +21,8 @@ interface listMain {
statustext: string;
createdAt: Date;
amountOld: number;
positionDate: Date
positionDate: Date;
leaveDate: Date
}
//ข้อมูลจาก api
interface listMainAPI {
@ -48,6 +49,7 @@ interface listMainAPI {
createdAt: Date;
amountOld: number;
positionDate: Date
leaveDate: Date
}
interface OtherdataInterface {
@ -97,6 +99,7 @@ interface resApiData {
avatar: string;
commandType: string;
militaryDate: Date
leaveDate: Date
};
};
}