feat: Implement product categories, stores, suppliers, and users management features
- Added ProductCategoriesService for handling product category API interactions. - Created components for listing and viewing product categories. - Implemented UI for managing product categories with a data list component. - Developed StoresService for managing store-related API calls. - Created components for listing and viewing stores with appropriate UI. - Added SuppliersService for handling supplier API interactions. - Implemented components for managing suppliers with a data list component. - Developed UsersService for managing user-related API calls. - Created components for listing and viewing users with appropriate UI. - Enhanced not found page with improved layout and navigation options.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { SUPPLIERS_API_ROUTES } from '../constants';
|
||||
import { ISupplierRawResponse, ISupplierRequest, ISupplierResponse } from '../models';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class SuppliersService {
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
private apiRoutes = SUPPLIERS_API_ROUTES;
|
||||
|
||||
getAll(): Observable<ISupplierResponse[]> {
|
||||
return this.http.get<ISupplierRawResponse[]>(this.apiRoutes.list());
|
||||
}
|
||||
|
||||
getSingle(supplierId: string): Observable<ISupplierResponse> {
|
||||
return this.http.get<ISupplierRawResponse>(this.apiRoutes.single(supplierId));
|
||||
}
|
||||
|
||||
create(data: ISupplierRequest): Observable<ISupplierResponse> {
|
||||
return this.http.post<ISupplierRawResponse>(this.apiRoutes.list(), data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user