Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2024-12-23 09:25:50 +07:00
commit 2f1572bde0
8 changed files with 140 additions and 138 deletions

View file

@ -142,105 +142,103 @@ const API = {
...file,
};
const path =
import.meta.env.VITE_MANUAL_URL ??
"https://bma-ehr-manual.frappet.synology.me";
const path = import.meta.env.VITE_MANUAL_URL ?? "";
const generatePopupPath = (routeName: any) => {
if (routeName.includes("metadata")) {
return `${path}/manual/chapter-2-admin-metadata`;
return `${path}/chapter-2-admin-metadata`;
} else if (routeName.includes("registryNew")) {
return `${path}/manual/chapter-6-1-admin-registry`;
return `${path}/chapter-6-1-admin-registry`;
} else if (routeName.includes("registryEmployeeList")) {
return `${path}/manual/chapter-6-2-admin-registry`;
return `${path}/chapter-6-2-admin-registry`;
} else if (routeName.includes("registry-employee")) {
return `${path}/manual/chapter-6-3-admin-registry`;
return `${path}/chapter-6-3-admin-registry`;
} else if (routeName.includes("insignia")) {
return `${path}/manual/chapter-13-admin-insignia`;
return `${path}/chapter-13-admin-insignia`;
} else if (routeName.includes("acting")) {
return `${path}/manual/chapter-4-admin-acting`;
return `${path}/chapter-4-admin-acting`;
} else if (routeName.includes("positionEmployee")) {
return `${path}/manual/chapter-5-admin-position-employee`;
return `${path}/chapter-5-admin-position-employee`;
} else if (routeName == "retirement") {
return `${path}/manual/chapter-11-admin-retirement`;
return `${path}/chapter-11-admin-retirement`;
} else if (routeName == "resign") {
return `${path}/manual/chapter-11-2-admin-retirement`;
return `${path}/chapter-11-2-admin-retirement`;
} else if (routeName == "resignEmployee") {
return `${path}/manual/chapter-11-3-admin-retirement`;
return `${path}/chapter-11-3-admin-retirement`;
} else if (routeName == "exit-Interview") {
return `${path}/manual/chapter-11-4-admin-retirement`;
return `${path}/chapter-11-4-admin-retirement`;
} else if (routeName == "deceased") {
return `${path}/manual/chapter-11-5-admin-retirement`;
return `${path}/chapter-11-5-admin-retirement`;
} else if (routeName == "dismiss-order") {
return `${path}/manual/chapter-11-6-admin-retirement`;
return `${path}/chapter-11-6-admin-retirement`;
} else if (routeName.includes("disciplineComplaints")) {
return `${path}/manual/chapter-14-admin-discipline-complaints`;
return `${path}/chapter-14-admin-discipline-complaints`;
} else if (routeName.includes("disciplineInvestigatefacts")) {
return `${path}/manual/chapter-14-2-admin-discipline-investigatefacts`;
return `${path}/chapter-14-2-admin-discipline-investigatefacts`;
} else if (routeName.includes("disciplineDisciplinary")) {
return `${path}/manual/chapter-14-3-admin-discipline-disciplinary`;
return `${path}/chapter-14-3-admin-discipline-disciplinary`;
} else if (routeName.includes("disciplineResult")) {
return `${path}/manual/chapter-14-4-admin-discipline-result`;
return `${path}/chapter-14-4-admin-discipline-result`;
} else if (routeName.includes("disciplineListSuspend")) {
return `${path}/manual/chapter-14-5-admin-discipline-suspend`;
return `${path}/chapter-14-5-admin-discipline-suspend`;
} else if (routeName.includes("appealComplain")) {
return `${path}/manual/chapter-14-6-admin-discipline-appealcomplain`;
return `${path}/chapter-14-6-admin-discipline-appealcomplain`;
} else if (routeName.includes("disciplineDirector")) {
return `${path}/manual/chapter-14-7-admin-discipline-director`;
return `${path}/chapter-14-7-admin-discipline-director`;
} else if (routeName.includes("disciplineChannel")) {
return `${path}/manual/chapter-14-7-2-admin-discipline-channel`;
return `${path}/chapter-14-7-2-admin-discipline-channel`;
} else if (routeName.includes("KPIIndicatorByPlan")) {
return `${path}/manual/chapter-2-admin-evaluate`;
return `${path}/chapter-2-admin-evaluate`;
} else if (routeName.includes("KPIIndicatorByRole")) {
return `${path}/manual/chapter-2-1-2-admin-evaluate`;
return `${path}/chapter-2-1-2-admin-evaluate`;
} else if (routeName.includes("KPIAssignment")) {
return `${path}/manual/chapter-2-1-3-admin-evaluate`;
return `${path}/chapter-2-1-3-admin-evaluate`;
} else if (routeName.includes("KPICompetency")) {
return `${path}/manual/chapter-2-2-admin-evaluate`;
return `${path}/chapter-2-2-admin-evaluate`;
} else if (routeName.includes("strategic")) {
return `${path}/manual/chapter-2-3-admin-evaluate`;
return `${path}/chapter-2-3-admin-evaluate`;
} else if (routeName == "commandListPage") {
return `${path}/manual/chapter-7-admin-order`;
return `${path}/chapter-7-admin-order`;
} else if (routeName == "competePeriod") {
return `${path}/manual/chapter-8-3-admin-compete-period`;
return `${path}/chapter-8-3-admin-compete-period`;
} else if (routeName == "qualifyPeriod") {
return `${path}/manual/chapter-8-4-1-admin-qualify-period`;
return `${path}/chapter-8-4-1-admin-qualify-period`;
} else if (routeName == "disablePeriod") {
return `${path}/manual/chapter-8-4-2-admin-disable-period`;
return `${path}/chapter-8-4-2-admin-disable-period`;
} else if (routeName == "manage") {
return `${path}/manual/chapter-8-4-3-admin-qualify-manage`;
return `${path}/chapter-8-4-3-admin-qualify-manage`;
} else if (routeName == "qualifyPeriodStat") {
return `${path}/manual/chapter-8-4-4-admin-qualify-period-stat`;
return `${path}/chapter-8-4-4-admin-qualify-period-stat`;
} else if (routeName == "qualifyPeriodStatDisable") {
return `${path}/manual/chapter-8-4-5-admin-qualify-disable-stat`;
return `${path}/chapter-8-4-5-admin-qualify-disable-stat`;
} else if (routeName.includes("competePeriodStat")) {
return `${path}/manual/chapter-8-3-2-admin-compete-period-stat`;
return `${path}/chapter-8-3-2-admin-compete-period-stat`;
} else if (routeName.includes("probation")) {
return `${path}/manual/chapter-10-admin-probation`;
return `${path}/chapter-10-admin-probation`;
} else if (routeName.includes("insigniaProposals")) {
return `${path}/manual/chapter-12-admin-insignia`;
return `${path}/chapter-12-admin-insignia`;
} else if (routeName.includes("insigniaManage")) {
return `${path}/manual/chapter-12-2-admin-insignia`;
return `${path}/chapter-12-2-admin-insignia`;
} else if (routeName.includes("insigniaRecord")) {
return `${path}/manual/chapter-12-3-admin-insignia`;
return `${path}/chapter-12-3-admin-insignia`;
} else if (routeName.includes("insigniaAllocate")) {
return `${path}/manual/chapter-12-4-admin-insignia`;
return `${path}/chapter-12-4-admin-insignia`;
} else if (routeName.includes("insigniaBorrow")) {
return `${path}/manual/chapter-12-5-admin-insignia`;
return `${path}/chapter-12-5-admin-insignia`;
} else if (routeName.includes("insigniaReport")) {
return `${path}/manual/chapter-12-6-admin-insignia`;
return `${path}/chapter-12-6-admin-insignia`;
} else if (routeName.includes("roundTime")) {
return `${path}/manual/chapter-13-admin-leave`;
return `${path}/chapter-13-admin-leave`;
} else if (routeName.includes("workList")) {
return `${path}/manual/chapter-13-2-admin-leave`;
return `${path}/chapter-13-2-admin-leave`;
} else if (routeName.includes("changeRound")) {
return `${path}/manual/chapter-13-3-admin-leave`;
return `${path}/chapter-13-3-admin-leave`;
} else if (routeName.includes("timestampSpecial")) {
return `${path}/manual/chapter-13-4-admin-leave`;
return `${path}/chapter-13-4-admin-leave`;
} else if (routeName == "leave") {
return `${path}/manual/chapter-13-5-admin-leave`;
return `${path}/chapter-13-5-admin-leave`;
} else if (routeName == "leaveReport") {
return `${path}/manual/chapter-13-6-admin-leave`;
return `${path}/chapter-13-6-admin-leave`;
} else if (
routeName.includes("qualify") ||
routeName.includes("recruiting") ||
@ -248,41 +246,41 @@ const generatePopupPath = (routeName: any) => {
routeName.includes("disable") ||
routeName.includes("manage")
) {
return `${path}/manual/chapter-9-admin-recruit`;
return `${path}/chapter-9-admin-recruit`;
} else if (routeName.includes("developmentMain")) {
return `${path}/manual/chapter-18-admin-development`;
return `${path}/chapter-18-admin-development`;
} else if (routeName.includes("developmentHistory")) {
return `${path}/manual/chapter-18-2-admin-development-history`;
return `${path}/chapter-18-2-admin-development-history`;
} else if (routeName.includes("developmentEmployeeHistory")) {
return `${path}/manual/chapter-18-3-admin-development-employee-history`;
return `${path}/chapter-18-3-admin-development-employee-history`;
} else if (routeName.includes("developmentScholarship")) {
return `${path}/manual/chapter-18-4-admin-development-scholarship`;
return `${path}/chapter-18-4-admin-development-scholarship`;
} else if (routeName == "evaluate") {
return `${path}/manual/chapter-15-admin-KPI`;
return `${path}/chapter-15-admin-KPI`;
} else if (routeName == "evaluateDirector") {
return `${path}/manual/chapter-15-2-admin-KPI`;
return `${path}/chapter-15-2-admin-KPI`;
} else if (routeName == "evaluateMeeting") {
return `${path}/manual/chapter-15-2-2-admin-KPI`;
return `${path}/chapter-15-2-2-admin-KPI`;
} else if (routeName == "salaryChart") {
return `${path}/manual/chapter-16-admin-salary`;
return `${path}/chapter-16-admin-salary`;
} else if (routeName == "salaryEmployeeChart") {
return `${path}/manual/chapter-16-2-admin-salary`;
return `${path}/chapter-16-2-admin-salary`;
} else if (routeName == "salaryRound") {
return `${path}/manual/chapter-16-3-admin-salary`;
return `${path}/chapter-16-3-admin-salary`;
} else if (routeName == "salaryLists") {
return `${path}/manual/chapter-16-4-admin-salary`;
return `${path}/chapter-16-4-admin-salary`;
} else if (routeName == "salaryEmployeeLists") {
return `${path}/manual/chapter-16-5-admin-salary`;
return `${path}/chapter-16-5-admin-salary`;
} else if (routeName == "KPIRound") {
return `${path}/manual/chapter-17-admin-development`;
return `${path}/chapter-17-admin-development`;
} else if (routeName == "KPIList") {
return `${path}/manual/chapter-17-2-admin-development-history`;
return `${path}/chapter-17-2-admin-development-history`;
} else if (routeName == "KPIResults") {
return `${path}/manual/chapter-17-3-admin-development-employee-history`;
return `${path}/chapter-17-3-admin-development-employee-history`;
} else if (routeName == "KPIReport") {
return `${path}/manual/chapter-17-4-admin-development-scholarship`;
return `${path}/chapter-17-4-admin-development-scholarship`;
} else if (routeName == "positionCondition") {
return `${path}/manual/chapter-19-admin-position-condition`;
return `${path}/chapter-19-admin-position-condition`;
} else {
return manualConfig[routeName as keyof typeof manualConfig];
}
@ -290,60 +288,60 @@ const generatePopupPath = (routeName: any) => {
const manualConfig = {
dashboard: `${path}/`,
strategic: `${path}/manual/chapter-2-admin-evaluate`,
KPIIndicatorByRoleAdd: `${path}/manual/chapter-2-admin-evaluate`,
KPIIndicatorByPlan: `${path}/manual/chapter-2-admin-evaluate`,
"KPIIndicatorByPlan/Add": `${path}/manual/chapter-2-admin-evaluate`,
KPIIndicatorByPlanByid: `${path}/manual/chapter-2-admin-evaluate`,
KPIIndicatorByRoleByid: `${path}/manual/chapter-2-admin-evaluate`,
KPICompetency: `${path}/manual/chapter-2-admin-evaluate`,
KPIAssignment: `${path}/manual/chapter-2-admin-evaluate`,
KPIAssignmentById: `${path}/manual/chapter-2-admin-evaluate`,
KPIIndicatorByRole: `${path}/manual/chapter-2-admin-evaluate`,
KPICompetencyAdd: `${path}/manual/chapter-2-admin-evaluate`,
KPICompetencyByid: `${path}/manual/chapter-2-admin-evaluate`,
organizationalNew: `${path}/manual/chapter-3-admin-organization`,
organization: `${path}/manual/chapter-6-admin-registry`,
registry: `${path}/manual/chapter-6-admin-registry`,
registryDetail: `${path}/manual/chapter-6-admin-registry`,
verified: `${path}/manual/chapter-6-admin-registry`,
order: `${path}/manual/chapter-8-admin-order`,
OrderDetail: `${path}/manual/chapter-8-admin-order`,
OrderAdd: `${path}/manual/chapter-8-admin-order`,
editorweb: `${path}/manual/chapter-8-admin-recruit`,
strategic: `${path}/chapter-2-admin-evaluate`,
KPIIndicatorByRoleAdd: `${path}/chapter-2-admin-evaluate`,
KPIIndicatorByPlan: `${path}/chapter-2-admin-evaluate`,
"KPIIndicatorByPlan/Add": `${path}/chapter-2-admin-evaluate`,
KPIIndicatorByPlanByid: `${path}/chapter-2-admin-evaluate`,
KPIIndicatorByRoleByid: `${path}/chapter-2-admin-evaluate`,
KPICompetency: `${path}/chapter-2-admin-evaluate`,
KPIAssignment: `${path}/chapter-2-admin-evaluate`,
KPIAssignmentById: `${path}/chapter-2-admin-evaluate`,
KPIIndicatorByRole: `${path}/chapter-2-admin-evaluate`,
KPICompetencyAdd: `${path}/chapter-2-admin-evaluate`,
KPICompetencyByid: `${path}/chapter-2-admin-evaluate`,
organizationalNew: `${path}/chapter-3-admin-organization`,
organization: `${path}/chapter-6-admin-registry`,
registry: `${path}/chapter-6-admin-registry`,
registryDetail: `${path}/chapter-6-admin-registry`,
verified: `${path}/chapter-6-admin-registry`,
order: `${path}/chapter-8-admin-order`,
OrderDetail: `${path}/chapter-8-admin-order`,
OrderAdd: `${path}/chapter-8-admin-order`,
editorweb: `${path}/chapter-8-admin-recruit`,
placement: `${path}/manual/chapter-9-admin-placement`,
transfer: `${path}/manual/chapter-9-2-admin-transfer`,
receive: `${path}/manual/chapter-9-3-admin-receive`,
"help-government": `${path}/manual/chapter-9-4-admin-help-government`,
repatriate: `${path}/manual/chapter-9-5-admin-repatriate`,
"appoint-promote": `${path}/manual/chapter-9-6-admin-appoint-promote`,
"appoint-employee": `${path}/manual/chapter-9-7-admin-appoint-employee`,
other: `${path}/manual/chapter-9-8-admin-other`,
placement: `${path}/chapter-9-admin-placement`,
transfer: `${path}/chapter-9-2-admin-transfer`,
receive: `${path}/chapter-9-3-admin-receive`,
"help-government": `${path}/chapter-9-4-admin-help-government`,
repatriate: `${path}/chapter-9-5-admin-repatriate`,
"appoint-promote": `${path}/chapter-9-6-admin-appoint-promote`,
"appoint-employee": `${path}/chapter-9-7-admin-appoint-employee`,
other: `${path}/chapter-9-8-admin-other`,
probation: `${path}/manual/chapter-11-admin-probation`,
probationDetail: `${path}/manual/chapter-11-admin-probation`,
probationForm: `${path}/manual/chapter-11-admin-probation`,
retirement: `${path}/manual/chapter-12-admin-retirement`,
resign: `${path}/manual/chapter-12-admin-retirement`,
ExitInterviewEditQuestion: `${path}/manual/chapter-12-admin-retirement`,
"dismiss-order": `${path}/manual/chapter-12-admin-retirement`,
"report-report": `${path}/manual/chapter-13-admin-insignia`,
"report-report-01": `${path}/manual/chapter-13-admin-insignia`,
roundTime: `${path}/manual/chapter-14-admin-leave`,
changeRound: `${path}/manual/chapter-14-admin-leave`,
workList: `${path}/manual/chapter-14-admin-leave`,
timestampSpecial: `${path}/manual/chapter-14-admin-leave`,
leave: `${path}/manual/chapter-14-admin-leave`,
leaveDetail: `${path}/manual/chapter-14-admin-leave`,
leaveRejectDetail: `${path}/manual/chapter-14-admin-leave`,
leaveReport: `${path}/manual/chapter-14-admin-leave`,
appealComplain: `${path}/manual/chapter-15-admin-discipline`,
// KPIRound: `${path}/manual/chapter-18-admin-perf-evaluation`,
// "KPIList": `${path}/manual/chapter-18-admin-perf-evaluation`,
// KPIDetail: `${path}/manual/chapter-18-admin-perf-evaluation`,
// KPIReport: `${path}/manual/chapter-18-admin-perf-evaluation`,
// KPIDetailnew: `${path}/manual/chapter-18-admin-perf-evaluation`,
probation: `${path}/chapter-11-admin-probation`,
probationDetail: `${path}/chapter-11-admin-probation`,
probationForm: `${path}/chapter-11-admin-probation`,
retirement: `${path}/chapter-12-admin-retirement`,
resign: `${path}/chapter-12-admin-retirement`,
ExitInterviewEditQuestion: `${path}/chapter-12-admin-retirement`,
"dismiss-order": `${path}/chapter-12-admin-retirement`,
"report-report": `${path}/chapter-13-admin-insignia`,
"report-report-01": `${path}/chapter-13-admin-insignia`,
roundTime: `${path}/chapter-14-admin-leave`,
changeRound: `${path}/chapter-14-admin-leave`,
workList: `${path}/chapter-14-admin-leave`,
timestampSpecial: `${path}/chapter-14-admin-leave`,
leave: `${path}/chapter-14-admin-leave`,
leaveDetail: `${path}/chapter-14-admin-leave`,
leaveRejectDetail: `${path}/chapter-14-admin-leave`,
leaveReport: `${path}/chapter-14-admin-leave`,
appealComplain: `${path}/chapter-15-admin-discipline`,
// KPIRound: `${path}/chapter-18-admin-perf-evaluation`,
// "KPIList": `${path}/chapter-18-admin-perf-evaluation`,
// KPIDetail: `${path}/chapter-18-admin-perf-evaluation`,
// KPIReport: `${path}/chapter-18-admin-perf-evaluation`,
// KPIDetailnew: `${path}/chapter-18-admin-perf-evaluation`,
};
export default {

View file

@ -327,6 +327,7 @@ onMounted(async () => {
emit-value
:readonly="checkRoute"
class="inputgreen"
clearable
/>
</div>
<div class="col-4">

View file

@ -365,6 +365,7 @@ onMounted(() => {
input-class="text-red"
label="รอบการประเมิน"
class="inputgreen"
clearable
/>
</div>
<div class="col-2" v-if="id">

View file

@ -562,7 +562,7 @@ async function sendDataAbout() {
async function fetchProvince() {
showLoader();
await http
.get(config.API.province)
.get(config.API.orgProvince)
.then((res) => {
const data = res.data.result;
let option: DataOption[] = [];
@ -587,9 +587,9 @@ async function fetchDistrict(id: string | null) {
if (id !== null && id != "") {
showLoader();
await http
.get(config.API.listDistrict(id))
.get(config.API.orgProvince + `/${id}`)
.then((res) => {
const data = res.data.result;
const data = res.data.result.districts;
let option: DataOption[] = [];
data.map((r: any) => {
option.push({ id: r.id.toString(), name: r.name.toString() });
@ -613,9 +613,9 @@ async function fetchSubDistrict(id: string | null) {
if (id !== null && id != "") {
showLoader();
await http
.get(config.API.listSubDistrict(id))
.get(config.API.orgDistrict + `/${id}`)
.then((res) => {
const data = res.data.result;
const data = res.data.result.subDistricts;
let option: zipCodeOption[] = [];
data.map((r: any) => {
option.push({

View file

@ -301,7 +301,7 @@ const historyColumns = ref<QTableProps["columns"]>([
sortable: true,
field: "endDate",
format(val, row) {
row.isDate
return row.isDate
? date2Thai(row.endDate)
: new Date(row.endDate).getFullYear() + 543;
},

View file

@ -677,7 +677,6 @@ onMounted(() => {
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props" v-if="mode === 'table'">
@ -685,7 +684,6 @@ onMounted(() => {
<q-td v-for="col in props.cols" :key="col.id">
<div>{{ col.value ? col.value : "-" }}</div>
</q-td>
<q-td auto-width> </q-td>
</q-tr>
</template>
</d-table>

View file

@ -497,6 +497,11 @@ function appointPost() {
*/
function clickPassaway() {
dialogPassaway.value = true;
filePassaway.value = null;
deathCertificateNo.value = "";
dateDeath.value = new Date();
placeDeathCertificate.value = "";
reasonDeath.value = "";
}
/**
@ -1003,7 +1008,7 @@ onMounted(async () => {
<q-separator />
<q-card-section class="q-pa-md row q-col-gutter-sm">
<q-file
class="col-12 col-sm-6 col-md-5"
class="col-12 col-sm-6 col-md-5 inputgreen"
outlined
dense
v-model="filePassaway"
@ -1018,7 +1023,7 @@ onMounted(async () => {
</template>
</q-file>
<q-input
class="col-12 col-sm-6 col-md-7"
class="col-12 col-sm-6 col-md-7 inputgreen"
dense
outlined
v-model="deathCertificateNo"
@ -1026,7 +1031,7 @@ onMounted(async () => {
/>
<datepicker
class="col-12 col-sm-6 col-md-5"
class="col-12 col-sm-6 col-md-5 inputgreen"
menu-class-name="modalfix"
v-model="dateDeath"
:locale="'th'"
@ -1064,14 +1069,14 @@ onMounted(async () => {
</datepicker>
<q-input
class="col-12 col-sm-6 col-md-7"
class="col-12 col-sm-6 col-md-7 inputgreen"
dense
outlined
v-model="placeDeathCertificate"
label="สถานที่ออกใบมรณบัตร"
/>
<q-input
class="col-12"
class="col-12 inputgreen"
dense
outlined
v-model="reasonDeath"
@ -1083,11 +1088,8 @@ onMounted(async () => {
<q-separator />
<q-card-actions align="right">
<q-btn
unelevated
label="บันทึก"
dense
color="public"
class="q-px-md"
@click="clickSaveDeceased"
:disable="
filePassaway === null ||

View file

@ -27,7 +27,7 @@ import ModuleCommand from "@/modules/18_command/router";
import ModulePositionCondition from "@/modules/19_condition/router";
// TODO: ใช้หรือไม่?
import { authenticated } from "@/plugins/auth";
import { authenticated, logout } from "@/plugins/auth";
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
@ -117,8 +117,10 @@ const router = createRouter({
router.beforeEach(async (to, from, next) => {
if (to.meta.Auth) {
const checkAuthen = await authenticated();
console.log("checkAuthen", checkAuthen);
if (!checkAuthen && to.meta.Auth) {
router.push({ name: "loginMain" });
logout();
}
}
next();