Merge branch 'develop' into feat/delete
This commit is contained in:
commit
aa3d41b7b3
15 changed files with 61 additions and 38 deletions
|
|
@ -8,6 +8,7 @@ import config from "@/app.config";
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
import type { FormProfile } from "@/interface/main";
|
import type { FormProfile } from "@/interface/main";
|
||||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||||
|
import avatarMain from "@/assets/avatar_user.jpg";
|
||||||
|
|
||||||
/** importComponents*/
|
/** importComponents*/
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
|
|
@ -91,8 +92,11 @@ function fetchProfile(id: string, name: string) {
|
||||||
if (profile.avatar === "") {
|
if (profile.avatar === "") {
|
||||||
http
|
http
|
||||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `${name}`))
|
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `${name}`))
|
||||||
.then(async (res) => {
|
.then((res) => {
|
||||||
profile.avatar = res.data.downloadUrl;
|
profile.avatar = res.data.downloadUrl;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
profile.avatar = avatarMain;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
@click="close"
|
@click="close"
|
||||||
|
@keydown.enter.prevent
|
||||||
|
@keydown.space.prevent
|
||||||
style="color: #ff8080; background-color: #ffdede"
|
style="color: #ff8080; background-color: #ffdede"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import type {
|
||||||
GovermentEmpTemp,
|
GovermentEmpTemp,
|
||||||
} from "@/components/information/interface/response/Government";
|
} from "@/components/information/interface/response/Government";
|
||||||
import type { Avatar } from "@/components/information/interface/response/avatar";
|
import type { Avatar } from "@/components/information/interface/response/avatar";
|
||||||
|
import avatarMain from "@/assets/avatar_user.jpg";
|
||||||
|
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
@ -167,9 +168,9 @@ async function fetchInformation(id: string) {
|
||||||
avatar.position = data.position ? data.position : "-";
|
avatar.position = data.position ? data.position : "-";
|
||||||
//ถ้ามีรูปเรียก Function fetchProfile เรียกข้อมูลรูปโปรไฟล์
|
//ถ้ามีรูปเรียก Function fetchProfile เรียกข้อมูลรูปโปรไฟล์
|
||||||
if (data.avatarName) {
|
if (data.avatarName) {
|
||||||
await fetchProfile(data.id as string, data.avatarName);
|
fetchProfile(data.id as string, data.avatarName);
|
||||||
} else {
|
} else {
|
||||||
avatar.avatar = "";
|
avatar.avatar = avatarMain;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.id) {
|
if (props.id) {
|
||||||
|
|
@ -260,11 +261,14 @@ async function fetchProfileGovTemp(id: string) {
|
||||||
* @param id profileID
|
* @param id profileID
|
||||||
* @param avatarName ชื่อไฟล์
|
* @param avatarName ชื่อไฟล์
|
||||||
*/
|
*/
|
||||||
async function fetchProfile(id: string, avatarName: string) {
|
function fetchProfile(id: string, avatarName: string) {
|
||||||
await http
|
http
|
||||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName))
|
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName))
|
||||||
.then(async (res) => {
|
.then((res) => {
|
||||||
avatar.avatar = await res.data.downloadUrl;
|
avatar.avatar = res.data.downloadUrl;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
avatar.avatar = avatarMain;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,9 @@ function formatHistoryOwnerData(data: HistoryPos[]) {
|
||||||
return data.map((item) => ({
|
return data.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
fullname: item.firstName
|
fullname: item.firstName
|
||||||
? `${item.prefix}${item.firstName} ${item.lastName}`.trim()
|
? `${item.prefix || ""}${item.firstName || ""} ${
|
||||||
|
item.lastName || ""
|
||||||
|
}`.trim()
|
||||||
: "ว่าง",
|
: "ว่าง",
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -866,7 +866,8 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
:model-value="date2Thai(formData.dateEnd)"
|
:model-value="date2Thai(formData.dateEnd)"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก วันที่สิ้นสุด'}`]"
|
clearable
|
||||||
|
@clear="formData.dateEnd = null"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'วันที่สิ้นสุด'}`"
|
:label="`${'วันที่สิ้นสุด'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -408,7 +408,8 @@ function calculateMinDate() {
|
||||||
|
|
||||||
function prefixRankRule() {
|
function prefixRankRule() {
|
||||||
return [
|
return [
|
||||||
() => !!formData.rank || !!formData.prefix || "กรุณาเลือกคำนำหน้าชื่อ หรือยศ",
|
() =>
|
||||||
|
!!formData.rank || !!formData.prefix || "กรุณาเลือกคำนำหน้าชื่อ หรือยศ",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -588,6 +589,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-select
|
<q-select
|
||||||
|
:readonly="checkPermission($route)?.attrOwnership !== 'OWNER'"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
use-input
|
use-input
|
||||||
|
|
@ -602,7 +604,6 @@ onMounted(() => {
|
||||||
option-value="name"
|
option-value="name"
|
||||||
v-model="formData.prefix"
|
v-model="formData.prefix"
|
||||||
clearable
|
clearable
|
||||||
class="inputgreen"
|
|
||||||
:options="store.Ops.prefixOps"
|
:options="store.Ops.prefixOps"
|
||||||
:label="dataLabel.prefix"
|
:label="dataLabel.prefix"
|
||||||
:rules="prefixRankRule()"
|
:rules="prefixRankRule()"
|
||||||
|
|
@ -640,24 +641,24 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-input
|
<q-input
|
||||||
|
:readonly="checkPermission($route)?.attrOwnership !== 'OWNER'"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
v-model="formData.firstName"
|
v-model="formData.firstName"
|
||||||
class="inputgreen"
|
|
||||||
:label="dataLabel.firstName"
|
:label="dataLabel.firstName"
|
||||||
:rules="[(val: string) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
:rules="[(val: string) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-input
|
<q-input
|
||||||
|
:readonly="checkPermission($route)?.attrOwnership !== 'OWNER'"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
v-model="formData.lastName"
|
v-model="formData.lastName"
|
||||||
class="inputgreen"
|
|
||||||
:label="dataLabel.lastName"
|
:label="dataLabel.lastName"
|
||||||
:rules="[(val: string) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
:rules="[(val: string) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
||||||
/>
|
/>
|
||||||
|
|
@ -721,6 +722,7 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<q-select
|
<q-select
|
||||||
|
:readonly="checkPermission($route)?.attrOwnership !== 'OWNER'"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
use-input
|
use-input
|
||||||
|
|
@ -735,7 +737,6 @@ onMounted(() => {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
v-model="formData.gender"
|
v-model="formData.gender"
|
||||||
class="inputgreen"
|
|
||||||
:options="store.Ops.genderOps"
|
:options="store.Ops.genderOps"
|
||||||
:label="dataLabel.gender"
|
:label="dataLabel.gender"
|
||||||
@filter="(inputValue: string,
|
@filter="(inputValue: string,
|
||||||
|
|
|
||||||
|
|
@ -323,10 +323,10 @@ async function uploadFileURL(uploadUrl: string, file: any) {
|
||||||
* ฟังก์ชันดึงข้อมูลรูปโปรไฟล์
|
* ฟังก์ชันดึงข้อมูลรูปโปรไฟล์
|
||||||
* @param id โปรไฟล์
|
* @param id โปรไฟล์
|
||||||
*/
|
*/
|
||||||
async function fetchProfile(id: string) {
|
function fetchProfile(id: string) {
|
||||||
await http
|
http
|
||||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, fileName.value))
|
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, fileName.value))
|
||||||
.then(async (res) => {
|
.then((res) => {
|
||||||
profilePicture.value = res.data.downloadUrl;
|
profilePicture.value = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
@ -403,7 +403,7 @@ async function fetchDataPersonal() {
|
||||||
|
|
||||||
fileName.value = res.data.result.avatarName;
|
fileName.value = res.data.result.avatarName;
|
||||||
if (formDetail.value?.avatarName) {
|
if (formDetail.value?.avatarName) {
|
||||||
await fetchProfile(profileId.value);
|
fetchProfile(profileId.value);
|
||||||
} else {
|
} else {
|
||||||
profilePicture.value = avatar;
|
profilePicture.value = avatar;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -889,8 +889,8 @@ function handleSortByDate() {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ยืนยันการเรียงลำดับข้อมูล",
|
"ยืนยันการจัดลำดับ",
|
||||||
"ต้องการยืนยันการเรียงลำดับข้อมูลนี้ใช่หรือไม่?"
|
"ต้องการยืนยันการจัดลำดับข้อมูลตามวันที่คำสั่งมีผลใช่หรือไม่?"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -941,10 +941,10 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
color="indigo-5"
|
color="indigo-5"
|
||||||
icon="mdi-sort-alphabetical-descending"
|
icon="mdi-calendar-export"
|
||||||
@click="handleSortByDate()"
|
@click="handleSortByDate()"
|
||||||
>
|
>
|
||||||
<q-tooltip>เรียงลำดับข้อมูล</q-tooltip>
|
<q-tooltip>จัดลำดับตามวันที่คำสั่งมีผล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -316,9 +316,10 @@ onMounted(() => {
|
||||||
:model-value="
|
:model-value="
|
||||||
dateEnd !== null ? date2Thai(dateEnd) : null
|
dateEnd !== null ? date2Thai(dateEnd) : null
|
||||||
"
|
"
|
||||||
:rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]:[]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ถึงวันที่'}`"
|
:label="`${'ถึงวันที่'}`"
|
||||||
|
clearable
|
||||||
|
@clear="dateEnd = null"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
|
||||||
|
|
@ -236,8 +236,7 @@ function openModalOrder() {
|
||||||
item.status == "APPROVE") &&
|
item.status == "APPROVE") &&
|
||||||
item.organizationPositionOld &&
|
item.organizationPositionOld &&
|
||||||
item.organization &&
|
item.organization &&
|
||||||
item.dateStart &&
|
item.dateStart
|
||||||
item.dateEnd
|
|
||||||
);
|
);
|
||||||
rows2.value = row;
|
rows2.value = row;
|
||||||
rows2Data.value = row;
|
rows2Data.value = row;
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ function fetchInformation() {
|
||||||
citizenId.value = data.citizenId;
|
citizenId.value = data.citizenId;
|
||||||
|
|
||||||
if (data.avatarName) {
|
if (data.avatarName) {
|
||||||
await fetchProfile(data.id as string, data.avatarName);
|
fetchProfile(data.id as string, data.avatarName);
|
||||||
} else {
|
} else {
|
||||||
avatar.value = avatarMain;
|
avatar.value = avatarMain;
|
||||||
}
|
}
|
||||||
|
|
@ -70,11 +70,14 @@ function fetchInformation() {
|
||||||
* @param id profileId
|
* @param id profileId
|
||||||
* @param avatarName ชื้อไฟล์
|
* @param avatarName ชื้อไฟล์
|
||||||
*/
|
*/
|
||||||
async function fetchProfile(id: string, avatarName: string) {
|
function fetchProfile(id: string, avatarName: string) {
|
||||||
http
|
http
|
||||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName))
|
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName))
|
||||||
.then(async (res) => {
|
.then((res) => {
|
||||||
avatar.value = res.data.downloadUrl;
|
avatar.value = res.data.downloadUrl;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
avatar.value = avatarMain;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useKpiDataStore } from "@/modules/14_KPI/store";
|
import { useKpiDataStore } from "@/modules/14_KPI/store";
|
||||||
|
import avatar from "@/assets/avatar_user.jpg";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import type { FormProfile } from "@/modules/14_KPI/interface/request/index";
|
import type { FormProfile } from "@/modules/14_KPI/interface/request/index";
|
||||||
|
|
@ -65,7 +66,7 @@ async function fetchEvaluation() {
|
||||||
await store.checkCompetency();
|
await store.checkCompetency();
|
||||||
await store.checkCompetencyDefaultCompetencyLevel();
|
await store.checkCompetencyDefaultCompetencyLevel();
|
||||||
|
|
||||||
await fetchProfile(data.profileId);
|
fetchProfile(data.profileId);
|
||||||
|
|
||||||
plannedPoint.value = data.plannedPoint == null ? "" : data.plannedPoint;
|
plannedPoint.value = data.plannedPoint == null ? "" : data.plannedPoint;
|
||||||
rolePoint.value = data.rolePoint == null ? "" : data.rolePoint;
|
rolePoint.value = data.rolePoint == null ? "" : data.rolePoint;
|
||||||
|
|
@ -81,8 +82,8 @@ async function fetchEvaluation() {
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchProfile(id: string) {
|
function fetchProfile(id: string) {
|
||||||
await http
|
http
|
||||||
.get(
|
.get(
|
||||||
config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `profile-${id}`)
|
config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `profile-${id}`)
|
||||||
)
|
)
|
||||||
|
|
@ -90,6 +91,7 @@ async function fetchProfile(id: string) {
|
||||||
store.dataEvaluation.avartar = res.data.downloadUrl;
|
store.dataEvaluation.avartar = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
store.dataEvaluation.avartar = avatar;
|
||||||
// profilePicture.value = avatar;
|
// profilePicture.value = avatar;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ const modal = defineModel<boolean>("modal", { required: true });
|
||||||
let reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
let reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
||||||
const totalPage = defineModel<number>("totalPage", { required: true });
|
const totalPage = defineModel<number>("totalPage", { required: true });
|
||||||
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
||||||
const columns = defineModel<QTableProps[]>("columns", {});
|
const columns = defineModel<QTableProps["columns"]>("columns", { required: true });
|
||||||
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataTree: {
|
fetchDataTree: {
|
||||||
|
|
|
||||||
|
|
@ -777,7 +777,7 @@ watch(
|
||||||
<DialogMovePos
|
<DialogMovePos
|
||||||
v-model:modal="modalDialogMMove"
|
v-model:modal="modalDialogMMove"
|
||||||
v-model:nodeTree="nodeTree"
|
v-model:nodeTree="nodeTree"
|
||||||
v-model:columns="columns as QTableProps[]"
|
v-model:columns="columns"
|
||||||
v-model:rows="posMaster"
|
v-model:rows="posMaster"
|
||||||
v-model:totalPage="totalPage"
|
v-model:totalPage="totalPage"
|
||||||
v-model:reqMaster="reqMaster"
|
v-model:reqMaster="reqMaster"
|
||||||
|
|
|
||||||
|
|
@ -532,25 +532,29 @@ async function fetchKeycloakPosition() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.keycloakPosition())
|
.get(config.API.keycloakPosition())
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = res.data.result;
|
||||||
usePositionKeycloakStore().setPositionKeycloak(data);
|
usePositionKeycloakStore().setPositionKeycloak(data);
|
||||||
if (data.avatarName) {
|
if (data.avatarName) {
|
||||||
await getImg(data.profileId, data.avatarName);
|
getImg(data.profileId, data.avatarName);
|
||||||
} else {
|
} else {
|
||||||
profileImg.value = avatar;
|
profileImg.value = avatar;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
profileImg.value = avatar;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const profileImg = ref<string>("");
|
const profileImg = ref<string>("");
|
||||||
async function getImg(id: string, pathName: string) {
|
function getImg(id: string, pathName: string) {
|
||||||
await http
|
http
|
||||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, pathName))
|
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, pathName))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
profileImg.value = res.data.downloadUrl;
|
profileImg.value = res.data.downloadUrl;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
profileImg.value = avatar;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue