Chore: Changed the account_type and voucher_type enum.
The account type enum is not stored in the database as an enum. The voucher_type enum is now a table in the database. Feature: Closing stock can now be saved and in each department.
This commit is contained in:
@ -10,7 +10,7 @@ import { ProductService } from './product.service';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ProductResolver implements Resolve<Product> {
|
||||
constructor(private ser: ProductService, private router: Router) {}
|
||||
constructor(private ser: ProductService) {}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<Product> {
|
||||
const id = route.paramMap.get('id');
|
||||
|
||||
@ -53,6 +53,7 @@ export class ProductService {
|
||||
|
||||
autocomplete(
|
||||
query: string,
|
||||
isPurchased: boolean | null,
|
||||
extended: boolean = false,
|
||||
skus: boolean = true,
|
||||
date?: string,
|
||||
@ -61,6 +62,9 @@ export class ProductService {
|
||||
const options = {
|
||||
params: new HttpParams().set('q', query).set('e', extended.toString()).set('s', skus),
|
||||
};
|
||||
if (isPurchased !== null) {
|
||||
options.params = options.params.set('p', isPurchased.toString());
|
||||
}
|
||||
if (!!vendorId && !!date) {
|
||||
options.params = options.params.set('v', vendorId as string).set('d', date as string);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user