fix code build error

This commit is contained in:
Warunee Tamkoo 2023-09-24 09:14:17 +07:00
parent 52f89c16f1
commit 040a191573
7 changed files with 65 additions and 164 deletions

View file

@ -1131,11 +1131,11 @@ const columnsPosition = ref<QTableProps["columns"]>([
}, },
]); ]);
watch(organizationShortName, (count: any, prevCount: any) => { watch(organizationShortName, () => {
organizationNameOptions.value = []; organizationNameOptions.value = [];
}); });
watch(organizationName, (count: any, prevCount: any) => { watch(organizationName, () => {
positionPathOptions.value = []; positionPathOptions.value = [];
}); });

View file

@ -221,6 +221,7 @@ const saveAppoint = async () => {
} }
}); });
}; };
const validationDate = (thaiDate: string | null) => { const validationDate = (thaiDate: string | null) => {
if (thaiDate && daterow.value) { if (thaiDate && daterow.value) {
let a = convertThaiDateToNumeric(thaiDate); let a = convertThaiDateToNumeric(thaiDate);
@ -276,51 +277,21 @@ const openModalCalendar = (rows: any) => {
<div class="col-12 row q-pa-md"> <div class="col-12 row q-pa-md">
<div class="row col-12"> <div class="row col-12">
<div class="row col-12 q-col-gutter-sm"> <div class="row col-12 q-col-gutter-sm">
<q-btn color="blue-7" flat dense>แกไขคำถาม</q-btn>
<q-space /> <q-space />
<q-input <q-input class="col-xs-12 col-sm-3 col-md-2" standout dense v-model="filterKeyword" ref="filterRef" outlined
class="col-xs-12 col-sm-3 col-md-2" debounce="300" placeholder="ค้นหา">
standout
dense
v-model="filterKeyword"
ref="filterRef"
outlined
debounce="300"
placeholder="ค้นหา"
>
<template v-slot:append> <template v-slot:append>
<q-icon v-if="filterKeyword == ''" name="search" /> <q-icon v-if="filterKeyword == ''" name="search" />
<q-icon <q-icon v-if="filterKeyword !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
v-if="filterKeyword !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"
/>
</template> </template>
</q-input> </q-input>
<q-select <q-select v-model="visibleColumns" multiple outlined dense options-dense :display-value="$q.lang.table.columns"
v-model="visibleColumns" emit-value map-options :options="columns" option-value="name" options-cover style="min-width: 150px"
multiple class="col-xs-12 col-sm-3 col-md-2" />
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns"
option-value="name"
options-cover
style="min-width: 150px"
class="col-xs-12 col-sm-3 col-md-2"
/>
</div> </div>
<div class="col-12 q-pt-sm"> <div class="col-12 q-pt-sm">
<d-table <d-table :columns="columns" :rows="rows" :filter="filterKeyword" row-key="id" :visible-columns="visibleColumns">
:columns="columns"
:rows="rows"
:filter="filterKeyword"
row-key="id"
:visible-columns="visibleColumns"
>
<template v-slot:header="props"> <template v-slot:header="props">
<q-tr :props="props"> <q-tr :props="props">
<q-th v-for="col in props.cols" :key="col.name" :props="props"> <q-th v-for="col in props.cols" :key="col.name" :props="props">
@ -331,112 +302,64 @@ const openModalCalendar = (rows: any) => {
</template> </template>
<template v-slot:body="props"> <template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer"> <q-tr :props="props" class="cursor-pointer">
<q-td <q-td key="no" :props="props" @click="
key="no" router.push(`/exit-Interview/questionnair/${props.row.id}`)
:props="props" ">
@click="
router.push(`/exit-Interview/questionnair/${props.row.id}`)
"
>
{{ props.rowIndex + 1 }} {{ props.rowIndex + 1 }}
</q-td> </q-td>
<q-td <q-td key="fullname" :props="props" @click="
key="fullname" router.push(`/exit-Interview/questionnair/${props.row.id}`)
:props="props" ">
@click="
router.push(`/exit-Interview/questionnair/${props.row.id}`)
"
>
{{ props.row.fullname }} {{ props.row.fullname }}
</q-td> </q-td>
<q-td <q-td key="realReason" :props="props" @click="
key="realReason" router.push(`/exit-Interview/questionnair/${props.row.id}`)
:props="props" ">
@click="
router.push(`/exit-Interview/questionnair/${props.row.id}`)
"
>
{{ props.row.realReason }} {{ props.row.realReason }}
</q-td> </q-td>
<q-td <q-td key="notExitFactor" :props="props" @click="
key="notExitFactor" router.push(`/exit-Interview/questionnair/${props.row.id}`)
:props="props" ">
@click="
router.push(`/exit-Interview/questionnair/${props.row.id}`)
"
>
{{ props.row.notExitFactor }} {{ props.row.notExitFactor }}
</q-td> </q-td>
<q-td <q-td key="futureWork" :props="props" @click="
key="futureWork" router.push(`/exit-Interview/questionnair/${props.row.id}`)
:props="props" ">
@click="
router.push(`/exit-Interview/questionnair/${props.row.id}`)
"
>
{{ props.row.futureWork ? "ใช่" : "ไม่" }} {{ props.row.futureWork ? "ใช่" : "ไม่" }}
</q-td> </q-td>
<q-td <q-td key="futureWorkReason" :props="props" @click="
key="futureWorkReason" router.push(`/exit-Interview/questionnair/${props.row.id}`)
:props="props" ">
@click="
router.push(`/exit-Interview/questionnair/${props.row.id}`)
"
>
{{ props.row.futureWorkReason }} {{ props.row.futureWorkReason }}
</q-td> </q-td>
<q-td <q-td key="havejob" :props="props" @click="
key="havejob" router.push(`/exit-Interview/questionnair/${props.row.id}`)
:props="props" ">
@click="
router.push(`/exit-Interview/questionnair/${props.row.id}`)
"
>
{{ props.row.havejob ? "ใช่" : "ไม่" }} {{ props.row.havejob ? "ใช่" : "ไม่" }}
</q-td> </q-td>
<q-td <q-td key="havejobReason" :props="props" @click="
key="havejobReason" router.push(`/exit-Interview/questionnair/${props.row.id}`)
:props="props" ">
@click="
router.push(`/exit-Interview/questionnair/${props.row.id}`)
"
>
<div class="table_ellipsis"> <div class="table_ellipsis">
{{ props.row.havejobReason }} {{ props.row.havejobReason }}
</div> </div>
</q-td> </q-td>
<q-td <q-td key="appointDate" :props="props" @click="
key="appointDate" router.push(`/exit-Interview/questionnair/${props.row.id}`)
:props="props" ">
@click="
router.push(`/exit-Interview/questionnair/${props.row.id}`)
"
>
{{ {{
props.row.appointDate == null ? "-" : props.row.appointDate props.row.appointDate == null ? "-" : props.row.appointDate
}} }}
</q-td> </q-td>
<q-td <q-td key="datetext" :props="props" @click="
key="datetext" router.push(`/exit-Interview/questionnair/${props.row.id}`)
:props="props" ">
@click="
router.push(`/exit-Interview/questionnair/${props.row.id}`)
"
>
{{ props.row.datetext }} {{ props.row.datetext }}
</q-td> </q-td>
<q-td auto-width> <q-td auto-width>
<q-btn <q-btn v-if="props.row.appointDate == null" icon="mdi-calendar" size="12px" color="blue-7" flat round
v-if="props.row.appointDate == null" dense @click="openModalCalendar(props.row)">
icon="mdi-calendar"
size="12px"
color="blue-7"
flat
round
dense
@click="openModalCalendar(props.row)"
>
<q-tooltip>นนดหมายเพอทาการสมภาษณการลาออก</q-tooltip> <q-tooltip>นนดหมายเพอทาการสมภาษณการลาออก</q-tooltip>
</q-btn> </q-btn>
</q-td> </q-td>
@ -452,48 +375,26 @@ const openModalCalendar = (rows: any) => {
<q-dialog v-model="modal" persistent> <q-dialog v-model="modal" persistent>
<q-card style="width: 800px"> <q-card style="width: 800px">
<q-form ref="myForm"> <q-form ref="myForm">
<DialogHeader <DialogHeader title="กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก" :close="closeModal" />
title="กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"
:close="closeModal"
/>
<q-separator /> <q-separator />
<q-card-section class="q-p-sm q-gutter-md bg-grey-1"> <q-card-section class="q-p-sm q-gutter-md bg-grey-1">
<div class="col-xs-12 col-sm-12 col-md-12"> <div class="col-xs-12 col-sm-12 col-md-12">
<datepicker <datepicker menu-class-name="modalfix" v-model="dateBreak" :locale="'th'" autoApply :enableTimePicker="false"
menu-class-name="modalfix" week-start="0">
v-model="dateBreak"
:locale="'th'"
autoApply
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">{{ year + 543 }}</template> <template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{ <template #year-overlay-value="{ value }">{{
parseInt(value + 543) parseInt(value + 543)
}}</template> }}</template>
<template #trigger> <template #trigger>
<q-input <q-input outlined dense lazy-rules :model-value="dateBreak !== null ? date2Thai(dateBreak) : null
outlined " hide-bottom-space :label="`${' วันนัดหมายเพื่อทําการสัมภาษณ์การลาออก'}`" :rules="[
dense (val) => !!val || `${'กรุณาเลือกลงวันที่'}`,
lazy-rules (val) =>
:model-value=" validationDate(val) ||
dateBreak !== null ? date2Thai(dateBreak) : null `${'วันที่นัดหมายต้องมากกว่าวันที่สร้าง'}`,
" ]">
hide-bottom-space
:label="`${' วันนัดหมายเพื่อทําการสัมภาษณ์การลาออก'}`"
:rules="[
(val) => !!val || `${'กรุณาเลือกลงวันที่'}`,
(val) =>
validationDate(val) ||
`${'วันที่นัดหมายต้องมากกว่าวันที่สร้าง'}`,
]"
>
<template v-slot:prepend> <template v-slot:prepend>
<q-icon <q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon> </q-icon>
</template> </template>
</q-input> </q-input>

View file

@ -26,10 +26,10 @@ const dischargedDetails = () =>
"@/modules/06_retirement/components/Discharged/dischargedRegistry.vue" "@/modules/06_retirement/components/Discharged/dischargedRegistry.vue"
); );
const expulsionMain = () => const expulsionMain = () =>
import("@/modules/06_retirement/components/Expulsion/expulsionMain.vue"); import("@/modules/06_retirement/components/Expulsion/ExpulsionMain.vue");
const expulsionDetails = () => const expulsionDetails = () =>
import("@/modules/06_retirement/components/Expulsion/expulsionRegistry.vue"); import("@/modules/06_retirement/components/Expulsion/ExpulsionRegistry.vue");
const exitInterviewMain = () => const exitInterviewMain = () =>
import("@/modules/06_retirement/components/ExitInterview/exitMain.vue"); import("@/modules/06_retirement/components/ExitInterview/exitMain.vue");

View file

@ -523,7 +523,7 @@ const dataPerson = reactive({
level: "", level: "",
}); });
const reason = ref<string>(""); const reason = ref<string>("");
const selectPerson = (person) => { const selectPerson = (person: any) => {
dataPerson.id = person.id; dataPerson.id = person.id;
dataPerson.position = person.position; dataPerson.position = person.position;
dataPerson.organizationOrganization = person.organizationOrganization; dataPerson.organizationOrganization = person.organizationOrganization;

View file

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, reactive, ref, useAttrs, computed } from "vue"; import { onMounted, reactive, ref } from "vue";
import type { QTableProps } from "quasar"; import type { QTableProps } from "quasar";
import type { FormOrderPlacementMainData } from "@/modules/10_order/interface/request/Main"; import type { FormOrderPlacementMainData } from "@/modules/10_order/interface/request/Main";
import type { import type {
@ -244,10 +244,10 @@ const filterKeyword = ref<string>("");
const filterRef = ref<HTMLInputElement | null>(null); const filterRef = ref<HTMLInputElement | null>(null);
const resetFilter = () => { const resetFilter = () => {
filterKeyword.value = ""; filterKeyword.value = "";
filterRef.value.focus(); // filterRef.value.focus();
}; };
const attrs = ref<string | null>(useAttrs()); const attrs = ref<string | null>();
// //
const searchFilterTable = async () => { const searchFilterTable = async () => {
if (OrderType.value == "ทั้งหมด") { if (OrderType.value == "ทั้งหมด") {

View file

@ -2,7 +2,7 @@
import { ref } from "vue"; import { ref } from "vue";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
import type { QForm } from "quasar"; import type { QForm, QTableProps } from "quasar";
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
@ -10,7 +10,7 @@ import type {
history, history,
ColumnData, ColumnData,
DataOptionInsigniaType, DataOptionInsigniaType,
} from "../interface/index/Main.ts"; } from "@/modules/10_order/interface/index/Main";
const myForm = ref<QForm>(); const myForm = ref<QForm>();
const mixin = useCounterMixin(); const mixin = useCounterMixin();
@ -30,7 +30,7 @@ const reportType = ref<string>("");
const reportYear = ref<number | null>(); const reportYear = ref<number | null>();
const reportNo = ref<string>(""); const reportNo = ref<string>("");
const columns = ref<ColumnData[]>([ const columns = ref<QTableProps["columns"]>([
{ {
name: "no", name: "no",
label: "ลำดับ", label: "ลำดับ",
@ -227,7 +227,6 @@ const paginationLabel = (start: number, end: number, total: number) => {
" "
:label="`${'ปีงบประมาณ'}`" :label="`${'ปีงบประมาณ'}`"
:rules="[(val:string) => !!val || `${'กรุณาเลือก ปี'}`]" :rules="[(val:string) => !!val || `${'กรุณาเลือก ปี'}`]"
clearable
> >
</q-input> </q-input>
</template> </template>

View file

@ -12,9 +12,10 @@ import type {
ResponseOrganiz, ResponseOrganiz,
ResponseCopyOrder, ResponseCopyOrder,
DataCopyOrder, DataCopyOrder,
} from "@/modules/05_placement/interface/response/Order"; } from "@/modules/10_order/interface/response/Order";
import type { RequestCopyOrder } from "@/modules/05_placement/interface/request/Order"; import type { RequestCopyOrder } from "@/modules/05_placement/interface/request/Order";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import type { DataOption } from "@/modules/10_order/interface/index/Main";
const props = defineProps({ const props = defineProps({
next: { next: {