support plan

This commit is contained in:
hamid zarghami
2025-05-05 15:19:44 +03:30
parent 26f8cd85a8
commit 00d46d26b9
10 changed files with 357 additions and 6 deletions
@@ -6,6 +6,11 @@ export const createPlan = async (plan: CreatePlanType) => {
return data;
};
export const updatePlan = async (id: string, plan: CreatePlanType) => {
const { data } = await axios.patch(`/support-plans/${id}`, plan);
return data;
};
export const getPlans = async () => {
const { data } = await axios.get("/support-plans/list");
return data;
@@ -15,3 +20,8 @@ export const getPlanById = async (id: string) => {
const { data } = await axios.get(`/support-plans/${id}`);
return data;
};
export const deletePlan = async (id: string) => {
const { data } = await axios.delete(`/support-plans/${id}`);
return data;
};