5 Commits

Author SHA1 Message Date
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
3 changed files with 18 additions and 8 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "farmmaps-lib-app", "name": "farmmaps-lib-app",
"version": "4.5.0", "version": "4.8.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "farmmaps-lib-app", "name": "farmmaps-lib-app",
"version": "4.5.0", "version": "4.8.0",
"dependencies": { "dependencies": {
"@angular-eslint/eslint-plugin": "^15.2.1", "@angular-eslint/eslint-plugin": "^15.2.1",
"@angular/animations": "^17.3.3", "@angular/animations": "^17.3.3",

View File

@@ -1,6 +1,6 @@
{ {
"name": "farmmaps-lib-app", "name": "farmmaps-lib-app",
"version": "4.5.0", "version": "4.8.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",

View File

@@ -1,9 +1,11 @@
import { HttpClient, HttpParams } from "@angular/common/http";
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { IItem } from '../models/item'; 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 { AppConfig } from "../shared/app.config";
import {ItemTypeService} from './itemtype.service'; import { ItemTypeService } from './itemtype.service';
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root',
@@ -42,4 +44,12 @@ export class AdminService {
deleteItem(code: string): Observable<any> { deleteItem(code: string): Observable<any> {
return this.httpClient.delete<any>(`${this.ApiEndpoint()}/api/v1/admin/${code}`); 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);
}
} }