19 Commits

Author SHA1 Message Date
jenkins
1bddc28767 [ci skip] Updated packages #2485
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-09-02 12:29:11 +00:00
a999c05631 Aw-6020 Add getItemListCount for paging
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-09-02 14:27:47 +02:00
jenkins
f3252a378d [ci skip] Updated packages #2484
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-08-29 07:38:28 +00:00
4ab1e43d40 Aw-6020 Fix getChildItemListCount
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-08-29 09:37:03 +02:00
jenkins
2719f2fcf4 [ci skip] Updated packages #2483
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-08-20 08:54:40 +00:00
55914bf7d2 Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-08-20 10:51:30 +02:00
26ca9be4e7 Aw6020 Itemtype = optional 2024-08-20 10:51:21 +02:00
0ed342404e Aw6020 Itemtype = optional 2024-08-20 10:47:33 +02:00
jenkins
26ae1c7f06 [ci skip] Updated packages #2482
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-08-20 08:45:26 +00:00
f71d0fe256 Aw6020 Add my_root
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-08-20 10:43:57 +02:00
jenkins
7544203202 [ci skip] Updated packages #2481
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-08-20 08:04:03 +00:00
41a30e0b64 Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-08-20 10:02:37 +02:00
f14fc1a4fc Aw6020 Allow retrieving list items with date filter 2024-08-20 10:02:33 +02:00
jenkins
21ebda4753 [ci skip] Updated packages #2480
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-06-12 13:30:48 +00:00
3a80a6f7f3 Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-06-12 15:29:24 +02:00
71a2ef44e6 AW-6226 Add admin function to post task on behalve of other user 2024-06-12 15:29:15 +02:00
jenkins
1610391d56 [ci skip] Updated packages #2479
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-06-12 10:15:19 +00:00
b778e5726c error TS2307: Cannot find module 'dist/common' or its corresponding type declarations.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-06-12 12:14:05 +02:00
fc4abf9a5b AW-6226 Add admin function to retrieve all users
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2024-06-12 12:11:36 +02:00
7 changed files with 5638 additions and 4027 deletions

View File

@@ -53,7 +53,7 @@ ng serve
```
*Go*`
Point your browser to http://localhost:4200
Point your browser to http://localhost:4200
*ESLint*

9563
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "farmmaps-lib-app",
"version": "4.5.0",
"scripts": {
"version": "4.10.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
@@ -10,7 +10,7 @@
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"dependencies": {
"@angular/animations": "^17.3.3",
"@angular/common": "^17.3.3",
"@angular/compiler": "^17.3.3",
@@ -56,7 +56,7 @@
"util": "^0.12.4",
"zone.js": "~0.14.4"
},
"devDependencies": {
"devDependencies": {
"@angular-builders/custom-webpack": "^17",
"@angular-devkit/build-angular": "^17.3.3",
"@angular/cli": "^17.3.3",
@@ -86,4 +86,4 @@
"ts-node": "^8.8.1",
"typescript": "~5.4.4"
}
}
}

View File

@@ -148,7 +148,7 @@ export class AppCommonEffects {
ofType(appCommonActions.VIEWITEM),
withLatestFrom(this.store$.select(appCommonReducers.selectGetItemTypes)),
switchMap(([action, itemtypes]) => {
const a = action as appCommonActions.EditItem;
const a = action as appCommonActions.ViewItem;
const itemType = itemtypes[a.item.itemType];
const viewer = itemType.viewer;
const editor = itemType.editor;

View File

@@ -1,9 +1,11 @@
import { HttpClient, HttpParams } from "@angular/common/http";
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { IItem } from '../models/item';
import { HttpClient, HttpParams } from "@angular/common/http";
import { IItemTask } from '../models/itemTask';
import { IUser } from '../models/user';
import { AppConfig } from "../shared/app.config";
import {ItemTypeService} from './itemtype.service';
import { ItemTypeService } from './itemtype.service';
@Injectable({
providedIn: 'root',
@@ -42,4 +44,12 @@ export class AdminService {
deleteItem(code: string): Observable<any> {
return this.httpClient.delete<any>(`${this.ApiEndpoint()}/api/v1/admin/${code}`);
}
getAllUsers(): Observable<IUser[]> {
return this.httpClient.get<IUser[]>(`${this.ApiEndpoint()}/api/v1/admin/users`);
}
postItemTask(item: IItem, task: IItemTask): Observable<IItemTask> {
return this.httpClient.post<IItemTask>(`${this.ApiEndpoint()}/api/v1/admin/${item.code}/tasks`, task);
}
}

View File

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

View File

@@ -79,7 +79,9 @@ export class ItemService {
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}/${itemType}`);
}
getItemList(itemType?: string, dataFilter?: any, level?: number, atItemLocationItemCode?: string, indexed?: boolean, validToday?: boolean,tags?:string,crs?:string): Observable<IItem[]> {
getItemList(itemType?: string, dataFilter?: any, level?: number, atItemLocationItemCode?: string,
indexed?: boolean, validToday?: boolean,tags?:string,crs?:string, startDate?: Date, endDate?: Date,
skip?: number, take?: number): Observable<IItem[]> {
let params = new HttpParams();
if(itemType) params = params.append("it", itemType);
if(dataFilter) params = params.append("df", JSON.stringify(dataFilter));
@@ -89,10 +91,22 @@ export class ItemService {
if (validToday) params = params.append("vt", validToday ? "true" : "false");
if (tags) params = params.append("t", tags);
if (crs) params = params.append("crs", crs);
if (startDate) params = params.append("sDate", startDate.toISOString());
if (endDate) params = params.append("eDate", endDate.toISOString());
if(skip) params = params.append("skip", skip);
if(take) params = params.append("take", take);
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/`, { params: params });
}
getItemListCount(itemType: string, startDate?: Date, endDate?: Date): Observable<number> {
let params = new HttpParams();
params = params.append("it", itemType);
if (startDate) params = params.append("sDate", startDate.toISOString());
if (endDate) params = params.append("eDate", endDate.toISOString());
return this.httpClient.get<number>(`${this.ApiEndpoint()}/api/v1/items/count`, { params: params });
}
getChildItemList(parentcode: string, itemType: string, dataFilter?: any, level = 1, deep = true,
getChildItemList(parentcode: string, itemType?: string, dataFilter?: any, level = 1, deep = true,
startDate?: Date, endDate?: Date, skip?: number, take?: number): Observable<IItem[]> {
let params = new HttpParams();
if(itemType != null) {
@@ -111,9 +125,11 @@ export class ItemService {
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params });
}
getChildItemListCount(parentcode: string, itemType: string,dataFilter?: any): Observable<number> {
getChildItemListCount(parentcode: string, itemType?: string,dataFilter?: any): Observable<number> {
let params = new HttpParams();
params = params.append("it", itemType);
if(itemType != null) {
params = params.append("it", itemType);
}
if (dataFilter != null) {
params = params.append("df", JSON.stringify(dataFilter));
}