change list invoce and tickets + pwa + ...

This commit is contained in:
hamid zarghami
2025-03-05 16:44:11 +03:30
parent 0084aefae4
commit b346481267
19 changed files with 8624 additions and 188 deletions
+5 -5
View File
@@ -2,11 +2,11 @@ import axios from "../../../config/axios";
import { AddMessageTicketType, CreateCategoryType } from "../types/TicketTypes";
export const getTickets = async (status: string, customerId?: string) => {
let query = `/tickets/admin?status=${status}`;
if (customerId) {
query += `&userId=${customerId}`;
}
const { data } = await axios.get(query);
const params = new URLSearchParams();
if (status) params.append("status", status);
if (customerId) params.append("userId", customerId);
const query = params.toString();
const { data } = await axios.get(`/tickets/admin?${query}`);
return data;
};