diff --git a/src/modules/04_registryNew/components/detail/Achievement/05_ResultsPerformance.vue b/src/modules/04_registryNew/components/detail/Achievement/05_ResultsPerformance.vue index beb18b59f..2be1c6b2e 100644 --- a/src/modules/04_registryNew/components/detail/Achievement/05_ResultsPerformance.vue +++ b/src/modules/04_registryNew/components/detail/Achievement/05_ResultsPerformance.vue @@ -661,7 +661,6 @@ onMounted(async () => { outlined lazy-rules hide-bottom-space - mask="###" class="inputgreen" v-model="resPerformForm.point1Total" input-class="text-right " @@ -675,7 +674,6 @@ onMounted(async () => { outlined lazy-rules hide-bottom-space - mask="###" class="inputgreen" v-model="resPerformForm.point1" input-class="text-right" @@ -691,7 +689,6 @@ onMounted(async () => { outlined lazy-rules hide-bottom-space - mask="###" class="inputgreen" v-model="resPerformForm.point2Total" input-class="text-right" @@ -705,7 +702,6 @@ onMounted(async () => { outlined lazy-rules hide-bottom-space - mask="###" class="inputgreen" v-model="resPerformForm.point2" input-class="text-right" @@ -721,7 +717,6 @@ onMounted(async () => { outlined lazy-rules hide-bottom-space - mask="###" class="inputgreen" v-model="resPerformForm.pointSumTotal" input-class="text-right" @@ -735,7 +730,6 @@ onMounted(async () => { outlined lazy-rules hide-bottom-space - mask="###" v-model="resPerformForm.pointSum" class="inputgreen" input-class="text-right" diff --git a/src/modules/04_registryNew/stores/ResultsPerformance.ts b/src/modules/04_registryNew/stores/ResultsPerformance.ts index 717d3beb1..c9c8fae1d 100644 --- a/src/modules/04_registryNew/stores/ResultsPerformance.ts +++ b/src/modules/04_registryNew/stores/ResultsPerformance.ts @@ -1,27 +1,29 @@ import { ref } from "vue"; import { defineStore } from "pinia"; -export const useResultsPerformDataStore = defineStore("resultPerformDataStore", () => { +export const useResultsPerformDataStore = defineStore( + "resultPerformDataStore", + () => { + function textRangePoint(val: number | undefined) { + if (val == undefined) val = -1; + if (val < 60.0) return "(คะแนนต่ำกว่าร้อยละ 60.00)"; + if (val >= 60.0 && val <= 69.99) return "(คะแนนร้อยละ 60.00 - 69.99)"; + if (val >= 70.0 && val <= 79.99) return "(คะแนนร้อยละ 70.00 - 79.99)"; + if (val >= 80.0 && val <= 89.99) return " (คะแนนร้อยละ 80.00 - 89.99)"; + if (val >= 90.0) return " (คะแนนร้อยละ 90.00 ขึ้นไป)"; + else return ""; + } - function textRangePoint(val: number | undefined) { - if (val == undefined) val = -1; - if (val >= 0 && val <= 60) return "(ต่ำกว่าร้อยละ 60)"; - if (val >= 60 && val <= 69) return "(ร้อยละ 60 – 69)"; - if (val >= 70 && val <= 79) return "(ร้อยละ 70 – 79)"; - if (val >= 80 && val <= 89) return "(ร้อยละ 80 – 89)"; - if (val >= 90 && val <= 100) return "(ร้อยละ 90 - 100)"; - else return ""; - } - - function textPoint(val: number | undefined) { - if (val == undefined) val = -1; - if (val >= 0 && val <= 60) return "ต้องปรับปรุง"; - if (val >= 60 && val <= 69) return "พอใช้"; - if (val >= 70 && val <= 79) return "ดี"; - if (val >= 80 && val <= 89) return "ดีมาก"; - if (val >= 90 && val <= 100) return "ดีเด่น"; - else return "-"; - } + function textPoint(val: number | undefined) { + if (val == undefined) val = -1; + if (val < 60.0) return "ต้องปรับปรุง"; + if (val >= 60.0 && val <= 69.99) return "พอใช้"; + if (val >= 70.0 && val <= 79.99) return "ดี"; + if (val >= 80.0 && val <= 89.99) return "ดีมาก"; + if (val >= 90.0) return "ดีเด่น"; + else return "-"; + } - return { textRangePoint, textPoint }; -}); + return { textRangePoint, textPoint }; + } +);