Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2024-11-14 12:08:49 +07:00
commit 733f6c861f
18 changed files with 75 additions and 38 deletions

View file

@ -26,6 +26,7 @@ export default {
organizationHistoryNew: `${organization}/history`,
organizationHistoryPostNew: `${organization}/history/publish`,
orgChart: (id: string) => `${organization}/org-chart/${id}`,
orgIsLock: `${organization}/lock`,
/** position*/
orgPosPosition: `${orgPos}/position`,
@ -123,13 +124,14 @@ export default {
*
*/
requestEdit: `${orgProfile}/edit/`,
requestEditByType:(type:string)=> `${orgProfile}${type}/edit/`,
requestEditByType: (type: string) => `${orgProfile}${type}/edit/`,
/**
* IDP
*/
requestDevelopmentEdit: `${orgProfile}/development-request/`,
requestDevelopmentEditByType:(type:string)=> `${orgProfile}${type}/development-request/`,
requestDevelopmentEditByType: (type: string) =>
`${orgProfile}${type}/development-request/`,
/**
*
@ -151,4 +153,6 @@ export default {
`${workflow}/keycloak/isofficer/${type}`,
positionCondition: `${orgPos}/master/position-condition`,
keycloakLogSSO: `${organization}/keycloak/log/sso`,
};

View file

@ -545,7 +545,7 @@ onMounted(async () => {
dense
:nodes="lazy"
node-key="orgTreeId"
label-key="orgTreeName"
label-key="labelName"
:filter="filter"
no-results-label="ไม่พบข้อมูลที่ค้นหา"
no-nodes-label="ไม่มีข้อมูล"

View file

@ -520,7 +520,7 @@ onMounted(() => {
dense
:nodes="lazy"
node-key="orgTreeId"
label-key="orgTreeName"
label-key="labelName"
:filter="filter"
no-results-label="ไม่พบข้อมูลที่ค้นหา"
no-nodes-label="ไม่มีข้อมูล"
@ -627,7 +627,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
</div>
@ -636,9 +635,7 @@ onMounted(() => {
<d-table
ref="table"
:columns="columns"
:rows="
positionNo.length !== 0 ? positionNo : []
"
:rows="positionNo.length !== 0 ? positionNo : []"
:filter="filters"
row-key="id"
flat
@ -779,7 +776,9 @@ onMounted(() => {
<d-table
ref="table"
:columns="columnsPostition"
:rows="rowsPosition.length !== 0 ? rowsPosition:[]"
:rows="
rowsPosition.length !== 0 ? rowsPosition : []
"
row-key="id"
flat
bordered

View file

@ -274,7 +274,7 @@ onMounted(async () => {
dense
:nodes="lazy"
node-key="orgTreeId"
label-key="orgTreeName"
label-key="labelName"
:filter="filter"
no-results-label="ไม่พบข้อมูลที่ค้นหา"
no-nodes-label="ไม่มีข้อมูล"

View file

@ -528,7 +528,7 @@ onMounted(async () => {
dense
:nodes="nodeAgency"
node-key="orgTreeId"
label-key="orgTreeName"
label-key="labelName"
selected-color="primary"
:filter="filterAgency"
no-results-label="ไม่พบข้อมูลที่ค้นหา"

View file

@ -455,7 +455,7 @@ onMounted(() => {
dense
:nodes="node"
node-key="orgTreeId"
label-key="orgTreeName"
label-key="labelName"
v-model:expanded="expanded"
:filter="filter"
no-results-label="ไม่พบข้อมูลที่ค้นหา"

View file

@ -8,9 +8,7 @@ import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useOrganizational } from "@/modules/02_organization/store/organizational";
import { useStructStore } from "@/modules/02_organization/store/chart";
const storeOrg = useStructStore();
const $q = useQuasar();
const mixin = useCounterMixin();
const store = useOrganizational();

View file

@ -384,7 +384,10 @@ watch(
<div class="row q-col-gutter-sm q-pl-sm">
<div class="col-2" v-if="store.typeOrganizational === 'draft'">
<q-btn
v-if="checkPermission($route)?.attrOwnership == 'OWNER'"
v-if="
checkPermission($route)?.attrOwnership == 'OWNER' &&
!store.isLosck
"
dense
flat
round
@ -399,7 +402,8 @@ watch(
<div
:class="
store.typeOrganizational === 'draft' &&
checkPermission($route)?.attrOwnership == 'OWNER'
checkPermission($route)?.attrOwnership == 'OWNER ' &&
!store.isLosck
? 'col-10'
: 'col-12'
"
@ -468,7 +472,7 @@ watch(
</div>
<q-btn
v-if="store.typeOrganizational === 'draft'"
v-if="store.typeOrganizational === 'draft' && !store.isLosck"
@click.stop
flat
dense

View file

@ -487,7 +487,7 @@ watch(
<!-- TOOLBAR -->
<div class="col-12">
<q-toolbar style="padding: 0">
<div v-if="store.typeOrganizational === 'draft'">
<div v-if="store.typeOrganizational === 'draft'&& !store.isLosck">
<q-btn
flat
round
@ -602,7 +602,7 @@ watch(
<q-tr :props="props">
<q-td>
<q-btn
v-if="store.typeOrganizational === 'draft'"
v-if="store.typeOrganizational === 'draft' && !store.isLosck"
flat
color="secondary"
icon="mdi-dots-horizontal-circle-outline"

View file

@ -12,9 +12,9 @@ export const useOrganizational = defineStore("organizationalStore", () => {
const typeOrganizational = ref<string>("current"); // ประเภทโครงสร้าง
const statusView = ref<string>("list"); // การแสดงผล รายการ,map
const rootId = ref<string>('')
const isOfficer = ref<boolean|null>(null);
const isStaff = ref<boolean|null>(null);
const rootId = ref<string>("");
const isOfficer = ref<boolean | null>(null);
const isStaff = ref<boolean | null>(null);
const dataActive = ref<DataActive>(); //ข้อมูลโครงสร้าง
const activeId = ref<string>(); // id โครงสร้างปัจจุบัน
@ -24,6 +24,7 @@ export const useOrganizational = defineStore("organizationalStore", () => {
const treeId = ref<string>(); // id โหนด
const level = ref<number>(); // ระดับโหนด
const orgPublishDate = ref<Date | null>(null); // วันเผยแพร่
const isLosck = ref<boolean>(false);
const sumPosition = reactive({
total: 0,
use: 0,
@ -166,6 +167,7 @@ export const useOrganizational = defineStore("organizationalStore", () => {
getSumPosition,
isOfficer,
isStaff,
rootId
rootId,
isLosck,
};
});

View file

@ -56,6 +56,7 @@ async function fetchOrganizationActive() {
const data = await res.data.result;
if (data) {
await store.fetchDataActive(data);
await fetchCheckIslock(data.draftId);
if (data.activeName === null && data.draftName === null) {
isStatusData.value = false;
} else {
@ -146,6 +147,18 @@ async function workflowSystem() {
.finally(() => {});
}
async function fetchCheckIslock(id: string) {
http
.get(config.API.orgIsLock + `/${id}`)
.then((res) => {
const data = res.data.result;
store.isLosck = data;
})
.catch((e) => {
messageError($q, e);
});
}
watch(
() => store.typeOrganizational,
() => {
@ -305,7 +318,10 @@ onMounted(async () => {
</q-btn-group>
<q-btn
v-if="checkPermission($route)?.attrOwnership == 'OWNER'"
v-if="
checkPermission($route)?.attrOwnership == 'OWNER' &&
!store.isLosck
"
color="green-6"
dense
unelevated

View file

@ -113,7 +113,11 @@ const columns2 = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val: string) => {
return val === "SLIP" ? "เลื่อน" : val === "MOVE" ? "ย้าย" : "-";
return val === "SLIP"
? "ปรับระดับชั้นงาน"
: val === "MOVE"
? "ย้าย"
: "-";
},
},
{
@ -221,7 +225,7 @@ watch(
emit-value
map-options
use-input
style="width: 350px; max-width: auto"
style="width: 380px; max-width: auto"
@update:model-value="filterSelectOrder"
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn
@ -267,7 +271,6 @@ watch(
map-options
:options="columns2"
option-value="name"
style="min-width: 140px"
/>
</div>

View file

@ -121,7 +121,11 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val: string) => {
return val === "SLIP" ? "เลื่อน" : val === "MOVE" ? "ย้าย" : "-";
return val === "SLIP"
? "ปรับระดับชั้นงาน"
: val === "MOVE"
? "ย้าย"
: "-";
},
},
{
@ -342,7 +346,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
/>

View file

@ -7,7 +7,9 @@ const stroe = useDataStore();
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">รายการลาออกลกจาง</div>
<div class="toptitle text-dark col-12 row items-center">
รายการลาออกลกจาง
</div>
<div>
<q-card flat bordered class="col-12">
<q-tabs

View file

@ -80,8 +80,15 @@ export const useDataStore = defineStore("resign", () => {
formQurey.status = "WAITTING";
});
watch(mainTabsEMP, (val) => {
formQurey.status = "WAITTING";
formQureyEMP.status = "WAITTING";
});
return { mainTabs, mainTabsEMP, formQurey,formQureyEMP, optionStatus, optionStatusEMP };
return {
mainTabs,
mainTabsEMP,
formQurey,
formQureyEMP,
optionStatus,
optionStatusEMP,
};
});

View file

@ -112,7 +112,7 @@ function fetchRoundOption() {
roundOp.value = list;
store.formQuery.round = list[0].id;
await fetchList();
await changRound();
} else {
roundOp.value = [];
store.formQuery.round = "";
@ -152,7 +152,7 @@ async function fetchList() {
});
}
function changRound() {
async function changRound() {
formQuery.page = 1;
fetchList();
}
@ -170,7 +170,7 @@ function clearYear() {
year.value = null;
store.formQuery.round = "";
roundOp.value = [];
fetchList();
changRound();
}
/**
@ -318,7 +318,6 @@ onMounted(async () => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
</div>

View file

@ -418,7 +418,8 @@ const doLogout = () => {
dialogConfirm(
$q,
async () => {
logout();
await http.post(config.API.keycloakLogSSO, { text: "ออกจากระบบ" });
await logout();
},
"ยืนยันการออกจากระบบ",
"ต้องการออกจากระบบใช่หรือไม่?"