2024-12-05 17:02:06 +00:00
|
|
|
import {
|
2025-01-09 12:28:37 +00:00
|
|
|
httpDeleteInterceptor,
|
2024-12-05 17:02:06 +00:00
|
|
|
httpGetInterceptor,
|
|
|
|
|
httpPostInterceptor,
|
|
|
|
|
} from "../http-config/http-interceptor-service";
|
|
|
|
|
|
2024-12-11 18:28:57 +00:00
|
|
|
export async function listTicketingInternal(
|
|
|
|
|
page: number,
|
|
|
|
|
size: any,
|
2025-03-23 07:57:45 +00:00
|
|
|
title: string = "",
|
2025-05-19 01:24:48 +00:00
|
|
|
category: any = ""
|
2024-12-11 18:28:57 +00:00
|
|
|
) {
|
2024-12-05 17:02:06 +00:00
|
|
|
return await httpGetInterceptor(
|
2025-03-23 07:57:45 +00:00
|
|
|
`ticketing/internal/pagination?enablePage=1&size=${size}&page=${page}&title=${title}&category=${category}`
|
2024-12-11 18:28:57 +00:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-19 16:40:31 +00:00
|
|
|
|
2024-12-11 18:28:57 +00:00
|
|
|
export async function getTicketingEscalationPagination(
|
|
|
|
|
page: number,
|
|
|
|
|
size: any,
|
|
|
|
|
title: string = ""
|
|
|
|
|
) {
|
|
|
|
|
return await httpGetInterceptor(
|
|
|
|
|
`ticketing/escalation/pagination?enablePage=1&size=${size}&page=${page}&title=${title}`
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getTicketingCollaborationPagination(
|
|
|
|
|
page: number,
|
|
|
|
|
size: any,
|
|
|
|
|
title: string = ""
|
|
|
|
|
) {
|
|
|
|
|
return await httpGetInterceptor(
|
|
|
|
|
`ticketing/collaboration/pagination?enablePage=1&size=${size}&page=${page}&title=${title}`
|
2024-12-05 17:02:06 +00:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getCuratorUser() {
|
|
|
|
|
return await httpGetInterceptor("users/collaboration?enablePage=0");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getTicketingPriority() {
|
|
|
|
|
return await httpGetInterceptor("ticketing/priority");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function saveTicketingInternal(data: any) {
|
|
|
|
|
const url = "ticketing/internal";
|
|
|
|
|
return httpPostInterceptor(url, data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function saveTicketing(data: any) {
|
|
|
|
|
const url = "ticketing";
|
|
|
|
|
return httpPostInterceptor(url, data);
|
|
|
|
|
}
|
2024-12-19 17:30:43 +00:00
|
|
|
|
2025-05-19 01:24:48 +00:00
|
|
|
export async function saveTicketReply(data: any) {
|
|
|
|
|
const url = "ticketing/reply";
|
|
|
|
|
return httpPostInterceptor(url, data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function deleteTicket(id: any) {
|
|
|
|
|
const url = `ticketing?id=${id}`;
|
|
|
|
|
return httpDeleteInterceptor(url, id);
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-19 16:40:31 +00:00
|
|
|
export async function deleteTicketInternal(id: number | string) {
|
|
|
|
|
return await httpDeleteInterceptor(`ticketing/internal?id=${id}`);
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-19 19:39:21 +00:00
|
|
|
export async function closeTicket(id: any) {
|
|
|
|
|
const url = `ticketing/close?id=${id}`;
|
|
|
|
|
return httpPostInterceptor(url, id);
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-19 17:30:43 +00:00
|
|
|
export async function getTicketingInternalDetail(id: any) {
|
|
|
|
|
const url = `ticketing/internal?id=${id}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-19 17:30:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getTicketingInternalDiscussion(id: any) {
|
|
|
|
|
const url = `ticketing/internal/discussion?ticketId=${id}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-19 17:30:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function saveTicketInternalReply(data: any) {
|
|
|
|
|
const url = "ticketing/internal/discussion";
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpPostInterceptor(url, data);
|
2024-12-19 17:30:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getTicketingDetail(id: any) {
|
|
|
|
|
const url = `ticketing?id=${id}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-19 17:30:43 +00:00
|
|
|
}
|
2025-01-09 12:28:37 +00:00
|
|
|
|
2025-05-19 01:24:48 +00:00
|
|
|
export async function getTicketingReply(id: any) {
|
|
|
|
|
const url = `ticketing/reply?ticketId=${id}`;
|
|
|
|
|
return httpGetInterceptor(url);
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-09 12:28:37 +00:00
|
|
|
export async function getTicketCollaborationTeams(id: string | number) {
|
|
|
|
|
const url = `ticketing/collaboration/teams?ticketId=${id}`;
|
|
|
|
|
return httpGetInterceptor(url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function saveCollaborationTeams(
|
|
|
|
|
id: string | number,
|
|
|
|
|
userId: string | number
|
|
|
|
|
) {
|
|
|
|
|
const url = `ticketing/collaboration/teams?ticketId=${id}&userId=${userId}`;
|
|
|
|
|
return httpPostInterceptor(url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getCollabDiscussion(id: string | number) {
|
|
|
|
|
const url = `ticketing/collaboration/discussion?ticketId=${id}`;
|
|
|
|
|
return httpGetInterceptor(url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function saveCollabDiscussion(data: any) {
|
|
|
|
|
const url = "ticketing/collaboration/discussion";
|
|
|
|
|
return httpPostInterceptor(url, data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function deleteCollabDiscussion(id: string | number) {
|
|
|
|
|
const url = `ticketing/collaboration/discussion?id=${id}`;
|
|
|
|
|
return httpDeleteInterceptor(url);
|
|
|
|
|
}
|
2025-01-12 12:54:11 +00:00
|
|
|
|
2025-09-12 10:51:33 +00:00
|
|
|
// export async function getQuestionPagination(
|
|
|
|
|
// title = "",
|
|
|
|
|
// page: number,
|
|
|
|
|
// typeId: string,
|
|
|
|
|
// size: string
|
|
|
|
|
// ) {
|
|
|
|
|
// const url = `question/pagination?enablePage=1&size=${size}&title=${title}&page=${page}&typeId=${typeId}`;
|
|
|
|
|
// return httpGetInterceptor(url);
|
|
|
|
|
// }
|
2025-01-12 12:54:11 +00:00
|
|
|
export async function getQuestionPagination(
|
|
|
|
|
title = "",
|
|
|
|
|
page: number,
|
|
|
|
|
typeId: string,
|
2025-09-12 10:51:33 +00:00
|
|
|
size: string,
|
|
|
|
|
reportType?: string
|
2025-01-12 12:54:11 +00:00
|
|
|
) {
|
2025-09-12 10:51:33 +00:00
|
|
|
let url = `question/pagination?enablePage=1&size=${size}&title=${title}&page=${page}&typeId=${typeId}`;
|
|
|
|
|
|
|
|
|
|
if (reportType) {
|
|
|
|
|
url += `&reportType=${reportType}`;
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-12 12:54:11 +00:00
|
|
|
return httpGetInterceptor(url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function deleteQuestion(id: string | number) {
|
|
|
|
|
const url = `/question?id=${id}`;
|
|
|
|
|
return httpDeleteInterceptor(url);
|
|
|
|
|
}
|
2025-01-18 15:13:47 +00:00
|
|
|
|
2025-05-26 00:44:34 +00:00
|
|
|
export async function saveEscalationDiscussion(data: any) {
|
|
|
|
|
const url = "ticketing/escalation/discussion";
|
|
|
|
|
return httpPostInterceptor(url, data);
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-18 15:13:47 +00:00
|
|
|
export async function getEscalationDiscussion(id: any) {
|
|
|
|
|
const url = `ticketing/escalation/discussion?ticketId=${id}`;
|
|
|
|
|
return httpGetInterceptor(url);
|
|
|
|
|
}
|
2025-05-19 19:39:21 +00:00
|
|
|
|
|
|
|
|
export async function getQuestionTicket(id: any) {
|
|
|
|
|
const url = `question?id=${id}`;
|
|
|
|
|
return httpGetInterceptor(url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function saveTicketsQuestion(data: any) {
|
|
|
|
|
const url = "ticketing/convert-question";
|
|
|
|
|
return httpPostInterceptor(url, data);
|
|
|
|
|
}
|
2025-06-12 06:43:42 +00:00
|
|
|
|
|
|
|
|
export async function deleteEscalationDiscussion(id: any) {
|
|
|
|
|
const url = `ticketing/escalation/discussion?id=${id}`;
|
|
|
|
|
return httpDeleteInterceptor(url);
|
|
|
|
|
}
|