Merge branch 'nice' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-26 18:11:22 +07:00
commit 2b691a746d
3 changed files with 88 additions and 19 deletions

View file

@ -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 : "" }}

View file

@ -127,6 +127,7 @@ interface ResRecord {
trainingDays: number | null;
type: string;
isProfile: boolean;
idDoneIDP: boolean;
}
interface DataStrategic {

View file

@ -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