diff --git a/src/api/02_organizational/api.organization.ts b/src/api/02_organizational/api.organization.ts index 6b0eb23a6..b497f4431 100644 --- a/src/api/02_organizational/api.organization.ts +++ b/src/api/02_organizational/api.organization.ts @@ -23,6 +23,7 @@ export default { orgPosPositionExecutive : () => `${orgPos}/position/executive`, orgPosExecutive: `${orgPos}/executive`, orgPosType: `${orgPos}/type`, + orgPosTypeId: (id: string) => `${orgPos}/type/${id}`, orgPosLevel: `${orgPos}/level`, orgPosMaster: `${orgPos}/master`, orgPosMasterById: (id: string) => `${orgPos}/master/${id}`, diff --git a/src/modules/01_metadataNew/components/position/05ListLevelDetail.vue b/src/modules/01_metadataNew/components/position/05ListLevelDetail.vue index 318976a30..514d7f5ee 100644 --- a/src/modules/01_metadataNew/components/position/05ListLevelDetail.vue +++ b/src/modules/01_metadataNew/components/position/05ListLevelDetail.vue @@ -2,7 +2,7 @@ import { ref, onMounted } from "vue"; import type { QInput, QTableProps } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; -import { useRouter, useRoute } from "vue-router"; +import { useRoute } from "vue-router"; import { usePositionDataStore } from "@/modules/01_metadataNew/stores/positionListStore"; import { useMainOptionDataStore } from "@/modules/01_metadataNew/stores/main"; import { usePositionTypeDataStore } from "@/modules/01_metadataNew/stores/positionTypeStore"; @@ -133,6 +133,7 @@ const posLevelAuthority = ref(""); const posLevelNameRef = ref(null); const posLevelRankRef = ref(null); const posTypeIdRef = ref(null); +const posLevelAuthorityRef = ref(null); const visibleColumns = ref([ "no", "posTypeName", @@ -144,9 +145,10 @@ const visibleColumns = ref([ async function fetchData() { showLoader(); await http - .get(config.API.orgPosLevel) + .get(config.API.orgPosTypeId(id.value)) .then(async (res) => { - store.save(res.data.result, id.value); + posName.value = res.data.result.posTypeName; + store.save(res.data.result.posLevels); }) .catch((err) => { messageError($q, err); @@ -221,6 +223,7 @@ function validateForm() { posLevelNameRef.value?.validate(); posLevelRankRef.value?.validate(); posTypeIdRef.value?.validate(); + posLevelAuthorityRef.value?.validate(); onSubmit(); } @@ -238,28 +241,7 @@ async function onSubmit() { } } -async function fetchName() { - showLoader(); - await http - .get(config.API.orgPosType) - .then(async (res) => { - storeName.save(res.data.result); - storeName.row.forEach((e) => { - if (e.id === id.value) { - posName.value = e.posTypeName ? e.posTypeName : ""; - } - }); - }) - .catch((err) => { - messageError($q, err); - }) - .finally(() => { - hideLoader(); - }); -} - onMounted(async () => { - fetchName(); fetchData(); }); @@ -348,11 +330,18 @@ onMounted(async () => { @click.stop=" () => { dialogStatus = 'edit'; - dialog = true; editId = props.row.id; posLevelName = props.row.posLevelName; posLevelRank = props.row.posLevelRank; - posLevelAuthority = props.row.posLevelAuthority; + if (props.row.posLevelAuthority === 'หัวหน้าหน่วยงาน') { + posLevelAuthority = 'HEAD'; + } else if (props.row.posLevelAuthority === 'ปลัด') { + posLevelAuthority = 'DEPUTY'; + } else { + posLevelAuthority = 'GOVERNOR'; + } + + dialog = true; } " > @@ -424,6 +413,7 @@ onMounted(async () => {
{ label="ผู้มีอำนาจสั่งบรรจุ" dense lazy-rules + :rules="[(val) => !!val || 'กรุณาเลือกผู้มีอำนาจสั่งบรรจุ']" borderless bg-color="white" hide-bottom-space diff --git a/src/modules/01_metadataNew/stores/positionListStore.ts b/src/modules/01_metadataNew/stores/positionListStore.ts index c61f8ac74..8c039313c 100644 --- a/src/modules/01_metadataNew/stores/positionListStore.ts +++ b/src/modules/01_metadataNew/stores/positionListStore.ts @@ -13,7 +13,7 @@ const { date2Thai } = useCounterMixin(); export const usePositionDataStore = defineStore("PositionData", () => { const pathLocation = ref("list_position"); const row = ref([]); - function save(data: DataResponse[], id: string) { + function save(data: DataResponse[]) { const list = data.map((e) => ({ ...e, posTypes: undefined, @@ -26,7 +26,7 @@ export const usePositionDataStore = defineStore("PositionData", () => { ? storeOption.posLevelAuthorityConvert(e.posLevelAuthority) : "-", })) satisfies DataRow[]; - row.value = list.filter((e) => e.posTypeId === id); + row.value = list; } return { diff --git a/src/modules/13_salary/components/SalaryLists/TabMain.vue b/src/modules/13_salary/components/SalaryLists/TabMain.vue index 83cf99173..ca0dcf44f 100644 --- a/src/modules/13_salary/components/SalaryLists/TabMain.vue +++ b/src/modules/13_salary/components/SalaryLists/TabMain.vue @@ -324,12 +324,12 @@ onMounted(async () => { > - + ทั่วไป: - ปฏิบัติงาน,ชำนาญงาน,อาวุโส ปฏิบัติงาน, ชำนาญงาน, อาวุโส @@ -337,7 +337,9 @@ onMounted(async () => { วิชาการ: - ปฏิบัติการ,ชำนาญการ,ชำนาญการพิเศษ + ปฏิบัติการ, ชำนาญการ, ชำนาญการพิเศษ @@ -351,7 +353,7 @@ onMounted(async () => { - + @@ -364,7 +366,7 @@ onMounted(async () => { วิชาการ: - เชี่ยวชาญ,ทรงคุณวุฒิ เชี่ยวชาญ, ทรงคุณวุฒิ @@ -381,7 +383,7 @@ onMounted(async () => { บริหาร: - ต้น,สูง ต้น, สูง @@ -555,4 +557,7 @@ onMounted(async () => { .q-tabs--vertical .q-tab { padding: 0 20px; } +.tootip-txt-normal { + font-size: 0.8rem; +} diff --git a/src/modules/13_salary/components/salaryEmployeeChart/TabCriteria.vue b/src/modules/13_salary/components/salaryEmployeeChart/TabCriteria.vue index f89409cc2..6842696a5 100644 --- a/src/modules/13_salary/components/salaryEmployeeChart/TabCriteria.vue +++ b/src/modules/13_salary/components/salaryEmployeeChart/TabCriteria.vue @@ -16,7 +16,6 @@ import { useQuasar } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; import http from "@/plugins/http"; import config from "@/app.config"; -import { br } from "@fullcalendar/core/internal-common"; const maxPage = ref(1); const $q = useQuasar(); @@ -176,7 +175,7 @@ function getData() { posName: item.position, posLevel: item.posLevel, rateOldMin: item.salaryMin, - groupOld: item.salaryEmployeeMin.sort((a,b)=>a -b), + groupOld: item.salaryEmployeeMin.sort((a, b) => a - b), rateMaxOld: item.salary, groupRateHigh: item.group, rateHighMax: item.salaryMax, @@ -212,7 +211,7 @@ function updatePageSize(newPagination: NewPagination) { function onClickDelete(id: string) { dialogRemove($q, () => { http - .delete(config.API.salaryFormula()+`/${id}`) + .delete(config.API.salaryFormula() + `/${id}`) .then(() => { getData(); success($q, "ลบข้อมูลสำเร็จ"); @@ -317,16 +316,14 @@ onMounted(() => { {{ col.value ? col.value.toLocaleString() : "-" }}
- - - - {{ item }}{{index+1 == col.value.length ?'':','}} - - + + {{ item }}{{ index + 1 == col.value.length ? "" : "," }} + +
{{ col.value != "" ? col.value : "-" }}
- +