diff --git a/src/modules/10_registry/03_Salary/01_Salary.vue b/src/modules/10_registry/03_Salary/01_Salary.vue index 1399784..6ce069a 100644 --- a/src/modules/10_registry/03_Salary/01_Salary.vue +++ b/src/modules/10_registry/03_Salary/01_Salary.vue @@ -38,6 +38,10 @@ const checkType = ref( const modalHistory = ref(false); /** ตัวแปรข้อมูล */ +const salaryText = computed(() => { + return link.value == "" ? "เงินเดือน" : "ค่าจ้าง"; +}); + const baseColumns = ref([ { name: "commandDateAffect", @@ -194,7 +198,7 @@ const baseColumns = ref([ { name: "amount", align: "left", - label: link.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", + label: salaryText.value, sortable: true, field: "amount", headerStyle: "font-size: 14px", @@ -503,7 +507,7 @@ const baseColumnsHistory = ref([ { name: "amount", align: "left", - label: link.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", + label: salaryText.value, sortable: true, field: "amount", headerStyle: "font-size: 14px", @@ -652,9 +656,9 @@ onMounted(async () => {
- ตำแหน่ง/เงินเดือน + {{ + `ตำแหน่ง/${salaryText}` + }} { icon="mdi-history" @click="onHistory(props.row.id)" > - ประวัติแก้ไขตำแหน่ง/เงินเดือน + {{`ประวัติแก้ไขตำแหน่ง/${salaryText}`}} @@ -756,7 +760,7 @@ onMounted(async () => { class="absolute_button" @click="onHistory(props.row.id)" > - ประวัติแก้ไขตำแหน่ง/เงินเดือน + {{`ประวัติแก้ไขตำแหน่ง/${salaryText}`}} @@ -778,7 +782,7 @@ onMounted(async () => {
+import { ref, onMounted, computed } from "vue"; import { useCounterMixin } from "@/stores/mixin"; import { useQuasar, type QTableProps } from "quasar"; -import { ref, onMounted } from "vue"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -28,7 +28,9 @@ const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = const { getPathUploadFlie } = useRegistryDataStore(); const modalHistory = ref(false); -/** ตัวแปรข้อมูล */ +const salaryText = computed(() => { + return link.value == "" ? "เงินเดือน" : "ค่าจ้าง"; +}); const visibleColumns = ref([ "date", @@ -220,7 +222,7 @@ const columnsHistory = ref([ }, ]); -const fileGroup = ref("เอกสารบันทึกวันที่ไม่ได้รับเงินเดือน"); +const fileGroup = ref(`เอกสารบันทึกวันที่ไม่ได้รับ${salaryText.value}`); function onHistory(id: string) { modalHistory.value = true; @@ -287,9 +289,9 @@ onMounted(async () => {
- บันทึกวันที่ไม่ได้รับเงินเดือนฯ + {{ + `บันทึกวันที่ไม่ได้รับ${salaryText}ฯ` + }} { icon="mdi-history" @click="onHistory(props.row.id)" > - ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ + {{ + `ประวัติแก้ไขบันทึกวันที่ไม่ได้รับ${salaryText}ฯ` + }} @@ -412,9 +416,9 @@ onMounted(async () => { size="14px" @click="onHistory(props.row.id)" > - ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ + {{ + `ประวัติแก้ไขบันทึกวันที่ไม่ได้รับ${salaryText}ฯ` + }}
@@ -438,7 +442,7 @@ onMounted(async () => { -import { ref } from "vue"; +import { ref, computed } from "vue"; import { useCounterMixin } from "@/stores/mixin"; import { useDataStore } from "@/stores/data"; import { useRegistryInFormationStore } from "@/modules/10_registry/store/registry"; @@ -25,6 +25,9 @@ const mixin = useCounterMixin(); const { messageError, showLoader, hideLoader } = mixin; const router = useRouter(); const tab = ref("information"); +const salaryText = computed(() => { + return dataStore.officerType == "OFFICER" ? "เงินเดือน" : "ค่าจ้าง"; +}); const sizeImg = ref(""); function onResize(size: any) { @@ -210,7 +213,7 @@ function redirectToPagePetition() { class="bg-active" /> - + @@ -316,7 +319,7 @@ function redirectToPagePetition() { - ข้อมูลเงินเดือน/ค่าจ้าง + {{ `ข้อมูล${salaryText}` }}