Merge branch 'nice' into develop
This commit is contained in:
commit
2b691a746d
3 changed files with 88 additions and 19 deletions
|
|
@ -28,6 +28,24 @@ const listPerson = defineModel<ResRecord[]>("listPerson", { required: true });
|
|||
const keyword = ref<string>("");
|
||||
const rows = ref<ResRecord[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "isDone",
|
||||
align: "left",
|
||||
label: "บันทึกที่ทะเบียนประวัติแล้ว",
|
||||
sortable: true,
|
||||
field: "isDone",
|
||||
headerStyle: "font-size: 14px; width: 50px;",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "isDoneIDP",
|
||||
align: "left",
|
||||
label: "บันทึก IDP ที่ทะเบียนประวัติแล้ว",
|
||||
sortable: true,
|
||||
field: "isDoneIDP",
|
||||
headerStyle: "font-size: 14px; width: 50px;",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "type",
|
||||
align: "left",
|
||||
|
|
@ -177,6 +195,8 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"isDone",
|
||||
"isDoneIDP",
|
||||
"type",
|
||||
"idcard",
|
||||
"fullName",
|
||||
|
|
@ -268,26 +288,37 @@ onMounted(() => {
|
|||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width />
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>
|
||||
<q-icon
|
||||
v-if="props.row.isDone"
|
||||
name="mdi-check"
|
||||
color="green"
|
||||
size="xs"
|
||||
>
|
||||
<q-tooltip>ส่งไปบันทึกที่ทะเบียนประวัติแล้ว</q-tooltip>
|
||||
</q-icon>
|
||||
</q-td>
|
||||
<q-tr :props="props">
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div v-if="col.name == 'fullName'">
|
||||
<div v-if="col.name === 'isDone'" class="text-center">
|
||||
<q-icon
|
||||
v-if="props.row.isDone"
|
||||
name="mdi-check"
|
||||
color="green"
|
||||
size="xs"
|
||||
>
|
||||
<q-tooltip>ส่งไปบันทึกที่ทะเบียนประวัติแล้ว</q-tooltip>
|
||||
</q-icon>
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name === 'isDoneIDP'" class="text-center">
|
||||
<q-icon
|
||||
v-if="props.row.isDoneIDP"
|
||||
name="mdi-check"
|
||||
color="blue"
|
||||
size="xs"
|
||||
>
|
||||
<q-tooltip>ส่งไปบันทึก IDP ที่ทะเบียนประวัติแล้ว</q-tooltip>
|
||||
</q-icon>
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name == 'fullName'">
|
||||
{{ props.row.prefix ? props.row.prefix : ""
|
||||
}}{{ props.row.firstName ? props.row.firstName : "" }}
|
||||
{{ props.row.lastName ? props.row.lastName : "" }}
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ interface ResRecord {
|
|||
trainingDays: number | null;
|
||||
type: string;
|
||||
isProfile: boolean;
|
||||
idDoneIDP: boolean;
|
||||
}
|
||||
|
||||
interface DataStrategic {
|
||||
|
|
|
|||
|
|
@ -38,12 +38,13 @@ const modalAddPerson = ref<boolean>(false); // ตัวแปร dialog เพ
|
|||
* function fetch ข้อมูลเบื้องต้น
|
||||
* @param id ProjectId
|
||||
*/
|
||||
function fetchData(id: string) {
|
||||
async function fetchData(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.developmentMainTab("tab1", id))
|
||||
.then(async (res) => {
|
||||
title.value = res.data.result.projectName;
|
||||
title.value = await res.data.result.projectName;
|
||||
await fetchDataProject();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -56,10 +57,10 @@ function fetchData(id: string) {
|
|||
/**
|
||||
* function เรียกข้อมูลรายชื่อทั้งหมด
|
||||
*/
|
||||
function fetchDataProject() {
|
||||
async function fetchDataProject() {
|
||||
isLoadPage.value = false;
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.developmentMainTab("tab6", projectId.value))
|
||||
.then(async (res) => {
|
||||
listPerson.value = await res.data.result;
|
||||
|
|
@ -126,6 +127,30 @@ function sendRecordRegistry() {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* function ส่งข้อมูลการพัฒนารายบุคคลไปบันทึกที่ทะเบียนประวัติ
|
||||
*/
|
||||
function sendDevalopRegistry() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
// showLoader();
|
||||
// http
|
||||
// .get(config.API.developmentMainTab("tab6/done", projectId.value))
|
||||
// .then(async () => {
|
||||
// await fetchDataProject();
|
||||
// await success($q, "ส่งข้อมูลสำเร็จ");
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// hideLoader();
|
||||
// });
|
||||
},
|
||||
"ยืนยันการส่งข้อมูลการพัฒนารายบุคคลไปบันทึกที่ทะเบียนประวัติ",
|
||||
"ต้องการยืนยันการส่งข้อมูลการพัฒนารายบุคคลไปบันทึกที่ทะเบียนประวัติหรือไม่"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* function ดาวน์โหลดไฟล์ต้นแบบ
|
||||
*/
|
||||
|
|
@ -139,7 +164,6 @@ function downloadFile() {
|
|||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchDataProject();
|
||||
fetchData(projectId.value);
|
||||
store.projectStatus = "FINISH";
|
||||
});
|
||||
|
|
@ -206,6 +230,19 @@ onMounted(() => {
|
|||
>
|
||||
<q-tooltip>ส่งไปบันทึกที่ทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
size="md"
|
||||
icon="mdi-clipboard-account-outline"
|
||||
round
|
||||
flat
|
||||
color="primary"
|
||||
@click="sendDevalopRegistry()"
|
||||
>
|
||||
<q-tooltip
|
||||
>ส่งข้อมูลการพัฒนารายบุคคลไปบันทึกที่ทะเบียนประวัติ</q-tooltip
|
||||
>
|
||||
</q-btn>
|
||||
<q-space />
|
||||
<q-btn
|
||||
flat
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue