penambahan room list

This commit is contained in:
2024-05-31 10:42:23 +07:00
parent 6a9451c2b5
commit b2c1020c22
10 changed files with 146 additions and 36 deletions

View File

@@ -81,7 +81,7 @@ export class BuildingService {
return this.http.get<any>(url, { headers });
}
getMasterData(page: number = 1, limit: number = 10): Observable<any> {
getMasterData(page: number = 1, limit: number = 100): Observable<any> {
const url = `https://kapi.absys.ninja/hemat/header-param?page=${page}&limit=${limit}`;
const headers = new HttpHeaders({
'Content-Type': 'application/json',
@@ -99,6 +99,15 @@ export class BuildingService {
return this.http.get<any>(url, { headers });
}
getListRoomData(): Observable<any> {
const url = `https://kapi.absys.ninja/hemat/room/list`;
const headers = new HttpHeaders({
'Content-Type': 'application/json',
'x-api-key': 'j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT'
});
return this.http.get<any>(url, { headers });
}
getMasterRoomData(page: number = 1, limit: number = 100): Observable<any> {
const url = `https://kapi.absys.ninja/hemat/room?page=${page}&limit=${limit}`;
const headers = new HttpHeaders({
@@ -151,6 +160,15 @@ export class BuildingService {
return this.http.put<any>(url, data, { headers });
}
deleteMasterBuildingParam(id: any): Observable<any> {
const url = `https://kapi.absys.ninja/hemat/building/${id}`;
const headers = new HttpHeaders({
'Content-Type': 'application/json',
'x-api-key': 'j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT'
});
return this.http.delete<any>(url, { headers });
}
postMasterRoomParam(data: any): Observable<any> {
const url = `https://kapi.absys.ninja/hemat/room`;
const headers = new HttpHeaders({
@@ -167,4 +185,13 @@ export class BuildingService {
});
return this.http.put<any>(url, data, { headers });
}
postBatchBuilding(data: any): Observable<any> {
const url = `https://kapi.absys.ninja/hemat/room-building/post-batch/room`;
const headers = new HttpHeaders({
'Content-Type': 'application/json',
'x-api-key': 'j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT'
});
return this.http.post<any>(url, data, { headers });
}
}