ticket master

This commit is contained in:
hamid zarghami
2026-07-25 16:36:35 +03:30
parent f53b5d8fe1
commit b60a38e21d
12 changed files with 391 additions and 1 deletions
+26
View File
@@ -3,6 +3,7 @@ import {
AddMessageTicketType,
CreateCategoryType,
CreateTicketAdminType,
CreateTicketMasterType,
} from "../types/TicketTypes";
export const getTickets = async (
@@ -63,3 +64,28 @@ export const createTicket = async (params: CreateTicketAdminType) => {
const { data } = await axios.post(`/tickets/admin`, params);
return data;
};
export const getMasters = async () => {
const { data } = await axios.get(`/tickets/masters`);
return data;
};
export const getMasterById = async (id: string) => {
const { data } = await axios.get(`/tickets/masters/${id}`);
return data;
};
export const createMaster = async (params: CreateTicketMasterType) => {
const { data } = await axios.post(`/tickets/masters`, params);
return data;
};
export const updateMaster = async (id: string, params: CreateTicketMasterType) => {
const { data } = await axios.patch(`/tickets/masters/${id}`, params);
return data;
};
export const deleteMaster = async (id: string) => {
const { data } = await axios.delete(`/tickets/masters/${id}`);
return data;
};