Compare commits
5 Commits
2024.04
...
3a80a6f7f3
Author | SHA1 | Date | |
---|---|---|---|
3a80a6f7f3 | |||
71a2ef44e6 | |||
|
1610391d56 | ||
b778e5726c | |||
fc4abf9a5b |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -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",
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"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",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
"e2e": "ng e2e"
|
"e2e": "ng e2e"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^17.3.3",
|
"@angular/animations": "^17.3.3",
|
||||||
"@angular/common": "^17.3.3",
|
"@angular/common": "^17.3.3",
|
||||||
"@angular/compiler": "^17.3.3",
|
"@angular/compiler": "^17.3.3",
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
"util": "^0.12.4",
|
"util": "^0.12.4",
|
||||||
"zone.js": "~0.14.4"
|
"zone.js": "~0.14.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-builders/custom-webpack": "^17",
|
"@angular-builders/custom-webpack": "^17",
|
||||||
"@angular-devkit/build-angular": "^17.3.3",
|
"@angular-devkit/build-angular": "^17.3.3",
|
||||||
"@angular/cli": "^17.3.3",
|
"@angular/cli": "^17.3.3",
|
||||||
|
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user