Merge branch 'phatt_dev' into develop

This commit is contained in:
puriphatt 2024-03-19 15:15:35 +07:00
commit 2c4a70cda1
4 changed files with 270 additions and 218 deletions

View file

@ -17,7 +17,14 @@ export default {
profileNewHonorByProfileId: (profileId: string) => profileNewHonorByProfileId: (profileId: string) =>
`${registryNew}honor/${profileId}`, `${registryNew}honor/${profileId}`,
profileNewHonorById: (dataId: string) => `${registryNew}honor/${dataId}`, profileNewHonorById: (dataId: string) => `${registryNew}honor/${dataId}`,
profileNewHonorHisById: (dataId: string) => `${registryNew}honor/${dataId}`, profileNewHonorHisById: (dataId: string) => `${registryNew}honor/history/${dataId}`,
// ผลการประเมินการปฏิบัติราชการ
profileNewAssessments: `${registryNew}assessments`,
profileNewAssessmentsByProfileId: (profileId: string) =>
`${registryNew}assessments/${profileId}`,
profileNewAssessmentsById: (dataId: string) => `${registryNew}assessments/${dataId}`,
profileNewAssessmentsHisById: (dataId: string) => `${registryNew}assessments/history/${dataId}`,
// การฝึกอบรม // การฝึกอบรม
profileNewTraining: `${registryNew}training`, profileNewTraining: `${registryNew}training`,

View file

@ -1,85 +1,58 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, useAttrs } from "vue"; import { ref, onMounted, reactive, watch } from "vue";
import { useRoute } from "vue-router";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";
import type { QTableProps } from "quasar";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
import type { QTableProps, QForm } from "quasar";
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
import HistoryTable from "@/components/TableHistory.vue"; import HistoryTable from "@/components/TableHistory.vue";
import DialogHeader from "@/components/DialogHeader.vue"; import DialogHeader from "@/components/DialogHeader.vue";
import type { import type { RequestItemsObject } from "@/modules/04_registryNew/interface/request/DeclarationHonor";
RequestItemsObject, import type { FormData } from "@/modules/04_registryNew/interface/request/DeclarationHonor";
Columns, import type { ResponseObject } from "@/modules/04_registryNew/interface/response/DeclarationHonor";
} from "@/modules/04_registryNew/interface/request/DeclarationHonor";
import type {
DataOption,
DataOptionInsignia,
InsigniaOps,
Pagination,
} from "@/modules/04_registryNew/interface/index/Main";
const $q = useQuasar(); const $q = useQuasar();
const route = useRoute();
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const attrs = ref<any>(useAttrs());
const { const {
date2Thai, date2Thai,
success, success,
dateToISO,
messageError, messageError,
showLoader, showLoader,
hideLoader, hideLoader,
convertDate, dialogConfirm,
convertDateDisplay, dialogRemove,
} = mixin; } = mixin;
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const isDate = ref<string | null>("false"); const declHonorData = reactive<FormData>({
const issuer = ref<string>(); id: "",
const detail = ref<string>(); isActive: true,
const issueDate = ref<number>(); isDate: "false",
const issueDate2 = ref<Date>(); issuer: "",
const refCommandNo = ref<string>(); detail: "",
const refCommandDate = ref<Date | null>(); issueDate: null,
issueDateYear: 0,
refCommandNo: "",
refCommandDate: null,
});
const isEdit = ref<boolean>(false);
const editRow = ref<boolean>(false); const editRow = ref<boolean>(false);
const myForm = ref<any>(); const myForm = ref<QForm>();
const edit = ref<boolean>(false);
const modal = ref<boolean>(false); const modal = ref<boolean>(false);
const modelView = ref<string>("table"); const modelView = ref<string>("table");
const filterSearch = ref(""); const filterSearch = ref("");
const filterHistory = ref<string>(""); const filterHistory = ref<string>("");
const modalHistory = ref<boolean>(false); const modalHistory = ref<boolean>(false);
const rowsHistory = ref<RequestItemsObject[]>([]); const rowsHistory = ref<ResponseObject[]>([]);
const tittleHistory = ref<string>("ประวัติแก้ไขประกาศเกียรติคุณ"); const tittleHistory = ref<string>("ประวัติแก้ไขประกาศเกียรติคุณ");
// mock data const rows = ref<ResponseObject[]>([]);
const rows = ref<any[]>([
{
id: "08dc2c84-4ef1-463e-8004-a6018ccaea19",
issuer: "",
detail: "ประกาศเกียรติคุณ ชั้น 2",
isDate: false,
issueDate: new Date("2019-01-01T00:00:00").getFullYear(),
issueDate2: new Date("2019-01-01T00:00:00"),
refCommandNo: "",
refCommandDate: null,
createdAt: new Date("2024-02-13T18:09:55.151412"),
createdFullName: "สาวิตรี ศรีสมัย",
},
{
id: "08dc2c84-4ef1-463e-8004-a6018ccaea19",
issuer: "",
detail: "ประกาศเกียรติคุณ ชั้น 2",
isDate: true,
issueDate: new Date("2015-12-05T00:00:00").getFullYear(),
issueDate2: new Date("2015-12-05T00:00:00"),
refCommandNo: "",
refCommandDate: null,
createdAt: new Date("2024-02-13T18:10:37.425739"),
createdFullName: "สาวิตรี ศรีสมัย",
},
]);
const columns = ref<QTableProps["columns"]>([ const columns = ref<QTableProps["columns"]>([
{ {
@ -87,11 +60,12 @@ const columns = ref<QTableProps["columns"]>([
align: "left", align: "left",
label: "วันที่ได้รับ", label: "วันที่ได้รับ",
sortable: true, sortable: true,
field: "issueDate", field: (v) =>
v.isDate
? date2Thai(v.issueDate)
: new Date(v.issueDate).getFullYear() + 543,
headerStyle: "font-size: 14px", headerStyle: "font-size: 14px",
style: "font-size: 14px", style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
}, },
{ {
name: "issuer", name: "issuer",
@ -134,6 +108,7 @@ const columns = ref<QTableProps["columns"]>([
field: "refCommandDate", field: "refCommandDate",
headerStyle: "font-size: 14px", headerStyle: "font-size: 14px",
style: "font-size: 14px", style: "font-size: 14px",
format: (v) => date2Thai(v),
sort: (a: string, b: string) => sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
}, },
@ -144,11 +119,12 @@ const columnsHistory = ref<QTableProps["columns"]>([
align: "left", align: "left",
label: "วันที่ได้รับ", label: "วันที่ได้รับ",
sortable: true, sortable: true,
field: "issueDate", field: (v) =>
v.isDate
? date2Thai(v.issueDate)
: new Date(v.issueDate).getFullYear() + 543,
headerStyle: "font-size: 14px", headerStyle: "font-size: 14px",
style: "font-size: 14px", style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
}, },
{ {
name: "issuer", name: "issuer",
@ -191,6 +167,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
field: "refCommandDate", field: "refCommandDate",
headerStyle: "font-size: 14px", headerStyle: "font-size: 14px",
style: "font-size: 14px", style: "font-size: 14px",
format: (v) => date2Thai(v),
sort: (a: string, b: string) => sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
}, },
@ -213,6 +190,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
field: "createdAt", field: "createdAt",
headerStyle: "font-size: 14px", headerStyle: "font-size: 14px",
style: "font-size: 14px", style: "font-size: 14px",
format: (v) => date2Thai(v),
sort: (a: string, b: string) => sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
}, },
@ -236,87 +214,152 @@ const visibleColumnsHistory = ref<String[]>([
"createdAt", "createdAt",
]); ]);
const initialPagination = ref<Pagination>({ async function fetchData() {
rowsPerPage: 0, if (!profileId.value) return;
});
const paginationLabel = (start: string, end: string, total: string) => { showLoader();
return start + "-" + end + " ใน " + total; try {
}; const res = await http.get(
config.API.profileNewHonorByProfileId(profileId.value)
function onClickOpenDialog(StatusEdit: boolean = false, data: any = []) { );
modal.value = true; rows.value = res.data.result;
} catch (error) {
messageError($q, error);
} finally {
hideLoader();
}
} }
const clickClose = async () => { async function addEditData(editStatus: boolean = false) {
if (!profileId.value) return;
const url = editStatus
? config.API.profileNewHonorById(declHonorData.id)
: config.API.profileNewHonor;
const method = editStatus ? "patch" : "post";
const reqBody: RequestItemsObject = {
profileId: profileId.value,
isActive: declHonorData.isActive,
detail: declHonorData.detail,
issueDate: declHonorData.isDate
? declHonorData.issueDate
: new Date(`${declHonorData.issueDateYear}-1-1`),
issuer: declHonorData.issuer,
refCommandDate: declHonorData.refCommandDate,
refCommandNo: declHonorData.refCommandNo,
isDate: declHonorData.isDate === "true" ? true : false,
};
try {
await http[method](url, reqBody);
success($q, "บันทึกข้อมูลสำเร็จ");
await fetchData();
} catch (e) {
messageError($q, e);
} finally {
hideLoader();
}
}
async function clickDelete(dataId: string) {
try {
await http.delete(config.API.profileNewHonorById(dataId));
success($q, "ลบข้อมูลสำเร็จ");
await fetchData();
modal.value = false;
} catch (error) {
messageError($q, error);
} finally {
hideLoader();
}
}
function onClickOpenDialog(editStatus: boolean = false, row?: ResponseObject) {
modal.value = true;
editRow.value = false;
isEdit.value = editStatus;
if (editStatus && row) {
Object.assign(declHonorData, row);
declHonorData.isDate = row.isDate.toString();
declHonorData.issueDate = row.issueDate;
declHonorData.issueDateYear = new Date(row.issueDate).getFullYear();
declHonorData.refCommandDate = row.refCommandDate;
} else {
declHonorData.id = "";
declHonorData.isActive = true;
declHonorData.issuer = "";
declHonorData.detail = "";
declHonorData.issueDate = null;
declHonorData.issueDateYear = 0;
declHonorData.refCommandNo = "";
declHonorData.refCommandDate = null;
declHonorData.isDate = "false";
}
}
async function clickClose() {
if (editRow.value == true) { if (editRow.value == true) {
$q.dialog({ dialogConfirm(
title: `ข้อมูลมีการแก้ไข`, $q,
message: `ยืนยันที่จะปิดโดยไม่บันทึกใช่หรือไม่?`, async () => {
cancel: "ยกเลิก", modal.value = false;
ok: "ยืนยัน", editRow.value = false;
persistent: true, },
}).onOk(async () => { "ข้อมูลมีการแก้ไข",
modal.value = false; "ยืนยันที่จะปิดโดยไม่บันทึกใช่หรือไม่?"
// next.value = false; );
// previous.value = false;
});
} else { } else {
modal.value = false; modal.value = false;
// next.value = false;
// previous.value = false;
} }
}; }
async function clickHistory(row: ResponseObject) {
modalHistory.value = true;
filterSearch.value = "";
showLoader();
try {
const res = await http.get(config.API.profileNewHonorHisById(row.id));
rowsHistory.value = res.data.result;
} catch (e) {
messageError($q, e);
} finally {
hideLoader();
}
}
function onSubmit() { function onSubmit() {
myForm.value.validate().then(async (result: boolean) => { dialogConfirm(
if (result) { $q,
// await saveData(); async () => {
modal.value = false; myForm.value?.validate().then(async (result: boolean) => {
if (result) {
addEditData(isEdit.value);
modal.value = false;
}
});
},
"ยืนยันการบันทึกข้อมูล",
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
);
}
onMounted(async () => {
await fetchData();
});
watch(
() => declHonorData.isDate,
() => {
if (declHonorData.isDate === "true") {
declHonorData.issueDateYear = 0;
} }
}); if (declHonorData.isDate === "false") {
} declHonorData.issueDate = null;
}
function selectData(props: any) { }
modal.value = true; );
}
async function clickHistory(row: RequestItemsObject) {
modalHistory.value = true;
// tittleHistory.value =
// props.profileType == "employee"
// ? ""
// : "";
// modalHistory.value = true;
// filterHistory.value = "";
// showLoader();
// await http
// .get(config.API.profileHonorHisId(row.id))
// .then((res) => {
// let data = res.data.result;
// rowsHistory.value = [];
// data.map((e: any) => {
// rowsHistory.value.push({
// id: e.id,
// issuer: e.issuer,
// detail: e.detail,
// issueDate: new Date(e.issueDate).getFullYear(),
// issueDate2: new Date(e.issueDate),
// refCommandNo: e.refCommandNo,
// refCommandDate:
// e.refCommandDate == null ? null : new Date(e.refCommandDate),
// createdAt: new Date(e.createdAt),
// createdFullName: e.createdFullName,
// });
// });
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {
// hideLoader();
// });
}
</script> </script>
<template> <template>
<q-toolbar style="padding: 0px" class="text-primary"> <q-toolbar style="padding: 0px" class="text-primary">
@ -390,16 +433,14 @@ async function clickHistory(row: RequestItemsObject) {
bordered bordered
virtual-scroll virtual-scroll
ref="table" ref="table"
v-bind="attrs" class="custom-header-table"
:rows="rows" :rows="rows"
:paging="true"
:columns="columns" :columns="columns"
:filter="filterSearch" :filter="filterSearch"
:grid="modelView === 'card'" :grid="modelView === 'card'"
:pagination="initialPagination"
:visible-columns="visibleColumns" :visible-columns="visibleColumns"
:pagination-label="paginationLabel"
:rows-per-page-options="[20, 50, 100]" :rows-per-page-options="[20, 50, 100]"
:virtual-scroll-sticky-size-start="48"
> >
<template v-slot:header="props"> <template v-slot:header="props">
<q-tr :props="props"> <q-tr :props="props">
@ -417,27 +458,24 @@ async function clickHistory(row: RequestItemsObject) {
:key="col.name" :key="col.name"
:props="props" :props="props"
class="cursor-pointer" class="cursor-pointer"
@click="selectData(props)"
> >
<div v-if="col.name == 'issueDate'" class="table_ellipsis"> <div class="table_ellipsis">
{{
props.row.isDate == true
? date2Thai(props.row.issueDate2)
: col.value + 543
}}
</div>
<div v-else-if="col.name == 'refCommandDate'" class="table_ellipsis">
{{
props.row.refCommandDate
? date2Thai(props.row.refCommandDate)
: "-"
}}
</div>
<div v-else class="table_ellipsis">
{{ col.value ? col.value : "-" }} {{ col.value ? col.value : "-" }}
</div> </div>
</q-td> </q-td>
<q-td auto-width> <q-td auto-width>
<q-btn
flat
dense
round
class="q-mr-xs"
size="14px"
color="primary"
icon="mdi-pencil-outline"
@click="onClickOpenDialog(true, props.row)"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn <q-btn
color="info" color="info"
flat flat
@ -449,6 +487,19 @@ async function clickHistory(row: RequestItemsObject) {
> >
<q-tooltip>ประวแกไขประกาศเกยรต</q-tooltip> <q-tooltip>ประวแกไขประกาศเกยรต</q-tooltip>
</q-btn> </q-btn>
<!-- <q-btn
flat
dense
round
size="14px"
color="red"
icon="mdi-delete"
@click="
dialogRemove($q, async () => await clickDelete(props.row.id))
"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn> -->
</q-td> </q-td>
</q-tr> </q-tr>
</template> </template>
@ -464,7 +515,7 @@ async function clickHistory(row: RequestItemsObject) {
round round
color="primary" color="primary"
icon="mdi-pencil-outline" icon="mdi-pencil-outline"
@click.stop.prevent="onClickOpenDialog()" @click="onClickOpenDialog(true, props)"
> >
<q-tooltip>แกไขขอม</q-tooltip> <q-tooltip>แกไขขอม</q-tooltip>
</q-btn> </q-btn>
@ -492,21 +543,7 @@ async function clickHistory(row: RequestItemsObject) {
</q-item-section> </q-item-section>
<q-item-section class="text-dark"> <q-item-section class="text-dark">
<q-item-label v-if="col.name == 'issueDate'"> <q-item-label>
{{
props.row.isDate == true
? date2Thai(props.row.issueDate2)
: col.value + 543
}}
</q-item-label>
<q-item-label v-else-if="col.name == 'refCommandDate'">
{{
props.row.refCommandDate
? date2Thai(props.row.refCommandDate)
: "-"
}}
</q-item-label>
<q-item-label v-else>
{{ col.value ? col.value : "-" }} {{ col.value ? col.value : "-" }}
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
@ -526,7 +563,7 @@ async function clickHistory(row: RequestItemsObject) {
<div class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs"> <div class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs">
<div class="row col-12 q-gutter-md q-py-sm text-grey-7"> <div class="row col-12 q-gutter-md q-py-sm text-grey-7">
<q-radio <q-radio
v-model="isDate" v-model="declHonorData.isDate"
checked-icon="task_alt" checked-icon="task_alt"
unchecked-icon="panorama_fish_eye" unchecked-icon="panorama_fish_eye"
val="false" val="false"
@ -534,7 +571,7 @@ async function clickHistory(row: RequestItemsObject) {
dense dense
/> />
<q-radio <q-radio
v-model="isDate" v-model="declHonorData.isDate"
checked-icon="task_alt" checked-icon="task_alt"
unchecked-icon="panorama_fish_eye" unchecked-icon="panorama_fish_eye"
val="true" val="true"
@ -546,12 +583,12 @@ async function clickHistory(row: RequestItemsObject) {
<datepicker <datepicker
autoApply autoApply
year-picker year-picker
v-model="issueDate" v-model="declHonorData.issueDateYear"
week-start="0" week-start="0"
menu-class-name="modalfix" menu-class-name="modalfix"
:locale="'th'" :locale="'th'"
:enableTimePicker="false" :enableTimePicker="false"
v-if="isDate === 'false'" v-if="declHonorData.isDate === 'false'"
> >
<template #year="{ year }">{{ year + 543 }}</template> <template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{ <template #year-overlay-value="{ value }">{{
@ -563,7 +600,12 @@ async function clickHistory(row: RequestItemsObject) {
outlined outlined
lazy-rules lazy-rules
hide-bottom-space hide-bottom-space
:model-value="issueDate ? issueDate + 543 : ''" class="inputgreen"
:model-value="
declHonorData.issueDateYear
? declHonorData.issueDateYear + 543
: null
"
:rules="[ :rules="[
(val:string) => (val:string) =>
!!val || !!val ||
@ -587,7 +629,7 @@ async function clickHistory(row: RequestItemsObject) {
borderless borderless
week-start="0" week-start="0"
menu-class-name="modalfix" menu-class-name="modalfix"
v-model="issueDate2" v-model="declHonorData.issueDate"
:locale="'th'" :locale="'th'"
:enableTimePicker="false" :enableTimePicker="false"
v-else v-else
@ -602,14 +644,13 @@ async function clickHistory(row: RequestItemsObject) {
<q-input <q-input
dense dense
outlined outlined
hide-bottom-space
for="inputDatereceive" for="inputDatereceive"
ref="dateReceivedRef" ref="dateReceivedRef"
hide-bottom-space class="inputgreen"
:model-value="date2Thai(issueDate2 as Date)" :model-value="date2Thai(declHonorData.issueDate as Date)"
:label="`${'วันที่ได้รับ'}`" :label="`${'วันที่ได้รับ'}`"
:rules="[ :rules="[(val) => !!val || `${'กรุณาเลือกวันที่ได้รับ'}`]"
(val) => !!val || `${'กรุณาเลือกวันที่ได้รับ'}`,
]"
@update:modelValue="() => (editRow = true)" @update:modelValue="() => (editRow = true)"
> >
<template v-slot:prepend> <template v-slot:prepend>
@ -629,7 +670,8 @@ async function clickHistory(row: RequestItemsObject) {
outlined outlined
lazy-rules lazy-rules
hide-bottom-space hide-bottom-space
v-model="issuer" class="inputgreen"
v-model="declHonorData.issuer"
:label="`${'ผู้มีอำนาจลงนาม'}`" :label="`${'ผู้มีอำนาจลงนาม'}`"
@update:modelValue="() => (editRow = true)" @update:modelValue="() => (editRow = true)"
/> />
@ -640,7 +682,8 @@ async function clickHistory(row: RequestItemsObject) {
outlined outlined
lazy-rules lazy-rules
hide-bottom-space hide-bottom-space
v-model="detail" class="inputgreen"
v-model="declHonorData.detail"
:label="`${'รายละเอียด'}`" :label="`${'รายละเอียด'}`"
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]" :rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
@update:modelValue="() => (editRow = true)" @update:modelValue="() => (editRow = true)"
@ -652,7 +695,8 @@ async function clickHistory(row: RequestItemsObject) {
outlined outlined
lazy-rules lazy-rules
hide-bottom-space hide-bottom-space
v-model="refCommandNo" class="inputgreen"
v-model="declHonorData.refCommandNo"
:label="`${'เลขที่คำสั่ง'}`" :label="`${'เลขที่คำสั่ง'}`"
@update:modelValue="() => (editRow = true)" @update:modelValue="() => (editRow = true)"
> >
@ -667,7 +711,7 @@ async function clickHistory(row: RequestItemsObject) {
borderless borderless
week-start="0" week-start="0"
menu-class-name="modalfix" menu-class-name="modalfix"
v-model="refCommandDate" v-model="declHonorData.refCommandDate"
:locale="'th'" :locale="'th'"
:enableTimePicker="false" :enableTimePicker="false"
> >
@ -683,11 +727,14 @@ async function clickHistory(row: RequestItemsObject) {
outlined outlined
clearable clearable
hide-bottom-space hide-bottom-space
class="inputgreen"
:model-value=" :model-value="
refCommandDate == null ? null : date2Thai(refCommandDate) declHonorData.refCommandDate == null
? null
: date2Thai(declHonorData.refCommandDate)
" "
:label="`${'เอกสารอ้างอิง (ลงวันที่)'}`" :label="`${'เอกสารอ้างอิง (ลงวันที่)'}`"
@clear="refCommandDate = null" @clear="declHonorData.refCommandDate = null"
@update:modelValue="() => (editRow = true)" @update:modelValue="() => (editRow = true)"
> >
<template v-slot:prepend> <template v-slot:prepend>
@ -734,17 +781,7 @@ async function clickHistory(row: RequestItemsObject) {
<template #columns="props"> <template #columns="props">
<q-tr :props="props"> <q-tr :props="props">
<q-td v-for="col in props.cols" :key="col.name" :props="props"> <q-td v-for="col in props.cols" :key="col.name" :props="props">
<div <div class="table_ellipsis">
v-if="
col.name == 'issueDate' ||
col.name == 'createdAt' ||
col.name == 'refCommandDate'
"
class="table_ellipsis"
>
{{ col.value ? date2Thai(col.value) : "-" }}
</div>
<div v-else class="table_ellipsis">
{{ col.value ? col.value : "-" }} {{ col.value ? col.value : "-" }}
</div> </div>
</q-td> </q-td>

View file

@ -1,20 +1,24 @@
interface gDataProps { interface RequestItemsObject {
row: RequestItemsObject; profileId: string;
rowIndex: number; isActive: boolean;
detail: string;
issueDate: Date | null;
issuer: string;
refCommandDate: Date | null;
refCommandNo: string;
isDate: boolean;
} }
//ข้อมูล interface FormData {
interface RequestItemsObject {
id: string; id: string;
isActive: boolean;
isDate: string | null;
issuer: string; issuer: string;
detail: string; detail: string;
issueDate: number | null; issueDate: Date | null;
issueDate2: Date; issueDateYear: number;
refCommandNo: string; refCommandNo: string;
refCommandDate: Date | null | string; refCommandDate: Date | null;
createdFullName: string;
createdAt: Date;
isDate: string;
} }
//columns //columns
@ -30,4 +34,4 @@ interface Columns {
}; };
} }
export type { RequestItemsObject, Columns }; export type { RequestItemsObject, FormData, Columns };

View file

@ -1,15 +1,19 @@
//ข้อมูล
interface ResponseObject { interface ResponseObject {
id: string;
issuer: string;
detail: string;
issueDate: number;
issueDate2: Date;
refCommandNo: string;
refCommandDate: Date | null;
createdFullName: string;
createdAt: Date; createdAt: Date;
isDate: string; createdFullName: string;
createdUserId: string;
detail: string;
id: string;
isActive: boolean;
isDate: boolean;
issueDate: Date;
issuer: string;
lastUpdateFullName: string;
lastUpdateUserId: string;
lastUpdatedAt: Date;
profileId: string;
refCommandDate: Date;
refCommandNo: string;
} }
export type { ResponseObject }; export type { ResponseObject };