upd : kalender divisi

Deskripsi:
0 tambah data
- edit data kalender divisi
- nb : bllm selesai

No Issues
This commit is contained in:
2025-07-17 17:48:02 +08:00
parent cf3b2090ea
commit 85f80746a3
11 changed files with 501 additions and 58 deletions

View File

@@ -2,8 +2,8 @@ import axios from 'axios';
const api = axios.create({
// baseURL: 'http://10.0.2.2:3000/api',
baseURL: 'https://stg-darmasaba.wibudev.com/api',
// baseURL: 'http://192.168.1.126:3000/api',
// baseURL: 'https://stg-darmasaba.wibudev.com/api',
baseURL: 'http://192.168.1.126:3000/api',
});
export const apiCheckPhoneLogin = async (body: { phone: string }) => {
@@ -487,6 +487,16 @@ export const apiGetCalendarHistory = async ({ user, search, division, page }: {
return response.data;
};
export const apiCreateCalendar = async ({ data }: { data: { idDivision: string, title: string, desc: string, timeStart: string, timeEnd: string, dateStart: string, repeatEventTyper: string, repeatValue: string, linkMeet: string, member: any[], user: string } }) => {
const response = await api.post(`/mobile/calendar`, data)
return response.data;
};
export const apiUpdateCalendar = async ({ data, id }: { data: { title: string, desc: string, timeStart: string, timeEnd: string, dateStart: string, repeatEventTyper: string, repeatValue: number, linkMeet: string, user: string }, id: string }) => {
const response = await api.put(`/mobile/calendar/${id}`, data)
return response.data;
};
export const apiGetTask = async ({ user, status, search, division, page }: { user: string, status: string, search: string, division: string, page?: number }) => {
const response = await api.get(`mobile/task?user=${user}&status=${status}&division=${division}&search=${search}&page=${page}`);
return response.data;