Aw6020 Add my_root
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Peter Bastiani 2024-08-20 10:43:57 +02:00
parent 7544203202
commit f71d0fe256

View File

@ -18,33 +18,37 @@ export class FolderService {
return this.appConfig.getConfig("apiEndPoint"); return this.appConfig.getConfig("apiEndPoint");
} }
getFolder(code: string): Observable<IListItem> { getFolder(code: string): Observable<IListItem> {
return this.httpClient.get<IListItem>(`${this.ApiEndpoint()}/api/v1/folders/${code}`); return this.httpClient.get<IListItem>(`${this.ApiEndpoint()}/api/v1/folders/${code}`);
} }
getMyRoots(): Observable<IListItem[]> { getMyRoot(): Observable<IListItem[]> {
return this.httpClient.get<IListItem[]>(`${this.ApiEndpoint()}/api/v1/folders/my_roots`); return this.httpClient.get<IListItem[]>(`${this.ApiEndpoint()}/api/v1/folders/my_root`);
} }
getFolderParents(code: string): Observable<IListItem[]> { getMyRoots(): Observable<IListItem[]> {
return this.itemService.getBreadcrumbs(code); return this.httpClient.get<IListItem[]>(`${this.ApiEndpoint()}/api/v1/folders/my_roots`);
} }
getChildFolders(code: string): Observable<IListItem[]> { getFolderParents(code: string): Observable<IListItem[]> {
const folderItemTypes = "FOLDER,FTP_FOLDER"; return this.itemService.getBreadcrumbs(code);
return this.itemService.getChildItemList(code, folderItemTypes); }
}
getItems(code: string,skip:number, take:number): Observable<IListItem[]> { getChildFolders(code: string): Observable<IListItem[]> {
return this.itemService.getChildItemList(code, null, null, 1, true, null, null, skip, take); const folderItemTypes = "FOLDER,FTP_FOLDER";
} return this.itemService.getChildItemList(code, folderItemTypes);
}
moveItem(itemCode: string, newParentCode: string): Observable<IListItem> { getItems(code: string,skip:number, take:number): Observable<IListItem[]> {
const body = { itemCode: itemCode,newParentCode: newParentCode }; return this.itemService.getChildItemList(code, null, null, 1, true, null, null, skip, take);
return this.httpClient.post<IListItem>(`${this.ApiEndpoint()}/api/v1/items/move`, body); }
}
createFolder(folder: IItem): Observable<IListItem> { moveItem(itemCode: string, newParentCode: string): Observable<IListItem> {
return this.httpClient.post<IListItem>(`${this.ApiEndpoint()}/api/v1/folders/`, folder); const body = { itemCode: itemCode,newParentCode: newParentCode };
} return this.httpClient.post<IListItem>(`${this.ApiEndpoint()}/api/v1/items/move`, body);
}
createFolder(folder: IItem): Observable<IListItem> {
return this.httpClient.post<IListItem>(`${this.ApiEndpoint()}/api/v1/folders/`, folder);
}
} }