Merge branch 'develop' into devTee
This commit is contained in:
commit
1eca4d4457
7 changed files with 316 additions and 137 deletions
|
|
@ -207,4 +207,16 @@ export default {
|
|||
|
||||
requestInformationbyType: (type: string, id: string) =>
|
||||
`${registryNew}/request-edit/${type}/${id}`,
|
||||
|
||||
// รักษาการในตำแหน่ง
|
||||
profileActposition: (type: string, id: string) =>
|
||||
`${registryNew}${type}/actposition/${id}`,
|
||||
profileActpositionHistory: (id: string, type: string) =>
|
||||
`${registryNew}${type}/actposition/history/${id}`,
|
||||
|
||||
//ช่วยราชการ
|
||||
profileAssistance: (type: string, id: string) =>
|
||||
`${registryNew}${type}/assistance/${id}`,
|
||||
profileAssistanceHistory: (id: string, type: string) =>
|
||||
`${registryNew}${type}/assistance/history/${id}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataActing } from "@/modules/04_registryPerson/interface/request/Government";
|
||||
import type { ResActingPosData } from "@/modules/04_registryPerson/interface/response/Government";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import DialogHistory from "@/modules/04_registryPerson/components/detail/GovernmentInformation/05_ActingPosHistory.vue";
|
||||
|
|
@ -38,8 +40,8 @@ const isLeave = defineModel<boolean>("isLeave", {
|
|||
});
|
||||
|
||||
/** Table*/
|
||||
const rows = ref<any[]>([]); //รายการวินัย
|
||||
const rowsMain = ref<any[]>([]); //รายการวินัย
|
||||
const rows = ref<ResActingPosData[]>([]); //รายการวินัย
|
||||
const rowsMain = ref<ResActingPosData[]>([]); //รายการวินัย
|
||||
const mode = ref<string>("table"); //การแสดงผล Table card
|
||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -103,11 +105,11 @@ const visibleColumns = ref<String[]>([
|
|||
]);
|
||||
|
||||
/** Dialog*/
|
||||
const isStarusEdit = ref<boolean>(false);
|
||||
const isStatusEdit = ref<boolean>(false);
|
||||
const modal = ref<boolean>(false);
|
||||
const modalHistory = ref<boolean>(false);
|
||||
const rowId = ref<string>("");
|
||||
const formData = reactive({
|
||||
const formData = reactive<DataActing>({
|
||||
dateStart: null,
|
||||
dateEnd: null,
|
||||
posNo: "",
|
||||
|
|
@ -124,32 +126,54 @@ function serchDataTable() {
|
|||
);
|
||||
}
|
||||
|
||||
function fetchData() {
|
||||
const data = [
|
||||
{
|
||||
id: "1",
|
||||
dateStart: new Date(),
|
||||
dateEnd: new Date(),
|
||||
posNo: "ขพน. 1",
|
||||
position: "ผู้อำนวยการ",
|
||||
status: true,
|
||||
},
|
||||
];
|
||||
|
||||
rows.value = data;
|
||||
rowsMain.value = data;
|
||||
async function fetchData() {
|
||||
await http
|
||||
.get(config.API.profileActposition(empType.value, profileId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
rows.value = data;
|
||||
rowsMain.value = data;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, () => {
|
||||
success($q, "รอ API");
|
||||
closeDialogForm();
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
const body = {
|
||||
...formData,
|
||||
profileId: isStatusEdit.value ? undefined : profileId.value,
|
||||
};
|
||||
const method = isStatusEdit.value ? "patch" : "post";
|
||||
await http[method](
|
||||
config.API.profileActposition(
|
||||
empType.value,
|
||||
isStatusEdit.value ? rowId.value : ""
|
||||
),
|
||||
body
|
||||
)
|
||||
.then(async () => {
|
||||
await fetchData();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
closeDialogForm();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function openEditDialog(data: any) {
|
||||
function openEditDialog(data: ResActingPosData) {
|
||||
modal.value = true;
|
||||
isStarusEdit.value = true;
|
||||
isStatusEdit.value = true;
|
||||
rowId.value = data.id;
|
||||
formData.dateStart = data.dateStart;
|
||||
formData.dateEnd = data.dateEnd;
|
||||
|
|
@ -165,7 +189,7 @@ function showHistoryDialog(id: string) {
|
|||
|
||||
function closeDialogForm() {
|
||||
modal.value = false;
|
||||
isStarusEdit.value = false;
|
||||
isStatusEdit.value = false;
|
||||
rowId.value = "";
|
||||
formData.dateStart = null;
|
||||
formData.dateEnd = null;
|
||||
|
|
@ -386,7 +410,7 @@ onMounted(() => {
|
|||
<q-form @submit.prevent greedy @validation-success="onSubmit()">
|
||||
<DialogHeader
|
||||
:tittle="
|
||||
isStarusEdit
|
||||
isStatusEdit
|
||||
? 'แก้ไขข้อมูลรายการรักษาการในตำแหน่ง'
|
||||
: 'เพิ่มข้อมูลรายการรักษาการในตำแหน่ง'
|
||||
"
|
||||
|
|
|
|||
|
|
@ -75,6 +75,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
label: "สถานะ",
|
||||
sortable: true,
|
||||
field: "status",
|
||||
format(val, row) {
|
||||
return row.status ? "Active" : "NoActive";
|
||||
},
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -114,36 +117,20 @@ const historyPagination = ref({
|
|||
|
||||
/** function fetch ข้อมูลประวติการแก้ไขข้อมูล*/
|
||||
function fetchDataHistory() {
|
||||
// showLoader();
|
||||
// http
|
||||
// .get(config.API.profileNewDutyHisByDutyId(id.value, empType.value))
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// rows.value = [];
|
||||
// data.map((e: ResponseObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// dateStart: new Date(e.dateStart),
|
||||
// dateEnd: new Date(e.dateEnd),
|
||||
// detail: e.detail,
|
||||
// reference: e.reference,
|
||||
// refCommandNo: e.refCommandNo,
|
||||
// refCommandDate:
|
||||
// e.refCommandDate == null ? null : new Date(e.refCommandDate),
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdAt: new Date(e.createdAt),
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// });
|
||||
// });
|
||||
// rowsMain.value = rows.value;
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileActpositionHistory(id.value, empType.value))
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
rows.value = data;
|
||||
rowsMain.value = data;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function serchDataTable() {
|
||||
|
|
@ -164,6 +151,8 @@ watch(modal, (status) => {
|
|||
filterKeyword.value = "";
|
||||
} else {
|
||||
filterKeyword.value = "";
|
||||
rows.value = [];
|
||||
rowsMain.value = [];
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import axios from "axios";
|
||||
|
||||
import { useRoute } from "vue-router";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
|
@ -9,6 +10,8 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DatAssistance } from "@/modules/04_registryPerson/interface/request/Government";
|
||||
import type { ResAssistanceData } from "@/modules/04_registryPerson/interface/response/Government";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import DialogHistory from "@/modules/04_registryPerson/components/detail/GovernmentInformation/06_HelpGovernmentHistory.vue";
|
||||
|
|
@ -38,17 +41,17 @@ const isLeave = defineModel<boolean>("isLeave", {
|
|||
});
|
||||
|
||||
/** Table*/
|
||||
const rows = ref<any[]>([]); //รายการวินัย
|
||||
const rowsMain = ref<any[]>([]); //รายการวินัย
|
||||
const rows = ref<ResAssistanceData[]>([]); //รายการวินัย
|
||||
const rowsMain = ref<ResAssistanceData[]>([]); //รายการวินัย
|
||||
const mode = ref<string>("table"); //การแสดงผล Table card
|
||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "orgHelpGovernment",
|
||||
name: "agency",
|
||||
align: "left",
|
||||
label: "หน่วยงานที่ให้ช่วยราชการ",
|
||||
sortable: true,
|
||||
field: "orgHelpGovernment",
|
||||
field: "agency",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -73,11 +76,11 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "refNo",
|
||||
name: "commandNo",
|
||||
align: "left",
|
||||
label: "เลขที่คำสั่ง",
|
||||
sortable: true,
|
||||
field: "refNo",
|
||||
field: "commandNo",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -92,25 +95,26 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
const visibleColumns = ref<String[]>([
|
||||
"orgHelpGovernment",
|
||||
"agency",
|
||||
"dateStart",
|
||||
"dateEnd",
|
||||
"refNo",
|
||||
"commandNo",
|
||||
"document",
|
||||
]);
|
||||
|
||||
/** Dialog*/
|
||||
const isStarusEdit = ref<boolean>(false);
|
||||
const isStatusEdit = ref<boolean>(false);
|
||||
const rowId = ref<string>("");
|
||||
const modal = ref<boolean>(false);
|
||||
const modalHistory = ref<boolean>(false);
|
||||
|
||||
const formData = reactive({
|
||||
org: "",
|
||||
const formData = reactive<DatAssistance>({
|
||||
agency: "",
|
||||
dateStart: null,
|
||||
dateEnd: null,
|
||||
refNo: "",
|
||||
commandNo: "",
|
||||
document: "",
|
||||
isUpload: false,
|
||||
});
|
||||
const fileUpload = ref<File>();
|
||||
|
||||
|
|
@ -123,39 +127,153 @@ function serchDataTable() {
|
|||
);
|
||||
}
|
||||
|
||||
function fetchData() {
|
||||
const data = [
|
||||
{
|
||||
id: "1",
|
||||
orgHelpGovernment: "สำนักงานเขตพระนคร",
|
||||
dateStart: new Date(),
|
||||
dateEnd: new Date(),
|
||||
refNo: "งด. 5013/2568",
|
||||
document: "เลื่อนเงินเดือนคำสั่ง สนท.ที่ 91/2544 ลว.21 พ.ย. 44",
|
||||
isUpload: true,
|
||||
},
|
||||
];
|
||||
|
||||
rows.value = data;
|
||||
rowsMain.value = data;
|
||||
async function fetchData() {
|
||||
await http
|
||||
.get(config.API.profileAssistance(empType.value, profileId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
rows.value = data;
|
||||
rowsMain.value = data;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, () => {
|
||||
success($q, "รอ API");
|
||||
closeDialogForm();
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
const body = {
|
||||
...formData,
|
||||
profileId: isStatusEdit.value ? undefined : profileId.value,
|
||||
isUpload: isStatusEdit.value
|
||||
? formData.isUpload
|
||||
? formData.isUpload
|
||||
: fileUpload.value
|
||||
? true
|
||||
: false
|
||||
: fileUpload.value
|
||||
? true
|
||||
: false,
|
||||
};
|
||||
const method = isStatusEdit.value ? "patch" : "post";
|
||||
await http[method](
|
||||
config.API.profileAssistance(
|
||||
empType.value,
|
||||
isStatusEdit.value ? rowId.value : ""
|
||||
),
|
||||
body
|
||||
)
|
||||
.then(async (res) => {
|
||||
if (fileUpload.value) {
|
||||
const id = isStatusEdit.value ? rowId.value : res.data.result;
|
||||
await uploadProfile(id);
|
||||
}
|
||||
await fetchData();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
closeDialogForm();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function openEditDialog(data: any) {
|
||||
/**
|
||||
* ฟังก์ชันส้ราง Path อัปโหลดไฟล์
|
||||
* @param id
|
||||
*/
|
||||
async function uploadProfile(id: string) {
|
||||
await http
|
||||
.post(
|
||||
config.API.subFile(
|
||||
"ทะเบียนประวัติ",
|
||||
"ปฏิบัติราชการพิเศษ",
|
||||
profileId.value,
|
||||
id
|
||||
),
|
||||
{
|
||||
replace: true,
|
||||
fileList: [
|
||||
{
|
||||
fileName: "เอกสารหลักฐาน",
|
||||
},
|
||||
],
|
||||
}
|
||||
)
|
||||
.then(async (res) => {
|
||||
const uploadUrl = res.data["เอกสารหลักฐาน"].uploadUrl;
|
||||
await uploadFileURL(uploadUrl, fileUpload.value);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันอัปโหลไฟล์
|
||||
* @param uploadUrl Path อัปโหลดไฟล์
|
||||
* @param file ไฟล์เอกสาร
|
||||
*/
|
||||
async function uploadFileURL(uploadUrl: string, file: any) {
|
||||
await axios
|
||||
.put(uploadUrl, file, {
|
||||
headers: {
|
||||
"Content-Type": file.type,
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
fileUpload.value = undefined;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันโหลไฟลเอกสารหลักฐาน
|
||||
* @param id รายการที่ต้องการโหลด
|
||||
*/
|
||||
async function onDownloadFile(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(
|
||||
config.API.subFileByFileName(
|
||||
"ทะเบียนประวัติ",
|
||||
"ปฏิบัติราชการพิเศษ",
|
||||
profileId.value,
|
||||
id,
|
||||
"เอกสารหลักฐาน"
|
||||
)
|
||||
)
|
||||
.then(async (res) => {
|
||||
const data = res.data.downloadUrl;
|
||||
window.open(data, "_blank");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function openEditDialog(data: ResAssistanceData) {
|
||||
modal.value = true;
|
||||
isStarusEdit.value = true;
|
||||
isStatusEdit.value = true;
|
||||
rowId.value = data.id;
|
||||
formData.org = data.orgHelpGovernment;
|
||||
formData.agency = data.agency;
|
||||
formData.dateStart = data.dateStart;
|
||||
formData.dateEnd = data.dateEnd;
|
||||
formData.refNo = data.refNo;
|
||||
formData.commandNo = data.commandNo;
|
||||
formData.document = data.document;
|
||||
formData.isUpload = data.isUpload;
|
||||
}
|
||||
|
||||
function showHistoryDialog(id: string) {
|
||||
|
|
@ -165,13 +283,14 @@ function showHistoryDialog(id: string) {
|
|||
|
||||
function closeDialogForm() {
|
||||
modal.value = false;
|
||||
isStarusEdit.value = false;
|
||||
isStatusEdit.value = false;
|
||||
rowId.value = "";
|
||||
formData.org = "";
|
||||
formData.agency = "";
|
||||
formData.dateStart = null;
|
||||
formData.dateEnd = null;
|
||||
formData.refNo = "";
|
||||
formData.commandNo = "";
|
||||
formData.document = "";
|
||||
formData.isUpload = false;
|
||||
fileUpload.value = undefined;
|
||||
}
|
||||
|
||||
|
|
@ -316,6 +435,7 @@ onMounted(() => {
|
|||
color="green"
|
||||
icon="mdi-file-document-outline"
|
||||
v-if="props.row.isUpload"
|
||||
@click="onDownloadFile(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -356,11 +476,7 @@ onMounted(() => {
|
|||
หน่วยงานที่ให้ช่วยราชการ
|
||||
</div>
|
||||
<div class="col-9">
|
||||
{{
|
||||
props.row.orgHelpGovernment
|
||||
? props.row.orgHelpGovernment
|
||||
: "-"
|
||||
}}
|
||||
{{ props.row.agency ? props.row.agency : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-pa-sm bg-grey-2">
|
||||
|
|
@ -383,7 +499,7 @@ onMounted(() => {
|
|||
เลขที่คำสั่ง
|
||||
</div>
|
||||
<div class="col-9">
|
||||
{{ props.row.refNo ? props.row.refNo : "-" }}
|
||||
{{ props.row.commandNo ? props.row.commandNo : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
|
|
@ -407,7 +523,7 @@ onMounted(() => {
|
|||
<q-form @submit.prevent greedy @validation-success="onSubmit()">
|
||||
<DialogHeader
|
||||
:tittle="
|
||||
isStarusEdit
|
||||
isStatusEdit
|
||||
? 'แก้ไขข้อมูลรายการช่วยราชการ'
|
||||
: 'เพิ่มข้อมูลรายการช่วยราชการ'
|
||||
"
|
||||
|
|
@ -422,7 +538,7 @@ onMounted(() => {
|
|||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="formData.org"
|
||||
v-model="formData.agency"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกหน่วยงานที่ให้ช่วยราชการ'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'หน่วยงานที่ให้ช่วยราชการ'}`"
|
||||
|
|
@ -508,7 +624,7 @@ onMounted(() => {
|
|||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="formData.refNo"
|
||||
v-model="formData.commandNo"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่คำสั่ง'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'เลขที่คำสั่ง'}`"
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ const rows = ref<ResponseObject[]>([]); //data history
|
|||
const rowsMain = ref<ResponseObject[]>([]); //data history
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "orgHelpGovernment",
|
||||
name: "agency",
|
||||
align: "left",
|
||||
label: "หน่วยงานที่ให้ช่วยราชการ",
|
||||
sortable: true,
|
||||
field: "orgHelpGovernment",
|
||||
field: "agency",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -61,11 +61,11 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "refNo",
|
||||
name: "commandNo",
|
||||
align: "left",
|
||||
label: "เลขที่คำสั่ง",
|
||||
sortable: true,
|
||||
field: "refNo",
|
||||
field: "commandNo",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -99,10 +99,10 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
const visibleColumns = ref<String[]>([
|
||||
"orgHelpGovernment",
|
||||
"agency",
|
||||
"dateStart",
|
||||
"dateEnd",
|
||||
"refNo",
|
||||
"commandNo",
|
||||
"document",
|
||||
"lastUpdateFullName",
|
||||
"lastUpdatedAt",
|
||||
|
|
@ -114,36 +114,20 @@ const historyPagination = ref({
|
|||
|
||||
/** function fetch ข้อมูลประวติการแก้ไขข้อมูล*/
|
||||
function fetchDataHistory() {
|
||||
// showLoader();
|
||||
// http
|
||||
// .get(config.API.profileNewDutyHisByDutyId(id.value, empType.value))
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// rows.value = [];
|
||||
// data.map((e: ResponseObject) => {
|
||||
// rows.value.push({
|
||||
// id: e.id,
|
||||
// dateStart: new Date(e.dateStart),
|
||||
// dateEnd: new Date(e.dateEnd),
|
||||
// detail: e.detail,
|
||||
// reference: e.reference,
|
||||
// refCommandNo: e.refCommandNo,
|
||||
// refCommandDate:
|
||||
// e.refCommandDate == null ? null : new Date(e.refCommandDate),
|
||||
// createdFullName: e.createdFullName,
|
||||
// createdAt: new Date(e.createdAt),
|
||||
// lastUpdateFullName: e.lastUpdateFullName,
|
||||
// lastUpdatedAt: e.lastUpdatedAt,
|
||||
// });
|
||||
// });
|
||||
// rowsMain.value = rows.value;
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileAssistanceHistory(id.value, empType.value))
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
rows.value = data;
|
||||
rowsMain.value = rows.value;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function serchDataTable() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
interface DataActing {
|
||||
dateStart: null | Date;
|
||||
dateEnd: null | Date;
|
||||
posNo: string;
|
||||
position: string;
|
||||
status: boolean;
|
||||
}
|
||||
|
||||
interface DatAssistance {
|
||||
dateStart: Date | null;
|
||||
dateEnd: Date | null;
|
||||
agency: string;
|
||||
commandNo: string;
|
||||
document: string;
|
||||
isUpload: boolean;
|
||||
}
|
||||
|
||||
export type { DataActing, DatAssistance };
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
interface ResActingPosData {
|
||||
createdAt: string;
|
||||
createdFullName: string;
|
||||
createdUserId: string;
|
||||
dateEnd: Date | null;
|
||||
dateStart: Date | null;
|
||||
id: string;
|
||||
lastUpdateFullName: string;
|
||||
lastUpdateUserId: string;
|
||||
lastUpdatedAt: string;
|
||||
posNo: string;
|
||||
position: string;
|
||||
profileEmployeeId: string;
|
||||
profileId: string;
|
||||
status: boolean;
|
||||
}
|
||||
|
||||
interface ResAssistanceData {
|
||||
agency: string;
|
||||
commandNo: string;
|
||||
createdAt: Date | null;
|
||||
createdFullName: string;
|
||||
createdUserId: string;
|
||||
dateEnd: Date | null;
|
||||
dateStart: Date | null;
|
||||
document: string;
|
||||
id: string;
|
||||
isUpload: false;
|
||||
lastUpdateFullName: string;
|
||||
lastUpdateUserId: string;
|
||||
lastUpdatedAt: string;
|
||||
profileEmployeeId: string;
|
||||
profileId: string;
|
||||
}
|
||||
|
||||
export type { ResActingPosData, ResAssistanceData };
|
||||
Loading…
Add table
Add a link
Reference in a new issue