diff --git a/src/modules/00_support/store/Main.ts b/src/modules/00_support/store/Main.ts index 12383f0..d4b3174 100644 --- a/src/modules/00_support/store/Main.ts +++ b/src/modules/00_support/store/Main.ts @@ -17,7 +17,6 @@ import { getToken, tokenParsed } from "@/plugins/auth"; export const useSupportStore = defineStore("supportServiceStore", () => { const { showLoader, hideLoader, messageError } = useCounterMixin(); - const $q = useQuasar(); const openChat = ref(false); const icon = ref("mdi-account-check"); @@ -114,7 +113,7 @@ export const useSupportStore = defineStore("supportServiceStore", () => { const res = await http .get(config.API.supportMessageStatus(issueId)) .catch((err) => { - messageError($q, err); + console.log(err); }) .finally(() => { hideLoader(); @@ -129,7 +128,7 @@ export const useSupportStore = defineStore("supportServiceStore", () => { const res = await http .get(config.API.supportMessage(issueId)) .catch((err) => { - messageError($q, err); + console.log(err); }) .finally(() => { hideLoader(); @@ -149,7 +148,7 @@ export const useSupportStore = defineStore("supportServiceStore", () => { const res = await http .get(config.API.supportIssueUserId(userId.value)) .catch((err) => { - messageError($q, err); + console.log(err); }) .finally(() => { hideLoader(); @@ -166,7 +165,7 @@ export const useSupportStore = defineStore("supportServiceStore", () => { const res = await http .get(config.API.supportIssueCategory) .catch((err) => { - messageError($q, err); + console.log(err); }) .finally(() => { hideLoader(); @@ -188,7 +187,7 @@ export const useSupportStore = defineStore("supportServiceStore", () => { const res = await http .post(config.API.supportNewIssue, requestBody) .catch((err) => { - messageError($q, err); + console.log(err); }) .finally(() => { hideLoader(); @@ -203,7 +202,7 @@ export const useSupportStore = defineStore("supportServiceStore", () => { const res = await http .get(config.API.supportSearchIssue(searchData)) .catch((err) => { - messageError($q, err); + console.log(err); }); if (res && res.data) { issue.value = res.data; diff --git a/src/modules/06_evaluate/stores/evaluationFunction.ts b/src/modules/06_evaluate/stores/evaluationFunction.ts index a683f9c..faf7e37 100644 --- a/src/modules/06_evaluate/stores/evaluationFunction.ts +++ b/src/modules/06_evaluate/stores/evaluationFunction.ts @@ -1,15 +1,13 @@ import http from "@/plugins/http"; import config from "@/app.config"; -import { useQuasar } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; import { useEvaluateStore } from "@/modules/06_evaluate/store"; const store = useEvaluateStore(); const mixin = useCounterMixin(); -const $q = useQuasar(); -const { showLoader, hideLoader, messageError } = mixin; +const { showLoader, hideLoader } = mixin; /** function เช็คการยื่นข้อประเมิน*/ async function fetchCheckStatus() { @@ -26,7 +24,7 @@ async function fetchCheckStatus() { fetchCheckStep(store?.evaluateId); }) .catch((err) => { - messageError($q, err); + console.log(err); }) .finally(() => { hideLoader(); @@ -65,7 +63,7 @@ async function fetchCheckStep(id: string) { store.step = step; }) .catch((err) => { - messageError($q, err); + console.log(err); }) .finally(() => { store.showLoadStatus = true; @@ -143,7 +141,7 @@ async function saveEvaluation(formSpec: any, detail: any) { fetchCheckStatus(); }) .catch((err) => { - messageError($q, err); + console.log(err); }) .finally(() => { fetchCheckStep(store?.evaluateId); @@ -155,10 +153,9 @@ async function nextPrapare(type: string, body: any) { showLoader(); await http .put(config.API.evaluationPreparedoc(store.evaluateId, type), body) - .then((res) => { - }) + .then((res) => {}) .catch((err) => { - messageError($q, err); + console.log(err); }) .finally(() => { hideLoader(); @@ -170,10 +167,9 @@ async function nextCheckDoc(type: string) { showLoader(); await http .put(config.API.evaluationCheckdoc(store.evaluateId, type)) - .then((res) => { - }) + .then((res) => {}) .catch((err) => { - messageError($q, err); + console.log(err); }) .finally(() => { hideLoader(); diff --git a/src/modules/08_KPI/store.ts b/src/modules/08_KPI/store.ts index ebf25b4..25eb139 100644 --- a/src/modules/08_KPI/store.ts +++ b/src/modules/08_KPI/store.ts @@ -1,17 +1,9 @@ import { defineStore } from "pinia"; -import { ref, reactive, watch } from "vue"; +import { ref, reactive } from "vue"; import type { DataOptions } from "./interface/index/Main"; import type { FormQuery } from "@/modules/08_KPI/interface/request/index"; -import { useCounterMixin } from "@/stores/mixin"; -import http from "@/plugins/http"; -import config from "@/app.config"; -import { useQuasar } from "quasar"; export const useKpiDataStore = defineStore("KPIDate", () => { - const $q = useQuasar(); - const mixin = useCounterMixin(); - const { showLoader, hideLoader, messageError } = mixin; - const mainRowData = ref(); const isUpdate = ref(false); const tabMainevaluator = ref("1"); @@ -432,47 +424,6 @@ export const useKpiDataStore = defineStore("KPIDate", () => { const devProbationScore = ref(10); // สรุปผลการประเมินพฤติกรรมการปฏิบัติราชการ (สมรรถนะ+การพัฒนาตนเอง) (คะแนนเต็ม competencyDevScore คะแนน) const competencyDevProbationScore = ref(50); // สรุปผลการประเมินพฤติกรรมการปฏิบัติราชการ (สมรรถนะ+การพัฒนาตนเอง) (คะแนนเต็ม competencyDevScore คะแนน) - // function getDataWork() { - // showLoader(); - // http - // .get(config.API.orgPosition + `/${dataProfile.value.profileId}`) - // .then((res) => { - // const data = res.data.result.isProbation; - // work.value = data; - // if (data) { - // indicatorScore.value = 50; - // competencyScore.value = 40; - // excusiveCompetencyScore.value = 40; - // competencyDevScore.value = 10; - // } else { - // indicatorScore.value = 70; - // competencyScore.value = 20; - // excusiveCompetencyScore.value = 20; - // competencyDevScore.value = 30; - // } - // }) - // .catch((e) => { - // messageError($q, e); - // }) - // .finally(() => { - // hideLoader(); - // }); - // } - - // watch( - // () => tabMain.value, - // () => { - // if (tabMain.value == "3" && tabOpen.value == 3) { - // getDataWork(); - // } else { - // indicatorScore.value = 70; - // competencyScore.value = 20; - // excusiveCompetencyScore.value = 20; - // competencyDevScore.value = 30; - // } - // } - // ); - return { tabMain, dataProfile, @@ -526,6 +477,6 @@ export const useKpiDataStore = defineStore("KPIDate", () => { mainRowData, resultsOptions, statusOptions, - roleText + roleText, }; }); diff --git a/src/modules/10_registry/store/Main.ts b/src/modules/10_registry/store/Main.ts index 47c2ab6..bff947e 100644 --- a/src/modules/10_registry/store/Main.ts +++ b/src/modules/10_registry/store/Main.ts @@ -1,13 +1,7 @@ import { defineStore } from "pinia"; -import { useQuasar } from "quasar"; import http from "@/plugins/http"; import config from "@/app.config"; -import { useCounterMixin } from "@/stores/mixin"; - -const $q = useQuasar(); -const mixin = useCounterMixin(); -const { messageError } = mixin; export const useRegistryDataStore = defineStore("RegistryDataStoreMain", () => { async function getPathUploadFlie( @@ -27,7 +21,7 @@ export const useRegistryDataStore = defineStore("RegistryDataStoreMain", () => { ); return res.data; } catch (err) { - messageError($q, err); + console.log(err); } } diff --git a/src/modules/10_registry/store/Position.ts b/src/modules/10_registry/store/Position.ts index 7fee4f6..ad14276 100644 --- a/src/modules/10_registry/store/Position.ts +++ b/src/modules/10_registry/store/Position.ts @@ -6,7 +6,6 @@ import { useCounterMixin } from "@/stores/mixin"; import type { DataOption } from "@/modules/10_registry/interface/index/Main"; -const $q = useQuasar(); const mixin = useCounterMixin(); const {} = mixin;