2025-01-01 17:48:57 +00:00
|
|
|
import { httpGetInterceptor, httpPostInterceptor } from "../http-config/http-interceptor-service";
|
|
|
|
|
import { httpGet } from "../http-config/http-base-service";
|
2025-01-15 15:59:19 +00:00
|
|
|
import { any } from "zod";
|
2024-12-08 19:23:05 +00:00
|
|
|
|
2025-01-15 15:59:19 +00:00
|
|
|
export async function paginationSchedule(size: number, page: number, type: any, title: string = "") {
|
|
|
|
|
return await httpGetInterceptor(`schedule/pagination?enablePage=1&scheduleTypeId=${type}&page=${page}&size=${size}&title=${title}`);
|
2024-12-08 19:23:05 +00:00
|
|
|
}
|
2024-12-12 13:04:27 +00:00
|
|
|
|
|
|
|
|
export async function postSchedule(data: any) {
|
|
|
|
|
const url = "schedule";
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpPostInterceptor(url, data);
|
2024-12-12 13:04:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function detailSchedule(id: any) {
|
|
|
|
|
const url = `public/schedule?id=${id}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-12 13:04:27 +00:00
|
|
|
}
|
2024-12-13 14:33:59 +00:00
|
|
|
|
2024-12-16 15:50:19 +00:00
|
|
|
export async function listScheduleTodayPublic(group = null) {
|
|
|
|
|
const url = `public/schedule/today?group=${group}`;
|
2025-01-15 15:59:19 +00:00
|
|
|
return httpGet(url, null);
|
2024-12-16 15:50:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function listScheduleNextPublic(group = null) {
|
|
|
|
|
const url = `public/schedule/next-activity?group=${group}`;
|
2025-01-15 15:59:19 +00:00
|
|
|
return httpGet(url, null);
|
2024-12-16 15:50:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function listSchedulePrevPublic(group = null) {
|
|
|
|
|
const url = `public/schedule/prev-activity?group=${group}`;
|
2025-01-15 15:59:19 +00:00
|
|
|
return httpGet(url, null);
|
2024-12-16 15:50:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function listSchedule(group = null) {
|
|
|
|
|
const url = `public/schedule/list?group=${group}`;
|
2025-01-15 15:59:19 +00:00
|
|
|
return httpGet(url, null);
|
|
|
|
|
}
|
|
|
|
|
export async function searchSchedules(search = null) {
|
|
|
|
|
const url = `public/schedule/list?search=${search}`;
|
|
|
|
|
return httpGet(url, null);
|
2024-12-16 15:50:19 +00:00
|
|
|
}
|