Merge branch 'develop' into dev
* develop: fix:orgTreeDnaId fix(resign-employee):permission _update fix:Permission_Update fix(resign):Check _Permission_Update fix(organization):show draft or current fix(leave-reject):download report
This commit is contained in:
commit
279052dbc3
6 changed files with 64 additions and 23 deletions
|
|
@ -154,7 +154,7 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
field: "lastUpdatedAt",
|
field: "lastUpdatedAt",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
format(val) {
|
format(val) {
|
||||||
return date2Thai(val);
|
return date2Thai(val, true, true);
|
||||||
},
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
|
@ -265,15 +265,17 @@ watch(
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{
|
{{
|
||||||
store.typeOrganizational === "current" ||
|
historyType === "OWNER_HISTORY"
|
||||||
(store.typeOrganizational === "draft" &&
|
|
||||||
historyType === "OWNER_HISTORY")
|
|
||||||
? props.rowIndex + 1
|
? props.rowIndex + 1
|
||||||
: props.rowIndex + 1 == 1
|
: props.rowIndex + 1 == 1 &&
|
||||||
|
(store.typeOrganizational === "draft" ||
|
||||||
|
store.typeOrganizational === "old")
|
||||||
? "1 (แบบร่าง)"
|
? "1 (แบบร่าง)"
|
||||||
: props.rowIndex + 1 == 2
|
: props.rowIndex + 1 == 2 &&
|
||||||
|
(store.typeOrganizational === "draft" ||
|
||||||
|
store.typeOrganizational === "old")
|
||||||
? "2 (ปัจจุบัน)"
|
? "2 (ปัจจุบัน)"
|
||||||
: props.rowIndex + 1
|
: props.rowIndex + 1
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import genReport from "@/plugins/genreport";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
|
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
|
||||||
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
||||||
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
|
|
@ -766,7 +767,13 @@ onMounted(async () => {
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">ข้อมูลการลาออก</div>
|
<div class="q-pl-sm text-weight-bold text-dark">ข้อมูลการลาออก</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div v-if="isStaff && status === 'WAITTING'">
|
<div
|
||||||
|
v-if="
|
||||||
|
isStaff &&
|
||||||
|
status === 'WAITTING' &&
|
||||||
|
checkPermission($route)?.attrIsUpdate
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
outline
|
outline
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import genReport from "@/plugins/genreport";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
||||||
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
|
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
|
||||||
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
TypeFile,
|
TypeFile,
|
||||||
|
|
@ -794,7 +795,13 @@ onMounted(async () => {
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">ข้อมูลการลาออก</div>
|
<div class="q-pl-sm text-weight-bold text-dark">ข้อมูลการลาออก</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div v-if="isStaff && status === 'WAITTING'">
|
<div
|
||||||
|
v-if="
|
||||||
|
isStaff &&
|
||||||
|
status === 'WAITTING' &&
|
||||||
|
checkPermission($route)?.attrIsUpdate
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
outline
|
outline
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
||||||
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
|
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
|
||||||
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||||
|
|
@ -507,7 +508,12 @@ onMounted(async () => {
|
||||||
ผลการพิจารณาของผู้บังคับบัญชา
|
ผลการพิจารณาของผู้บังคับบัญชา
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!checkRoutePermisson && isStaff && approveStep === 'st1'"
|
v-if="
|
||||||
|
!checkRoutePermisson &&
|
||||||
|
isStaff &&
|
||||||
|
approveStep === 'st1' &&
|
||||||
|
checkPermission($route)?.attrIsUpdate
|
||||||
|
"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="add"
|
icon="add"
|
||||||
|
|
@ -554,7 +560,8 @@ onMounted(async () => {
|
||||||
dataDetail.statusMain === 'CANCELING' &&
|
dataDetail.statusMain === 'CANCELING' &&
|
||||||
props.row.approveStatus == 'PENDING' &&
|
props.row.approveStatus == 'PENDING' &&
|
||||||
props.row.comment == '' &&
|
props.row.comment == '' &&
|
||||||
approveStep === 'st2'
|
approveStep === 'st2' &&
|
||||||
|
checkPermission($route)?.attrIsUpdate
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -613,7 +620,12 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
q-btn
|
q-btn
|
||||||
v-if="!checkRoutePermisson && isStaff && approveStep === 'st1'"
|
v-if="
|
||||||
|
!checkRoutePermisson &&
|
||||||
|
isStaff &&
|
||||||
|
approveStep === 'st1' &&
|
||||||
|
checkPermission($route)?.attrIsUpdate
|
||||||
|
"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="add"
|
icon="add"
|
||||||
|
|
@ -634,7 +646,8 @@ onMounted(async () => {
|
||||||
rowsApprover.approvers &&
|
rowsApprover.approvers &&
|
||||||
rowsApprover.approvers[0]?.profileId == keycloakId &&
|
rowsApprover.approvers[0]?.profileId == keycloakId &&
|
||||||
rowsApprover.approvers[0]?.approveStatus == 'PENDING' &&
|
rowsApprover.approvers[0]?.approveStatus == 'PENDING' &&
|
||||||
approveStep === 'st3'
|
approveStep === 'st3' &&
|
||||||
|
checkPermission($route)?.attrIsUpdate
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -708,7 +721,12 @@ onMounted(async () => {
|
||||||
<q-card
|
<q-card
|
||||||
bordered
|
bordered
|
||||||
class="row col-12 text-dark q-mt-sm q-pa-sm"
|
class="row col-12 text-dark q-mt-sm q-pa-sm"
|
||||||
v-if="!checkRoutePermisson && isStaff && approveStep === 'st1'"
|
v-if="
|
||||||
|
!checkRoutePermisson &&
|
||||||
|
isStaff &&
|
||||||
|
approveStep === 'st1' &&
|
||||||
|
checkPermission($route)?.attrIsUpdate
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
@click="onSend"
|
@click="onSend"
|
||||||
|
|
@ -744,7 +762,8 @@ onMounted(async () => {
|
||||||
!checkRoutePermisson &&
|
!checkRoutePermisson &&
|
||||||
(dataDetail.status === 'APPROVE' ||
|
(dataDetail.status === 'APPROVE' ||
|
||||||
dataDetail.status === 'REJECT') &&
|
dataDetail.status === 'REJECT') &&
|
||||||
isStaff
|
isStaff &&
|
||||||
|
checkPermission($route)?.attrIsUpdate
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div class="q-gutter-sm" v-if="!edit">
|
<div class="q-gutter-sm" v-if="!edit">
|
||||||
|
|
|
||||||
|
|
@ -504,9 +504,10 @@ onMounted(async () => {
|
||||||
@click="
|
@click="
|
||||||
onClickDownloadFile(
|
onClickDownloadFile(
|
||||||
formData.id,
|
formData.id,
|
||||||
'ยกเลิก' + formData.leaveSubTypeName
|
'ยกเลิก' +
|
||||||
? formData.leaveSubTypeName
|
(formData.leaveSubTypeName
|
||||||
: formData.leaveTypeName,
|
? formData.leaveSubTypeName
|
||||||
|
: formData.leaveTypeName),
|
||||||
typeDocx
|
typeDocx
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
|
|
@ -522,9 +523,10 @@ onMounted(async () => {
|
||||||
@click="
|
@click="
|
||||||
onClickDownloadFile(
|
onClickDownloadFile(
|
||||||
formData.id,
|
formData.id,
|
||||||
'ยกเลิก' + formData.leaveSubTypeName
|
'ยกเลิก' +
|
||||||
? formData.leaveSubTypeName
|
(formData.leaveSubTypeName
|
||||||
: formData.leaveTypeName,
|
? formData.leaveSubTypeName
|
||||||
|
: formData.leaveTypeName),
|
||||||
typePdf
|
typePdf
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,7 @@ const nodeId = ref<string>("");
|
||||||
const nodeLevel = ref<number>(0);
|
const nodeLevel = ref<number>(0);
|
||||||
const node = ref<DataStructureTree[]>([]);
|
const node = ref<DataStructureTree[]>([]);
|
||||||
const expanded = ref<string[]>([]);
|
const expanded = ref<string[]>([]);
|
||||||
|
const orgTreeDnaId = ref<string>("");
|
||||||
|
|
||||||
/** ฟังก์ชันเรียกข้อมูลโครงสร้างหน่วยงาน*/
|
/** ฟังก์ชันเรียกข้อมูลโครงสร้างหน่วยงาน*/
|
||||||
async function fetchDataTree() {
|
async function fetchDataTree() {
|
||||||
|
|
@ -135,6 +136,7 @@ function onSelectedNode(data: any) {
|
||||||
nodeId.value = data.orgTreeId;
|
nodeId.value = data.orgTreeId;
|
||||||
nodeLevel.value = data.orgLevel;
|
nodeLevel.value = data.orgLevel;
|
||||||
expandedModal.value = false;
|
expandedModal.value = false;
|
||||||
|
orgTreeDnaId.value = data.orgTreeDnaId;
|
||||||
updateLeaveday();
|
updateLeaveday();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -219,6 +221,7 @@ async function fetchLeaveday(
|
||||||
startDate: Date,
|
startDate: Date,
|
||||||
endDate: Date
|
endDate: Date
|
||||||
) {
|
) {
|
||||||
|
const nodeIdVal = typeReport.value === 3 ? orgTreeDnaId.value : nodeId.value;
|
||||||
const body = {
|
const body = {
|
||||||
type:
|
type:
|
||||||
year === "FULL"
|
year === "FULL"
|
||||||
|
|
@ -232,7 +235,7 @@ async function fetchLeaveday(
|
||||||
: "WEEKLY",
|
: "WEEKLY",
|
||||||
startDate: dateToISO(startDate),
|
startDate: dateToISO(startDate),
|
||||||
endDate: dateToISO(endDate),
|
endDate: dateToISO(endDate),
|
||||||
nodeId: nodeId.value,
|
nodeId: nodeIdVal,
|
||||||
node: nodeLevel.value,
|
node: nodeLevel.value,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -334,6 +337,7 @@ function filterOption(val: string, update: any, typeOp: string) {
|
||||||
function clearData() {
|
function clearData() {
|
||||||
nodeId.value = "";
|
nodeId.value = "";
|
||||||
nodeLevel.value = 0;
|
nodeLevel.value = 0;
|
||||||
|
orgTreeDnaId.value = "";
|
||||||
org.value = "";
|
org.value = "";
|
||||||
typeReport.value = null;
|
typeReport.value = null;
|
||||||
yearType.value = "FULL";
|
yearType.value = "FULL";
|
||||||
|
|
@ -410,7 +414,7 @@ function getReport() {
|
||||||
: "WEEKLY",
|
: "WEEKLY",
|
||||||
startDate: dateToISO(dateStart.value),
|
startDate: dateToISO(dateStart.value),
|
||||||
endDate: dateToISO(dateEnd.value),
|
endDate: dateToISO(dateEnd.value),
|
||||||
nodeId: nodeId.value,
|
nodeId: orgTreeDnaId.value,
|
||||||
node: nodeLevel.value,
|
node: nodeLevel.value,
|
||||||
};
|
};
|
||||||
http
|
http
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue