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