mediahub-fe/service/schedule/schedule.ts

68 lines
1.8 KiB
TypeScript
Raw Normal View History

2025-01-18 15:13:47 +00:00
import {
httpGetInterceptor,
httpPostInterceptor,
} from "../http-config/http-interceptor-service";
2025-01-01 17:48:57 +00:00
import { httpGet } from "../http-config/http-base-service";
2025-01-15 15:59:19 +00:00
import { any } from "zod";
export async function paginationSchedule(
2025-04-03 15:43:04 +00:00
size: any,
page: number,
type: any,
title: string = ""
) {
return await httpGetInterceptor(
`schedule/pagination?enablePage=1&scheduleTypeId=${type}&page=${page}&size=${size}&title=${title}`
);
}
export async function postSchedule(data: any) {
const url = "schedule";
2025-01-01 17:48:57 +00:00
return httpPostInterceptor(url, data);
}
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-13 14:33:59 +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);
}
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);
}
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);
}
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);
}
2024-12-13 14:33:59 +00:00
2025-01-15 15:59:19 +00:00
export async function searchSchedules(search = null) {
const url = `public/schedule/list?search=${search}`;
return httpGet(url, null);
}
2025-01-18 15:13:47 +00:00
export async function listScheduleToday() {
const url = "schedule/today";
return httpGetInterceptor(url);
}
export async function getListScheduleAttachment(scheduleId: any) {
const url = `media/list?&enablePage=0&scheduleId=${scheduleId}`;
return httpGetInterceptor(url);
}
2025-01-18 15:13:47 +00:00
export async function listScheduleNext() {
const url = "schedule/next-activity";
return httpGetInterceptor(url);
}