47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import { title } from "process";
|
|
import { httpGetInterceptor } from "../http-config/http-interceptor-service";
|
|
import { type } from "os";
|
|
import { getAPI, getAPIInterceptor, postAPIInterceptor } from "@/config/api";
|
|
|
|
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}`
|
|
);
|
|
}
|
|
|
|
export async function postSchedule(data: any) {
|
|
const url = "schedule";
|
|
return postAPIInterceptor(url, data);
|
|
}
|
|
|
|
export async function detailSchedule(id: any) {
|
|
const url = `public/schedule?id=${id}`;
|
|
return getAPIInterceptor(url);
|
|
}
|
|
|
|
export async function listScheduleTodayPublic(group = null) {
|
|
const url = `public/schedule/today?group=${group}`;
|
|
return getAPI( url, null );
|
|
}
|
|
|
|
export async function listScheduleNextPublic(group = null) {
|
|
const url = `public/schedule/next-activity?group=${group}`;
|
|
return getAPI( url, null );
|
|
}
|
|
|
|
export async function listSchedulePrevPublic(group = null) {
|
|
const url = `public/schedule/prev-activity?group=${group}`;
|
|
return getAPI( url, null );
|
|
}
|
|
|
|
export async function listSchedule(group = null) {
|
|
const url = `public/schedule/list?group=${group}`;
|
|
return getAPI( url, null );
|
|
}
|
|
|