diff --git a/src/api/02_organizational/api.organization.ts b/src/api/02_organizational/api.organization.ts index f2f8f34bb..d8aad98b3 100644 --- a/src/api/02_organizational/api.organization.ts +++ b/src/api/02_organizational/api.organization.ts @@ -195,6 +195,7 @@ export default { orgAssistance: (id: string) => `${orgProfile}/assistance/${id}`, + orgIssues: `${organization}/issues`, // active รักษาการในตำแหน่งตามหน่วยงาน activeActPosition: (id: string) => `${orgPosAct}/${id}`, }; diff --git a/src/components/Dialogs/DialogDebug.vue b/src/components/Dialogs/DialogDebug.vue new file mode 100644 index 000000000..917151c0e --- /dev/null +++ b/src/components/Dialogs/DialogDebug.vue @@ -0,0 +1,410 @@ + + + + + diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/05_ActingPos.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/05_ActingPos.vue index f1bf0ea9e..c78b7e914 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/05_ActingPos.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/05_ActingPos.vue @@ -40,6 +40,9 @@ const empType = ref(pathRegistryEmp(route.name?.toString() ?? "")); const isLeave = defineModel("isLeave", { required: true, }); +const citizenId = defineModel("citizenId", { + required: true, +}); const baseColumns = ref([ { @@ -614,7 +617,7 @@ onMounted(() => { disable v-model="formData.status" label="ใช้งาน" - keep-color="primary" + keep-color /> @@ -642,6 +645,7 @@ onMounted(() => { v-model:modal="modalCommand" v-model:command="command" v-model:command-id="commandId" + :citizen-id="citizenId" /> diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/06_HelpGovernment.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/06_HelpGovernment.vue index 9d4b16405..47eba38f8 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/06_HelpGovernment.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/06_HelpGovernment.vue @@ -46,6 +46,9 @@ const empType = ref(pathRegistryEmp(route.name?.toString() ?? "")); const isLeave = defineModel("isLeave", { required: true, }); +const citizenId = defineModel("citizenId", { + required: true, +}); const baseColumns = ref([ { @@ -977,6 +980,7 @@ onMounted(() => { v-model:modal="modalCommand" v-model:command="command" v-model:command-id="commandId" + :citizen-id="citizenId" /> diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue index 25f62fdd2..33d3c77ee 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue @@ -39,6 +39,9 @@ const profileId = ref( const isLeave = defineModel("isLeave", { required: true, }); +const citizenId = defineModel("citizenId", { + required: true, +}); const store = useGovernmentPosDataStore(); const { @@ -1621,6 +1624,7 @@ onMounted(async () => { v-model:modal="modalCommand" v-model:command="command" v-model:commandId="commandId" + :citizen-id="citizenId" /> diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue index 02b9aaac8..da7af1456 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue @@ -65,13 +65,22 @@ const storeRegistry = useRegistryNewDataStore(); - + - + - + diff --git a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue index fb02b6d92..3a7105c70 100644 --- a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue +++ b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue @@ -39,6 +39,9 @@ const profileId = ref( const isLeave = defineModel("isLeave", { required: true, }); +const citizenId = defineModel("citizenId", { + required: true, +}); const store = useSalaryDataStore(); const { @@ -1624,6 +1627,7 @@ onMounted(async () => { v-model:modal="modalCommand" v-model:command="command" v-model:commandId="commandId" + :citizen-id="citizenId" /> diff --git a/src/modules/04_registryPerson/components/detail/Salary/Main.vue b/src/modules/04_registryPerson/components/detail/Salary/Main.vue index a78286a65..f0646d650 100644 --- a/src/modules/04_registryPerson/components/detail/Salary/Main.vue +++ b/src/modules/04_registryPerson/components/detail/Salary/Main.vue @@ -45,7 +45,10 @@ const tab = ref("1"); - + diff --git a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue index 8751cfbf6..17fde57a0 100644 --- a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue +++ b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue @@ -553,12 +553,17 @@ onMounted(async () => {
+ {{ typeEmp }} +
diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index 1f6c782f3..3e2038712 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -53,6 +53,7 @@ const props = defineProps({ const modalCommand = ref(false); const command = ref(""); const commandId = ref(""); +const commandCitizenId = ref(""); let roleAdmin = ref(false); const edit = ref(true); @@ -912,9 +913,10 @@ function onSearchAdd() { } function onRefCommand(data: any) { - modalCommand.value = true; command.value = data.refCommandNo; commandId.value = data.commandId; + commandCitizenId.value = data.citizenId; + modalCommand.value = true; // commandId.value = 'bdf9da91-ba45-497a-a2b7-cc49e2446d97'; //จำลอง } @@ -1787,6 +1789,7 @@ onMounted(async () => { v-model:modal="modalCommand" v-model:command="command" v-model:commandId="commandId" + v-model:citizen-id="commandCitizenId" /> diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue index 67d3b260e..8f3501946 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue @@ -130,7 +130,7 @@ async function fectFormfull() { evaluate_expenct_level.value = await probationStore.assignOutput.map( (e: any) => ({ id: e.id, - labal: e.output_desc, + label: e.output_desc, }) ); evaluate_ouptut.value = await probationStore.assignOutput.map((e: any) => ({ diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue index b2408b3b5..13141b464 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue @@ -122,7 +122,7 @@ const variablesToWatch = [ competency_level, learn_level, apply_level, - success_level, + // success_level, ]; const ArrayCountbotton = [orientation, self_learning, training_seminar]; @@ -158,7 +158,7 @@ async function fecthFormdata(id: string) { evaluate_expenct_level.value = res.data.result.assign_output.map( (e: any) => ({ id: e.id, - labal: e.output_desc, + label: e.output_desc, }) ); evaluate_ouptut.value = res.data.result.assign_output.map((e: any) => ({ @@ -186,7 +186,7 @@ function savaForm() { competency_level.value === 0 || learn_level.value === 0 || apply_level.value === 0 || - success_level.value === 0 || + // success_level.value === 0 || achievement_strength_desc.value === "" || lengthconduct.value !== 4 || lengthmoral_level.value !== 3 || @@ -260,7 +260,7 @@ function putformData() { competency_level: competency_level.value, learn_level: learn_level.value, apply_level: apply_level.value, - success_level: success_level.value, + // success_level: success_level.value, achievement_other: achievement_other.value, achievement_strength_desc: achievement_strength_desc.value, achievement_improve_desc: achievement_improve_desc.value, @@ -809,7 +809,7 @@ onMounted(async () => { - + @@ -851,7 +851,7 @@ onMounted(async () => { - 1.8 อื่น ๆ + 1.7 อื่น ๆ ({ id: e.id, - labal: e.output_desc, + label: e.output_desc, }) ); evaluate_ouptut.value = res.data.result.assign_output.map((e: any) => ({ @@ -267,7 +267,7 @@ function putformData() { competency_level: competency_level.value, learn_level: learn_level.value, apply_level: apply_level.value, - success_level: success_level.value, + // success_level: success_level.value, achievement_other: achievement_other.value, achievement_strength_desc: achievement_strength_desc.value, achievement_improve_desc: achievement_improve_desc.value, @@ -814,7 +814,7 @@ onMounted(async () => { - + @@ -856,7 +856,7 @@ onMounted(async () => { - 1.8 อื่น ๆ + 1.7 อื่น ๆ ({ id: e.id, - labal: e.output_desc, + label: e.output_desc, }) ); evaluate_ouptut.value = await probationStore.assignOutput.map((e: any) => ({ diff --git a/src/modules/13_salary/components/DialogInfoMain.vue b/src/modules/13_salary/components/DialogInfoMain.vue index 79868ccbc..71fe5997f 100644 --- a/src/modules/13_salary/components/DialogInfoMain.vue +++ b/src/modules/13_salary/components/DialogInfoMain.vue @@ -36,6 +36,7 @@ const props = defineProps({ const avatar = ref(""); const fullName = ref(""); const position = ref(""); +const citizenId = ref(""); const isLoading = ref(true); /** function เรียกข้อมูลส่วนตัว*/ @@ -48,6 +49,7 @@ function fetchInformation() { fullName.value = `${data.prefix}${data.firstName} ${data.lastName}`; position.value = data.position; + citizenId.value = data.citizenId; if (data.avatarName) { await fetchProfile(data.id as string, data.avatarName); @@ -220,6 +222,7 @@ watch( v-if="type === 'posSalary'" v-model:profileId="profileId" :employeeClass="employeeClass" + :citizenId="citizenId" /> ("profileId", { required: true }); const employeeClass = defineModel("employeeClass", { required: true }); +const citizenId = defineModel("citizenId", { required: true }); const modalCommand = ref(false); const command = ref(""); @@ -470,6 +471,7 @@ onMounted(() => { v-model:modal="modalCommand" v-model:command="command" v-model:commandId="commandId" + :citizen-id="citizenId" /> diff --git a/src/modules/18_command/components/DialogPreviewCommand.vue b/src/modules/18_command/components/DialogPreviewCommand.vue index 3f3fa9f4b..836abb6bd 100644 --- a/src/modules/18_command/components/DialogPreviewCommand.vue +++ b/src/modules/18_command/components/DialogPreviewCommand.vue @@ -19,6 +19,7 @@ const { showLoader, hideLoader, messageError } = useCounterMixin(); const modal = defineModel("modal", { required: true }); const command = defineModel("command", { required: true }); const commandId = defineModel("commandId", { required: true }); +const citizenId = defineModel("citizenId", { required: true }); const promises = ref([]); const tab = ref("main"); //tab @@ -37,6 +38,7 @@ function closeDialog() { modal.value = false; command.value = ""; commandId.value = ""; + citizenId.value = ""; } /** @@ -88,13 +90,25 @@ async function downloadCover(type: string) { */ async function fetchDataCommand(type: string) { let newType = type === "cover" ? "คำสั่ง" : "แนบท้าย"; + const pathAPI = + type === "cover" + ? config.API.fileByFile( + "ระบบออกคำสั่ง", + newType, + commandId.value, + newType + ) + : config.API.subFileByFileName( + "ระบบออกคำสั่ง", + newType, + commandId.value, + citizenId.value, + newType + ); await http - .get( - config.API.fileByFile("ระบบออกคำสั่ง", newType, commandId.value, newType) - ) + .get(pathAPI) .then(async (res) => { const data = res.data; - console.log(res); if (type === "cover") { dataCover.value = data; diff --git a/src/modules/18_command/components/Step/0_Main.vue b/src/modules/18_command/components/Step/0_Main.vue index 36974e185..30d177d76 100644 --- a/src/modules/18_command/components/Step/0_Main.vue +++ b/src/modules/18_command/components/Step/0_Main.vue @@ -43,7 +43,7 @@ async function fetchData() { ? "Live" : data.isSignature === false ? "Digital" - : ""; + : "Live"; isStatus.value = data.status; isDraft.value = data.isDraft; isSign.value = data.isSign; @@ -174,11 +174,12 @@ onMounted(async () => { + diff --git a/src/modules/18_command/components/Step/View0_Live.vue b/src/modules/18_command/components/Step/View0_Live.vue index fd5e051f3..57a7d3ef6 100644 --- a/src/modules/18_command/components/Step/View0_Live.vue +++ b/src/modules/18_command/components/Step/View0_Live.vue @@ -1,5 +1,5 @@ + + + + diff --git a/src/modules/22_issues/interface/Main.ts b/src/modules/22_issues/interface/Main.ts new file mode 100644 index 000000000..cdb6c7cd1 --- /dev/null +++ b/src/modules/22_issues/interface/Main.ts @@ -0,0 +1,42 @@ +import type { D } from "@fullcalendar/core/internal-common"; + +interface Options { + label: string; + value: string; +} + +interface IssueData { + codeIssue: string; + createdAt: Date; + createdFullName: string; + createdUserId: string; + description: string; + id: string; + lastUpdateFullName: string; + lastUpdateUserId: string; + lastUpdatedAt: Date; + menu: string; + org: string; + remark: string; + status: "IN_PROGRESS" | "RESOLVED" | "CLOSED" | "NEW"; + system: "mgt" | "user" | "checkin"; + title: string; +} + +interface IssueAttachment { + fileName: string; + path: string; + pathname: string; + title: string; +} + +interface IssueAttachmentWithDownloadUrl extends IssueAttachment { + downloadUrl: string; +} + +export type { + Options, + IssueData, + IssueAttachment, + IssueAttachmentWithDownloadUrl, +}; diff --git a/src/modules/22_issues/router.ts b/src/modules/22_issues/router.ts new file mode 100644 index 000000000..df3ef253d --- /dev/null +++ b/src/modules/22_issues/router.ts @@ -0,0 +1,14 @@ +const Main = () => import("@/modules/22_issues/views/Main.vue"); + +export default [ + { + path: "/issues", + name: "issuesMain", + component: Main, + meta: { + Auth: true, + Key: "REPORT_ORG", + Role: "STAFF", + }, + }, +]; diff --git a/src/modules/22_issues/store.ts b/src/modules/22_issues/store.ts new file mode 100644 index 000000000..f7d19d0a6 --- /dev/null +++ b/src/modules/22_issues/store.ts @@ -0,0 +1,52 @@ +import { ref } from "vue"; +import { defineStore } from "pinia"; +import type { Options } from "@/modules/22_issues/interface/Main"; + +export const useIssueStore = defineStore("issue", () => { + const systemOptions = ref([ + { label: "ทั้งหมด", value: "" }, + { label: "ระบบบริหารจัดการ", value: "MGT" }, + { label: "ระบบผู้ใช้งาน", value: "USER" }, + { label: "ระบบลงเวลา", value: "CHECKIN" }, + ]); + + const statusOptions = ref([ + { label: "ทั้งหมด", value: "" }, + { label: "ใหม่", value: "NEW" }, + { label: "กำลังดำเนินการ", value: "IN_PROGRESS" }, + { label: "แก้ไขแล้ว", value: "RESOLVED" }, + { label: "ปิดแล้ว", value: "CLOSED" }, + ]); + + function convertStatus(status: string) { + let val = status.toUpperCase(); + switch (val) { + case "NEW": + return "ใหม่"; + case "IN_PROGRESS": + return "กำลังดำเนินการ"; + case "RESOLVED": + return "แก้ไขแล้ว"; + case "CLOSED": + return "ปิดแล้ว"; + default: + return "-"; + } + } + + function convertSystem(system: string) { + let val = system.toUpperCase(); + switch (val) { + case "MGT": + return "ระบบบริหารจัดการ"; + case "USER": + return "ระบบผู้ใช้งาน"; + case "CHECKIN": + return "ระบบลงเวลา"; + default: + return "-"; + } + } + + return { systemOptions, statusOptions, convertStatus, convertSystem }; +}); diff --git a/src/modules/22_issues/views/Main.vue b/src/modules/22_issues/views/Main.vue new file mode 100644 index 000000000..31b0209bb --- /dev/null +++ b/src/modules/22_issues/views/Main.vue @@ -0,0 +1,333 @@ + + + + diff --git a/src/router/index.ts b/src/router/index.ts index 3fc48e205..f570ed6ce 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -28,6 +28,7 @@ import ModuleCommand from "@/modules/18_command/router"; import ModulePositionCondition from "@/modules/19_condition/router"; import ModulePositionTemp from "@/modules/20_positionTemp/router"; import ModuleReport from "@/modules/21_report/router"; +import ModuleIssues from "@/modules/22_issues/router"; // TODO: ใช้หรือไม่? import { authenticated, logout } from "@/plugins/auth"; @@ -79,6 +80,7 @@ const router = createRouter({ ...ModulePositionCondition, ...ModulePositionTemp, ...ModuleReport, + ...ModuleIssues, ], }, /** diff --git a/src/stores/positionKeycloak.ts b/src/stores/positionKeycloak.ts new file mode 100644 index 000000000..a285c459c --- /dev/null +++ b/src/stores/positionKeycloak.ts @@ -0,0 +1,60 @@ +import { ref } from "vue"; +import { defineStore } from "pinia"; + +export const usePositionKeycloakStore = defineStore("positionKeycloak", () => { + const dataPositionKeycloak = ref(null); + + function setPositionKeycloak(data: any) { + dataPositionKeycloak.value = data; + } + + function findOrgName(obj: any) { + if (obj) { + let name = + obj.child4 != null && + obj.child4 !== "" && + obj.child3 != null && + obj.child3 !== "" + ? obj.child4 + (obj.child3 ? "/" : "") + : obj.child4 != null && obj.child4 !== "" + ? obj.child4 + : ""; + + name += + obj.child3 != null && + obj.child3 !== "" && + obj.child2 != null && + obj.child2 !== "" + ? obj.child3 + (obj.child2 ? "/" : "") + : obj.child3 != null && obj.child3 !== "" + ? obj.child3 + : ""; + + name += + obj.child2 != null && + obj.child2 !== "" && + obj.child1 != null && + obj.child1 !== "" + ? obj.child2 + (obj.child1 ? "/" : "") + : obj.child2 != null && obj.child2 !== "" + ? obj.child2 + : ""; + + name += + obj.child1 != null && + obj.child1 !== "" && + obj.root != null && + obj.root !== "" + ? obj.child1 + (obj.root ? "/" : "") + : obj.child1 != null && obj.child1 !== "" + ? obj.child1 + : ""; + name += obj.root != null && obj.root !== "" ? obj.root : ""; + return name == "" ? "-" : name; + } else { + return ""; + } + } + + return { dataPositionKeycloak, setPositionKeycloak, findOrgName }; +}); diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 8180cbd86..452e437a4 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -6,6 +6,7 @@ import { storeToRefs } from "pinia"; import { scroll, useQuasar } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; import { useMenuDataStore } from "@/stores/menuList"; +import { usePositionKeycloakStore } from "@/stores/positionKeycloak"; import { tokenParsed, logout, @@ -26,6 +27,7 @@ import type { import { tabList, tabListPlacement } from "../interface/request/main/main"; import LoginLinkage from "@/components/LoginLinkage.vue"; +import DialogDebug from "@/components/Dialogs/DialogDebug.vue"; // landing page config url const configParam = { @@ -63,6 +65,7 @@ const modalLoginLinkage = ref(false); //เข้าสู่ระบ // landing page redirect const landingPageUrl = ref(configParam.landingPageUrl); +const modalDebug = ref(false); async function fetchmsgNoread() { await http @@ -524,6 +527,7 @@ async function fetchKeycloakPosition() { .get(config.API.keycloakPosition()) .then(async (res) => { const data = await res.data.result; + usePositionKeycloakStore().setPositionKeycloak(data); if (data.avatarName) { await getImg(data.profileId, data.avatarName); } else { @@ -783,6 +787,21 @@ function onViewDetailNoti(url: string) { + + + + + + แจ้งปัญหาการใช้งานระบบ + + + +