upd: report divisi

Deskripsi:
- report semua divisi
- report 1 divisi

No Issues
This commit is contained in:
amel
2024-09-03 14:15:14 +08:00
parent 309f0f17e0
commit a4b2cf64c5
9 changed files with 525 additions and 230 deletions

View File

@@ -77,4 +77,9 @@ export const funAddDivisionMember = async (path: string, data: IFormMemberDivisi
export const funGetListDivisionByIdDivision = async (path: string) => {
const response = await fetch(`/api/division/more${path}`);
return await response.json().catch(() => null);
}
export const funGetReportDivision = async (path?: string) => {
const response = await fetch(`/api/division/report${(path) ? path : ''}`, { next: { tags: ['discussion'] } });
return await response.json().catch(() => null);
}

View File

@@ -57,4 +57,18 @@ export interface IDataMemberDivision {
isLeader: string,
name: string,
img: string
}
export interface IDataReportDivision{
id: string
idDivision: string
title: string
desc: string
status: number
timeStart: string
timeEnd: string
dateStart: string
dateEnd: string
createdAt: string
user_name: string
}