diff --git a/.env.production b/.env.production index 5ba22af69..7d20397f2 100644 --- a/.env.production +++ b/.env.production @@ -6,6 +6,7 @@ VITE_REALM_KEYCLOAK=VITE_REALM_KEYCLOAK VITE_CLIENTID_KEYCLOAK=VITE_CLIENTID_KEYCLOAK VITE_URL_KEYCLOAK=VITE_URL_KEYCLOAK VITE_API_PUBLISH_URL=VITE_API_PUBLISH_URL +VITE_API_REPORT_URL=VITE_API_REPORT_URL # VITE_COMPETITIVE_EXAM_PANEL: "https://bma-dashboard.frappet.synology.me/goto/KO0GpSu4z?orgId=1" # VITE_QUALIFY_DISABLE_EMAM_PANEL: "https://bma-dashboard.frappet.synology.me/goto/dQQzpIX4z?orgId=1" @@ -14,4 +15,5 @@ VITE_API_PUBLISH_URL=VITE_API_PUBLISH_URL # VITE_REALM_KEYCLOAK: "bma-ehr" # VITE_CLIENTID_KEYCLOAK: "bma-ehr-vue3" # VITE_URL_KEYCLOAK: "https://id.frappet.synology.me/" -# VITE_API_PUBLISH_URL: "https://bma-ehr-publish.frappet.synology.me" \ No newline at end of file +# VITE_API_PUBLISH_URL: "https://bma-ehr-publish.frappet.synology.me" +# VITE_API_REPORT_URL: "https://report-server.frappet.synology.me/api/v1/report-template" \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 6d4a7faa2..d9b2d4220 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -16,6 +16,7 @@ do sed -i 's|VITE_CLIENTID_KEYCLOAK|'${VITE_CLIENTID_KEYCLOAK}'|g' $file sed -i 's|VITE_URL_KEYCLOAK|'${VITE_URL_KEYCLOAK}'|g' $file sed -i 's|VITE_API_PUBLISH_URL|'${VITE_API_PUBLISH_URL}'|g' $file + sed -i 's|VITE_API_REPORT_URL|'${VITE_API_REPORT_URL}'|g' $file done diff --git a/src/api/index.ts b/src/api/index.ts index 7359b3d8c..87570ccaa 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,6 +3,7 @@ import { ref } from "vue"; const env = ref(process.env.NODE_ENV || "development"); export const apiUrlConfigPublish = import.meta.env.VITE_API_PUBLISH_URL; +export const apiUrlConfigReport = import.meta.env.VITE_API_REPORT_URL; // if (process.env.VUE_APP_TEST) { // env = "test"; // } @@ -56,9 +57,8 @@ const config = ref({ API_RETIREMENT_URI: `${window.location.protocol}//${window.location.host}/api/v1`, API_PROBATION_URI: `${window.location.protocol}//${window.location.host}/api/v1/probation`, API_REPORT2_URI: `${window.location.protocol}//${window.location.host}/api/v2`, - LINK_EVALUATE_PUBLISH: "https://bma-ehr-publish.frappet.synology.me", - API_REPORT_TEMPLATE_URI: - "https://report-server.frappet.synology.me/api/v1/report-template", + LINK_EVALUATE_PUBLISH: apiUrlConfigPublish, + API_REPORT_TEMPLATE_URI: apiUrlConfigReport, }, }); diff --git a/src/modules/10_order/components/step/step04.vue b/src/modules/10_order/components/step/step04.vue index 485428fd2..61136704c 100644 --- a/src/modules/10_order/components/step/step04.vue +++ b/src/modules/10_order/components/step/step04.vue @@ -82,7 +82,9 @@ const attachmentStatus = computed(() => { // เช็คว่าต้องไป gen report ที่ server เพิ่มไหม code ที่เพิ่มคือคำสั่งใหม่ที่ต้องไป gen report อีกรอบ const genReportStatus = computed(() => { - return code.value == "c-pm-25" || + return code.value == "c-pm-19" || + code.value == "c-pm-20" || + code.value == "c-pm-25" || code.value == "c-pm-26" || code.value == "c-pm-27" || code.value == "c-pm-28" || @@ -119,7 +121,7 @@ const getCommandDetail = async () => { const downloadCover = async (type: string) => { showLoader(); - if (!genReportStatus) { + if (!genReportStatus.value) { await http .get(config.API.fileCover(code.value, type, orderId.value), { responseType: "blob", diff --git a/src/modules/12_evaluatePersonal/components/Detail/step/step6.vue b/src/modules/12_evaluatePersonal/components/Detail/step/step6.vue index 7a3b46f63..9a63c3136 100644 --- a/src/modules/12_evaluatePersonal/components/Detail/step/step6.vue +++ b/src/modules/12_evaluatePersonal/components/Detail/step/step6.vue @@ -136,8 +136,10 @@ onMounted(() => { outlined v-model="assignedPosition" @update:model-value="updateInput(formCommand)" - label="ต่ำแหน่งที่ได้รับ" - :rules="[(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]" + label="ตำแหน่งที่ได้รับ" + :rules="[ + (val) => !!val || `${'กรุณากรอกตำแหน่งที่ได้รับ'}`, + ]" lazy-rules />