delete const $q = useQuasar(); .ts

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-06-06 13:50:04 +07:00
parent 1927870302
commit 60bda24d1d
5 changed files with 17 additions and 78 deletions

View file

@ -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();