เพิ่ม api (support)

This commit is contained in:
puri-ph4tt 2024-02-02 17:18:33 +07:00
parent 830ad6d3f1
commit 12ac44c7c2
3 changed files with 24 additions and 6 deletions

View file

@ -12,6 +12,7 @@ const config = ref<any>({
development: {
// API_URI: "https://localhost:7260/api",
API_URI: "https://bma-ehr.frappet.synology.me/api/v1",
API_URL_SUPPORT: "http://192.168.1.10:3000/api/v1/support",
MEET_URI: "meet.frappet.com",
LINK_EVALUATE_PUBLISH: "https://bma-ehr-publish.frappet.synology.me",
},
@ -21,6 +22,7 @@ const config = ref<any>({
},
production: {
API_URI: apiUrlConfig,
API_URL_SUPPORT: "http://192.168.1.10:3000/api/v1/support",
API_URI_ORG_TREE:
"https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230707_115124.json",
MEET_URI: "meet.frappet.com",
@ -29,6 +31,7 @@ const config = ref<any>({
});
const API_URI = ref<string>(config.value[env.value].API_URI);
const API_URL_SUPPORT = ref<string>(config.value[env.value].API_URL_SUPPORT)
const MEET_URI = ref<string>(config.value[env.value].MEET_URI);
const LINK_EVALUATE_PUBLISH = ref<string>(
config.value[env.value].LINK_EVALUATE_PUBLISH
@ -38,6 +41,7 @@ export default {
env: env.value,
config: config.value,
API_URI: API_URI.value,
API_URL_SUPPORT: API_URL_SUPPORT.value,
MEET_URI: MEET_URI.value,
LINK_EVALUATE_PUBLISH: LINK_EVALUATE_PUBLISH.value,
};

View file

@ -0,0 +1,12 @@
import env from "../index";
const support = `${env.API_URL_SUPPORT}`;
export default {
supportMessageStatus: (id: string) => `${support}/issue/${id}/message-status`,
supportMessage: (id: string, pageSize: number = 999, page: number = 1) =>
`${support}/issue/${id}/message?pageSize=${pageSize}&page=${page}`,
supportIssueUserId: (userId: string) => `${support}/issue?userId=${userId}`,
supportIssue: `${support}/issue`,
supportIssueCategory: `${support}/issue-category`,
};

View file

@ -1,12 +1,13 @@
/**ใช้รวมไฟล์ย่อยๆ ของ api แต่ละไฟล์ */
/** API Metadata */
import testtest from "./api/test/api.test"
import retirementResign from "./api/leave/api.leave"
import placementTransfer from "./api/transfer/api.transfer"
import appeal from "./api/appeal/api.appeal"
import message from "./api/api.message"
import testtest from "./api/test/api.test";
import retirementResign from "./api/leave/api.leave";
import placementTransfer from "./api/transfer/api.transfer";
import appeal from "./api/appeal/api.appeal";
import message from "./api/api.message";
import evaluate from "./api/evaluate/api.evaluate";
import support from "./api/support/api.support";
const API = {
...testtest,
@ -14,7 +15,8 @@ const API = {
...placementTransfer,
...message,
...evaluate,
...appeal
...appeal,
...support,
};
export default {