2025-01-01 17:48:57 +00:00
|
|
|
import { httpGetInterceptor, httpPostInterceptor } from "../http-config/http-interceptor-service";
|
|
|
|
|
|
2024-12-12 13:04:27 +00:00
|
|
|
|
|
|
|
|
export async function getAgendaSettingsById(id: any) {
|
|
|
|
|
const url = `agenda-settings?id=${id}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-12 13:04:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getAgendaSettingsList(year = "", month = "", type = "") {
|
|
|
|
|
const url = `agenda-settings/list?year=${year}&month=${month}&type=${type}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-12 13:04:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function saveAgendaSettings(data: any) {
|
|
|
|
|
const url = `agenda-settings`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpPostInterceptor(url, data);
|
2024-12-12 13:04:27 +00:00
|
|
|
}
|
2024-12-24 18:17:21 +00:00
|
|
|
|
|
|
|
|
export async function getPlanningDailyByTypeId(
|
|
|
|
|
page: number,
|
|
|
|
|
size = 10,
|
|
|
|
|
parentId: any,
|
|
|
|
|
date: string,
|
|
|
|
|
typeId: number
|
|
|
|
|
) {
|
2024-12-30 13:23:15 +00:00
|
|
|
const url = `planning/pagination/daily?enablePage=1&time=1&size=${size}&page=${page}&date=${date}&typeId=${typeId}${
|
2024-12-24 18:17:21 +00:00
|
|
|
parentId ? `&parentId=${parentId}` : ""
|
|
|
|
|
}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-24 18:17:21 +00:00
|
|
|
}
|
|
|
|
|
|
2024-12-27 15:13:21 +00:00
|
|
|
export async function getMonthlyPlanList(dates: any, typeId: number) {
|
2024-12-24 18:17:21 +00:00
|
|
|
const url = `planning/monthly/list?date=${dates}&typeId=${typeId}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-24 18:17:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getWeeklyPlanList(
|
|
|
|
|
dates: number | undefined,
|
|
|
|
|
typeId: number,
|
|
|
|
|
isMonthly = false
|
|
|
|
|
) {
|
|
|
|
|
const url = `planning/weekly/list?date=${dates}&typeId=${typeId}&isMonthly=${isMonthly}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-24 18:17:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getWeeklyPlanListByParentId(id: string, typeId: number) {
|
|
|
|
|
const url = `planning/weekly/list?parentId=${id}&typeId=${typeId}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-24 18:17:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getPlanningPagination(
|
|
|
|
|
page: number,
|
|
|
|
|
title = "",
|
|
|
|
|
size = 10,
|
|
|
|
|
typeId: number,
|
|
|
|
|
time: number,
|
|
|
|
|
parentId = ""
|
|
|
|
|
) {
|
|
|
|
|
const url = `planning/pagination?enablePage=1&size=${size}&page=${page}&title=${title}&typeId=${typeId}&time=${time}&parentId=${parentId}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-24 18:17:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function savePlanning(data: any) {
|
|
|
|
|
const url = "planning";
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpPostInterceptor(url, data);
|
2024-12-24 18:17:21 +00:00
|
|
|
}
|
2024-12-26 12:52:20 +00:00
|
|
|
|
|
|
|
|
export async function getPlanningMonthlyPerSocmed(
|
|
|
|
|
month = "",
|
|
|
|
|
year = "",
|
|
|
|
|
typeId: number,
|
|
|
|
|
parentId = ""
|
|
|
|
|
) {
|
|
|
|
|
const url = `planning/socmed/monthly?month=${month}&year=${year}&typeId=${typeId}&parentId=${parentId}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-26 12:52:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getPlanningDailyMedsosByPlatform(
|
|
|
|
|
page: string,
|
|
|
|
|
size = 10,
|
|
|
|
|
date: string,
|
|
|
|
|
platformTypeId: string
|
|
|
|
|
) {
|
|
|
|
|
const url = `planning/pagination/daily?enablePage=1&size=${size}&page=${page}&date=${date}&typeId=2&platformTypeId=${platformTypeId}`;
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-26 12:52:20 +00:00
|
|
|
}
|