delete const $q = useQuasar(); .ts
This commit is contained in:
parent
af4bae0b8a
commit
685191c74b
7 changed files with 51 additions and 84 deletions
|
|
@ -12,12 +12,10 @@ import type {
|
|||
SupportMessageStatus,
|
||||
SupportIssueCategoryResponse,
|
||||
} from "@/modules/00_support/interface/index/Main";
|
||||
import { useQuasar } from "quasar";
|
||||
import { getToken, tokenParsed } from "@/plugins/auth";
|
||||
|
||||
export const useSupportStore = defineStore("supportServiceStore", async () => {
|
||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
const $q = useQuasar();
|
||||
const { showLoader, hideLoader } = useCounterMixin();
|
||||
const userId = ref<string | undefined>("");
|
||||
const issue = ref<SupportIssueResponse>();
|
||||
const message = ref<SupportMessageResponse>();
|
||||
|
|
@ -123,7 +121,7 @@ export const useSupportStore = defineStore("supportServiceStore", async () => {
|
|||
const res = await http
|
||||
.get(config.API.supportMessageStatus(issueId))
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {});
|
||||
|
||||
|
|
@ -136,7 +134,7 @@ export const useSupportStore = defineStore("supportServiceStore", async () => {
|
|||
const res = await http
|
||||
.get(`${config.API.supportMessage(currentIssue.value)}?page=${page}`)
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
if (res && res.data) {
|
||||
|
|
@ -150,7 +148,7 @@ export const useSupportStore = defineStore("supportServiceStore", async () => {
|
|||
const res = await http
|
||||
.get(config.API.supportMessage(issueId))
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -183,7 +181,7 @@ export const useSupportStore = defineStore("supportServiceStore", async () => {
|
|||
const res = await http
|
||||
.patch(config.API.supportIssueChangeStatus(issueId), requestBody)
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -199,7 +197,7 @@ export const useSupportStore = defineStore("supportServiceStore", async () => {
|
|||
const res = await http
|
||||
.get(`${config.API.supportIssue}?page=${page}&pageSize=30`)
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -217,7 +215,7 @@ export const useSupportStore = defineStore("supportServiceStore", async () => {
|
|||
const res = await http
|
||||
.get(config.API.supportSearchIssue(input))
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -237,7 +235,7 @@ export const useSupportStore = defineStore("supportServiceStore", async () => {
|
|||
name: name,
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -253,10 +251,10 @@ export const useSupportStore = defineStore("supportServiceStore", async () => {
|
|||
const res = await http
|
||||
.get(config.API.supportCategory)
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -271,7 +269,7 @@ export const useSupportStore = defineStore("supportServiceStore", async () => {
|
|||
const res = await http
|
||||
.delete(config.API.supportCategoryAction(CategoryId))
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -289,7 +287,7 @@ export const useSupportStore = defineStore("supportServiceStore", async () => {
|
|||
name: name,
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue