category ticket and group user and ...

This commit is contained in:
hamid zarghami
2025-03-01 16:41:20 +03:30
parent cfd4284cd8
commit 0cf7dede8b
14 changed files with 430 additions and 58 deletions
+11 -1
View File
@@ -1,5 +1,5 @@
import axios from "../../../config/axios";
import { AddMessageTicketType } from "../types/TicketTypes";
import { AddMessageTicketType, CreateCategoryType } from "../types/TicketTypes";
export const getTickets = async (status: string) => {
const { data } = await axios.get(`/tickets/admin?status=${status}`);
@@ -23,3 +23,13 @@ export const closeTicket = async (id: string) => {
const { data } = await axios.post(`/tickets/${id}/close`);
return data;
};
export const createCategory = async (params: CreateCategoryType) => {
const { data } = await axios.post(`/tickets/category`, params);
return data;
};
export const getCategories = async () => {
const { data } = await axios.get(`/tickets/categories`);
return data;
};