techlify-inventory-common 18.27.0 → 18.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/esm2022/lib/inventory-common/location/location-form/location-form.component.mjs +19 -40
  2. package/esm2022/lib/inventory-common/location/location-form-button/location-form-button.component.mjs +13 -4
  3. package/esm2022/lib/inventory-common/location/location-list/location-list.component.mjs +34 -77
  4. package/esm2022/lib/inventory-common/location/location-selector/location-selector.component.mjs +159 -0
  5. package/esm2022/lib/inventory-common/location/location-status-changer/location-status-changer.component.mjs +3 -3
  6. package/esm2022/lib/inventory-common/product/product-form-button/product-form-button.component.mjs +4 -4
  7. package/esm2022/lib/inventory-common/product/product-list/product-list.component.mjs +16 -17
  8. package/esm2022/lib/inventory-common/product/product-view-page/product-view-page.component.mjs +5 -4
  9. package/esm2022/lib/inventory-common/product/product.module.mjs +11 -5
  10. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-list/stock-issue-list.component.mjs +2 -1
  11. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.mjs +4 -3
  12. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.module.mjs +8 -4
  13. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.mjs +2 -1
  14. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-listing/purchase-order-listing.component.mjs +63 -0
  15. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order.service.mjs +20 -0
  16. package/esm2022/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.mjs +2 -2
  17. package/esm2022/lib/inventory-common/supplier/supplier-information/supplier-information.component.mjs +2 -2
  18. package/esm2022/lib/inventory-common/supplier/supplier-routing.module.mjs +6 -1
  19. package/esm2022/lib/inventory-common/supplier/supplier.service.mjs +4 -45
  20. package/esm2022/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.mjs +33 -107
  21. package/fesm2022/{techlify-inventory-common-category.module-S6Val92n.mjs → techlify-inventory-common-category.module-BT3uLLqI.mjs} +9 -9
  22. package/fesm2022/techlify-inventory-common-category.module-BT3uLLqI.mjs.map +1 -0
  23. package/fesm2022/{techlify-inventory-common-measure.module-BhHMV-wL.mjs → techlify-inventory-common-measure.module-s9xhNWZM.mjs} +7 -7
  24. package/fesm2022/{techlify-inventory-common-measure.module-BhHMV-wL.mjs.map → techlify-inventory-common-measure.module-s9xhNWZM.mjs.map} +1 -1
  25. package/fesm2022/{techlify-inventory-common-stock-issue-view.component-CltIudzA.mjs → techlify-inventory-common-stock-issue-view.component-CNrY99hf.mjs} +2 -2
  26. package/fesm2022/{techlify-inventory-common-stock-issue-view.component-CltIudzA.mjs.map → techlify-inventory-common-stock-issue-view.component-CNrY99hf.mjs.map} +1 -1
  27. package/fesm2022/{techlify-inventory-common-techlify-inventory-common-f9URc8HX.mjs → techlify-inventory-common-techlify-inventory-common-DRw7na0D.mjs} +531 -476
  28. package/fesm2022/techlify-inventory-common-techlify-inventory-common-DRw7na0D.mjs.map +1 -0
  29. package/fesm2022/techlify-inventory-common.mjs +1 -1
  30. package/lib/inventory-common/location/location-form/location-form.component.d.ts +3 -3
  31. package/lib/inventory-common/location/location-list/location-list.component.d.ts +6 -7
  32. package/lib/inventory-common/location/location-selector/location-selector.component.d.ts +43 -0
  33. package/lib/inventory-common/product/product.module.d.ts +1 -1
  34. package/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.module.d.ts +2 -1
  35. package/lib/inventory-common/supplier/purchase-order/purchase-order-listing/purchase-order-listing.component.d.ts +16 -0
  36. package/lib/inventory-common/supplier/purchase-order/purchase-order.service.d.ts +8 -0
  37. package/lib/inventory-common/supplier/supplier.service.d.ts +2 -33
  38. package/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.d.ts +4 -18
  39. package/package.json +1 -1
  40. package/fesm2022/techlify-inventory-common-category.module-S6Val92n.mjs.map +0 -1
  41. package/fesm2022/techlify-inventory-common-techlify-inventory-common-f9URc8HX.mjs.map +0 -1
@@ -1,31 +1,31 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, Input, Inject, forwardRef, EventEmitter, Output, ViewChild, NgModule } from '@angular/core';
2
+ import { Injectable, Component, Input, Inject, forwardRef, NgModule, input, signal, EventEmitter, Output, ViewChild } from '@angular/core';
3
3
  import * as i2 from '@angular/router';
4
4
  import { RouterLink, RouterModule, RouterLinkActive } from '@angular/router';
5
5
  import moment from 'moment';
6
6
  import * as i1 from 'ngx-techlify-core';
7
7
  import { TechlifyServiceBaseClass, TechlifyListingControllerInterface, TechlifyFormComponentInterface, SearchableSelectorModule, AuthenticationGuard, TechlifyFeatureModule, ImportCsvModule, TimelineFilterModule, MaterialModule as MaterialModule$1, ColumnSelectorModule, EntityFilesViewAllModule, NoteModule, TechlifyIconModule, ActionPopupComponent, AuditLogForModelModule } from 'ngx-techlify-core';
8
- import * as i3$1 from '@angular/material/icon';
8
+ import * as i11$1 from '@angular/material/icon';
9
9
  import { MatIconModule, MatIcon } from '@angular/material/icon';
10
10
  import * as i4 from '@angular/material/card';
11
11
  import { MatCard, MatCardContent, MatCardModule } from '@angular/material/card';
12
12
  import * as i3 from '@angular/common';
13
13
  import { NgIf, CommonModule, NgForOf, CurrencyPipe, DatePipe } from '@angular/common';
14
- import * as i7 from '@angular/material/table';
14
+ import * as i11 from '@angular/material/table';
15
15
  import { MatTableDataSource, MatTableModule, MatCell, MatCellDef, MatColumnDef, MatHeaderCell, MatHeaderRow, MatTable, MatHeaderCellDef, MatHeaderRowDef, MatRowDef, MatRow, MatFooterCell, MatFooterRow, MatFooterRowDef, MatFooterCellDef } from '@angular/material/table';
16
16
  import * as i9 from '@angular/material/progress-bar';
17
17
  import { MatProgressBar, MatProgressBarModule } from '@angular/material/progress-bar';
18
- import * as i11 from 'ngx-infinite-scroll';
18
+ import * as i14 from 'ngx-infinite-scroll';
19
19
  import { InfiniteScrollDirective, InfiniteScrollModule } from 'ngx-infinite-scroll';
20
20
  import * as i2$1 from 'angular-google-charts';
21
21
  import { ChartType, GoogleChartsModule } from 'angular-google-charts';
22
- import * as i8 from '@angular/material/form-field';
22
+ import * as i6 from '@angular/material/form-field';
23
23
  import { MatFormFieldModule, MatFormField, MatLabel, MatSuffix, MatError, MatHint } from '@angular/material/form-field';
24
24
  import * as i9$1 from '@angular/material/input';
25
25
  import { MatInputModule, MatInput } from '@angular/material/input';
26
26
  import * as i2$2 from '@angular/forms';
27
- import { Validators, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule, FormControl } from '@angular/forms';
28
- import { BehaviorSubject, lastValueFrom, debounceTime as debounceTime$1, distinctUntilChanged } from 'rxjs';
27
+ import { Validators, NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
28
+ import { BehaviorSubject, lastValueFrom, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1 } from 'rxjs';
29
29
  import * as i13 from '@angular/material/sort';
30
30
  import { MatSortModule, MatSortHeader, MatSort } from '@angular/material/sort';
31
31
  import * as i2$3 from '@angular/material/tooltip';
@@ -34,27 +34,25 @@ import { __decorate } from 'tslib';
34
34
  import * as i1$1 from '@angular/material/dialog';
35
35
  import { MAT_DIALOG_DATA, MatDialogModule, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog';
36
36
  import * as i4$1 from 'ngx-spinner';
37
- import * as i7$1 from '@angular/material/button';
37
+ import * as i7 from '@angular/material/button';
38
38
  import { MatButtonModule, MatButton } from '@angular/material/button';
39
39
  import * as i10 from '@angular/flex-layout';
40
40
  import { FlexLayoutModule, FlexModule } from '@angular/flex-layout';
41
- import { debounceTime, map } from 'rxjs/operators';
41
+ import { debounceTime, map, distinctUntilChanged } from 'rxjs/operators';
42
42
  import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
43
- import * as i11$1 from '@angular/material/core';
43
+ import * as i11$2 from '@angular/material/core';
44
44
  import { MatCommonModule, MatLineModule, MatNativeDateModule, MatOptionModule, MatPseudoCheckboxModule, MatRippleModule } from '@angular/material/core';
45
45
  import * as i12 from '@angular/material/select';
46
46
  import { MatSelectModule } from '@angular/material/select';
47
47
  import { SelectionModel } from '@angular/cdk/collections';
48
- import { HttpParams } from '@angular/common/http';
49
48
  import * as i9$2 from '@angular/material/datepicker';
50
49
  import { MatDatepickerModule, MatDatepickerInput, MatDatepickerToggle, MatDatepicker } from '@angular/material/datepicker';
51
- import * as i10$1 from '@angular/material/checkbox';
52
- import { MatCheckboxModule } from '@angular/material/checkbox';
53
- import * as XLSX from 'xlsx';
54
50
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
55
51
  import { MatBadgeModule } from '@angular/material/badge';
56
52
  import * as i12$1 from '@angular/material/button-toggle';
57
53
  import { MatButtonToggleModule } from '@angular/material/button-toggle';
54
+ import * as i10$1 from '@angular/material/checkbox';
55
+ import { MatCheckboxModule } from '@angular/material/checkbox';
58
56
  import { MatChipsModule } from '@angular/material/chips';
59
57
  import * as i5 from '@angular/material/divider';
60
58
  import { MatDividerModule, MatDivider } from '@angular/material/divider';
@@ -70,10 +68,11 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
70
68
  import { MatSliderModule } from '@angular/material/slider';
71
69
  import { MatSnackBarModule } from '@angular/material/snack-bar';
72
70
  import { MatStepperModule } from '@angular/material/stepper';
73
- import * as i6 from '@angular/material/tabs';
71
+ import * as i6$1 from '@angular/material/tabs';
74
72
  import { MatTabsModule } from '@angular/material/tabs';
75
73
  import { MatToolbarModule } from '@angular/material/toolbar';
76
74
  import { MatTreeModule } from '@angular/material/tree';
75
+ import * as XLSX from 'xlsx';
77
76
  import moment$1 from 'moment/moment';
78
77
  import * as i5$1 from 'ngx-permissions';
79
78
  import { NgxPermissionsModule } from 'ngx-permissions';
@@ -140,7 +139,7 @@ class LowStockProductsWidgetComponent extends TechlifyListingControllerInterface
140
139
  });
141
140
  }
142
141
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LowStockProductsWidgetComponent, deps: [{ token: ProductService }], target: i0.ɵɵFactoryTarget.Component });
143
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LowStockProductsWidgetComponent, selector: "app-low-stock-products-widget", usesInheritance: true, ngImport: i0, template: "<mat-card style=\"max-height: 460px; overflow: auto\">\n <mat-card-content>\n <h3>Low Stock Products</h3>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"Product\">\n <th mat-header-cell *matHeaderCellDef>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Stock Column -->\n <ng-container matColumnDef=\"Stock\">\n <th mat-header-cell *matHeaderCellDef>Stock</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.current_stock }}</td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"Reorder Point\">\n <th mat-header-cell *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.reorder_point }}</td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], preserveWhitespaces: true });
142
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LowStockProductsWidgetComponent, selector: "app-low-stock-products-widget", usesInheritance: true, ngImport: i0, template: "<mat-card style=\"max-height: 460px; overflow: auto\">\n <mat-card-content>\n <h3>Low Stock Products</h3>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"Product\">\n <th mat-header-cell *matHeaderCellDef>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Stock Column -->\n <ng-container matColumnDef=\"Stock\">\n <th mat-header-cell *matHeaderCellDef>Stock</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.current_stock }}</td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"Reorder Point\">\n <th mat-header-cell *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.reorder_point }}</td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i14.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], preserveWhitespaces: true });
144
143
  }
145
144
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LowStockProductsWidgetComponent, decorators: [{
146
145
  type: Component,
@@ -287,7 +286,7 @@ class ProductMeasureFormComponent {
287
286
  return this.formValidatorService.getErrorMessage(field, this.productMeasureForm, errorMessages$1);
288
287
  }
289
288
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductMeasureFormComponent, deps: [{ token: MeasureService }, { token: i2$2.FormBuilder }, { token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i4$1.NgxSpinnerService }, { token: i1.FormValidatorService }, { token: i1.ErrorHandlerService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
290
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductMeasureFormComponent, selector: "app-product-measure-form", ngImport: i0, template: "<div>\n <form [formGroup]=\"productMeasureForm\" (ngSubmit)=\"save()\">\n <h3 class=\"text-center\">Create/Update Product Measure</h3>\n <div fxLayout=\"column\">\n <div fxLayout=\"column\">\n <mat-form-field>\n <input matInput placeholder=\"Title\" formControlName=\"title\" required />\n <mat-error *ngIf=\"isFieldValid('title')\">{{ getErrorMessage('title') }} </mat-error>\n </mat-form-field>\n <mat-form-field>\n <input matInput placeholder=\"Description\" formControlName=\"description\" required />\n <mat-error *ngIf=\"isFieldValid('description')\">{{ getErrorMessage('description') }} </mat-error>\n </mat-form-field>\n <div fxFlex=\"100%\" fxLayout fxLayoutGap=\"1rem\">\n <button mat-button class=\"mt-2\" type=\"button\" (click)=\"dialogRef.close()\">Cancel</button>\n <button mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">Save</button>\n </div>\n </div>\n </div>\n </form>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
289
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductMeasureFormComponent, selector: "app-product-measure-form", ngImport: i0, template: "<div>\n <form [formGroup]=\"productMeasureForm\" (ngSubmit)=\"save()\">\n <h3 class=\"text-center\">Create/Update Product Measure</h3>\n <div fxLayout=\"column\">\n <div fxLayout=\"column\">\n <mat-form-field>\n <input matInput placeholder=\"Title\" formControlName=\"title\" required />\n <mat-error *ngIf=\"isFieldValid('title')\">{{ getErrorMessage('title') }} </mat-error>\n </mat-form-field>\n <mat-form-field>\n <input matInput placeholder=\"Description\" formControlName=\"description\" required />\n <mat-error *ngIf=\"isFieldValid('description')\">{{ getErrorMessage('description') }} </mat-error>\n </mat-form-field>\n <div fxFlex=\"100%\" fxLayout fxLayoutGap=\"1rem\">\n <button mat-button class=\"mt-2\" type=\"button\" (click)=\"dialogRef.close()\">Cancel</button>\n <button mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">Save</button>\n </div>\n </div>\n </div>\n </form>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
291
290
  }
292
291
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductMeasureFormComponent, decorators: [{
293
292
  type: Component,
@@ -408,7 +407,7 @@ let ProductMeasuresListComponent = class ProductMeasuresListComponent {
408
407
  //Add 'implements OnDestroy' to the class.
409
408
  }
410
409
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductMeasuresListComponent, deps: [{ token: i2$2.FormBuilder }, { token: i1$1.MatDialog }, { token: i1.FilterService }, { token: i2.ActivatedRoute }, { token: MeasureService }], target: i0.ɵɵFactoryTarget.Component });
411
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductMeasuresListComponent, selector: "app-product-measure-list", ngImport: i0, template: "<div fxLayout=\"column\">\n <div class=\"text-center\" fxLayoutAlign=\"center center\">\n <h3 fxLayout>\n <span class=\"mt-1\"> Product Measures </span>\n <button mat-raised-button class=\"ml-2\" color=\"primary\" (click)=\"modifyProductMeasure()\">\n <mat-icon>add</mat-icon>\n Product Measure\n </button>\n </h3>\n </div>\n\n <div fxLayout>\n <form [formGroup]=\"filterFormGroup\" fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field>\n <input matInput placeholder=\"Item Name, Description, etc.\" formControlName=\"search\" />\n </mat-form-field>\n </form>\n\n <mat-form-field class=\"ml-2\" fxFlex=\"0 1 calc(11.11% - 0.5rem)\">\n <mat-label>Columns</mat-label>\n <mat-select [(ngModel)]=\"displayedColumns\" multiple name=\"column\">\n <mat-option *ngFor=\"let column of columnDefinitions\" [value]=\"column.def\" [disabled]=\"!column.isShow\">\n {{ column?.def }}</mat-option\n >\n </mat-select>\n </mat-form-field>\n </div>\n\n <table\n mat-table\n #table\n [dataSource]=\"dataSource\"\n class=\"mat-elevation-z8 w-100 mt-4 table-hover\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n infiniteScrollContainer=\"mat-sidenav-content\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n matSortDisableClear=\"true\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"Title\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.title }}</td>\n </ng-container>\n\n <!-- Description Column -->\n <ng-container matColumnDef=\"Description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary\" fxLayoutGap=\"1rem\">\n <button mat-icon-button (click)=\"modifyProductMeasure(element)\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], preserveWhitespaces: true });
410
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductMeasuresListComponent, selector: "app-product-measure-list", ngImport: i0, template: "<div fxLayout=\"column\">\n <div class=\"text-center\" fxLayoutAlign=\"center center\">\n <h3 fxLayout>\n <span class=\"mt-1\"> Product Measures </span>\n <button mat-raised-button class=\"ml-2\" color=\"primary\" (click)=\"modifyProductMeasure()\">\n <mat-icon>add</mat-icon>\n Product Measure\n </button>\n </h3>\n </div>\n\n <div fxLayout>\n <form [formGroup]=\"filterFormGroup\" fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field>\n <input matInput placeholder=\"Item Name, Description, etc.\" formControlName=\"search\" />\n </mat-form-field>\n </form>\n\n <mat-form-field class=\"ml-2\" fxFlex=\"0 1 calc(11.11% - 0.5rem)\">\n <mat-label>Columns</mat-label>\n <mat-select [(ngModel)]=\"displayedColumns\" multiple name=\"column\">\n <mat-option *ngFor=\"let column of columnDefinitions\" [value]=\"column.def\" [disabled]=\"!column.isShow\">\n {{ column?.def }}</mat-option\n >\n </mat-select>\n </mat-form-field>\n </div>\n\n <table\n mat-table\n #table\n [dataSource]=\"dataSource\"\n class=\"mat-elevation-z8 w-100 mt-4 table-hover\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n infiniteScrollContainer=\"mat-sidenav-content\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n matSortDisableClear=\"true\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"Title\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.title }}</td>\n </ng-container>\n\n <!-- Description Column -->\n <ng-container matColumnDef=\"Description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary\" fxLayoutGap=\"1rem\">\n <button mat-icon-button (click)=\"modifyProductMeasure(element)\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "component", type: i11$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i14.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], preserveWhitespaces: true });
412
411
  };
413
412
  ProductMeasuresListComponent = __decorate([
414
413
  UntilDestroy()
@@ -484,53 +483,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
484
483
  }]
485
484
  }], ctorParameters: () => [{ type: i1.HttpService }] });
486
485
 
487
- class SupplierService {
486
+ class SupplierService extends TechlifyServiceBaseClass {
488
487
  httpService;
489
488
  constructor(httpService) {
489
+ super(httpService, 'suppliers');
490
490
  this.httpService = httpService;
491
491
  }
492
- /**
493
- * get all suppliers from API
494
- *
495
- * @param filters Any attributes to filter suppliers by
496
- */
497
- index(filters) {
498
- let queries = new HttpParams({ fromObject: filters });
499
- return this.httpService.get(`api/suppliers`, { params: queries });
500
- }
501
- /**
502
- * get individual supplier from API (for view page)
503
- *
504
- * @param id ID of the supplier being requested
505
- */
506
- show(id) {
507
- return this.httpService.get(`api/suppliers/${id}`);
508
- }
509
- /**
510
- * store a new supplier in the DB
511
- *
512
- * @param model data from the supplier form that will be stored in the DB
513
- */
514
- store(model) {
515
- return this.httpService.post(`api/suppliers`, model);
516
- }
517
- /**
518
- * update a supplier in the DB
519
- *
520
- * @param model.id ID of the supplier being updated
521
- * @param model data from the supplier form that will be updated in the DB
522
- */
523
- update(model) {
524
- return this.httpService.put(`api/suppliers/${model?.id}`, model);
525
- }
526
- /**
527
- * delete a supplier from the DB
528
- *
529
- * @param id ID of the supplier being deleted
530
- */
531
- destroy(id) {
532
- return this.httpService.delete(`api/suppliers/${id}`);
533
- }
534
492
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierService, deps: [{ token: i1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
535
493
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierService, providedIn: 'root' });
536
494
  }
@@ -618,7 +576,7 @@ class SupplierFormComponent extends TechlifyFormComponentInterface {
618
576
  return this.formValidatorService.getErrorMessage(field, this.supplierForm, this.errorMessages);
619
577
  }
620
578
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierFormComponent, deps: [{ token: i2$2.FormBuilder }, { token: i1.FormValidatorService }, { token: i4$1.NgxSpinnerService }, { token: i1$1.MatDialogRef }, { token: i1.ErrorHandlerService }, { token: MAT_DIALOG_DATA }, { token: SupplierService }], target: i0.ɵɵFactoryTarget.Component });
621
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierFormComponent, selector: "app-supplier-form", usesInheritance: true, ngImport: i0, template: "<form (ngSubmit)=\"submit()\" [formGroup]=\"supplierForm\" class=\"mat-typography\">\n <div class=\"d-flex flex-column justify-content-start gap-2\" mat-dialog-content>\n <h2 class=\"mb-2\">{{ isUpdateMode ? 'Edit' : 'Create' }} Supplier</h2>\n <mat-form-field>\n <mat-label>Company Name</mat-label>\n <input autocomplete=\"off\" formControlName=\"company_name\" matInput placeholder=\"Company Name\" required />\n <mat-error *ngIf=\"isFieldValid('company_name')\">\n {{ getErrorMessage('company_name') }}\n </mat-error>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Contact Name</mat-label>\n <input autocomplete=\"off\" formControlName=\"contact_name\" matInput placeholder=\"Contact Name\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Types</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_id\" titleField=\"title\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('supplier_type_id')\">\n {{ getErrorMessage('supplier_type_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Phone</mat-label>\n <input autocomplete=\"off\" formControlName=\"phone\" matInput placeholder=\"Phone\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input autocomplete=\"off\" formControlName=\"email\" matInput placeholder=\"Email\" type=\"email\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Address</mat-label>\n <input autocomplete=\"off\" formControlName=\"address\" matInput placeholder=\"Address\" />\n <mat-error *ngIf=\"isFieldValid('address')\">\n {{ getErrorMessage('address') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <input autocomplete=\"off\" formControlName=\"details\" matInput placeholder=\"Details\" />\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button (click)=\"dialogRef.close()\" [disabled]=\"isWorking\" mat-flat-button type=\"button\">Cancel</button>\n <button [disabled]=\"isWorking\" color=\"primary\" mat-raised-button type=\"submit\">Save</button>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
579
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierFormComponent, selector: "app-supplier-form", usesInheritance: true, ngImport: i0, template: "<form (ngSubmit)=\"submit()\" [formGroup]=\"supplierForm\" class=\"mat-typography\">\n <div class=\"d-flex flex-column justify-content-start gap-2\" mat-dialog-content>\n <h2 class=\"mb-2\">{{ isUpdateMode ? 'Edit' : 'Create' }} Supplier</h2>\n <mat-form-field>\n <mat-label>Company Name</mat-label>\n <input autocomplete=\"off\" formControlName=\"company_name\" matInput placeholder=\"Company Name\" required />\n <mat-error *ngIf=\"isFieldValid('company_name')\">\n {{ getErrorMessage('company_name') }}\n </mat-error>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Contact Name</mat-label>\n <input autocomplete=\"off\" formControlName=\"contact_name\" matInput placeholder=\"Contact Name\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Types</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_id\" titleField=\"title\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('supplier_type_id')\">\n {{ getErrorMessage('supplier_type_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Phone</mat-label>\n <input autocomplete=\"off\" formControlName=\"phone\" matInput placeholder=\"Phone\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input autocomplete=\"off\" formControlName=\"email\" matInput placeholder=\"Email\" type=\"email\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Address</mat-label>\n <input autocomplete=\"off\" formControlName=\"address\" matInput placeholder=\"Address\" />\n <mat-error *ngIf=\"isFieldValid('address')\">\n {{ getErrorMessage('address') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <input autocomplete=\"off\" formControlName=\"details\" matInput placeholder=\"Details\" />\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button (click)=\"dialogRef.close()\" [disabled]=\"isWorking\" mat-flat-button type=\"button\">Cancel</button>\n <button [disabled]=\"isWorking\" color=\"primary\" mat-raised-button type=\"submit\">Save</button>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
622
580
  }
623
581
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierFormComponent, decorators: [{
624
582
  type: Component,
@@ -656,7 +614,7 @@ class PayeeSelectorComponent {
656
614
  useExisting: forwardRef(() => PayeeSelectorComponent),
657
615
  multi: true,
658
616
  },
659
- ], ngImport: i0, template: "<mat-form-field [appearance]=\"appearance\" class=\"w-100\">\n <mat-label>{{ label }}</mat-label>\n <app-searchable-selector\n apiUrl=\"api/suppliers\"\n titleField=\"company_name\"\n sortBy=\"company_name|asc\"\n [required]=\"required\"\n [(ngModel)]=\"value\"\n #payeeSelector=\"ngModel\"\n name=\"payeeSelector\"\n [add]=\"showAddButton\"\n [itemComponent]=\"SupplierFormComponent\"\n (ngModelChange)=\"onChange($event)\"\n [addConfig]=\"{ width: '600px' }\"\n [ngModelOptions]=\"{ standalone: true }\"\n [multiple]=\"multiple\"\n >\n </app-searchable-selector>\n <mat-error *ngIf=\"payeeSelector.invalid && payeeSelector.touched\"> The payee field is required. </mat-error>\n</mat-form-field>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], preserveWhitespaces: true });
617
+ ], ngImport: i0, template: "<mat-form-field [appearance]=\"appearance\" class=\"w-100\">\n <mat-label>{{ label }}</mat-label>\n <app-searchable-selector\n apiUrl=\"api/suppliers\"\n titleField=\"company_name\"\n sortBy=\"company_name|asc\"\n [required]=\"required\"\n [(ngModel)]=\"value\"\n #payeeSelector=\"ngModel\"\n name=\"payeeSelector\"\n [add]=\"showAddButton\"\n [itemComponent]=\"SupplierFormComponent\"\n (ngModelChange)=\"onChange($event)\"\n [addConfig]=\"{ width: '600px' }\"\n [ngModelOptions]=\"{ standalone: true }\"\n [multiple]=\"multiple\"\n >\n </app-searchable-selector>\n <mat-error *ngIf=\"payeeSelector.invalid && payeeSelector.touched\"> The payee field is required. </mat-error>\n</mat-form-field>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], preserveWhitespaces: true });
660
618
  }
661
619
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PayeeSelectorComponent, decorators: [{
662
620
  type: Component,
@@ -679,6 +637,287 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
679
637
  type: Input
680
638
  }] } });
681
639
 
640
+ /*
641
+ * This module imports and re-exports all Angular Material modules for convenience,
642
+ * so only 1 module import is needed in your feature modules.
643
+ * See https://material.angular.io/guide/getting-started#step-3-import-the-component-modules.
644
+ *
645
+ * To optimize your production builds, you should only import the components used in your app.
646
+ */
647
+ class MaterialModule {
648
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
649
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: MaterialModule, exports: [MatAutocompleteModule,
650
+ MatBadgeModule,
651
+ MatButtonModule,
652
+ MatButtonToggleModule,
653
+ MatCardModule,
654
+ MatCheckboxModule,
655
+ MatChipsModule,
656
+ MatCommonModule,
657
+ MatDatepickerModule,
658
+ MatDialogModule,
659
+ MatDividerModule,
660
+ MatExpansionModule,
661
+ MatFormFieldModule,
662
+ MatGridListModule,
663
+ MatIconModule,
664
+ MatInputModule,
665
+ MatLineModule,
666
+ MatListModule,
667
+ MatMenuModule,
668
+ MatNativeDateModule,
669
+ MatOptionModule,
670
+ MatPaginatorModule,
671
+ MatProgressBarModule,
672
+ MatProgressSpinnerModule,
673
+ MatPseudoCheckboxModule,
674
+ MatRadioModule,
675
+ MatRippleModule,
676
+ MatSelectModule,
677
+ MatSidenavModule,
678
+ MatSlideToggleModule,
679
+ MatSliderModule,
680
+ MatSnackBarModule,
681
+ MatSortModule,
682
+ MatStepperModule,
683
+ MatTableModule,
684
+ MatTabsModule,
685
+ MatToolbarModule,
686
+ MatTooltipModule,
687
+ MatTreeModule] });
688
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MaterialModule, imports: [MatAutocompleteModule,
689
+ MatBadgeModule,
690
+ MatButtonModule,
691
+ MatButtonToggleModule,
692
+ MatCardModule,
693
+ MatCheckboxModule,
694
+ MatChipsModule,
695
+ MatCommonModule,
696
+ MatDatepickerModule,
697
+ MatDialogModule,
698
+ MatDividerModule,
699
+ MatExpansionModule,
700
+ MatFormFieldModule,
701
+ MatGridListModule,
702
+ MatIconModule,
703
+ MatInputModule,
704
+ MatLineModule,
705
+ MatListModule,
706
+ MatMenuModule,
707
+ MatNativeDateModule,
708
+ MatOptionModule,
709
+ MatPaginatorModule,
710
+ MatProgressBarModule,
711
+ MatProgressSpinnerModule,
712
+ MatPseudoCheckboxModule,
713
+ MatRadioModule,
714
+ MatRippleModule,
715
+ MatSelectModule,
716
+ MatSidenavModule,
717
+ MatSlideToggleModule,
718
+ MatSliderModule,
719
+ MatSnackBarModule,
720
+ MatSortModule,
721
+ MatStepperModule,
722
+ MatTableModule,
723
+ MatTabsModule,
724
+ MatToolbarModule,
725
+ MatTooltipModule,
726
+ MatTreeModule] });
727
+ }
728
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MaterialModule, decorators: [{
729
+ type: NgModule,
730
+ args: [{
731
+ exports: [
732
+ MatAutocompleteModule,
733
+ MatBadgeModule,
734
+ MatButtonModule,
735
+ MatButtonToggleModule,
736
+ MatCardModule,
737
+ MatCheckboxModule,
738
+ MatChipsModule,
739
+ MatCommonModule,
740
+ MatDatepickerModule,
741
+ MatDialogModule,
742
+ MatDividerModule,
743
+ MatExpansionModule,
744
+ MatFormFieldModule,
745
+ MatGridListModule,
746
+ MatIconModule,
747
+ MatInputModule,
748
+ MatLineModule,
749
+ MatListModule,
750
+ MatMenuModule,
751
+ MatNativeDateModule,
752
+ MatOptionModule,
753
+ MatPaginatorModule,
754
+ MatProgressBarModule,
755
+ MatProgressSpinnerModule,
756
+ MatPseudoCheckboxModule,
757
+ MatRadioModule,
758
+ MatRippleModule,
759
+ MatSelectModule,
760
+ MatSidenavModule,
761
+ MatSlideToggleModule,
762
+ MatSliderModule,
763
+ MatSnackBarModule,
764
+ MatSortModule,
765
+ MatStepperModule,
766
+ MatTableModule,
767
+ MatTabsModule,
768
+ MatToolbarModule,
769
+ MatTooltipModule,
770
+ MatTreeModule,
771
+ ],
772
+ }]
773
+ }] });
774
+
775
+ class LocationSelectorComponent {
776
+ locationService;
777
+ featureService;
778
+ label = input('Location');
779
+ placeholder = input('Select a location');
780
+ includeNone = input(true);
781
+ isSubLocationEnabled = signal(false);
782
+ locations = [];
783
+ selectedValue = null;
784
+ isDisabled = false;
785
+ searchControl = new FormControl('');
786
+ onChange = () => { };
787
+ onTouched = () => { };
788
+ constructor(locationService, featureService) {
789
+ this.locationService = locationService;
790
+ this.featureService = featureService;
791
+ }
792
+ ngOnInit() {
793
+ this.isSubLocationEnabled.set(this.featureService.isFeatureExists('sub-locations'));
794
+ this.loadData();
795
+ this.setupSearch();
796
+ }
797
+ setupSearch() {
798
+ this.searchControl.valueChanges.pipe(debounceTime(400), distinctUntilChanged()).subscribe((value) => {
799
+ this.loadData(value);
800
+ });
801
+ }
802
+ loadData(search = null) {
803
+ const params = {};
804
+ if (search) {
805
+ params.search = search;
806
+ }
807
+ this.locationService.index(params).subscribe({
808
+ next: (response) => {
809
+ const flatLocations = response.data;
810
+ this.locations = this.isSubLocationEnabled()
811
+ ? this.buildHierarchy(flatLocations)
812
+ : flatLocations;
813
+ }
814
+ });
815
+ }
816
+ /**
817
+ * To prevent recursive calls in the api while trying to get
818
+ * parent and children of a location, i've opted to have the ui
819
+ * build the hierarchy of locations
820
+ */
821
+ buildHierarchy(locations) {
822
+ const locationMap = new Map();
823
+ locations.forEach(location => locationMap.set(location.id, location));
824
+ // Calculate depth for each location with cycle detection
825
+ const getDepth = (location, visited = new Set()) => {
826
+ if (!location.parent_id)
827
+ return 0;
828
+ if (visited.has(location.id))
829
+ return 0; // Prevent infinite loop if parent is same as child
830
+ visited.add(location.id); // Take note of visited locations
831
+ const parent = locationMap.get(location.parent_id);
832
+ if (!parent)
833
+ return 0;
834
+ return 1 + getDepth(parent, visited);
835
+ };
836
+ // Build hierarchical list with depths
837
+ const withDepths = locations.map(location => ({
838
+ id: location.id,
839
+ title: location.title,
840
+ parent_id: location.parent_id,
841
+ depth: getDepth(location)
842
+ }));
843
+ // Sort: root items first, then recursively add children
844
+ const result = [];
845
+ const added = new Set(); // Prevent infinite loop on cycles
846
+ // Find all "roots" - items with no parent, OR items whose parent is missing from the list
847
+ const rootIds = withDepths
848
+ .filter(location => !location.parent_id || !locationMap.has(location.parent_id))
849
+ .map(location => location.id);
850
+ const addWithChildren = (parentId, depth) => {
851
+ // If parentId is null, we look for our identified roots.
852
+ // Otherwise we look for children of the parentId.
853
+ const itemsToAdd = parentId === null
854
+ ? withDepths.filter(location => rootIds.includes(location.id))
855
+ : withDepths.filter(location => location.parent_id === parentId);
856
+ itemsToAdd
857
+ .filter(location => !added.has(location.id))
858
+ .sort((a, b) => a.title.localeCompare(b.title))
859
+ .forEach(location => {
860
+ added.add(location.id);
861
+ result.push(location);
862
+ addWithChildren(location.id, depth + 1);
863
+ });
864
+ };
865
+ addWithChildren(null, 0);
866
+ // If there are still items not added (due to circular references A->B->A), add them as roots
867
+ if (added.size < withDepths.length) {
868
+ withDepths
869
+ .filter(location => !added.has(location.id))
870
+ .sort((a, b) => a.title.localeCompare(b.title))
871
+ .forEach(location => {
872
+ added.add(location.id);
873
+ result.push(location);
874
+ // Try to add children for this "forced root" in case it has valid children
875
+ addWithChildren(location.id, location.depth + 1);
876
+ });
877
+ }
878
+ return result;
879
+ }
880
+ onSelectionChange(value) {
881
+ this.selectedValue = value;
882
+ this.onChange(value);
883
+ this.onTouched();
884
+ }
885
+ writeValue(value) {
886
+ this.selectedValue = value;
887
+ }
888
+ registerOnChange(fn) {
889
+ this.onChange = fn;
890
+ }
891
+ registerOnTouched(fn) {
892
+ this.onTouched = fn;
893
+ }
894
+ setDisabledState(isDisabled) {
895
+ this.isDisabled = isDisabled;
896
+ }
897
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationSelectorComponent, deps: [{ token: LocationService }, { token: i1.TechlifyFeatureService }], target: i0.ɵɵFactoryTarget.Component });
898
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: LocationSelectorComponent, isStandalone: true, selector: "app-location-selector", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, includeNone: { classPropertyName: "includeNone", publicName: "includeNone", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
899
+ {
900
+ provide: NG_VALUE_ACCESSOR,
901
+ useExisting: forwardRef(() => LocationSelectorComponent),
902
+ multi: true
903
+ }
904
+ ], ngImport: i0, template: "<mat-form-field class=\"w-100\">\n <mat-label>{{ label() }}</mat-label>\n <mat-select [value]=\"selectedValue\" [disabled]=\"isDisabled\" [placeholder]=\"placeholder()\"\n (selectionChange)=\"onSelectionChange($event.value)\">\n\n <div class=\"sticky-search-container\">\n <input [formControl]=\"searchControl\" placeholder=\"Search...\" class=\"search-input\" (keydown)=\"$event.stopPropagation()\">\n </div>\n\n <mat-option *ngIf=\"includeNone()\" [value]=\"null\">None</mat-option>\n\n <mat-option *ngFor=\"let location of locations\" [value]=\"location.id\">\n <span [ngStyle]=\"{'padding-left.px': location.depth * 16}\">\n <span *ngIf=\"location.depth > 0\">\u21B3 </span>{{ location.title }}\n </span>\n </mat-option>\n\n </mat-select>\n</mat-form-field>", styles: [".sticky-search-container{position:sticky;top:0;z-index:1000;background:#fff;border-bottom:1px solid rgba(0,0,0,.04);margin-top:-8px;padding:8px 16px}.search-input{width:100%;padding:8px;border:none;outline:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i11$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], preserveWhitespaces: true });
905
+ }
906
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationSelectorComponent, decorators: [{
907
+ type: Component,
908
+ args: [{ selector: 'app-location-selector', standalone: true, imports: [
909
+ CommonModule,
910
+ MaterialModule,
911
+ ReactiveFormsModule
912
+ ], providers: [
913
+ {
914
+ provide: NG_VALUE_ACCESSOR,
915
+ useExisting: forwardRef(() => LocationSelectorComponent),
916
+ multi: true
917
+ }
918
+ ], template: "<mat-form-field class=\"w-100\">\n <mat-label>{{ label() }}</mat-label>\n <mat-select [value]=\"selectedValue\" [disabled]=\"isDisabled\" [placeholder]=\"placeholder()\"\n (selectionChange)=\"onSelectionChange($event.value)\">\n\n <div class=\"sticky-search-container\">\n <input [formControl]=\"searchControl\" placeholder=\"Search...\" class=\"search-input\" (keydown)=\"$event.stopPropagation()\">\n </div>\n\n <mat-option *ngIf=\"includeNone()\" [value]=\"null\">None</mat-option>\n\n <mat-option *ngFor=\"let location of locations\" [value]=\"location.id\">\n <span [ngStyle]=\"{'padding-left.px': location.depth * 16}\">\n <span *ngIf=\"location.depth > 0\">\u21B3 </span>{{ location.title }}\n </span>\n </mat-option>\n\n </mat-select>\n</mat-form-field>", styles: [".sticky-search-container{position:sticky;top:0;z-index:1000;background:#fff;border-bottom:1px solid rgba(0,0,0,.04);margin-top:-8px;padding:8px 16px}.search-input{width:100%;padding:8px;border:none;outline:none}\n"] }]
919
+ }], ctorParameters: () => [{ type: LocationService }, { type: i1.TechlifyFeatureService }] });
920
+
682
921
  class StockReceiptFormComponent extends TechlifyFormComponentInterface {
683
922
  formBuilder;
684
923
  stockReceiptService;
@@ -824,11 +1063,11 @@ class StockReceiptFormComponent extends TechlifyFormComponentInterface {
824
1063
  this.form.get('amount')?.setValue(amount);
825
1064
  }
826
1065
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: StockReceiptService }, { token: i1.DateUtils }, { token: LocationService }], target: i0.ɵɵFactoryTarget.Component });
827
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockReceiptFormComponent, selector: "app-stock-receipt-form", inputs: { product: "product", stockReceipt: "stockReceipt", stockReceiptProduct: "stockReceiptProduct", latestLocationId: "latestLocationId" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<h3 class=\"text-center\">{{ stockReceipt?.id ? 'Edit' : 'Receive' }} Stock for {{ product?.name }}</h3>\n<form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n <app-payee-selector label=\"Supplier\" formControlName=\"supplier_id\" appearance=\"fill\"\n [showAddButton]=\"true\"></app-payee-selector>\n\n <mat-form-field *ngIf=\"locationsCount > 1\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('quantity')\">\n {{ getErrorMessage('quantity') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Purchase Price</mat-label>\n <input matInput formControlName=\"purchase_price\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('purchase_price')\">\n {{ getErrorMessage('purchase_price') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Total Value</mat-label>\n <input matInput formControlName=\"amount\" readonly type=\"number\" min=\"0\" />\n </mat-form-field>\n\n <div techlifyFeatureEnabled=\"product-batch-numbers\" class=\"d-flex flex-column gap-2 w-100\">\n <mat-form-field>\n <mat-label>Batch #</mat-label>\n <input type=\"text\" formControlName=\"batch_number\" matInput placeholder=\"Batch #\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Expires On</mat-label>\n <input matInput [matDatepicker]=\"expiresOnPicker\" formControlName=\"expires_on\" (focus)=\"expiresOnPicker.open()\" />\n <mat-datepicker #expiresOnPicker></mat-datepicker>\n </mat-form-field>\n </div>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"cancelled.emit()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PayeeSelectorComponent, selector: "app-payee-selector", inputs: ["label", "appearance", "required", "showAddButton", "multiple"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: i1.TechlifyFeatureEnabledDirective, selector: "[techlifyFeatureEnabled]", inputs: ["techlifyFeatureEnabled"] }], preserveWhitespaces: true });
1066
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockReceiptFormComponent, selector: "app-stock-receipt-form", inputs: { product: "product", stockReceipt: "stockReceipt", stockReceiptProduct: "stockReceiptProduct", latestLocationId: "latestLocationId" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<h3 class=\"text-center\">{{ stockReceipt?.id ? 'Edit' : 'Receive' }} Stock for {{ product?.name }}</h3>\n<form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n <app-payee-selector label=\"Supplier\" formControlName=\"supplier_id\" appearance=\"fill\"\n [showAddButton]=\"true\"></app-payee-selector>\n\n <app-location-selector *ngIf=\"locationsCount > 1\" formControlName=\"location_id\"></app-location-selector>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('quantity')\">\n {{ getErrorMessage('quantity') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Purchase Price</mat-label>\n <input matInput formControlName=\"purchase_price\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('purchase_price')\">\n {{ getErrorMessage('purchase_price') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Total Value</mat-label>\n <input matInput formControlName=\"amount\" readonly type=\"number\" min=\"0\" />\n </mat-form-field>\n\n <div techlifyFeatureEnabled=\"product-batch-numbers\" class=\"d-flex flex-column gap-2 w-100\">\n <mat-form-field>\n <mat-label>Batch #</mat-label>\n <input type=\"text\" formControlName=\"batch_number\" matInput placeholder=\"Batch #\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Expires On</mat-label>\n <input matInput [matDatepicker]=\"expiresOnPicker\" formControlName=\"expires_on\" (focus)=\"expiresOnPicker.open()\" />\n <mat-datepicker #expiresOnPicker></mat-datepicker>\n </mat-form-field>\n </div>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"cancelled.emit()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PayeeSelectorComponent, selector: "app-payee-selector", inputs: ["label", "appearance", "required", "showAddButton", "multiple"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i1.TechlifyFeatureEnabledDirective, selector: "[techlifyFeatureEnabled]", inputs: ["techlifyFeatureEnabled"] }, { kind: "component", type: LocationSelectorComponent, selector: "app-location-selector", inputs: ["label", "placeholder", "includeNone"] }], preserveWhitespaces: true });
828
1067
  }
829
1068
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormComponent, decorators: [{
830
1069
  type: Component,
831
- args: [{ selector: 'app-stock-receipt-form', template: "<h3 class=\"text-center\">{{ stockReceipt?.id ? 'Edit' : 'Receive' }} Stock for {{ product?.name }}</h3>\n<form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n <app-payee-selector label=\"Supplier\" formControlName=\"supplier_id\" appearance=\"fill\"\n [showAddButton]=\"true\"></app-payee-selector>\n\n <mat-form-field *ngIf=\"locationsCount > 1\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('quantity')\">\n {{ getErrorMessage('quantity') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Purchase Price</mat-label>\n <input matInput formControlName=\"purchase_price\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('purchase_price')\">\n {{ getErrorMessage('purchase_price') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Total Value</mat-label>\n <input matInput formControlName=\"amount\" readonly type=\"number\" min=\"0\" />\n </mat-form-field>\n\n <div techlifyFeatureEnabled=\"product-batch-numbers\" class=\"d-flex flex-column gap-2 w-100\">\n <mat-form-field>\n <mat-label>Batch #</mat-label>\n <input type=\"text\" formControlName=\"batch_number\" matInput placeholder=\"Batch #\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Expires On</mat-label>\n <input matInput [matDatepicker]=\"expiresOnPicker\" formControlName=\"expires_on\" (focus)=\"expiresOnPicker.open()\" />\n <mat-datepicker #expiresOnPicker></mat-datepicker>\n </mat-form-field>\n </div>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"cancelled.emit()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n</form>\n" }]
1070
+ args: [{ selector: 'app-stock-receipt-form', template: "<h3 class=\"text-center\">{{ stockReceipt?.id ? 'Edit' : 'Receive' }} Stock for {{ product?.name }}</h3>\n<form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n <app-payee-selector label=\"Supplier\" formControlName=\"supplier_id\" appearance=\"fill\"\n [showAddButton]=\"true\"></app-payee-selector>\n\n <app-location-selector *ngIf=\"locationsCount > 1\" formControlName=\"location_id\"></app-location-selector>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('quantity')\">\n {{ getErrorMessage('quantity') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Purchase Price</mat-label>\n <input matInput formControlName=\"purchase_price\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('purchase_price')\">\n {{ getErrorMessage('purchase_price') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Total Value</mat-label>\n <input matInput formControlName=\"amount\" readonly type=\"number\" min=\"0\" />\n </mat-form-field>\n\n <div techlifyFeatureEnabled=\"product-batch-numbers\" class=\"d-flex flex-column gap-2 w-100\">\n <mat-form-field>\n <mat-label>Batch #</mat-label>\n <input type=\"text\" formControlName=\"batch_number\" matInput placeholder=\"Batch #\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Expires On</mat-label>\n <input matInput [matDatepicker]=\"expiresOnPicker\" formControlName=\"expires_on\" (focus)=\"expiresOnPicker.open()\" />\n <mat-datepicker #expiresOnPicker></mat-datepicker>\n </mat-form-field>\n </div>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"cancelled.emit()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n</form>" }]
832
1071
  }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: StockReceiptService }, { type: i1.DateUtils }, { type: LocationService }], propDecorators: { product: [{
833
1072
  type: Input
834
1073
  }], stockReceipt: [{
@@ -935,7 +1174,7 @@ class StockIssueFormComponent extends TechlifyFormComponentInterface {
935
1174
  }
936
1175
  ngOnInit() {
937
1176
  // Update the stock receipt batches when the location changes
938
- this.form.get('location_id')?.valueChanges?.pipe(debounceTime$1(50), distinctUntilChanged()).subscribe((val) => {
1177
+ this.form.get('location_id')?.valueChanges?.pipe(debounceTime$1(50), distinctUntilChanged$1()).subscribe((val) => {
939
1178
  this.resetBatchSelector(val);
940
1179
  });
941
1180
  this.locationService.count().subscribe((count) => {
@@ -1056,7 +1295,7 @@ class StockIssueFormComponent extends TechlifyFormComponentInterface {
1056
1295
  });
1057
1296
  }
1058
1297
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: StockIssueService }, { token: i1.DateUtils }, { token: LocationService }], target: i0.ɵɵFactoryTarget.Component });
1059
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueFormComponent, selector: "app-stock-issue-form", inputs: { product: "product", stockIssueProduct: "stockIssueProduct", stockIssue: "stockIssue", issuableType: "issuableType", issuableId: "issuableId" }, outputs: { saved: "saved", cancelled: "cancelled" }, viewQueries: [{ propertyName: "batchSearchableSelector", first: true, predicate: ["batchSearchableSelector"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<h3 class=\"text-center\">{{ stockIssue?.id ? 'Edit' : 'Issue' }} Stock for {{ product?.name }}</h3>\n<form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n <mat-form-field *ngIf=\"!product\">\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n (selectedValueChange)=\"onProductChange($event)\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"locationsCount > 1\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"\n [selectedValue]=\"stockIssue?.stock_issue_products[0]?.location\"></app-searchable-selector>\n </mat-form-field>\n\n <ng-container *ngIf=\"locationsCount > 1 && form.value?.location_id && batchesApiUrl\">\n <mat-form-field techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSearchableSelector formControlName=\"batch_id\"\n [apiUrl]=\"batchesApiUrl\" [enableSearch]=\"false\"\n (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('quantity')\">\n {{ getErrorMessage('quantity') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"cancelled.emit()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: i1.TechlifyFeatureEnabledDirective, selector: "[techlifyFeatureEnabled]", inputs: ["techlifyFeatureEnabled"] }], preserveWhitespaces: true });
1298
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueFormComponent, selector: "app-stock-issue-form", inputs: { product: "product", stockIssueProduct: "stockIssueProduct", stockIssue: "stockIssue", issuableType: "issuableType", issuableId: "issuableId" }, outputs: { saved: "saved", cancelled: "cancelled" }, viewQueries: [{ propertyName: "batchSearchableSelector", first: true, predicate: ["batchSearchableSelector"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<h3 class=\"text-center\">{{ stockIssue?.id ? 'Edit' : 'Issue' }} Stock for {{ product?.name }}</h3>\n<form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n <mat-form-field *ngIf=\"!product\">\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n (selectedValueChange)=\"onProductChange($event)\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"locationsCount > 1\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"\n [selectedValue]=\"stockIssue?.stock_issue_products[0]?.location\"></app-searchable-selector>\n </mat-form-field>\n\n <ng-container *ngIf=\"locationsCount > 1 && form.value?.location_id && batchesApiUrl\">\n <mat-form-field techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSearchableSelector formControlName=\"batch_id\"\n [apiUrl]=\"batchesApiUrl\" [enableSearch]=\"false\"\n (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('quantity')\">\n {{ getErrorMessage('quantity') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"cancelled.emit()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: i1.TechlifyFeatureEnabledDirective, selector: "[techlifyFeatureEnabled]", inputs: ["techlifyFeatureEnabled"] }], preserveWhitespaces: true });
1060
1299
  }
1061
1300
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormComponent, decorators: [{
1062
1301
  type: Component,
@@ -1082,180 +1321,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1082
1321
 
1083
1322
  class StockIssueFormButtonComponent {
1084
1323
  matDialog;
1085
- product;
1086
- stockIssueProduct;
1087
- stockIssue;
1088
- icon;
1089
- issuableType;
1090
- issuableId;
1091
- saved = new EventEmitter();
1092
- matDialogRef;
1093
- constructor(matDialog) {
1094
- this.matDialog = matDialog;
1095
- }
1096
- showStockIssuanceForm(templateRef) {
1097
- this.matDialogRef = this.matDialog.open(templateRef, { width: '500px' });
1098
- }
1099
- onStockIssuanceSaved(item) {
1100
- this.matDialogRef.close();
1101
- this.saved.emit(item);
1102
- }
1103
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1104
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: { product: "product", stockIssueProduct: "stockIssueProduct", stockIssue: "stockIssue", icon: "icon", issuableType: "issuableType", issuableId: "issuableId" }, outputs: { saved: "saved" }, ngImport: i0, template: "<span\n class=\"material-symbols-outlined cursor-pointer\"\n [class.text-primary]=\"icon\"\n matTooltip=\"Stock Issue\"\n (click)=\"showStockIssuanceForm(stockIssuanceFormTemplate)\"\n>\n {{ stockIssue ? 'edit' : icon ?? 'upload' }}\n</span>\n\n<ng-template #stockIssuanceFormTemplate>\n <app-stock-issue-form\n mat-dialog-content\n [product]=\"product\"\n [stockIssueProduct]=\"stockIssueProduct\"\n [stockIssue]=\"stockIssue\"\n [issuableType]=\"issuableType\"\n [issuableId]=\"issuableId\"\n (cancelled)=\"matDialogRef.close()\"\n (saved)=\"onStockIssuanceSaved($event)\"\n ></app-stock-issue-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: StockIssueFormComponent, selector: "app-stock-issue-form", inputs: ["product", "stockIssueProduct", "stockIssue", "issuableType", "issuableId"], outputs: ["saved", "cancelled"] }], preserveWhitespaces: true });
1105
- }
1106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormButtonComponent, decorators: [{
1107
- type: Component,
1108
- args: [{ selector: 'app-stock-issue-form-button', template: "<span\n class=\"material-symbols-outlined cursor-pointer\"\n [class.text-primary]=\"icon\"\n matTooltip=\"Stock Issue\"\n (click)=\"showStockIssuanceForm(stockIssuanceFormTemplate)\"\n>\n {{ stockIssue ? 'edit' : icon ?? 'upload' }}\n</span>\n\n<ng-template #stockIssuanceFormTemplate>\n <app-stock-issue-form\n mat-dialog-content\n [product]=\"product\"\n [stockIssueProduct]=\"stockIssueProduct\"\n [stockIssue]=\"stockIssue\"\n [issuableType]=\"issuableType\"\n [issuableId]=\"issuableId\"\n (cancelled)=\"matDialogRef.close()\"\n (saved)=\"onStockIssuanceSaved($event)\"\n ></app-stock-issue-form>\n</ng-template>\n" }]
1109
- }], ctorParameters: () => [{ type: i1$1.MatDialog }], propDecorators: { product: [{
1110
- type: Input
1111
- }], stockIssueProduct: [{
1112
- type: Input
1113
- }], stockIssue: [{
1114
- type: Input
1115
- }], icon: [{
1116
- type: Input
1117
- }], issuableType: [{
1118
- type: Input
1119
- }], issuableId: [{
1120
- type: Input
1121
- }], saved: [{
1122
- type: Output
1123
- }] } });
1124
-
1125
- /*
1126
- * This module imports and re-exports all Angular Material modules for convenience,
1127
- * so only 1 module import is needed in your feature modules.
1128
- * See https://material.angular.io/guide/getting-started#step-3-import-the-component-modules.
1129
- *
1130
- * To optimize your production builds, you should only import the components used in your app.
1131
- */
1132
- class MaterialModule {
1133
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1134
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: MaterialModule, exports: [MatAutocompleteModule,
1135
- MatBadgeModule,
1136
- MatButtonModule,
1137
- MatButtonToggleModule,
1138
- MatCardModule,
1139
- MatCheckboxModule,
1140
- MatChipsModule,
1141
- MatCommonModule,
1142
- MatDatepickerModule,
1143
- MatDialogModule,
1144
- MatDividerModule,
1145
- MatExpansionModule,
1146
- MatFormFieldModule,
1147
- MatGridListModule,
1148
- MatIconModule,
1149
- MatInputModule,
1150
- MatLineModule,
1151
- MatListModule,
1152
- MatMenuModule,
1153
- MatNativeDateModule,
1154
- MatOptionModule,
1155
- MatPaginatorModule,
1156
- MatProgressBarModule,
1157
- MatProgressSpinnerModule,
1158
- MatPseudoCheckboxModule,
1159
- MatRadioModule,
1160
- MatRippleModule,
1161
- MatSelectModule,
1162
- MatSidenavModule,
1163
- MatSlideToggleModule,
1164
- MatSliderModule,
1165
- MatSnackBarModule,
1166
- MatSortModule,
1167
- MatStepperModule,
1168
- MatTableModule,
1169
- MatTabsModule,
1170
- MatToolbarModule,
1171
- MatTooltipModule,
1172
- MatTreeModule] });
1173
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MaterialModule, imports: [MatAutocompleteModule,
1174
- MatBadgeModule,
1175
- MatButtonModule,
1176
- MatButtonToggleModule,
1177
- MatCardModule,
1178
- MatCheckboxModule,
1179
- MatChipsModule,
1180
- MatCommonModule,
1181
- MatDatepickerModule,
1182
- MatDialogModule,
1183
- MatDividerModule,
1184
- MatExpansionModule,
1185
- MatFormFieldModule,
1186
- MatGridListModule,
1187
- MatIconModule,
1188
- MatInputModule,
1189
- MatLineModule,
1190
- MatListModule,
1191
- MatMenuModule,
1192
- MatNativeDateModule,
1193
- MatOptionModule,
1194
- MatPaginatorModule,
1195
- MatProgressBarModule,
1196
- MatProgressSpinnerModule,
1197
- MatPseudoCheckboxModule,
1198
- MatRadioModule,
1199
- MatRippleModule,
1200
- MatSelectModule,
1201
- MatSidenavModule,
1202
- MatSlideToggleModule,
1203
- MatSliderModule,
1204
- MatSnackBarModule,
1205
- MatSortModule,
1206
- MatStepperModule,
1207
- MatTableModule,
1208
- MatTabsModule,
1209
- MatToolbarModule,
1210
- MatTooltipModule,
1211
- MatTreeModule] });
1212
- }
1213
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MaterialModule, decorators: [{
1214
- type: NgModule,
1215
- args: [{
1216
- exports: [
1217
- MatAutocompleteModule,
1218
- MatBadgeModule,
1219
- MatButtonModule,
1220
- MatButtonToggleModule,
1221
- MatCardModule,
1222
- MatCheckboxModule,
1223
- MatChipsModule,
1224
- MatCommonModule,
1225
- MatDatepickerModule,
1226
- MatDialogModule,
1227
- MatDividerModule,
1228
- MatExpansionModule,
1229
- MatFormFieldModule,
1230
- MatGridListModule,
1231
- MatIconModule,
1232
- MatInputModule,
1233
- MatLineModule,
1234
- MatListModule,
1235
- MatMenuModule,
1236
- MatNativeDateModule,
1237
- MatOptionModule,
1238
- MatPaginatorModule,
1239
- MatProgressBarModule,
1240
- MatProgressSpinnerModule,
1241
- MatPseudoCheckboxModule,
1242
- MatRadioModule,
1243
- MatRippleModule,
1244
- MatSelectModule,
1245
- MatSidenavModule,
1246
- MatSlideToggleModule,
1247
- MatSliderModule,
1248
- MatSnackBarModule,
1249
- MatSortModule,
1250
- MatStepperModule,
1251
- MatTableModule,
1252
- MatTabsModule,
1253
- MatToolbarModule,
1254
- MatTooltipModule,
1255
- MatTreeModule,
1256
- ],
1257
- }]
1258
- }] });
1324
+ product;
1325
+ stockIssueProduct;
1326
+ stockIssue;
1327
+ icon;
1328
+ issuableType;
1329
+ issuableId;
1330
+ saved = new EventEmitter();
1331
+ matDialogRef;
1332
+ constructor(matDialog) {
1333
+ this.matDialog = matDialog;
1334
+ }
1335
+ showStockIssuanceForm(templateRef) {
1336
+ this.matDialogRef = this.matDialog.open(templateRef, { width: '500px' });
1337
+ }
1338
+ onStockIssuanceSaved(item) {
1339
+ this.matDialogRef.close();
1340
+ this.saved.emit(item);
1341
+ }
1342
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1343
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: { product: "product", stockIssueProduct: "stockIssueProduct", stockIssue: "stockIssue", icon: "icon", issuableType: "issuableType", issuableId: "issuableId" }, outputs: { saved: "saved" }, ngImport: i0, template: "<span\n class=\"material-symbols-outlined cursor-pointer\"\n [class.text-primary]=\"icon\"\n matTooltip=\"Stock Issue\"\n (click)=\"showStockIssuanceForm(stockIssuanceFormTemplate)\"\n>\n {{ stockIssue ? 'edit' : icon ?? 'upload' }}\n</span>\n\n<ng-template #stockIssuanceFormTemplate>\n <app-stock-issue-form\n mat-dialog-content\n [product]=\"product\"\n [stockIssueProduct]=\"stockIssueProduct\"\n [stockIssue]=\"stockIssue\"\n [issuableType]=\"issuableType\"\n [issuableId]=\"issuableId\"\n (cancelled)=\"matDialogRef.close()\"\n (saved)=\"onStockIssuanceSaved($event)\"\n ></app-stock-issue-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: StockIssueFormComponent, selector: "app-stock-issue-form", inputs: ["product", "stockIssueProduct", "stockIssue", "issuableType", "issuableId"], outputs: ["saved", "cancelled"] }], preserveWhitespaces: true });
1344
+ }
1345
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormButtonComponent, decorators: [{
1346
+ type: Component,
1347
+ args: [{ selector: 'app-stock-issue-form-button', template: "<span\n class=\"material-symbols-outlined cursor-pointer\"\n [class.text-primary]=\"icon\"\n matTooltip=\"Stock Issue\"\n (click)=\"showStockIssuanceForm(stockIssuanceFormTemplate)\"\n>\n {{ stockIssue ? 'edit' : icon ?? 'upload' }}\n</span>\n\n<ng-template #stockIssuanceFormTemplate>\n <app-stock-issue-form\n mat-dialog-content\n [product]=\"product\"\n [stockIssueProduct]=\"stockIssueProduct\"\n [stockIssue]=\"stockIssue\"\n [issuableType]=\"issuableType\"\n [issuableId]=\"issuableId\"\n (cancelled)=\"matDialogRef.close()\"\n (saved)=\"onStockIssuanceSaved($event)\"\n ></app-stock-issue-form>\n</ng-template>\n" }]
1348
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }], propDecorators: { product: [{
1349
+ type: Input
1350
+ }], stockIssueProduct: [{
1351
+ type: Input
1352
+ }], stockIssue: [{
1353
+ type: Input
1354
+ }], icon: [{
1355
+ type: Input
1356
+ }], issuableType: [{
1357
+ type: Input
1358
+ }], issuableId: [{
1359
+ type: Input
1360
+ }], saved: [{
1361
+ type: Output
1362
+ }] } });
1259
1363
 
1260
1364
  class ExportToExcelButtonComponent {
1261
1365
  tableId;
@@ -1457,7 +1561,7 @@ class ProductFormComponent {
1457
1561
  return this.displayedFormSections.length > 0 && this.displayedFormSections.includes(sectionName);
1458
1562
  }
1459
1563
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductFormComponent, deps: [{ token: ProductService }, { token: i2$2.FormBuilder }, { token: i1.FormValidatorService }, { token: i1.AlertService }, { token: i3.DatePipe }, { token: ProductFormService }], target: i0.ɵɵFactoryTarget.Component });
1460
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductFormComponent, selector: "app-product-form", inputs: { product: "product", displayedFormFields: "displayedFormFields", displayedFormSections: "displayedFormSections" }, outputs: { saved: "saved", cancelled: "cancelled" }, ngImport: i0, template: "<form [formGroup]=\"productForm\" (submit)=\"save()\">\n <h3 class=\"text-center\">{{ product?.id ? 'Update' : 'Create' }} Product</h3>\n <div fxLayout=\"column\">\n <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('basic information')\">\n <h3><strong>Basic Information</strong></h3>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('name')\">\n <mat-label>Name</mat-label>\n <input matInput placeholder=\"Name\" formControlName=\"name\" required />\n <mat-error *ngIf=\"isFieldValid('name')\">{{ getErrorMessage('name') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('product type')\">\n <mat-label>Product Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_id\"> </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('type_id')\">{{ getErrorMessage('type_id') }} </mat-error>\n </mat-form-field>\n </div>\n\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('sku')\">\n <mat-label>SKU</mat-label>\n <input matInput placeholder=\"SKU\" formControlName=\"sku\" />\n <mat-error *ngIf=\"isFieldValid('sku')\">{{ getErrorMessage('sku') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\">\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('category_ids')\">\n {{ getErrorMessage('category_ids') }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"100%\" *ngIf=\"isFormFieldShown('description')\">\n <mat-label>Description</mat-label>\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n </div>\n </div>\n\n <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('inventory information')\">\n <h3><strong>Inventory Information</strong></h3>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('product measure')\">\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_id\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('measure_id')\">{{ getErrorMessage('measure_id') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('reorder point')\">\n <mat-label>Reorder Point</mat-label>\n <input matInput placeholder=\"Reorder Point\" formControlName=\"reorder_point\" type=\"number\" />\n <mat-error *ngIf=\"isFieldValid('reorder_point')\">{{ getErrorMessage('reorder_point') }} </mat-error>\n </mat-form-field>\n </div>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('initial quantity')\">\n <mat-label>Initial Quantity</mat-label>\n <input matInput placeholder=\"Initial Quantity\" formControlName=\"initial_quantity\" />\n <mat-error *ngIf=\"isFieldValid('initial_quantity')\">{{ getErrorMessage('initial_quantity') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('initial quantity date')\">\n <mat-label>Initial Quantity Date</mat-label>\n <input matInput [matDatepicker]=\"pickerInitialQuantityDate\" placeholder=\"Initial Quantity Date\"\n formControlName=\"initial_quantity_date\" />\n <mat-datepicker-toggle matSuffix [for]=\"pickerInitialQuantityDate\"></mat-datepicker-toggle>\n <mat-datepicker #pickerInitialQuantityDate></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('initial_quantity_date')\">{{ getErrorMessage('initial_quantity_date') }}\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('sales information')\">\n <h3><strong>Sale Information</strong></h3>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('sales price')\">\n <mat-label>Selling Price</mat-label>\n <input matInput placeholder=\"Selling Price\" formControlName=\"sale_price\" required type=\"number\" step=\"any\" />\n <mat-error *ngIf=\"isFieldValid('sale_price')\">{{ getErrorMessage('sale_price') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('condition types')\">\n <mat-label>Condition</mat-label>\n <app-searchable-selector apiUrl=\"api/condition-types\"\n formControlName=\"condition_type_id\"></app-searchable-selector>\n </mat-form-field>\n </div>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('minimum price')\">\n <mat-label>Minimum Price</mat-label>\n <input matInput placeholder=\"Minimum Price\" formControlName=\"minimum_price\" required type=\"number\"\n step=\"any\" />\n <mat-error *ngIf=\"isFieldValid('minimum_price')\">{{ getErrorMessage('minimum_price') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('maximum price')\">\n <mat-label>Maximum Price</mat-label>\n <input matInput placeholder=\"Maximum Price\" formControlName=\"maximum_price\" type=\"number\" step=\"any\" />\n </mat-form-field>\n </div>\n </div>\n\n <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n <button [disabled]=\"isWorking\" mat-button class=\"mt-2\" type=\"button\" (click)=\"cancelled.emit(true)\">\n Cancel\n </button>\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">Save</button>\n </div>\n </div>\n</form>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
1564
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductFormComponent, selector: "app-product-form", inputs: { product: "product", displayedFormFields: "displayedFormFields", displayedFormSections: "displayedFormSections" }, outputs: { saved: "saved", cancelled: "cancelled" }, ngImport: i0, template: "<form [formGroup]=\"productForm\" (submit)=\"save()\">\n <h3 class=\"text-center\">{{ product?.id ? 'Update' : 'Create' }} Product</h3>\n <div fxLayout=\"column\">\n <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('basic information')\">\n <h3><strong>Basic Information</strong></h3>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('name')\">\n <mat-label>Name</mat-label>\n <input matInput placeholder=\"Name\" formControlName=\"name\" required />\n <mat-error *ngIf=\"isFieldValid('name')\">{{ getErrorMessage('name') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('product type')\">\n <mat-label>Product Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_id\"> </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('type_id')\">{{ getErrorMessage('type_id') }} </mat-error>\n </mat-form-field>\n </div>\n\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('sku')\">\n <mat-label>SKU</mat-label>\n <input matInput placeholder=\"SKU\" formControlName=\"sku\" />\n <mat-error *ngIf=\"isFieldValid('sku')\">{{ getErrorMessage('sku') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\">\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('category_ids')\">\n {{ getErrorMessage('category_ids') }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"100%\" *ngIf=\"isFormFieldShown('description')\">\n <mat-label>Description</mat-label>\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n </div>\n </div>\n\n <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('inventory information')\">\n <h3><strong>Inventory Information</strong></h3>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('product measure')\">\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_id\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('measure_id')\">{{ getErrorMessage('measure_id') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('reorder point')\">\n <mat-label>Reorder Point</mat-label>\n <input matInput placeholder=\"Reorder Point\" formControlName=\"reorder_point\" type=\"number\" />\n <mat-error *ngIf=\"isFieldValid('reorder_point')\">{{ getErrorMessage('reorder_point') }} </mat-error>\n </mat-form-field>\n </div>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('initial quantity')\">\n <mat-label>Initial Quantity</mat-label>\n <input matInput placeholder=\"Initial Quantity\" formControlName=\"initial_quantity\" />\n <mat-error *ngIf=\"isFieldValid('initial_quantity')\">{{ getErrorMessage('initial_quantity') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('initial quantity date')\">\n <mat-label>Initial Quantity Date</mat-label>\n <input matInput [matDatepicker]=\"pickerInitialQuantityDate\" placeholder=\"Initial Quantity Date\"\n formControlName=\"initial_quantity_date\" />\n <mat-datepicker-toggle matSuffix [for]=\"pickerInitialQuantityDate\"></mat-datepicker-toggle>\n <mat-datepicker #pickerInitialQuantityDate></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('initial_quantity_date')\">{{ getErrorMessage('initial_quantity_date') }}\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('sales information')\">\n <h3><strong>Sale Information</strong></h3>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('sales price')\">\n <mat-label>Selling Price</mat-label>\n <input matInput placeholder=\"Selling Price\" formControlName=\"sale_price\" required type=\"number\" step=\"any\" />\n <mat-error *ngIf=\"isFieldValid('sale_price')\">{{ getErrorMessage('sale_price') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('condition types')\">\n <mat-label>Condition</mat-label>\n <app-searchable-selector apiUrl=\"api/condition-types\"\n formControlName=\"condition_type_id\"></app-searchable-selector>\n </mat-form-field>\n </div>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('minimum price')\">\n <mat-label>Minimum Price</mat-label>\n <input matInput placeholder=\"Minimum Price\" formControlName=\"minimum_price\" required type=\"number\"\n step=\"any\" />\n <mat-error *ngIf=\"isFieldValid('minimum_price')\">{{ getErrorMessage('minimum_price') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('maximum price')\">\n <mat-label>Maximum Price</mat-label>\n <input matInput placeholder=\"Maximum Price\" formControlName=\"maximum_price\" type=\"number\" step=\"any\" />\n </mat-form-field>\n </div>\n </div>\n\n <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n <button [disabled]=\"isWorking\" mat-button class=\"mt-2\" type=\"button\" (click)=\"cancelled.emit(true)\">\n Cancel\n </button>\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">Save</button>\n </div>\n </div>\n</form>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
1461
1565
  }
1462
1566
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductFormComponent, decorators: [{
1463
1567
  type: Component,
@@ -1497,11 +1601,11 @@ class ProductFormButtonComponent {
1497
1601
  this.productFormService.listUpdated(true);
1498
1602
  }
1499
1603
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductFormButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: ProductFormService }], target: i0.ɵɵFactoryTarget.Component });
1500
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: { product: "product" }, outputs: { saved: "saved" }, ngImport: i0, template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" [class.text-secondary]=\"product\" (click)=\"showForm(addProductForm)\">\n {{ product ? 'edit' : 'add' }}\n</mat-icon>\n\n<ng-template #addProductForm>\n <app-product-form\n [product]=\"product\"\n mat-dialog-content\n (saved)=\"onProductSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-product-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: ProductFormComponent, selector: "app-product-form", inputs: ["product", "displayedFormFields", "displayedFormSections"], outputs: ["saved", "cancelled"] }], preserveWhitespaces: true });
1604
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: { product: "product" }, outputs: { saved: "saved" }, ngImport: i0, template: "<app-techlify-icon name='edit' [class.text-secondary]=\"product\" (click)=\"showForm(addProductForm)\"></app-techlify-icon>\n\n<ng-template #addProductForm>\n <app-product-form\n [product]=\"product\"\n mat-dialog-content\n (saved)=\"onProductSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-product-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "component", type: ProductFormComponent, selector: "app-product-form", inputs: ["product", "displayedFormFields", "displayedFormSections"], outputs: ["saved", "cancelled"] }], preserveWhitespaces: true });
1501
1605
  }
1502
1606
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductFormButtonComponent, decorators: [{
1503
1607
  type: Component,
1504
- args: [{ selector: 'app-product-form-button', template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" [class.text-secondary]=\"product\" (click)=\"showForm(addProductForm)\">\n {{ product ? 'edit' : 'add' }}\n</mat-icon>\n\n<ng-template #addProductForm>\n <app-product-form\n [product]=\"product\"\n mat-dialog-content\n (saved)=\"onProductSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-product-form>\n</ng-template>\n" }]
1608
+ args: [{ selector: 'app-product-form-button', template: "<app-techlify-icon name='edit' [class.text-secondary]=\"product\" (click)=\"showForm(addProductForm)\"></app-techlify-icon>\n\n<ng-template #addProductForm>\n <app-product-form\n [product]=\"product\"\n mat-dialog-content\n (saved)=\"onProductSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-product-form>\n</ng-template>\n" }]
1505
1609
  }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: ProductFormService }], propDecorators: { product: [{
1506
1610
  type: Input
1507
1611
  }], saved: [{
@@ -1558,7 +1662,7 @@ class ProductBatchUpdateFormComponent extends TechlifyFormComponentInterface {
1558
1662
  });
1559
1663
  }
1560
1664
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductBatchUpdateFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: ProductBatchService }], target: i0.ɵɵFactoryTarget.Component });
1561
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductBatchUpdateFormComponent, selector: "app-product-batch-update-form", inputs: { selection: "selection" }, outputs: { updated: "updated" }, usesInheritance: true, ngImport: i0, template: "<p class=\"text-primary fw-bold\">{{ selection.selected.length }} Product(s) Selected</p>\n<form [formGroup]=\"form\" class=\"d-flex flex-column justify-content-start\" (submit)=\"save()\">\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_id\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_id\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Reorder Point</mat-label>\n <input matInput placeholder=\"Reorder Point\" formControlName=\"reorder_point\" type=\"number\" />\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-3\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">Update</button>\n <button [disabled]=\"isSaving\" mat-flat-button type=\"button\" (click)=\"selection.clear()\">Cancel</button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
1665
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductBatchUpdateFormComponent, selector: "app-product-batch-update-form", inputs: { selection: "selection" }, outputs: { updated: "updated" }, usesInheritance: true, ngImport: i0, template: "<p class=\"text-primary fw-bold\">{{ selection.selected.length }} Product(s) Selected</p>\n<form [formGroup]=\"form\" class=\"d-flex flex-column justify-content-start\" (submit)=\"save()\">\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_id\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_id\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Reorder Point</mat-label>\n <input matInput placeholder=\"Reorder Point\" formControlName=\"reorder_point\" type=\"number\" />\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-3\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">Update</button>\n <button [disabled]=\"isSaving\" mat-flat-button type=\"button\" (click)=\"selection.clear()\">Cancel</button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
1562
1666
  }
1563
1667
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductBatchUpdateFormComponent, decorators: [{
1564
1668
  type: Component,
@@ -1586,7 +1690,7 @@ let ProductListComponent = class ProductListComponent extends TechlifyListingCon
1586
1690
  'reorder_point',
1587
1691
  'stock_receipts',
1588
1692
  'last_stock_receipt_date',
1589
- 'stock_issuances',
1693
+ 'stock_issues',
1590
1694
  'last_stock_issue_date',
1591
1695
  'on_hand',
1592
1696
  'measure',
@@ -1613,7 +1717,7 @@ let ProductListComponent = class ProductListComponent extends TechlifyListingCon
1613
1717
  'description',
1614
1718
  'reorder_point',
1615
1719
  'stock_receipts',
1616
- 'stock_issuances',
1720
+ 'stock_issues',
1617
1721
  'on_hand',
1618
1722
  'measure',
1619
1723
  'sale_price'
@@ -1672,7 +1776,7 @@ let ProductListComponent = class ProductListComponent extends TechlifyListingCon
1672
1776
  };
1673
1777
  params.page = this.page;
1674
1778
  params.perPage = this.perPage;
1675
- params.with = 'categories,lastStockReceipt,lastStockIssuance,measure,creator';
1779
+ params.with = 'categories,lastStockReceipt,lastStockIssue,measure,creator';
1676
1780
  if (this.importId) {
1677
1781
  params.import_id = this.importId;
1678
1782
  }
@@ -1720,14 +1824,14 @@ let ProductListComponent = class ProductListComponent extends TechlifyListingCon
1720
1824
  this.exportInProgress = hideColumns;
1721
1825
  }
1722
1826
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductListComponent, deps: [{ token: i2$2.FormBuilder }, { token: i1$1.MatDialog }, { token: i2.ActivatedRoute }, { token: ProductService }, { token: ProductFormService }], target: i0.ɵɵFactoryTarget.Component });
1723
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductListComponent, selector: "app-product-list", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Products</h3>\n <app-product-form-button></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\"\n (onExportStart)=\"handleExport(true)\" (onExportEnd)=\"handleExport(false)\">\n </app-export-to-excel-button>\n <app-column-selector mode=\"icon\" class=\"d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector\n apiUrl=\"api/product-types\"\n formControlName=\"type_ids\"\n titleField=\"title\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<div class=\"d-flex justify-content-start gap-3\">\n <mat-card [style.width]=\"selection.isEmpty() ? '100%' : '85%'\">\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n matSortDisableClear=\"true\"\n aria-describedby=\"Products List\"\n id=\"productTable\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Name Column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"[element?.id, 'view']\">{{ element.name }}</a>\n <small class=\"text-secondary\" *ngIf=\"element.type && !exportInProgress\">\n {{ element.type?.title }}\n </small>\n </div>\n </td>\n </ng-container>\n\n <!-- Type Column -->\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div\n *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\"\n >\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.sku }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Initial Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element.initial_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.initial_quantity_date\">\n on {{ element?.initial_quantity_date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Receipts Column -->\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell mat-sort-header=\"stock_receipts_sum_quantity\" *matHeaderCellDef>Stock Receipts</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_receipts_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_receipt && !exportInProgress\">\n Latest on {{ element?.last_stock_receipt?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Last Stock Receipt Date Column -->\n <ng-container matColumnDef=\"last_stock_receipt_date\">\n <th mat-header-cell *matHeaderCellDef>Last Stock Receipt Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_receipt?.date | date }}\n </td>\n </ng-container>\n\n <!-- Stock Issuances Column -->\n <ng-container matColumnDef=\"stock_issuances\">\n <th mat-header-cell mat-sort-header=\"stock_issuances_sum_quantity\" *matHeaderCellDef>Stock Issuances</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_issuances_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_issuance && !exportInProgress\">\n Latest on {{ element?.last_stock_issuance?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Last Stock Issue Date Column -->\n <ng-container matColumnDef=\"last_stock_issue_date\">\n <th mat-header-cell *matHeaderCellDef>Last Stock Issue Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_issuance?.date | date }}\n </td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell mat-sort-header='stock_on_hand' *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Measure</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"reorder_point\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reorder_point }}\n </td>\n </ng-container>\n\n <!-- Selling Price Column -->\n <ng-container matColumnDef=\"sale_price\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Selling Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.sale_price | currency }}\n </td>\n </ng-container>\n\n <!-- Income Account Column -->\n <ng-container matColumnDef=\"income_account\">\n <th mat-header-cell *matHeaderCellDef>Income Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.income_account?.title }}\n </td>\n </ng-container>\n\n <!-- Expense Account Column -->\n <ng-container matColumnDef=\"expense_account\">\n <th mat-header-cell *matHeaderCellDef>Expense Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.expense_account?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-product-form-button [product]=\"element\"></app-product-form-button>\n <mat-icon\n class=\"cursor-pointer\"\n matTooltip=\"View\"\n [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"\n >\n remove_red_eye\n </mat-icon>\n\n <app-stock-receipt-form-button [product]=\"element\" (saved)=\"reload()\"></app-stock-receipt-form-button>\n\n <app-stock-issue-form-button [product]=\"element\" (saved)=\"reload()\"></app-stock-issue-form-button>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Select\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllRowsSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllRowsSelected()\"\n [aria-label]=\"checkboxLabel()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n [aria-label]=\"checkboxLabel(row)\">\n </mat-checkbox>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <mat-card\n *ngIf=\"!selection.isEmpty()\"\n style=\"width: calc(15% - 1rem)\"\n >\n <mat-card-content>\n <app-product-batch-update-form [selection]=\"selection\" (updated)=\"reload()\"></app-product-batch-update-form>\n </mat-card-content>\n </mat-card>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: StockReceiptFormButtonComponent, selector: "app-stock-receipt-form-button", inputs: ["product", "stockReceipt", "latestLocationId", "icon"], outputs: ["saved"] }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssueProduct", "stockIssue", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "component", type: i10$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i7.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: ExportToExcelButtonComponent, selector: "app-export-to-excel-button", inputs: ["tableId", "fileName"], outputs: ["onExportStart", "onExportEnd"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"], outputs: ["saved"] }, { kind: "component", type: ProductBatchUpdateFormComponent, selector: "app-product-batch-update-form", inputs: ["selection"], outputs: ["updated"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
1827
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductListComponent, selector: "app-product-list", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Products</h3>\n <app-product-form-button></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\" (onExportStart)=\"handleExport(true)\"\n (onExportEnd)=\"handleExport(false)\">\n </app-export-to-excel-button>\n <app-column-selector mode=\"icon\" class=\"d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field class='fl-md'>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_ids\" titleField=\"title\"\n [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<div class=\"d-flex justify-content-start gap-3\">\n <mat-card [class.flex-fill]=\"!selection.isEmpty()\" [class.w-100]=\"selection.isEmpty()\">\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" matSortDisableClear=\"true\" aria-describedby=\"Products List\"\n id=\"productTable\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Name Column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"[element?.id, 'view']\">{{ element.name }}</a>\n <small class=\"text-secondary\" *ngIf=\"element.type && !exportInProgress\">\n {{ element.type?.title }}\n </small>\n </div>\n </td>\n </ng-container>\n\n <!-- Type Column -->\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\">\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.sku }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Initial Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element.initial_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.initial_quantity_date\">\n on {{ element?.initial_quantity_date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Receipts Column -->\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell mat-sort-header=\"stock_receipts_sum_quantity\" *matHeaderCellDef>Stock Receipts</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_receipts_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_receipt && !exportInProgress\">\n Latest on {{ element?.last_stock_receipt?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Issues Column -->\n <ng-container matColumnDef=\"stock_issues\">\n <th mat-header-cell mat-sort-header=\"stock_issues_sum_quantity\" *matHeaderCellDef>Stock Issues</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_issues_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_issue && !exportInProgress\">\n Latest on {{ element?.last_stock_issue?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell mat-sort-header='stock_on_hand' *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Measure</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"reorder_point\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reorder_point }}\n </td>\n </ng-container>\n\n <!-- Selling Price Column -->\n <ng-container matColumnDef=\"sale_price\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Selling Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.sale_price | currency }}\n </td>\n </ng-container>\n\n <!-- Income Account Column -->\n <ng-container matColumnDef=\"income_account\">\n <th mat-header-cell *matHeaderCellDef>Income Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.income_account?.title }}\n </td>\n </ng-container>\n\n <!-- Expense Account Column -->\n <ng-container matColumnDef=\"expense_account\">\n <th mat-header-cell *matHeaderCellDef>Expense Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.expense_account?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-techlify-icon name='view' [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"></app-techlify-icon>\n\n <app-product-form-button [product]=\"element\"></app-product-form-button>\n <app-stock-receipt-form-button [product]=\"element\" (saved)=\"reload()\"></app-stock-receipt-form-button>\n <app-stock-issue-form-button [product]=\"element\" (saved)=\"reload()\"></app-stock-issue-form-button>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Select\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllRowsSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllRowsSelected()\" [aria-label]=\"checkboxLabel()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\" [aria-label]=\"checkboxLabel(row)\">\n </mat-checkbox>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <mat-card *ngIf=\"!selection.isEmpty()\" class=\"batch-update-card\">\n <mat-card-content>\n <app-product-batch-update-form [selection]=\"selection\" (updated)=\"reload()\"></app-product-batch-update-form>\n </mat-card-content>\n </mat-card>\n</div>", styles: [".batch-update-card{width:15%;min-width:300px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: StockReceiptFormButtonComponent, selector: "app-stock-receipt-form-button", inputs: ["product", "stockReceipt", "latestLocationId", "icon"], outputs: ["saved"] }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssueProduct", "stockIssue", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "component", type: i10$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i11.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i14.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: ExportToExcelButtonComponent, selector: "app-export-to-excel-button", inputs: ["tableId", "fileName"], outputs: ["onExportStart", "onExportEnd"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"], outputs: ["saved"] }, { kind: "component", type: ProductBatchUpdateFormComponent, selector: "app-product-batch-update-form", inputs: ["selection"], outputs: ["updated"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
1724
1828
  };
1725
1829
  ProductListComponent = __decorate([
1726
1830
  UntilDestroy()
1727
1831
  ], ProductListComponent);
1728
1832
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductListComponent, decorators: [{
1729
1833
  type: Component,
1730
- args: [{ selector: 'app-product-list', template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Products</h3>\n <app-product-form-button></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\"\n (onExportStart)=\"handleExport(true)\" (onExportEnd)=\"handleExport(false)\">\n </app-export-to-excel-button>\n <app-column-selector mode=\"icon\" class=\"d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector\n apiUrl=\"api/product-types\"\n formControlName=\"type_ids\"\n titleField=\"title\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<div class=\"d-flex justify-content-start gap-3\">\n <mat-card [style.width]=\"selection.isEmpty() ? '100%' : '85%'\">\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n matSortDisableClear=\"true\"\n aria-describedby=\"Products List\"\n id=\"productTable\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Name Column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"[element?.id, 'view']\">{{ element.name }}</a>\n <small class=\"text-secondary\" *ngIf=\"element.type && !exportInProgress\">\n {{ element.type?.title }}\n </small>\n </div>\n </td>\n </ng-container>\n\n <!-- Type Column -->\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div\n *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\"\n >\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.sku }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Initial Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element.initial_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.initial_quantity_date\">\n on {{ element?.initial_quantity_date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Receipts Column -->\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell mat-sort-header=\"stock_receipts_sum_quantity\" *matHeaderCellDef>Stock Receipts</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_receipts_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_receipt && !exportInProgress\">\n Latest on {{ element?.last_stock_receipt?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Last Stock Receipt Date Column -->\n <ng-container matColumnDef=\"last_stock_receipt_date\">\n <th mat-header-cell *matHeaderCellDef>Last Stock Receipt Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_receipt?.date | date }}\n </td>\n </ng-container>\n\n <!-- Stock Issuances Column -->\n <ng-container matColumnDef=\"stock_issuances\">\n <th mat-header-cell mat-sort-header=\"stock_issuances_sum_quantity\" *matHeaderCellDef>Stock Issuances</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_issuances_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_issuance && !exportInProgress\">\n Latest on {{ element?.last_stock_issuance?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Last Stock Issue Date Column -->\n <ng-container matColumnDef=\"last_stock_issue_date\">\n <th mat-header-cell *matHeaderCellDef>Last Stock Issue Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_issuance?.date | date }}\n </td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell mat-sort-header='stock_on_hand' *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Measure</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"reorder_point\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reorder_point }}\n </td>\n </ng-container>\n\n <!-- Selling Price Column -->\n <ng-container matColumnDef=\"sale_price\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Selling Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.sale_price | currency }}\n </td>\n </ng-container>\n\n <!-- Income Account Column -->\n <ng-container matColumnDef=\"income_account\">\n <th mat-header-cell *matHeaderCellDef>Income Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.income_account?.title }}\n </td>\n </ng-container>\n\n <!-- Expense Account Column -->\n <ng-container matColumnDef=\"expense_account\">\n <th mat-header-cell *matHeaderCellDef>Expense Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.expense_account?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-product-form-button [product]=\"element\"></app-product-form-button>\n <mat-icon\n class=\"cursor-pointer\"\n matTooltip=\"View\"\n [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"\n >\n remove_red_eye\n </mat-icon>\n\n <app-stock-receipt-form-button [product]=\"element\" (saved)=\"reload()\"></app-stock-receipt-form-button>\n\n <app-stock-issue-form-button [product]=\"element\" (saved)=\"reload()\"></app-stock-issue-form-button>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Select\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllRowsSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllRowsSelected()\"\n [aria-label]=\"checkboxLabel()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n [aria-label]=\"checkboxLabel(row)\">\n </mat-checkbox>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <mat-card\n *ngIf=\"!selection.isEmpty()\"\n style=\"width: calc(15% - 1rem)\"\n >\n <mat-card-content>\n <app-product-batch-update-form [selection]=\"selection\" (updated)=\"reload()\"></app-product-batch-update-form>\n </mat-card-content>\n </mat-card>\n</div>\n" }]
1834
+ args: [{ selector: 'app-product-list', template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Products</h3>\n <app-product-form-button></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\" (onExportStart)=\"handleExport(true)\"\n (onExportEnd)=\"handleExport(false)\">\n </app-export-to-excel-button>\n <app-column-selector mode=\"icon\" class=\"d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field class='fl-md'>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_ids\" titleField=\"title\"\n [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<div class=\"d-flex justify-content-start gap-3\">\n <mat-card [class.flex-fill]=\"!selection.isEmpty()\" [class.w-100]=\"selection.isEmpty()\">\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" matSortDisableClear=\"true\" aria-describedby=\"Products List\"\n id=\"productTable\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Name Column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"[element?.id, 'view']\">{{ element.name }}</a>\n <small class=\"text-secondary\" *ngIf=\"element.type && !exportInProgress\">\n {{ element.type?.title }}\n </small>\n </div>\n </td>\n </ng-container>\n\n <!-- Type Column -->\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\">\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.sku }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Initial Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element.initial_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.initial_quantity_date\">\n on {{ element?.initial_quantity_date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Receipts Column -->\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell mat-sort-header=\"stock_receipts_sum_quantity\" *matHeaderCellDef>Stock Receipts</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_receipts_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_receipt && !exportInProgress\">\n Latest on {{ element?.last_stock_receipt?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Issues Column -->\n <ng-container matColumnDef=\"stock_issues\">\n <th mat-header-cell mat-sort-header=\"stock_issues_sum_quantity\" *matHeaderCellDef>Stock Issues</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_issues_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_issue && !exportInProgress\">\n Latest on {{ element?.last_stock_issue?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell mat-sort-header='stock_on_hand' *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Measure</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"reorder_point\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reorder_point }}\n </td>\n </ng-container>\n\n <!-- Selling Price Column -->\n <ng-container matColumnDef=\"sale_price\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Selling Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.sale_price | currency }}\n </td>\n </ng-container>\n\n <!-- Income Account Column -->\n <ng-container matColumnDef=\"income_account\">\n <th mat-header-cell *matHeaderCellDef>Income Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.income_account?.title }}\n </td>\n </ng-container>\n\n <!-- Expense Account Column -->\n <ng-container matColumnDef=\"expense_account\">\n <th mat-header-cell *matHeaderCellDef>Expense Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.expense_account?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-techlify-icon name='view' [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"></app-techlify-icon>\n\n <app-product-form-button [product]=\"element\"></app-product-form-button>\n <app-stock-receipt-form-button [product]=\"element\" (saved)=\"reload()\"></app-stock-receipt-form-button>\n <app-stock-issue-form-button [product]=\"element\" (saved)=\"reload()\"></app-stock-issue-form-button>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Select\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllRowsSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllRowsSelected()\" [aria-label]=\"checkboxLabel()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\" [aria-label]=\"checkboxLabel(row)\">\n </mat-checkbox>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <mat-card *ngIf=\"!selection.isEmpty()\" class=\"batch-update-card\">\n <mat-card-content>\n <app-product-batch-update-form [selection]=\"selection\" (updated)=\"reload()\"></app-product-batch-update-form>\n </mat-card-content>\n </mat-card>\n</div>", styles: [".batch-update-card{width:15%;min-width:300px}\n"] }]
1731
1835
  }], ctorParameters: () => [{ type: i2$2.FormBuilder }, { type: i1$1.MatDialog }, { type: i2.ActivatedRoute }, { type: ProductService }, { type: ProductFormService }] });
1732
1836
 
1733
1837
  class ProductNavBarComponent {
@@ -1781,7 +1885,7 @@ class StockReceiptDeleteButtonComponent {
1781
1885
  });
1782
1886
  }
1783
1887
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptDeleteButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: StockReceiptService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
1784
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockReceiptDeleteButtonComponent, selector: "app-stock-receipt-delete-button", inputs: { stockReceipt: "stockReceipt" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<span class=\"material-symbols-outlined cursor-pointer\" (click)=\"showDeleteConfirmModel(deleteModelTemplate)\">\n delete\n</span>\n\n<ng-template #deleteModelTemplate>\n <h3 mat-dialog-title>Delete Stock Receipt</h3>\n <div mat-dialog-content>\n <p>Are you sure you want to delete the stock receipt record?</p>\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-2\">\n <button [disabled]=\"isDeleting\" mat-raised-button type=\"button\" color=\"warn\" (click)=\"delete()\">Delete</button>\n <button [disabled]=\"isDeleting\" mat-flat-button mat-dialog-close type=\"button\">Cancel</button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }], preserveWhitespaces: true });
1888
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockReceiptDeleteButtonComponent, selector: "app-stock-receipt-delete-button", inputs: { stockReceipt: "stockReceipt" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<span class=\"material-symbols-outlined cursor-pointer\" (click)=\"showDeleteConfirmModel(deleteModelTemplate)\">\n delete\n</span>\n\n<ng-template #deleteModelTemplate>\n <h3 mat-dialog-title>Delete Stock Receipt</h3>\n <div mat-dialog-content>\n <p>Are you sure you want to delete the stock receipt record?</p>\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-2\">\n <button [disabled]=\"isDeleting\" mat-raised-button type=\"button\" color=\"warn\" (click)=\"delete()\">Delete</button>\n <button [disabled]=\"isDeleting\" mat-flat-button mat-dialog-close type=\"button\">Cancel</button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }], preserveWhitespaces: true });
1785
1889
  }
1786
1890
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptDeleteButtonComponent, decorators: [{
1787
1891
  type: Component,
@@ -1883,6 +1987,7 @@ let StockReceiptsListPageComponent = class StockReceiptsListPageComponent extend
1883
1987
  }
1884
1988
  this.patchFiltersFromRoute();
1885
1989
  this.listenFilterChanges();
1990
+ this.loadData();
1886
1991
  }
1887
1992
  loadData() {
1888
1993
  const params = {
@@ -1932,7 +2037,7 @@ let StockReceiptsListPageComponent = class StockReceiptsListPageComponent extend
1932
2037
  }
1933
2038
  subscribeToRouteChanges() {
1934
2039
  this.activatedRoute.queryParams
1935
- .pipe(debounceTime$1(500), distinctUntilChanged())
2040
+ .pipe(debounceTime$1(500), distinctUntilChanged$1())
1936
2041
  .subscribe(() => {
1937
2042
  this.reload();
1938
2043
  });
@@ -1951,7 +2056,7 @@ let StockReceiptsListPageComponent = class StockReceiptsListPageComponent extend
1951
2056
  this.router.navigate(['/inventory/stock-receipts', model?.id, 'view']);
1952
2057
  }
1953
2058
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptsListPageComponent, deps: [{ token: StockReceiptService }, { token: i2$2.FormBuilder }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i1.TechlifyFeatureService }], target: i0.ɵɵFactoryTarget.Component });
1954
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockReceiptsListPageComponent, selector: "app-stock-receipts-list-page", inputs: { product: "product", supplierId: "supplierId" }, outputs: { listUpdated: "listUpdated" }, usesInheritance: true, ngImport: i0, template: "<mat-card *ngIf=\"!product\" class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Stock Receipts</h3>\n\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector mode=\"icon\" class=\"mt-1 d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <form [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"product\" class=\"mb-0\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> output_circle </span>\n <h3 class=\"mb-0\">Stock Receipts</h3>\n <app-stock-receipt-form-button [latestLocationId]=\"models.length > 0 ? models[0].location_id : null\"\n [product]=\"product\" (saved)=\"redirectToView($event)\" icon=\"add\"></app-stock-receipt-form-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Receipts\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.stock_receipt_products[0]?.product?.id, 'view']\">\n {{ element?.stock_receipt_products[0]?.product?.name }}\n </a>\n <app-product-category-badges\n [product]=\"element?.stock_receipt_products[0]?.product\"></app-product-category-badges>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.product?.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date }}</td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.quantity }} {{\n element?.stock_receipt_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_receipt_products[0]?.location_id, 'view']\">\n {{ element?.stock_receipt_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Purchase Price Column -->\n <ng-container matColumnDef=\"purchase_price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Purchase Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_receipt_products[0]?.purchase_price | currency }}\n </td>\n </ng-container>\n\n <!-- Total Value Column -->\n <ng-container matColumnDef=\"amount\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Value</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_receipt_products[0]?.amount | currency }}\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.supplier?.company_name }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1\">\n <mat-icon [routerLink]=\"['/inventory', 'stock-receipts', element?.id, 'view']\" class=\"cursor-pointer\">\n visibility\n </mat-icon>\n <app-stock-receipt-form-button [product]=\"element.product\" [stockReceipt]=\"element\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-receipt-form-button>\n <app-stock-receipt-delete-button [stockReceipt]=\"element\"\n (deleted)=\"reload(); listUpdated.emit()\"></app-stock-receipt-delete-button>\n </div>\n\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef colspan=\"1\"><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalPurchasePrice | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalValue | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i7.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i7.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: StockReceiptFormButtonComponent, selector: "app-stock-receipt-form-button", inputs: ["product", "stockReceipt", "latestLocationId", "icon"], outputs: ["saved"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: StockReceiptDeleteButtonComponent, selector: "app-stock-receipt-delete-button", inputs: ["stockReceipt"], outputs: ["deleted"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
2059
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockReceiptsListPageComponent, selector: "app-stock-receipts-list-page", inputs: { product: "product", supplierId: "supplierId" }, outputs: { listUpdated: "listUpdated" }, usesInheritance: true, ngImport: i0, template: "<mat-card *ngIf=\"!product\" class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Stock Receipts</h3>\n\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector mode=\"icon\" class=\"mt-1 d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <form [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"product\" class=\"mb-0\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> output_circle </span>\n <h3 class=\"mb-0\">Stock Receipts</h3>\n <app-stock-receipt-form-button [latestLocationId]=\"models.length > 0 ? models[0].location_id : null\"\n [product]=\"product\" (saved)=\"redirectToView($event)\" icon=\"add\"></app-stock-receipt-form-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Receipts\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.stock_receipt_products[0]?.product?.id, 'view']\">\n {{ element?.stock_receipt_products[0]?.product?.name }}\n </a>\n <app-product-category-badges\n [product]=\"element?.stock_receipt_products[0]?.product\"></app-product-category-badges>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.product?.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date }}</td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.quantity }} {{\n element?.stock_receipt_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_receipt_products[0]?.location_id, 'view']\">\n {{ element?.stock_receipt_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Purchase Price Column -->\n <ng-container matColumnDef=\"purchase_price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Purchase Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_receipt_products[0]?.purchase_price | currency }}\n </td>\n </ng-container>\n\n <!-- Total Value Column -->\n <ng-container matColumnDef=\"amount\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Value</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_receipt_products[0]?.amount | currency }}\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.supplier?.company_name }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1\">\n <mat-icon [routerLink]=\"['/inventory', 'stock-receipts', element?.id, 'view']\" class=\"cursor-pointer\">\n visibility\n </mat-icon>\n <app-stock-receipt-form-button [product]=\"element.product\" [stockReceipt]=\"element\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-receipt-form-button>\n <app-stock-receipt-delete-button [stockReceipt]=\"element\"\n (deleted)=\"reload(); listUpdated.emit()\"></app-stock-receipt-delete-button>\n </div>\n\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef colspan=\"1\"><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalPurchasePrice | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalValue | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i11.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i11.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i11.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i14.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i11$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: StockReceiptFormButtonComponent, selector: "app-stock-receipt-form-button", inputs: ["product", "stockReceipt", "latestLocationId", "icon"], outputs: ["saved"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: StockReceiptDeleteButtonComponent, selector: "app-stock-receipt-delete-button", inputs: ["stockReceipt"], outputs: ["deleted"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
1955
2060
  };
1956
2061
  StockReceiptsListPageComponent = __decorate([
1957
2062
  UntilDestroy()
@@ -1997,7 +2102,7 @@ class StockIssuanceDeleteButtonComponent {
1997
2102
  });
1998
2103
  }
1999
2104
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssuanceDeleteButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: StockIssueService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
2000
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssuanceDeleteButtonComponent, selector: "app-stock-issuance-delete-button", inputs: { stockIssuance: "stockIssuance" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<span class=\"material-symbols-outlined cursor-pointer\" (click)=\"showDeleteConfirmModel(deleteModelTemplate)\">\n delete\n</span>\n\n<ng-template #deleteModelTemplate>\n <h3 mat-dialog-title>Delete Stock Issuance</h3>\n <div mat-dialog-content>\n <p>Are you sure you want to delete the stock issuance record?</p>\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-2\">\n <button [disabled]=\"isDeleting\" mat-raised-button type=\"button\" color=\"warn\" (click)=\"delete()\">Delete</button>\n <button [disabled]=\"isDeleting\" mat-flat-button mat-dialog-close type=\"button\">Cancel</button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }], preserveWhitespaces: true });
2105
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssuanceDeleteButtonComponent, selector: "app-stock-issuance-delete-button", inputs: { stockIssuance: "stockIssuance" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<span class=\"material-symbols-outlined cursor-pointer\" (click)=\"showDeleteConfirmModel(deleteModelTemplate)\">\n delete\n</span>\n\n<ng-template #deleteModelTemplate>\n <h3 mat-dialog-title>Delete Stock Issuance</h3>\n <div mat-dialog-content>\n <p>Are you sure you want to delete the stock issuance record?</p>\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-2\">\n <button [disabled]=\"isDeleting\" mat-raised-button type=\"button\" color=\"warn\" (click)=\"delete()\">Delete</button>\n <button [disabled]=\"isDeleting\" mat-flat-button mat-dialog-close type=\"button\">Cancel</button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }], preserveWhitespaces: true });
2001
2106
  }
2002
2107
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssuanceDeleteButtonComponent, decorators: [{
2003
2108
  type: Component,
@@ -2076,6 +2181,7 @@ class StockIssueListComponent extends TechlifyListingControllerInterface {
2076
2181
  }
2077
2182
  this.patchFiltersFromRoute();
2078
2183
  this.listenFilterChanges();
2184
+ this.loadData();
2079
2185
  }
2080
2186
  loadData() {
2081
2187
  const params = {
@@ -2129,7 +2235,7 @@ class StockIssueListComponent extends TechlifyListingControllerInterface {
2129
2235
  }
2130
2236
  subscribeToRouteChanges() {
2131
2237
  this.activatedRoute.queryParams
2132
- .pipe(debounceTime$1(500), distinctUntilChanged())
2238
+ .pipe(debounceTime$1(500), distinctUntilChanged$1())
2133
2239
  .subscribe(() => {
2134
2240
  this.reload();
2135
2241
  });
@@ -2145,7 +2251,7 @@ class StockIssueListComponent extends TechlifyListingControllerInterface {
2145
2251
  }
2146
2252
  }
2147
2253
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueListComponent, deps: [{ token: i2$2.FormBuilder }, { token: StockIssueService }, { token: i2.ActivatedRoute }, { token: i1.TechlifyFeatureService }], target: i0.ɵɵFactoryTarget.Component });
2148
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueListComponent, selector: "app-stock-issue-list", inputs: { product: "product", issuableType: "issuableType", issuableId: "issuableId", label: "label", showActions: "showActions", showFilters: "showFilters" }, outputs: { listUpdated: "listUpdated" }, usesInheritance: true, ngImport: i0, template: "<mat-card *ngIf=\"!product\" class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">{{ label }}</h3>\n\n <app-stock-issue-form-button icon=\"add\" [issuableType]=\"issuableType\" [issuableId]=\"issuableId\"\n (saved)=\"reload()\"></app-stock-issue-form-button>\n\n <span *ngIf=\"showActions\" matTooltip=\"Import\" routerLink=\"import\"\n class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector *ngIf=\"showActions\" mode=\"icon\" class=\"mt-2 d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <form [formGroup]=\"filterForm\" *ngIf=\"showFilters\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"product\" class=\"mb-0\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <h3 class=\"mb-0\">Stock Issues</h3>\n\n <app-stock-issue-form-button class=\"mt-2\" [product]=\"product\" icon=\"add\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-issue-form-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issuances\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.stock_issue_products[0]?.product?.id, 'view']\">\n {{ element?.stock_issue_products[0]?.product.name }}\n </a>\n <app-product-category-badges\n [product]=\"element?.stock_issue_products[0]?.product\"></app-product-category-badges>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_issue_products[0]?.location_id, 'view']\">\n {{ element?.stock_issue_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-dark\" *ngIf=\"element?.issuable\" [routerLink]=\"['/maintenances', element?.issuable_id, 'view']\">\n Maintenance for {{ element?.issuable?.fixed_asset?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.quantity }} {{\n element?.stock_issue_products[0]?.product.measure?.title }}</td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.stock_issue_products[0]?.batch?.batch_number\">{{\n element?.stock_issue_products[0]?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.stock_issue_products[0]?.batch?.expires_on\">\n Expires {{ element?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product.measure?.title }}</td>\n </ng-container>\n\n <!-- Purchase Price Column -->\n <ng-container matColumnDef=\"purchase_price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Purchase Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.purchase_price | currency }}\n </td>\n </ng-container>\n\n <!-- Total Value Column -->\n <ng-container matColumnDef=\"amount\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Value</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.amount | currency }}\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.supplier?.company_name }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', element?.id, 'view']\"></app-techlify-icon>\n <app-stock-issue-form-button [stockIssue]=\"element\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-issue-form-button>\n <app-stock-issuance-delete-button [stockIssuance]=\"element\"\n (deleted)=\"reload(); listUpdated.emit()\"></app-stock-issuance-delete-button>\n </div>\n\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i7.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i7.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssueProduct", "stockIssue", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: StockIssuanceDeleteButtonComponent, selector: "app-stock-issuance-delete-button", inputs: ["stockIssuance"], outputs: ["deleted"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
2254
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueListComponent, selector: "app-stock-issue-list", inputs: { product: "product", issuableType: "issuableType", issuableId: "issuableId", label: "label", showActions: "showActions", showFilters: "showFilters" }, outputs: { listUpdated: "listUpdated" }, usesInheritance: true, ngImport: i0, template: "<mat-card *ngIf=\"!product\" class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">{{ label }}</h3>\n\n <app-stock-issue-form-button icon=\"add\" [issuableType]=\"issuableType\" [issuableId]=\"issuableId\"\n (saved)=\"reload()\"></app-stock-issue-form-button>\n\n <span *ngIf=\"showActions\" matTooltip=\"Import\" routerLink=\"import\"\n class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector *ngIf=\"showActions\" mode=\"icon\" class=\"mt-2 d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <form [formGroup]=\"filterForm\" *ngIf=\"showFilters\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"product\" class=\"mb-0\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <h3 class=\"mb-0\">Stock Issues</h3>\n\n <app-stock-issue-form-button class=\"mt-2\" [product]=\"product\" icon=\"add\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-issue-form-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issuances\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.stock_issue_products[0]?.product?.id, 'view']\">\n {{ element?.stock_issue_products[0]?.product.name }}\n </a>\n <app-product-category-badges\n [product]=\"element?.stock_issue_products[0]?.product\"></app-product-category-badges>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_issue_products[0]?.location_id, 'view']\">\n {{ element?.stock_issue_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-dark\" *ngIf=\"element?.issuable\" [routerLink]=\"['/maintenances', element?.issuable_id, 'view']\">\n Maintenance for {{ element?.issuable?.fixed_asset?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.quantity }} {{\n element?.stock_issue_products[0]?.product.measure?.title }}</td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.stock_issue_products[0]?.batch?.batch_number\">{{\n element?.stock_issue_products[0]?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.stock_issue_products[0]?.batch?.expires_on\">\n Expires {{ element?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product.measure?.title }}</td>\n </ng-container>\n\n <!-- Purchase Price Column -->\n <ng-container matColumnDef=\"purchase_price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Purchase Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.purchase_price | currency }}\n </td>\n </ng-container>\n\n <!-- Total Value Column -->\n <ng-container matColumnDef=\"amount\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Value</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.amount | currency }}\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.supplier?.company_name }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', element?.id, 'view']\"></app-techlify-icon>\n <app-stock-issue-form-button [stockIssue]=\"element\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-issue-form-button>\n <app-stock-issuance-delete-button [stockIssuance]=\"element\"\n (deleted)=\"reload(); listUpdated.emit()\"></app-stock-issuance-delete-button>\n </div>\n\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i11.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i11.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i11.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssueProduct", "stockIssue", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "directive", type: i14.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: StockIssuanceDeleteButtonComponent, selector: "app-stock-issuance-delete-button", inputs: ["stockIssuance"], outputs: ["deleted"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
2149
2255
  }
2150
2256
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueListComponent, decorators: [{
2151
2257
  type: Component,
@@ -2363,7 +2469,7 @@ class ProductLocationListComponent extends TechlifyListingControllerInterface {
2363
2469
  });
2364
2470
  }
2365
2471
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductLocationListComponent, deps: [{ token: ProductStatisticsService }, { token: i1.ErrorHandlerService }], target: i0.ɵɵFactoryTarget.Component });
2366
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductLocationListComponent, isStandalone: true, selector: "app-product-location-list", inputs: { product: "product" }, outputs: { updated: "updated" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"pb-3 d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start gap-2\">\n <span class=\"material-symbols-outlined\"> location_on </span>\n <strong class=\"mb-0 text-dark\">Product Locations</strong>\n </div>\n\n </mat-card-content>\n <mat-divider></mat-divider>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = index\"> {{ i + 1 }} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Location\">\n <th mat-header-cell *matHeaderCellDef> Location </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Stock\">\n <th mat-header-cell *matHeaderCellDef> Stock </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.current_stock }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n <app-stock-transfer-form-button *ngIf=\"element?.id\" [locationFrom]=\"element\" [productId]=\"product?.id\"\n (saved)=\"reload();updated.emit($event)\"></app-stock-transfer-form-button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n\n </mat-card-content>\n</mat-card>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: StockTransferFormButtonComponent, selector: "app-stock-transfer-form-button", inputs: ["productId", "locationFrom"], outputs: ["saved"] }], preserveWhitespaces: true });
2472
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductLocationListComponent, isStandalone: true, selector: "app-product-location-list", inputs: { product: "product" }, outputs: { updated: "updated" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"pb-3 d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start gap-2\">\n <span class=\"material-symbols-outlined\"> location_on </span>\n <strong class=\"mb-0 text-dark\">Product Locations</strong>\n </div>\n\n </mat-card-content>\n <mat-divider></mat-divider>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = index\"> {{ i + 1 }} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Location\">\n <th mat-header-cell *matHeaderCellDef> Location </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Stock\">\n <th mat-header-cell *matHeaderCellDef> Stock </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.current_stock }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n <app-stock-transfer-form-button *ngIf=\"element?.id\" [locationFrom]=\"element\" [productId]=\"product?.id\"\n (saved)=\"reload();updated.emit($event)\"></app-stock-transfer-form-button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n\n </mat-card-content>\n</mat-card>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: StockTransferFormButtonComponent, selector: "app-stock-transfer-form-button", inputs: ["productId", "locationFrom"], outputs: ["saved"] }], preserveWhitespaces: true });
2367
2473
  }
2368
2474
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductLocationListComponent, decorators: [{
2369
2475
  type: Component,
@@ -2454,7 +2560,7 @@ class StockTransferListComponent extends TechlifyListingControllerInterface {
2454
2560
  }
2455
2561
  subscribeToRouteChanges() {
2456
2562
  this.activatedRoute.queryParams
2457
- .pipe(debounceTime$1(500), distinctUntilChanged())
2563
+ .pipe(debounceTime$1(500), distinctUntilChanged$1())
2458
2564
  .subscribe(() => {
2459
2565
  this.reload();
2460
2566
  });
@@ -2471,7 +2577,7 @@ class StockTransferListComponent extends TechlifyListingControllerInterface {
2471
2577
  this.filterForm.get('sort_by').setValue(active + '|' + direction);
2472
2578
  }
2473
2579
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockTransferListComponent, deps: [{ token: StockTransferService }, { token: i2$2.FormBuilder }, { token: i1.ErrorHandlerService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
2474
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockTransferListComponent, isStandalone: true, selector: "app-stock-transfer-list", inputs: { productId: "productId" }, usesInheritance: true, ngImport: i0, template: "<mat-card *ngIf=\"!productId\" class=\"mb-2\">\n <mat-card-content class=\"mb-0 d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n\n <div class=\"d-flex flex-row gap-2 align-items-center\">\n <h3 class=\"mb-0\">Stock Transfers</h3>\n <app-stock-transfer-form-button [productId]=\"productId\" (saved)=\"reload()\"></app-stock-transfer-form-button>\n </div>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search Stock Transfers\" matInput formControlName=\"search\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector apiUrl=\"api/stock-transfer-statuses\" formControlName=\"status_ids\"\n [enableSearch]=\"false\" [multiple]=\"true\"></app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"productId\" class=\"mb-0 d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n\n <div class=\"d-flex flex-row gap-2 align-items-center\">\n <h3 class=\"mb-0\">Stock Transfers</h3>\n <app-stock-transfer-form-button [productId]=\"productId\" (saved)=\"reload()\"></app-stock-transfer-form-button>\n </div>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Transfers\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"date\">Date</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column\">\n <span>{{ element?.date | date }}</span>\n <span>{{ element?.particulars }}</span>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <a [routerLink]=\"['/inventory/products', element?.product?.id, 'view']\"\n class=\"text-decoration-none text-dark\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"quantity\">Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.quantity }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"location_from\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"location_from_id\">From</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.location_from?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"location_to\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"location_to_id\">To</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.location_to?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"status\">Status</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.status?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: StockTransferFormButtonComponent, selector: "app-stock-transfer-form-button", inputs: ["productId", "locationFrom"], outputs: ["saved"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }], preserveWhitespaces: true });
2580
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockTransferListComponent, isStandalone: true, selector: "app-stock-transfer-list", inputs: { productId: "productId" }, usesInheritance: true, ngImport: i0, template: "<mat-card *ngIf=\"!productId\" class=\"mb-2\">\n <mat-card-content class=\"mb-0 d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n\n <div class=\"d-flex flex-row gap-2 align-items-center\">\n <h3 class=\"mb-0\">Stock Transfers</h3>\n <app-stock-transfer-form-button [productId]=\"productId\" (saved)=\"reload()\"></app-stock-transfer-form-button>\n </div>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search Stock Transfers\" matInput formControlName=\"search\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector apiUrl=\"api/stock-transfer-statuses\" formControlName=\"status_ids\"\n [enableSearch]=\"false\" [multiple]=\"true\"></app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"productId\" class=\"mb-0 d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n\n <div class=\"d-flex flex-row gap-2 align-items-center\">\n <h3 class=\"mb-0\">Stock Transfers</h3>\n <app-stock-transfer-form-button [productId]=\"productId\" (saved)=\"reload()\"></app-stock-transfer-form-button>\n </div>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Transfers\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"date\">Date</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column\">\n <span>{{ element?.date | date }}</span>\n <span>{{ element?.particulars }}</span>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <a [routerLink]=\"['/inventory/products', element?.product?.id, 'view']\"\n class=\"text-decoration-none text-dark\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"quantity\">Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.quantity }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"location_from\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"location_from_id\">From</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.location_from?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"location_to\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"location_to_id\">To</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.location_to?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"status\">Status</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.status?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: StockTransferFormButtonComponent, selector: "app-stock-transfer-form-button", inputs: ["productId", "locationFrom"], outputs: ["saved"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }], preserveWhitespaces: true });
2475
2581
  }
2476
2582
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockTransferListComponent, decorators: [{
2477
2583
  type: Component,
@@ -2547,7 +2653,7 @@ class ProductDeleteButtonComponent {
2547
2653
  this.matDialog.open(templateRef, { width: '500px' });
2548
2654
  }
2549
2655
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductDeleteButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: ProductService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
2550
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductDeleteButtonComponent, selector: "app-product-delete-button", inputs: { product: "product" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer text-secondary\" (click)=\"showDeleteDialog(deleteProductDialog)\"> delete </mat-icon>\n\n<ng-template #deleteProductDialog>\n <h3 mat-dialog-title>Delete Product</h3>\n <div mat-dialog-content>\n Are you sure? You want to delete the\n <strong>{{ product?.name }}</strong> ?\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-1 mb-2\">\n <button [disabled]=\"isDeleting\" type=\"button\" mat-raised-button color=\"warn\" (click)=\"deleteProduct()\">\n Delete\n </button>\n <button [disabled]=\"isDeleting\" type=\"button\" mat-flat-button mat-dialog-close>Cancel</button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], preserveWhitespaces: true });
2656
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductDeleteButtonComponent, selector: "app-product-delete-button", inputs: { product: "product" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer text-secondary\" (click)=\"showDeleteDialog(deleteProductDialog)\"> delete </mat-icon>\n\n<ng-template #deleteProductDialog>\n <h3 mat-dialog-title>Delete Product</h3>\n <div mat-dialog-content>\n Are you sure? You want to delete the\n <strong>{{ product?.name }}</strong> ?\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-1 mb-2\">\n <button [disabled]=\"isDeleting\" type=\"button\" mat-raised-button color=\"warn\" (click)=\"deleteProduct()\">\n Delete\n </button>\n <button [disabled]=\"isDeleting\" type=\"button\" mat-flat-button mat-dialog-close>Cancel</button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i11$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], preserveWhitespaces: true });
2551
2657
  }
2552
2658
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductDeleteButtonComponent, decorators: [{
2553
2659
  type: Component,
@@ -2659,11 +2765,11 @@ class ProductViewPageComponent {
2659
2765
  this.location.back();
2660
2766
  }
2661
2767
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductViewPageComponent, deps: [{ token: ProductService }, { token: i2.ActivatedRoute }, { token: i3.Location }], target: i0.ɵɵFactoryTarget.Component });
2662
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductViewPageComponent, selector: "app-product-view-page", viewQueries: [{ propertyName: "productLocationList", first: true, predicate: ["productLocationList"], descendants: true }, { propertyName: "stockTransferList", first: true, predicate: ["stockTransferList"], descendants: true }, { propertyName: "stockReceiptsListPage", first: true, predicate: ["stockReceiptsListPage"], descendants: true }, { propertyName: "stockIssueListPage", first: true, predicate: ["stockIssueListPage"], descendants: true }], ngImport: i0, template: "<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n\n<div *ngIf=\"product\" class=\"d-flex justify-content-start align-items-start gap-3\">\n <div *ngIf=\"product\" class=\"d-flex justify-content-start align-items-start gap-3\">\n <div style=\"width: calc(25% - 1rem)\" class=\"d-flex flex-column gap-3\">\n <app-product-basic-info [product]=\"product\" #productBasicInfoComponent (deleted)=\"onProductDeleted()\"\n (saved)=\"onProductUpdated($event)\"></app-product-basic-info>\n\n <app-product-location-list [product]=\"product\"\n (updated)=\"stockTransferList.reload(); stockReceiptsListPage.reload(); stockIssueListPage.reload()\"\n #productLocationList></app-product-location-list>\n\n <!-- <app-product-tax-list [product]=\"product\"></app-product-tax-list> -->\n </div>\n <div style=\"width: calc(75%)\" class=\"d-flex flex-column gap-3\">\n <app-stock-receipts-list-page #stockReceiptsListPage [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-receipts-list-page>\n\n <app-stock-issue-list #stockIssueListPage [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-issue-list>\n\n <app-stock-transfer-list #stockTransferList *ngIf=\"product\" [productId]=\"product.id\"></app-stock-transfer-list>\n </div>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: StockReceiptsListPageComponent, selector: "app-stock-receipts-list-page", inputs: ["product", "supplierId"], outputs: ["listUpdated"] }, { kind: "component", type: StockIssueListComponent, selector: "app-stock-issue-list", inputs: ["product", "issuableType", "issuableId", "label", "showActions", "showFilters"], outputs: ["listUpdated"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: ProductLocationListComponent, selector: "app-product-location-list", inputs: ["product"], outputs: ["updated"] }, { kind: "component", type: StockTransferListComponent, selector: "app-stock-transfer-list", inputs: ["productId"] }, { kind: "component", type: ProductBasicInfoComponent, selector: "app-product-basic-info", inputs: ["product"], outputs: ["saved", "deleted"] }], preserveWhitespaces: true });
2768
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductViewPageComponent, selector: "app-product-view-page", viewQueries: [{ propertyName: "productLocationList", first: true, predicate: ["productLocationList"], descendants: true }, { propertyName: "stockTransferList", first: true, predicate: ["stockTransferList"], descendants: true }, { propertyName: "stockReceiptsListPage", first: true, predicate: ["stockReceiptsListPage"], descendants: true }, { propertyName: "stockIssueListPage", first: true, predicate: ["stockIssueListPage"], descendants: true }], ngImport: i0, template: "<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n\n<div *ngIf=\"product\" class=\"d-flex justify-content-start align-items-start gap-3\">\n <div *ngIf=\"product\" class=\"d-flex justify-content-start align-items-start gap-3\">\n <div style=\"width: calc(25% - 1rem)\" class=\"d-flex flex-column gap-3\">\n <app-product-basic-info [product]=\"product\" #productBasicInfoComponent (deleted)=\"onProductDeleted()\"\n (saved)=\"onProductUpdated($event)\"></app-product-basic-info>\n\n <app-product-location-list [product]=\"product\"\n (updated)=\"stockTransferList.reload(); stockReceiptsListPage.reload(); stockIssueListPage.reload()\"\n #productLocationList></app-product-location-list>\n\n <app-note-list labelText=\"Notes\" viewMode=\"timeline\" modelType=\"Product\"\n [relatedModelId]=\"product.id\"></app-note-list>\n\n </div>\n <div style=\"width: calc(75%)\" class=\"d-flex flex-column gap-3\">\n <app-stock-receipts-list-page #stockReceiptsListPage [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-receipts-list-page>\n\n <app-stock-issue-list #stockIssueListPage [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-issue-list>\n\n <app-stock-transfer-list #stockTransferList *ngIf=\"product\" [productId]=\"product.id\"></app-stock-transfer-list>\n </div>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: StockReceiptsListPageComponent, selector: "app-stock-receipts-list-page", inputs: ["product", "supplierId"], outputs: ["listUpdated"] }, { kind: "component", type: StockIssueListComponent, selector: "app-stock-issue-list", inputs: ["product", "issuableType", "issuableId", "label", "showActions", "showFilters"], outputs: ["listUpdated"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: ProductLocationListComponent, selector: "app-product-location-list", inputs: ["product"], outputs: ["updated"] }, { kind: "component", type: StockTransferListComponent, selector: "app-stock-transfer-list", inputs: ["productId"] }, { kind: "component", type: i1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "component", type: ProductBasicInfoComponent, selector: "app-product-basic-info", inputs: ["product"], outputs: ["saved", "deleted"] }], preserveWhitespaces: true });
2663
2769
  }
2664
2770
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductViewPageComponent, decorators: [{
2665
2771
  type: Component,
2666
- args: [{ selector: 'app-product-view-page', template: "<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n\n<div *ngIf=\"product\" class=\"d-flex justify-content-start align-items-start gap-3\">\n <div *ngIf=\"product\" class=\"d-flex justify-content-start align-items-start gap-3\">\n <div style=\"width: calc(25% - 1rem)\" class=\"d-flex flex-column gap-3\">\n <app-product-basic-info [product]=\"product\" #productBasicInfoComponent (deleted)=\"onProductDeleted()\"\n (saved)=\"onProductUpdated($event)\"></app-product-basic-info>\n\n <app-product-location-list [product]=\"product\"\n (updated)=\"stockTransferList.reload(); stockReceiptsListPage.reload(); stockIssueListPage.reload()\"\n #productLocationList></app-product-location-list>\n\n <!-- <app-product-tax-list [product]=\"product\"></app-product-tax-list> -->\n </div>\n <div style=\"width: calc(75%)\" class=\"d-flex flex-column gap-3\">\n <app-stock-receipts-list-page #stockReceiptsListPage [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-receipts-list-page>\n\n <app-stock-issue-list #stockIssueListPage [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-issue-list>\n\n <app-stock-transfer-list #stockTransferList *ngIf=\"product\" [productId]=\"product.id\"></app-stock-transfer-list>\n </div>\n </div>\n</div>" }]
2772
+ args: [{ selector: 'app-product-view-page', template: "<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n\n<div *ngIf=\"product\" class=\"d-flex justify-content-start align-items-start gap-3\">\n <div *ngIf=\"product\" class=\"d-flex justify-content-start align-items-start gap-3\">\n <div style=\"width: calc(25% - 1rem)\" class=\"d-flex flex-column gap-3\">\n <app-product-basic-info [product]=\"product\" #productBasicInfoComponent (deleted)=\"onProductDeleted()\"\n (saved)=\"onProductUpdated($event)\"></app-product-basic-info>\n\n <app-product-location-list [product]=\"product\"\n (updated)=\"stockTransferList.reload(); stockReceiptsListPage.reload(); stockIssueListPage.reload()\"\n #productLocationList></app-product-location-list>\n\n <app-note-list labelText=\"Notes\" viewMode=\"timeline\" modelType=\"Product\"\n [relatedModelId]=\"product.id\"></app-note-list>\n\n </div>\n <div style=\"width: calc(75%)\" class=\"d-flex flex-column gap-3\">\n <app-stock-receipts-list-page #stockReceiptsListPage [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-receipts-list-page>\n\n <app-stock-issue-list #stockIssueListPage [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-issue-list>\n\n <app-stock-transfer-list #stockTransferList *ngIf=\"product\" [productId]=\"product.id\"></app-stock-transfer-list>\n </div>\n </div>\n</div>" }]
2667
2773
  }], ctorParameters: () => [{ type: ProductService }, { type: i2.ActivatedRoute }, { type: i3.Location }], propDecorators: { productLocationList: [{
2668
2774
  type: ViewChild,
2669
2775
  args: ['productLocationList']
@@ -2809,13 +2915,15 @@ class StockReceiptFormModule {
2809
2915
  ReactiveFormsModule,
2810
2916
  MaterialModule,
2811
2917
  SearchableSelectorModule,
2812
- TechlifyFeatureModule], exports: [StockReceiptFormButtonComponent] });
2918
+ TechlifyFeatureModule,
2919
+ LocationSelectorComponent], exports: [StockReceiptFormButtonComponent] });
2813
2920
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormModule, imports: [CommonModule,
2814
2921
  PayeeSelectorModule,
2815
2922
  ReactiveFormsModule,
2816
2923
  MaterialModule,
2817
2924
  SearchableSelectorModule,
2818
- TechlifyFeatureModule] });
2925
+ TechlifyFeatureModule,
2926
+ LocationSelectorComponent] });
2819
2927
  }
2820
2928
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormModule, decorators: [{
2821
2929
  type: NgModule,
@@ -2828,7 +2936,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
2828
2936
  ReactiveFormsModule,
2829
2937
  MaterialModule,
2830
2938
  SearchableSelectorModule,
2831
- TechlifyFeatureModule
2939
+ TechlifyFeatureModule,
2940
+ LocationSelectorComponent
2832
2941
  ],
2833
2942
  }]
2834
2943
  }] });
@@ -3048,7 +3157,7 @@ class TechlifyFilterComponent {
3048
3157
  fixed_asset_ids: { multiple: true },
3049
3158
  });
3050
3159
  // listen for route change
3051
- this.activatedRoute.queryParams.pipe(debounceTime$1(800), distinctUntilChanged()).subscribe((val) => {
3160
+ this.activatedRoute.queryParams.pipe(debounceTime$1(800), distinctUntilChanged$1()).subscribe((val) => {
3052
3161
  this.filterUpdated.emit(this.filterForm.value);
3053
3162
  });
3054
3163
  }
@@ -3089,7 +3198,7 @@ class TechlifyFilterComponent {
3089
3198
  : '';
3090
3199
  }
3091
3200
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TechlifyFilterComponent, deps: [{ token: i1.RequestHelperService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
3092
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: TechlifyFilterComponent, selector: "app-techlify-filter", inputs: { filterForm: "filterForm", filterConfig: "filterConfig" }, outputs: { filterUpdated: "filterUpdated" }, ngImport: i0, template: "<form [formGroup]=\"filterForm\" fxLayout fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\">\n <mat-form-field *ngIf=\"filterForm.get('search')\" [appearance]=\"getFilterConfig('appearance', 'search')\">\n <mat-label>Search</mat-label>\n <input formControlName=\"search\" matInput [placeholder]=\"getFilterConfig('placeholder', 'search')\" />\n <button *ngIf=\"filterForm.value?.search\" mat-icon-button matSuffix (click)=\"resetField('search')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <app-timeline-filter\n *ngIf=\"filterForm?.get('duration')\"\n appearance=\"fill\"\n [labelText]=\"getFilterConfig('label', 'duration')\"\n [appearance]=\"getFilterConfig('appearance', 'duration')\"\n formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\"\n [showClearButton]=\"true\"\n [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"\n ></app-timeline-filter>\n\n <mat-form-field *ngIf=\"filterForm.get('payment_method_ids')\">\n <mat-label>Payment Method</mat-label>\n <app-searchable-selector\n formControlName=\"payment_method_ids\"\n apiUrl=\"api/payment-methods\"\n [multiple]=\"true\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.payment_method_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('payment_method_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"filterForm.get('payment_account_ids')\">\n <mat-form-field *ngxPermissionsOnly=\"['accountingcommon_account.read']\">\n <mat-label>{{ getFilterConfig('label', 'payment_account_ids') || 'Payment Account' }}</mat-label>\n <app-searchable-selector\n formControlName=\"payment_account_ids\"\n [apiUrl]=\"getFilterConfig('apiUrl', 'payment_account_ids') || 'api/accounts'\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.payment_account_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('payment_account_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field *ngIf=\"filterForm.get('invoice_status_ids')\">\n <mat-label>Invoice Status</mat-label>\n <app-searchable-selector\n formControlName=\"invoice_status_ids\"\n apiUrl=\"api/invoice-statuses\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.invoice_status_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('invoice_status_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"filterForm.get('customer_ids')\">\n <mat-form-field *ngxPermissionsOnly=\"['customer_read']\">\n <mat-label>Customer</mat-label>\n <app-searchable-selector\n formControlName=\"customer_ids\"\n titleField=\"name\"\n apiUrl=\"api/customers\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.customer_ids\" mat-icon-button matSuffix (click)=\"resetField('customer_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <ng-container *ngIf=\"filterForm.get('project_ids') && getFilterConfig('disabled', 'project_ids') === false\">\n <mat-form-field *ngxPermissionsOnly=\"['project.read']\">\n <mat-label>Project</mat-label>\n <app-searchable-selector\n formControlName=\"project_ids\"\n apiUrl=\"api/projects\"\n titleField=\"project_name\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.project_ids\" mat-icon-button matSuffix (click)=\"resetField('project_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field *ngIf=\"filterForm.get('product_ids')\">\n <mat-label>Product</mat-label>\n <app-searchable-selector\n formControlName=\"product_ids\"\n apiUrl=\"api/products\"\n titleField=\"name\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.product_ids\" mat-icon-button matSuffix (click)=\"resetField('product_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('measure_ids')\">\n <mat-label>Measure</mat-label>\n <app-searchable-selector\n formControlName=\"measure_ids\"\n apiUrl=\"api/product-measures\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.measure_ids\" mat-icon-button matSuffix (click)=\"resetField('measure_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-form-field *ngIf=\"filterForm.get('supplier_ids')\" [appearance]=\"getFilterConfig('appearance', 'supplier_ids')\">\n <mat-label>Supplier</mat-label>\n <app-searchable-selector\n formControlName=\"supplier_ids\"\n titleField=\"company_name\"\n apiUrl=\"api/suppliers\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.supplier_ids\" mat-icon-button matSuffix (click)=\"resetField('supplier_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <app-timeline-filter\n appearance=\"fill\"\n [labelText]=\"getFilterConfig('label', 'expiry_duration')\"\n *ngIf=\"filterForm?.get('expiry_duration')\"\n formControlName=\"expiry_duration\"\n (selectionChange)=\"onExpiryDurationChange($event)\"\n [showClearButton]=\"true\"\n [dateFrom]=\"filterForm.value?.expiry_date_from\"\n [dateTo]=\"filterForm.value?.expiry_date_to\"\n ></app-timeline-filter>\n\n <mat-form-field *ngIf=\"filterForm.get('cost_category_ids')\" style=\"width: 150px\">\n <mat-label>Cost Category</mat-label>\n <app-searchable-selector\n formControlName=\"cost_category_ids\"\n apiUrl=\"api/cost-code-categories\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.cost_category_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('cost_category_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('milestone_ids')\" style=\"width: 150px\">\n <mat-label>Milestone</mat-label>\n <app-searchable-selector\n formControlName=\"milestone_ids\"\n apiUrl=\"api/milestones\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.milestone_ids\" mat-icon-button matSuffix (click)=\"resetField('milestone_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('team_member_ids')\">\n <mat-label>Assignee</mat-label>\n <app-searchable-selector apiUrl=\"api/persons\" formControlName=\"team_member_ids\" titleField=\"name\" [multiple]=\"true\">\n </app-searchable-selector>\n <button *ngIf=\"filterForm.value?.team_member_ids\" mat-icon-button matSuffix (click)=\"resetField('team_member_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('fixed_asset_type_ids')\">\n <mat-label>Type</mat-label>\n <app-searchable-selector\n formControlName=\"fixed_asset_type_ids\"\n apiUrl=\"api/accounting-plus/fixed-asset-types\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.fixed_asset_type_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('fixed_asset_type_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('fixed_asset_document_type_ids')\">\n <mat-label>Type</mat-label>\n <app-searchable-selector\n formControlName=\"fixed_asset_document_type_ids\"\n apiUrl=\"api/accounting-plus/fixed-asset-document-types\"\n [multiple]=\"true\"\n [enableSearch]=\"getFilterConfig('enableSearch', 'fixed_asset_document_type_ids')\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.fixed_asset_document_type_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('fixed_asset_document_type_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <div *ngIf=\"filterForm.get('fixed_asset_document_status')\">\n <small class=\"mr-2 text-secondary\" *ngIf=\"getFilterConfig('showLabel', 'fixed_asset_document_status')\">\n Status\n </small>\n <mat-button-toggle-group formControlName=\"fixed_asset_document_status\" [multiple]=\"false\">\n <mat-button-toggle value=\"all\">All</mat-button-toggle>\n <mat-button-toggle value=\"active\">Active</mat-button-toggle>\n <mat-button-toggle value=\"expired\">Expired</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n\n <mat-form-field *ngIf=\"filterForm.get('asset_account_ids')\">\n <mat-label>Asset Account</mat-label>\n <app-searchable-selector\n formControlName=\"asset_account_ids\"\n apiUrl=\"api/accounts\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.asset_account_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('asset_account_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('depreciation_expense_account_ids')\">\n <mat-label>Depreciation Expense Account</mat-label>\n <app-searchable-selector\n [multiple]=\"true\"\n apiUrl=\"api/accounts\"\n formControlName=\"depreciation_expense_account_ids\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.depreciation_expense_account_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('depreciation_expense_account_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('depreciation_method_ids')\">\n <mat-label>Depreciation Method</mat-label>\n <app-searchable-selector\n formControlName=\"depreciation_method_ids\"\n apiUrl=\"api/accounting-plus/depreciation-methods\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n (click)=\"resetField('depreciation_method_ids')\"\n *ngIf=\"filterForm.value?.depreciation_method_ids\"\n mat-icon-button\n matSuffix\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('task_status_ids')\" style=\"width: 150px\">\n <mat-label>Status</mat-label>\n <app-searchable-selector\n apiUrl=\"api/task-statuses\"\n formControlName=\"task_status_ids\"\n titleField=\"title\"\n [multiple]=\"true\"\n [enableSearch]=\"false\"\n >\n </app-searchable-selector>\n <button *ngIf=\"filterForm.value?.task_status_ids\" mat-icon-button matSuffix (click)=\"resetField('task_status_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('service_center_ids')\">\n <mat-label>Service Center</mat-label>\n <app-searchable-selector\n apiUrl=\"api/accounting-plus/service-centers\"\n formControlName=\"service_center_ids\"\n titleField=\"name\"\n [enableSearch]=\"false\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.service_center_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('service_center_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('fixed_asset_maintenance_status_ids')\">\n <mat-label>Status</mat-label>\n <app-searchable-selector\n apiUrl=\"api/accounting-plus/fixed-asset-maintenance-statuses\"\n formControlName=\"fixed_asset_maintenance_status_ids\"\n [multiple]=\"true\"\n [enableSearch]=\"false\"\n >\n </app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.fixed_asset_maintenance_status_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('fixed_asset_maintenance_status_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('group_by')\">\n <mat-label>Group By</mat-label>\n <mat-select formControlName=\"group_by\">\n <mat-option value=\"week\">Week</mat-option>\n <mat-option value=\"month\">Month</mat-option>\n <mat-option value=\"year\">Year</mat-option>\n </mat-select>\n </mat-form-field>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i12$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i12$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: i5$1.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }], preserveWhitespaces: true });
3201
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: TechlifyFilterComponent, selector: "app-techlify-filter", inputs: { filterForm: "filterForm", filterConfig: "filterConfig" }, outputs: { filterUpdated: "filterUpdated" }, ngImport: i0, template: "<form [formGroup]=\"filterForm\" fxLayout fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\">\n <mat-form-field *ngIf=\"filterForm.get('search')\" [appearance]=\"getFilterConfig('appearance', 'search')\">\n <mat-label>Search</mat-label>\n <input formControlName=\"search\" matInput [placeholder]=\"getFilterConfig('placeholder', 'search')\" />\n <button *ngIf=\"filterForm.value?.search\" mat-icon-button matSuffix (click)=\"resetField('search')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <app-timeline-filter\n *ngIf=\"filterForm?.get('duration')\"\n appearance=\"fill\"\n [labelText]=\"getFilterConfig('label', 'duration')\"\n [appearance]=\"getFilterConfig('appearance', 'duration')\"\n formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\"\n [showClearButton]=\"true\"\n [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"\n ></app-timeline-filter>\n\n <mat-form-field *ngIf=\"filterForm.get('payment_method_ids')\">\n <mat-label>Payment Method</mat-label>\n <app-searchable-selector\n formControlName=\"payment_method_ids\"\n apiUrl=\"api/payment-methods\"\n [multiple]=\"true\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.payment_method_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('payment_method_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"filterForm.get('payment_account_ids')\">\n <mat-form-field *ngxPermissionsOnly=\"['accountingcommon_account.read']\">\n <mat-label>{{ getFilterConfig('label', 'payment_account_ids') || 'Payment Account' }}</mat-label>\n <app-searchable-selector\n formControlName=\"payment_account_ids\"\n [apiUrl]=\"getFilterConfig('apiUrl', 'payment_account_ids') || 'api/accounts'\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.payment_account_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('payment_account_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field *ngIf=\"filterForm.get('invoice_status_ids')\">\n <mat-label>Invoice Status</mat-label>\n <app-searchable-selector\n formControlName=\"invoice_status_ids\"\n apiUrl=\"api/invoice-statuses\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.invoice_status_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('invoice_status_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"filterForm.get('customer_ids')\">\n <mat-form-field *ngxPermissionsOnly=\"['customer_read']\">\n <mat-label>Customer</mat-label>\n <app-searchable-selector\n formControlName=\"customer_ids\"\n titleField=\"name\"\n apiUrl=\"api/customers\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.customer_ids\" mat-icon-button matSuffix (click)=\"resetField('customer_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <ng-container *ngIf=\"filterForm.get('project_ids') && getFilterConfig('disabled', 'project_ids') === false\">\n <mat-form-field *ngxPermissionsOnly=\"['project.read']\">\n <mat-label>Project</mat-label>\n <app-searchable-selector\n formControlName=\"project_ids\"\n apiUrl=\"api/projects\"\n titleField=\"project_name\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.project_ids\" mat-icon-button matSuffix (click)=\"resetField('project_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field *ngIf=\"filterForm.get('product_ids')\">\n <mat-label>Product</mat-label>\n <app-searchable-selector\n formControlName=\"product_ids\"\n apiUrl=\"api/products\"\n titleField=\"name\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.product_ids\" mat-icon-button matSuffix (click)=\"resetField('product_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('measure_ids')\">\n <mat-label>Measure</mat-label>\n <app-searchable-selector\n formControlName=\"measure_ids\"\n apiUrl=\"api/product-measures\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.measure_ids\" mat-icon-button matSuffix (click)=\"resetField('measure_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-form-field *ngIf=\"filterForm.get('supplier_ids')\" [appearance]=\"getFilterConfig('appearance', 'supplier_ids')\">\n <mat-label>Supplier</mat-label>\n <app-searchable-selector\n formControlName=\"supplier_ids\"\n titleField=\"company_name\"\n apiUrl=\"api/suppliers\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.supplier_ids\" mat-icon-button matSuffix (click)=\"resetField('supplier_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <app-timeline-filter\n appearance=\"fill\"\n [labelText]=\"getFilterConfig('label', 'expiry_duration')\"\n *ngIf=\"filterForm?.get('expiry_duration')\"\n formControlName=\"expiry_duration\"\n (selectionChange)=\"onExpiryDurationChange($event)\"\n [showClearButton]=\"true\"\n [dateFrom]=\"filterForm.value?.expiry_date_from\"\n [dateTo]=\"filterForm.value?.expiry_date_to\"\n ></app-timeline-filter>\n\n <mat-form-field *ngIf=\"filterForm.get('cost_category_ids')\" style=\"width: 150px\">\n <mat-label>Cost Category</mat-label>\n <app-searchable-selector\n formControlName=\"cost_category_ids\"\n apiUrl=\"api/cost-code-categories\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.cost_category_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('cost_category_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('milestone_ids')\" style=\"width: 150px\">\n <mat-label>Milestone</mat-label>\n <app-searchable-selector\n formControlName=\"milestone_ids\"\n apiUrl=\"api/milestones\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.milestone_ids\" mat-icon-button matSuffix (click)=\"resetField('milestone_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('team_member_ids')\">\n <mat-label>Assignee</mat-label>\n <app-searchable-selector apiUrl=\"api/persons\" formControlName=\"team_member_ids\" titleField=\"name\" [multiple]=\"true\">\n </app-searchable-selector>\n <button *ngIf=\"filterForm.value?.team_member_ids\" mat-icon-button matSuffix (click)=\"resetField('team_member_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('fixed_asset_type_ids')\">\n <mat-label>Type</mat-label>\n <app-searchable-selector\n formControlName=\"fixed_asset_type_ids\"\n apiUrl=\"api/accounting-plus/fixed-asset-types\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.fixed_asset_type_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('fixed_asset_type_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('fixed_asset_document_type_ids')\">\n <mat-label>Type</mat-label>\n <app-searchable-selector\n formControlName=\"fixed_asset_document_type_ids\"\n apiUrl=\"api/accounting-plus/fixed-asset-document-types\"\n [multiple]=\"true\"\n [enableSearch]=\"getFilterConfig('enableSearch', 'fixed_asset_document_type_ids')\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.fixed_asset_document_type_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('fixed_asset_document_type_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <div *ngIf=\"filterForm.get('fixed_asset_document_status')\">\n <small class=\"mr-2 text-secondary\" *ngIf=\"getFilterConfig('showLabel', 'fixed_asset_document_status')\">\n Status\n </small>\n <mat-button-toggle-group formControlName=\"fixed_asset_document_status\" [multiple]=\"false\">\n <mat-button-toggle value=\"all\">All</mat-button-toggle>\n <mat-button-toggle value=\"active\">Active</mat-button-toggle>\n <mat-button-toggle value=\"expired\">Expired</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n\n <mat-form-field *ngIf=\"filterForm.get('asset_account_ids')\">\n <mat-label>Asset Account</mat-label>\n <app-searchable-selector\n formControlName=\"asset_account_ids\"\n apiUrl=\"api/accounts\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.asset_account_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('asset_account_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('depreciation_expense_account_ids')\">\n <mat-label>Depreciation Expense Account</mat-label>\n <app-searchable-selector\n [multiple]=\"true\"\n apiUrl=\"api/accounts\"\n formControlName=\"depreciation_expense_account_ids\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.depreciation_expense_account_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('depreciation_expense_account_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('depreciation_method_ids')\">\n <mat-label>Depreciation Method</mat-label>\n <app-searchable-selector\n formControlName=\"depreciation_method_ids\"\n apiUrl=\"api/accounting-plus/depreciation-methods\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n (click)=\"resetField('depreciation_method_ids')\"\n *ngIf=\"filterForm.value?.depreciation_method_ids\"\n mat-icon-button\n matSuffix\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('task_status_ids')\" style=\"width: 150px\">\n <mat-label>Status</mat-label>\n <app-searchable-selector\n apiUrl=\"api/task-statuses\"\n formControlName=\"task_status_ids\"\n titleField=\"title\"\n [multiple]=\"true\"\n [enableSearch]=\"false\"\n >\n </app-searchable-selector>\n <button *ngIf=\"filterForm.value?.task_status_ids\" mat-icon-button matSuffix (click)=\"resetField('task_status_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('service_center_ids')\">\n <mat-label>Service Center</mat-label>\n <app-searchable-selector\n apiUrl=\"api/accounting-plus/service-centers\"\n formControlName=\"service_center_ids\"\n titleField=\"name\"\n [enableSearch]=\"false\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.service_center_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('service_center_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('fixed_asset_maintenance_status_ids')\">\n <mat-label>Status</mat-label>\n <app-searchable-selector\n apiUrl=\"api/accounting-plus/fixed-asset-maintenance-statuses\"\n formControlName=\"fixed_asset_maintenance_status_ids\"\n [multiple]=\"true\"\n [enableSearch]=\"false\"\n >\n </app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.fixed_asset_maintenance_status_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('fixed_asset_maintenance_status_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('group_by')\">\n <mat-label>Group By</mat-label>\n <mat-select formControlName=\"group_by\">\n <mat-option value=\"week\">Week</mat-option>\n <mat-option value=\"month\">Month</mat-option>\n <mat-option value=\"year\">Year</mat-option>\n </mat-select>\n </mat-form-field>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i11$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i12$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i12$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: i5$1.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }], preserveWhitespaces: true });
3093
3202
  }
3094
3203
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TechlifyFilterComponent, decorators: [{
3095
3204
  type: Component,
@@ -3308,7 +3417,9 @@ class ProductModule {
3308
3417
  ColumnSelectorModule,
3309
3418
  ProductLocationListComponent,
3310
3419
  StockTransferListComponent,
3311
- ExportToExcelButtonComponent], exports: [ProductFormComponent,
3420
+ ExportToExcelButtonComponent,
3421
+ NoteModule,
3422
+ TechlifyIconModule], exports: [ProductFormComponent,
3312
3423
  ProductBasicInfoComponent,
3313
3424
  ProductFormButtonComponent,
3314
3425
  ProductBatchUpdateFormComponent] });
@@ -3330,7 +3441,9 @@ class ProductModule {
3330
3441
  ColumnSelectorModule,
3331
3442
  ProductLocationListComponent,
3332
3443
  StockTransferListComponent,
3333
- ExportToExcelButtonComponent] });
3444
+ ExportToExcelButtonComponent,
3445
+ NoteModule,
3446
+ TechlifyIconModule] });
3334
3447
  }
3335
3448
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductModule, decorators: [{
3336
3449
  type: NgModule,
@@ -3367,7 +3480,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
3367
3480
  ColumnSelectorModule,
3368
3481
  ProductLocationListComponent,
3369
3482
  StockTransferListComponent,
3370
- ExportToExcelButtonComponent
3483
+ ExportToExcelButtonComponent,
3484
+ NoteModule,
3485
+ TechlifyIconModule
3371
3486
  ],
3372
3487
  exports: [
3373
3488
  ProductFormComponent,
@@ -3478,7 +3593,7 @@ class InventoryDashboardPageComponent {
3478
3593
  });
3479
3594
  }
3480
3595
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InventoryDashboardPageComponent, deps: [{ token: ProductSummaryService }], target: i0.ɵɵFactoryTarget.Component });
3481
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InventoryDashboardPageComponent, selector: "app-inventory-dashboard-page", ngImport: i0, template: "<div class=\"d-flex justify-content-start align-items-start gap-3 vh-100\">\n <div class=\"row\" style=\"width: calc(100% - 300px)\">\n <div class=\"col-lg-4 mb-3\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-center align-items-center gap-3\">\n <span class=\"material-symbols-outlined fs-1 fw-bold\" style=\"color: #f5222d !important\"> inventory_2 </span>\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Low Stock Products</small>\n <h1 class=\"mb-0 fw-bold\">{{ lowStockProductsCount | number }}</h1>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"col-lg-4 mb-3\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-center align-items-center gap-3\">\n <span class=\"material-symbols-outlined fs-1 fw-bold\"> arrow_circle_down </span>\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Products Received This Month</small>\n <h1 class=\"mb-0 fw-bold\">{{ stockReceiptsQtySum | number }}</h1>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"col-lg-4 mb-3\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-center align-items-center gap-3\">\n <span class=\"material-symbols-outlined fs-1 fw-bold\"> arrow_circle_up </span>\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Products Issued This Month</small>\n <h1 class=\"mb-0 fw-bold\">{{ stockIssuanceQtySum | number }}</h1>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"col-lg-6 mb-3\">\n <app-product-quick-search></app-product-quick-search>\n </div>\n <div class=\"col-lg-6 mb-3\">\n <app-low-stock-products-widget></app-low-stock-products-widget>\n </div>\n <div class=\"col-lg-6 mb-3\">\n <app-product-summary-chart title=\"Product By Category\"></app-product-summary-chart>\n </div>\n </div>\n <div style=\"width: 300px\" class=\"d-flex flex-column gap-3 h-100\">\n <mat-card class=\"h-100\">\n <mat-card-content>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-icon>flag</mat-icon>\n <h3 class=\"mb-0 fw-bold\">Reports</h3>\n </div>\n </mat-card-content>\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-start gap-3\">\n <a\n class=\"d-flex justify-content-start align-items-center gap-2 text-decoration-none text-dark\"\n routerLink=\"/inventory/reports/low-stock-report\"\n >\n <span class=\"material-symbols-outlined fs-3\"> description </span>\n <h3 class=\"mb-0\">Low Stock Report</h3>\n <span class=\"material-symbols-outlined\"> chevron_forward </span>\n </a>\n <a\n class=\"d-flex justify-content-start align-items-center gap-2 text-decoration-none text-dark cursor-pointer\"\n routerLink=\"/inventory/reports/inventory-value-report\"\n >\n <span class=\"material-symbols-outlined fs-3\"> description </span>\n <h3 class=\"mb-0\">Inventory Value Report</h3>\n <span class=\"material-symbols-outlined\"> chevron_forward </span>\n </a>\n </mat-card-content>\n </mat-card>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: LowStockProductsWidgetComponent, selector: "app-low-stock-products-widget" }, { kind: "component", type: ProductSummaryChartComponent, selector: "app-product-summary-chart", inputs: ["height", "title"] }, { kind: "component", type: ProductQuickSearchComponent, selector: "app-product-quick-search" }, { kind: "pipe", type: i3.DecimalPipe, name: "number" }], preserveWhitespaces: true });
3596
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InventoryDashboardPageComponent, selector: "app-inventory-dashboard-page", ngImport: i0, template: "<div class=\"d-flex justify-content-start align-items-start gap-3 vh-100\">\n <div class=\"row\" style=\"width: calc(100% - 300px)\">\n <div class=\"col-lg-4 mb-3\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-center align-items-center gap-3\">\n <span class=\"material-symbols-outlined fs-1 fw-bold\" style=\"color: #f5222d !important\"> inventory_2 </span>\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Low Stock Products</small>\n <h1 class=\"mb-0 fw-bold\">{{ lowStockProductsCount | number }}</h1>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"col-lg-4 mb-3\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-center align-items-center gap-3\">\n <span class=\"material-symbols-outlined fs-1 fw-bold\"> arrow_circle_down </span>\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Products Received This Month</small>\n <h1 class=\"mb-0 fw-bold\">{{ stockReceiptsQtySum | number }}</h1>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"col-lg-4 mb-3\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-center align-items-center gap-3\">\n <span class=\"material-symbols-outlined fs-1 fw-bold\"> arrow_circle_up </span>\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Products Issued This Month</small>\n <h1 class=\"mb-0 fw-bold\">{{ stockIssuanceQtySum | number }}</h1>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"col-lg-6 mb-3\">\n <app-product-quick-search></app-product-quick-search>\n </div>\n <div class=\"col-lg-6 mb-3\">\n <app-low-stock-products-widget></app-low-stock-products-widget>\n </div>\n <div class=\"col-lg-6 mb-3\">\n <app-product-summary-chart title=\"Product By Category\"></app-product-summary-chart>\n </div>\n </div>\n <div style=\"width: 300px\" class=\"d-flex flex-column gap-3 h-100\">\n <mat-card class=\"h-100\">\n <mat-card-content>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-icon>flag</mat-icon>\n <h3 class=\"mb-0 fw-bold\">Reports</h3>\n </div>\n </mat-card-content>\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-start gap-3\">\n <a\n class=\"d-flex justify-content-start align-items-center gap-2 text-decoration-none text-dark\"\n routerLink=\"/inventory/reports/low-stock-report\"\n >\n <span class=\"material-symbols-outlined fs-3\"> description </span>\n <h3 class=\"mb-0\">Low Stock Report</h3>\n <span class=\"material-symbols-outlined\"> chevron_forward </span>\n </a>\n <a\n class=\"d-flex justify-content-start align-items-center gap-2 text-decoration-none text-dark cursor-pointer\"\n routerLink=\"/inventory/reports/inventory-value-report\"\n >\n <span class=\"material-symbols-outlined fs-3\"> description </span>\n <h3 class=\"mb-0\">Inventory Value Report</h3>\n <span class=\"material-symbols-outlined\"> chevron_forward </span>\n </a>\n </mat-card-content>\n </mat-card>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i11$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: LowStockProductsWidgetComponent, selector: "app-low-stock-products-widget" }, { kind: "component", type: ProductSummaryChartComponent, selector: "app-product-summary-chart", inputs: ["height", "title"] }, { kind: "component", type: ProductQuickSearchComponent, selector: "app-product-quick-search" }, { kind: "pipe", type: i3.DecimalPipe, name: "number" }], preserveWhitespaces: true });
3482
3597
  }
3483
3598
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InventoryDashboardPageComponent, decorators: [{
3484
3599
  type: Component,
@@ -3599,7 +3714,7 @@ class LowStockReportComponent extends TechlifyListingControllerInterface {
3599
3714
  });
3600
3715
  }
3601
3716
  subscribeToRouteChanges() {
3602
- this.activatedRoute.queryParams.pipe(debounceTime$1(500), distinctUntilChanged()).subscribe(() => {
3717
+ this.activatedRoute.queryParams.pipe(debounceTime$1(500), distinctUntilChanged$1()).subscribe(() => {
3603
3718
  this.reload();
3604
3719
  });
3605
3720
  }
@@ -3736,7 +3851,7 @@ class InventoryValueReportComponent extends TechlifyListingControllerInterface {
3736
3851
  });
3737
3852
  }
3738
3853
  subscribeToRouteChanges() {
3739
- this.activatedRoute.queryParams.pipe(debounceTime$1(500), distinctUntilChanged()).subscribe(() => {
3854
+ this.activatedRoute.queryParams.pipe(debounceTime$1(500), distinctUntilChanged$1()).subscribe(() => {
3740
3855
  this.reload();
3741
3856
  });
3742
3857
  }
@@ -3773,7 +3888,7 @@ class InventoryValueReportComponent extends TechlifyListingControllerInterface {
3773
3888
  this.loadData();
3774
3889
  }
3775
3890
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InventoryValueReportComponent, deps: [{ token: InventoryValueReportService }, { token: i2.ActivatedRoute }, { token: i2$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
3776
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InventoryValueReportComponent, isStandalone: true, selector: "app-inventory-value-report", usesInheritance: true, ngImport: i0, template: "<div>\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Inventory Value Report</h3>\n <i class=\"fa-solid fa-file-excel cursor-pointer d-print-none\" (click)=\"export('excel')\"></i>\n <i class=\"fa-solid fa-file-pdf cursor-pointer d-print-none\" (click)=\"export('pdf')\"></i>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Min Stock On Hand</mat-label>\n <mat-select formControlName=\"min_stock_on_hand\">\n <mat-option *ngFor=\"let option of minStockOptions\" [value]=\"option\">\n {{ option }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"name\">Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n <app-product-category-badges [product]=\"element\"></app-product-category-badges>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <span>{{ element?.sku }}</span>\n <span class='text-secondary'> {{ element?.type?.title }} </span>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>Total</strong>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"stock_on_hand\">On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Average Price Column -->\n <ng-container matColumnDef=\"Average Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"average_purchase_price\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Avg. Price</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Average price of batches in stock\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.average_purchase_price | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Column -->\n <ng-container matColumnDef=\"Inventory Value\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"inventory_value\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\" matTooltip=\"Based on average price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>{{ totalInventoryValue | currency }}</strong>\n </td>\n </ng-container>\n\n <!-- Last Purchase Price Column -->\n <ng-container matColumnDef=\"Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"last_purchase_price\">\n Last Price\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_receipt?.purchase_price ?? 0 | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Based On Last Purchase Price Column -->\n <ng-container matColumnDef=\"Inventory Value Based On Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"inventory_value_based_on_last_price\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Based on last purchase price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value_based_on_last_price ?? 0 | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i11$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i7.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i7.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }], preserveWhitespaces: true });
3891
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InventoryValueReportComponent, isStandalone: true, selector: "app-inventory-value-report", usesInheritance: true, ngImport: i0, template: "<div>\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Inventory Value Report</h3>\n <i class=\"fa-solid fa-file-excel cursor-pointer d-print-none\" (click)=\"export('excel')\"></i>\n <i class=\"fa-solid fa-file-pdf cursor-pointer d-print-none\" (click)=\"export('pdf')\"></i>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Min Stock On Hand</mat-label>\n <mat-select formControlName=\"min_stock_on_hand\">\n <mat-option *ngFor=\"let option of minStockOptions\" [value]=\"option\">\n {{ option }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"name\">Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n <app-product-category-badges [product]=\"element\"></app-product-category-badges>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <span>{{ element?.sku }}</span>\n <span class='text-secondary'> {{ element?.type?.title }} </span>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>Total</strong>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"stock_on_hand\">On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Average Price Column -->\n <ng-container matColumnDef=\"Average Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"average_purchase_price\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Avg. Price</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Average price of batches in stock\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.average_purchase_price | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Column -->\n <ng-container matColumnDef=\"Inventory Value\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"inventory_value\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\" matTooltip=\"Based on average price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>{{ totalInventoryValue | currency }}</strong>\n </td>\n </ng-container>\n\n <!-- Last Purchase Price Column -->\n <ng-container matColumnDef=\"Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"last_purchase_price\">\n Last Price\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_receipt?.purchase_price ?? 0 | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Based On Last Purchase Price Column -->\n <ng-container matColumnDef=\"Inventory Value Based On Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"inventory_value_based_on_last_price\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Based on last purchase price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value_based_on_last_price ?? 0 | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i11$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i11.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i11.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i11.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }], preserveWhitespaces: true });
3777
3892
  }
3778
3893
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InventoryValueReportComponent, decorators: [{
3779
3894
  type: Component,
@@ -3809,7 +3924,7 @@ const routes$6 = [
3809
3924
  },
3810
3925
  {
3811
3926
  path: "measures",
3812
- loadChildren: () => import('./techlify-inventory-common-measure.module-BhHMV-wL.mjs').then((mod) => mod.MeasureModule),
3927
+ loadChildren: () => import('./techlify-inventory-common-measure.module-s9xhNWZM.mjs').then((mod) => mod.MeasureModule),
3813
3928
  },
3814
3929
  {
3815
3930
  path: 'stock-issues',
@@ -3821,7 +3936,7 @@ const routes$6 = [
3821
3936
  },
3822
3937
  {
3823
3938
  path: 'categories',
3824
- loadChildren: () => import('./techlify-inventory-common-category.module-S6Val92n.mjs').then((mod) => mod.CategoryModule),
3939
+ loadChildren: () => import('./techlify-inventory-common-category.module-BT3uLLqI.mjs').then((mod) => mod.CategoryModule),
3825
3940
  },
3826
3941
  {
3827
3942
  path: 'products',
@@ -4029,7 +4144,7 @@ let ProductSearchComponent = class ProductSearchComponent {
4029
4144
  });
4030
4145
  }
4031
4146
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductSearchComponent, deps: [{ token: i1$1.MatDialog }, { token: i2$2.FormBuilder }, { token: i1.FilterService }, { token: ProductService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
4032
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductSearchComponent, selector: "app-product-search", inputs: { with: "with" }, outputs: { selected: "selected" }, ngImport: i0, template: "<div id=\"tableContainer\" #tableContainer fxLayout=\"column\" class=\"table-container\">\n <div class=\"text-dark d-flex flex-row justify-content-start align-items-center gap-2\">\n <mat-icon class=\"material-symbol-outlined\"> campaign </mat-icon>\n <strong>Product Search</strong>\n </div>\n <small class=\"text-secondary mt-2\"> Quickly search for a product to be added as a line item. </small>\n <form [formGroup]=\"searchFormGroup\">\n <mat-form-field fxFlex=\"100%\">\n <mat-label>Search</mat-label>\n <input fxLayout matInput placeholder=\"Search product, SKU\" formControlName=\"search\" />\n </mat-form-field>\n </form>\n <div\n fxLayout=\"column\"\n fxLayoutGap=\"0.5rem\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [infiniteScrollContainer]=\"tableContainer\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"false\"\n >\n <mat-card class=\"p-2\" style=\"background: #d9d9d9\" *ngFor=\"let product of products\">\n <div>\n <div class=\"d-flex flex-row justify-content-between align-items-center\">\n <strong class=\"text-dark\">{{ product?.name }}</strong>\n <strong class=\"text-primary font-xs cursor-pointer\" (click)=\"addProduct(product)\"> Add </strong>\n </div>\n <div class=\"d-flex flex-row justify-content-between align-items-center\">\n <small class=\"text-secondary\">{{ product?.sku }}</small>\n <mat-icon\n (click)=\"viewProduct(product, viewProductTemplate)\"\n class=\"material-symbol-outlined font-md cursor-pointer\"\n >\n contact_support\n </mat-icon>\n </div>\n </div>\n </mat-card>\n </div>\n</div>\n\n<ng-template #viewProductTemplate let-data>\n <div mat-dialog-content>\n <app-product-basic-info [product]=\"data.product\" (saved)=\"reload()\" (deleted)=\"reload()\"></app-product-basic-info>\n\n <div class=\"d-flex justify-content-end mt-2\">\n <button mat-flat-button type=\"button\" mat-dialog-close>Close</button>\n </div>\n </div>\n</ng-template>\n", styles: [".table-container{max-height:600px;overflow-y:scroll}::-webkit-scrollbar{display:none}::-webkit-scrollbar-button{display:none}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: ProductBasicInfoComponent, selector: "app-product-basic-info", inputs: ["product"], outputs: ["saved", "deleted"] }], preserveWhitespaces: true });
4147
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductSearchComponent, selector: "app-product-search", inputs: { with: "with" }, outputs: { selected: "selected" }, ngImport: i0, template: "<div id=\"tableContainer\" #tableContainer fxLayout=\"column\" class=\"table-container\">\n <div class=\"text-dark d-flex flex-row justify-content-start align-items-center gap-2\">\n <mat-icon class=\"material-symbol-outlined\"> campaign </mat-icon>\n <strong>Product Search</strong>\n </div>\n <small class=\"text-secondary mt-2\"> Quickly search for a product to be added as a line item. </small>\n <form [formGroup]=\"searchFormGroup\">\n <mat-form-field fxFlex=\"100%\">\n <mat-label>Search</mat-label>\n <input fxLayout matInput placeholder=\"Search product, SKU\" formControlName=\"search\" />\n </mat-form-field>\n </form>\n <div\n fxLayout=\"column\"\n fxLayoutGap=\"0.5rem\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [infiniteScrollContainer]=\"tableContainer\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"false\"\n >\n <mat-card class=\"p-2\" style=\"background: #d9d9d9\" *ngFor=\"let product of products\">\n <div>\n <div class=\"d-flex flex-row justify-content-between align-items-center\">\n <strong class=\"text-dark\">{{ product?.name }}</strong>\n <strong class=\"text-primary font-xs cursor-pointer\" (click)=\"addProduct(product)\"> Add </strong>\n </div>\n <div class=\"d-flex flex-row justify-content-between align-items-center\">\n <small class=\"text-secondary\">{{ product?.sku }}</small>\n <mat-icon\n (click)=\"viewProduct(product, viewProductTemplate)\"\n class=\"material-symbol-outlined font-md cursor-pointer\"\n >\n contact_support\n </mat-icon>\n </div>\n </div>\n </mat-card>\n </div>\n</div>\n\n<ng-template #viewProductTemplate let-data>\n <div mat-dialog-content>\n <app-product-basic-info [product]=\"data.product\" (saved)=\"reload()\" (deleted)=\"reload()\"></app-product-basic-info>\n\n <div class=\"d-flex justify-content-end mt-2\">\n <button mat-flat-button type=\"button\" mat-dialog-close>Close</button>\n </div>\n </div>\n</ng-template>\n", styles: [".table-container{max-height:600px;overflow-y:scroll}::-webkit-scrollbar{display:none}::-webkit-scrollbar-button{display:none}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i14.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "component", type: i11$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: ProductBasicInfoComponent, selector: "app-product-basic-info", inputs: ["product"], outputs: ["saved", "deleted"] }], preserveWhitespaces: true });
4033
4148
  };
4034
4149
  ProductSearchComponent = __decorate([
4035
4150
  UntilDestroy()
@@ -4122,7 +4237,7 @@ const routes$5 = [
4122
4237
  },
4123
4238
  {
4124
4239
  path: ':id/view',
4125
- loadComponent: () => import('./techlify-inventory-common-stock-issue-view.component-CltIudzA.mjs').then(m => m.StockIssueViewComponent),
4240
+ loadComponent: () => import('./techlify-inventory-common-stock-issue-view.component-CNrY99hf.mjs').then(m => m.StockIssueViewComponent),
4126
4241
  canLoad: [AuthenticationGuard]
4127
4242
  }
4128
4243
  ];
@@ -4395,7 +4510,7 @@ class IncidentListComponent extends TechlifyListingControllerInterface {
4395
4510
  });
4396
4511
  // listen for route change
4397
4512
  this.activatedRoute.queryParams
4398
- .pipe(debounceTime$1(500), distinctUntilChanged())
4513
+ .pipe(debounceTime$1(500), distinctUntilChanged$1())
4399
4514
  .subscribe((val) => {
4400
4515
  this.reload();
4401
4516
  });
@@ -4665,7 +4780,7 @@ class RatingListComponent extends TechlifyListingControllerInterface {
4665
4780
  });
4666
4781
  // listen for route change
4667
4782
  this.activatedRoute.queryParams
4668
- .pipe(debounceTime$1(500), distinctUntilChanged())
4783
+ .pipe(debounceTime$1(500), distinctUntilChanged$1())
4669
4784
  .subscribe((val) => {
4670
4785
  this.reload();
4671
4786
  });
@@ -4775,7 +4890,7 @@ class SupplierInformationComponent {
4775
4890
  dialogRef.afterClosed().subscribe(async (result) => {
4776
4891
  if (result) {
4777
4892
  try {
4778
- const result = await this.supplierService.destroy(id);
4893
+ const result = await this.supplierService.delete(id);
4779
4894
  this.alertService.addAlert('Successfully Deleted Supplier', 'success');
4780
4895
  }
4781
4896
  catch (error) {
@@ -4788,7 +4903,7 @@ class SupplierInformationComponent {
4788
4903
  });
4789
4904
  }
4790
4905
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierInformationComponent, deps: [{ token: i1$1.MatDialog }, { token: SupplierService }, { token: i1.AlertService }, { token: i2.Router }, { token: i1.ErrorHandlerService }], target: i0.ɵɵFactoryTarget.Component });
4791
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierInformationComponent, selector: "app-supplier-information", inputs: { supplier: "supplier" }, ngImport: i0, template: "<mat-card>\n <mat-card-content>\n <div class=\"d-flex justify-content-between align-items-center\">\n <h3 class=\"mb-0\">Personal Information</h3>\n <div class=\"d-flex justify-content-end align-items-center gap-1\">\n <app-audit-log-for-model [modelId]=\"supplier?.id\" modelType=\"Supplier\" logView=\"all\"></app-audit-log-for-model>\n <mat-icon class=\"material-icons cursor-pointer\" (click)=\"modifySupplier(supplier)\"> edit </mat-icon>\n <mat-icon class=\"material-icons cursor-pointer\" (click)=\"deleteSupplier(supplier)\"> delete </mat-icon>\n </div>\n </div>\n\n <mat-divider></mat-divider>\n\n <div class=\"mt-2\">\n <div class=\"d-flex justify-content-start gap-2\">\n <div>\n <h3 class=\"mb-0\">{{ supplier?.company_name }}</h3>\n <span *ngIf=\"supplier?.type\" class=\"status-pill-sm status-light-orange\"> {{ supplier?.type?.title }}</span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-3\">\n <div class=\"col-6\" *ngIf=\"supplier?.contact_name\">\n <p class=\"text-muted mb-0\">Contact Name</p>\n <p class=\"text-wrap\">{{ supplier?.contact_name }}</p>\n </div>\n <div class=\"col-6\" *ngIf=\"supplier?.email\">\n <p class=\"text-muted mb-0\">Email</p>\n <p class=\"text-wrap\">{{ supplier?.email }}</p>\n </div>\n <div class=\"col-6\" *ngIf=\"supplier?.phone\">\n <p class=\"text-muted mb-0\">Phone</p>\n <p class=\"text-wrap\">{{ supplier?.phone }}</p>\n </div>\n <div class=\"col-6\" *ngIf=\"supplier?.details\">\n <p class=\"text-muted mb-0\">Details</p>\n <p class=\"text-wrap\">{{ supplier?.details }}</p>\n </div>\n </div>\n\n <div class=\"row mt-2 h-100\">\n <div class=\"d-flex\" *ngIf=\"supplier?.address\">\n <mat-icon class=\"material-icons text-primary my-auto\">location_on</mat-icon>\n <p class=\"ms-2 my-auto\">{{ supplier?.address }}</p>\n </div>\n </div>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1.AuditLogForModelComponent, selector: "app-audit-log-for-model", inputs: ["isIconView", "modelType", "modelId", "logView"] }], preserveWhitespaces: true });
4906
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierInformationComponent, selector: "app-supplier-information", inputs: { supplier: "supplier" }, ngImport: i0, template: "<mat-card>\n <mat-card-content>\n <div class=\"d-flex justify-content-between align-items-center\">\n <h3 class=\"mb-0\">Personal Information</h3>\n <div class=\"d-flex justify-content-end align-items-center gap-1\">\n <app-audit-log-for-model [modelId]=\"supplier?.id\" modelType=\"Supplier\" logView=\"all\"></app-audit-log-for-model>\n <mat-icon class=\"material-icons cursor-pointer\" (click)=\"modifySupplier(supplier)\"> edit </mat-icon>\n <mat-icon class=\"material-icons cursor-pointer\" (click)=\"deleteSupplier(supplier)\"> delete </mat-icon>\n </div>\n </div>\n\n <mat-divider></mat-divider>\n\n <div class=\"mt-2\">\n <div class=\"d-flex justify-content-start gap-2\">\n <div>\n <h3 class=\"mb-0\">{{ supplier?.company_name }}</h3>\n <span *ngIf=\"supplier?.type\" class=\"status-pill-sm status-light-orange\"> {{ supplier?.type?.title }}</span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-3\">\n <div class=\"col-6\" *ngIf=\"supplier?.contact_name\">\n <p class=\"text-muted mb-0\">Contact Name</p>\n <p class=\"text-wrap\">{{ supplier?.contact_name }}</p>\n </div>\n <div class=\"col-6\" *ngIf=\"supplier?.email\">\n <p class=\"text-muted mb-0\">Email</p>\n <p class=\"text-wrap\">{{ supplier?.email }}</p>\n </div>\n <div class=\"col-6\" *ngIf=\"supplier?.phone\">\n <p class=\"text-muted mb-0\">Phone</p>\n <p class=\"text-wrap\">{{ supplier?.phone }}</p>\n </div>\n <div class=\"col-6\" *ngIf=\"supplier?.details\">\n <p class=\"text-muted mb-0\">Details</p>\n <p class=\"text-wrap\">{{ supplier?.details }}</p>\n </div>\n </div>\n\n <div class=\"row mt-2 h-100\">\n <div class=\"d-flex\" *ngIf=\"supplier?.address\">\n <mat-icon class=\"material-icons text-primary my-auto\">location_on</mat-icon>\n <p class=\"ms-2 my-auto\">{{ supplier?.address }}</p>\n </div>\n </div>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i11$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1.AuditLogForModelComponent, selector: "app-audit-log-for-model", inputs: ["isIconView", "modelType", "modelId", "logView"] }], preserveWhitespaces: true });
4792
4907
  }
4793
4908
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierInformationComponent, decorators: [{
4794
4909
  type: Component,
@@ -4866,7 +4981,7 @@ class SupplierBranchFormComponent extends TechlifyFormComponentInterface {
4866
4981
  });
4867
4982
  }
4868
4983
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: SupplierBranchService }, { token: MAT_DIALOG_DATA }, { token: i1$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
4869
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierBranchFormComponent, selector: "app-supplier-branch-form", usesInheritance: true, ngImport: i0, template: "<mat-card-content>\n <h3 class=\"text-center mb-1\">Branch Form</h3>\n\n <form [formGroup]=\"form\" class=\"d-flex flex-row flex-wrap justify-content-start gap-2\" (submit)=\"save()\">\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Title</mat-label>\n <input formControlName=\"title\" type=\"text\" matInput placeholder=\"Title\" />\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Phone</mat-label>\n <input formControlName=\"phone\" type=\"text\" matInput placeholder=\"Phone\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Email</mat-label>\n <input formControlName=\"email\" type=\"email\" matInput placeholder=\"Email\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Address</mat-label>\n <input formControlName=\"address\" type=\"text\" matInput placeholder=\"Address\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\" style=\"width: calc(100%)\">\n <button [disabled]=\"isWorking\" type=\"button\" mat-flat-button mat-dialog-close>Cancel</button>\n <button [disabled]=\"isWorking\" type=\"submit\" mat-raised-button color=\"primary\">Save</button>\n </div>\n </form>\n</mat-card-content>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
4984
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierBranchFormComponent, selector: "app-supplier-branch-form", usesInheritance: true, ngImport: i0, template: "<mat-card-content>\n <h3 class=\"text-center mb-1\">Branch Form</h3>\n\n <form [formGroup]=\"form\" class=\"d-flex flex-row flex-wrap justify-content-start gap-2\" (submit)=\"save()\">\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Title</mat-label>\n <input formControlName=\"title\" type=\"text\" matInput placeholder=\"Title\" />\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Phone</mat-label>\n <input formControlName=\"phone\" type=\"text\" matInput placeholder=\"Phone\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Email</mat-label>\n <input formControlName=\"email\" type=\"email\" matInput placeholder=\"Email\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Address</mat-label>\n <input formControlName=\"address\" type=\"text\" matInput placeholder=\"Address\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\" style=\"width: calc(100%)\">\n <button [disabled]=\"isWorking\" type=\"button\" mat-flat-button mat-dialog-close>Cancel</button>\n <button [disabled]=\"isWorking\" type=\"submit\" mat-raised-button color=\"primary\">Save</button>\n </div>\n </form>\n</mat-card-content>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
4870
4985
  }
4871
4986
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchFormComponent, decorators: [{
4872
4987
  type: Component,
@@ -5022,7 +5137,7 @@ class SupplierBranchesListComponent extends TechlifyListingControllerInterface {
5022
5137
  return this.filterForm.get('sort_by')?.setValue(column + '|' + direction);
5023
5138
  }
5024
5139
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchesListComponent, deps: [{ token: i2$2.FormBuilder }, { token: i1.ErrorHandlerService }, { token: SupplierBranchService }], target: i0.ɵɵFactoryTarget.Component });
5025
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierBranchesListComponent, selector: "app-supplier-branches-list", inputs: { supplierId: "supplierId" }, usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h3 class=\"mb-0 fw-bold\">Branches</h3>\n <app-supplier-branch-form-button [supplierId]=\"supplierId\"\n (saved)=\"reload()\"></app-supplier-branch-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search by Title, Address, Phone, Email\" formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Supplier Branches List\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Title</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-2\">\n <app-supplier-branch-form-button [branch]=\"element\" [supplierId]=\"supplierId\"\n (saved)=\"reload()\"></app-supplier-branch-form-button>\n <app-supplier-branch-delete-button [branch]=\"element\"\n (deleted)=\"reload()\"></app-supplier-branch-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: SupplierBranchFormButtonComponent, selector: "app-supplier-branch-form-button", inputs: ["branch", "supplierId"], outputs: ["saved"] }, { kind: "component", type: SupplierBranchDeleteButtonComponent, selector: "app-supplier-branch-delete-button", inputs: ["branch"], outputs: ["deleted"] }], preserveWhitespaces: true });
5140
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierBranchesListComponent, selector: "app-supplier-branches-list", inputs: { supplierId: "supplierId" }, usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h3 class=\"mb-0 fw-bold\">Branches</h3>\n <app-supplier-branch-form-button [supplierId]=\"supplierId\"\n (saved)=\"reload()\"></app-supplier-branch-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search by Title, Address, Phone, Email\" formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Supplier Branches List\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Title</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-2\">\n <app-supplier-branch-form-button [branch]=\"element\" [supplierId]=\"supplierId\"\n (saved)=\"reload()\"></app-supplier-branch-form-button>\n <app-supplier-branch-delete-button [branch]=\"element\"\n (deleted)=\"reload()\"></app-supplier-branch-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i11$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i14.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: SupplierBranchFormButtonComponent, selector: "app-supplier-branch-form-button", inputs: ["branch", "supplierId"], outputs: ["saved"] }, { kind: "component", type: SupplierBranchDeleteButtonComponent, selector: "app-supplier-branch-delete-button", inputs: ["branch"], outputs: ["deleted"] }], preserveWhitespaces: true });
5026
5141
  }
5027
5142
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchesListComponent, decorators: [{
5028
5143
  type: Component,
@@ -5079,7 +5194,7 @@ class SupplierViewComponent {
5079
5194
  this.supplier = result.item;
5080
5195
  }
5081
5196
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierViewComponent, deps: [{ token: SupplierService }, { token: i2.ActivatedRoute }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
5082
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierViewComponent, selector: "app-supplier-view", ngImport: i0, template: "<mat-progress-bar *ngIf=\"isLoading\" mode=\"indeterminate\"></mat-progress-bar>\n\n<div *ngIf=\"supplier\" class=\"d-flex flex-row gap-3 justify-content-between\">\n <div style=\"width: 300px\">\n <app-supplier-information [supplier]=\"supplier\"></app-supplier-information>\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <app-note-list modelType=\"Supplier\" [relatedModelId]=\"supplier?.id\" viewMode=\"timeline\"\n labelText=\"Notes\"></app-note-list>\n </mat-card-content>\n </mat-card>\n </div>\n\n <mat-card class='w-100'>\n <mat-card-content>\n <mat-tab-group [mat-stretch-tabs]=\"false\">\n <mat-tab label=\"Branches\">\n <app-supplier-branches-list [supplierId]=\"supplier?.id\"></app-supplier-branches-list>\n </mat-tab>\n <mat-tab label=\"Incidents\">\n <app-incident-list [supplierId]=\"supplier?.id\" incidentableType=\"Supplier\" [incidentableId]=\"supplier?.id\">\n </app-incident-list>\n </mat-tab>\n <mat-tab label=\"Ratings\">\n <app-rating-list [supplierId]=\"supplier?.id\" [rateableId]=\"supplier?.id\"\n rateableType=\"Supplier\"></app-rating-list>\n </mat-tab>\n <mat-tab label=\"Stock Receipts\">\n <app-stock-receipts-list-page [supplierId]=\"supplier?.id\"></app-stock-receipts-list-page>\n </mat-tab>\n </mat-tab-group>\n </mat-card-content>\n </mat-card>\n</div>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i6.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i6.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: i1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "component", type: StockReceiptsListPageComponent, selector: "app-stock-receipts-list-page", inputs: ["product", "supplierId"], outputs: ["listUpdated"] }, { kind: "component", type: IncidentListComponent, selector: "app-incident-list", inputs: ["supplierId", "incidentableType", "incidentableId"] }, { kind: "component", type: RatingListComponent, selector: "app-rating-list", inputs: ["supplierId", "rateableType", "rateableId"] }, { kind: "component", type: SupplierInformationComponent, selector: "app-supplier-information", inputs: ["supplier"] }, { kind: "component", type: SupplierBranchesListComponent, selector: "app-supplier-branches-list", inputs: ["supplierId"] }], preserveWhitespaces: true });
5197
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierViewComponent, selector: "app-supplier-view", ngImport: i0, template: "<mat-progress-bar *ngIf=\"isLoading\" mode=\"indeterminate\"></mat-progress-bar>\n\n<div *ngIf=\"supplier\" class=\"d-flex flex-row gap-3 justify-content-between\">\n <div style=\"width: 300px\">\n <app-supplier-information [supplier]=\"supplier\"></app-supplier-information>\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <app-note-list modelType=\"Supplier\" [relatedModelId]=\"supplier?.id\" viewMode=\"timeline\"\n labelText=\"Notes\"></app-note-list>\n </mat-card-content>\n </mat-card>\n </div>\n\n <mat-card class='w-100'>\n <mat-card-content>\n <mat-tab-group [mat-stretch-tabs]=\"false\">\n <mat-tab label=\"Branches\">\n <app-supplier-branches-list [supplierId]=\"supplier?.id\"></app-supplier-branches-list>\n </mat-tab>\n <mat-tab label=\"Incidents\">\n <app-incident-list [supplierId]=\"supplier?.id\" incidentableType=\"Supplier\" [incidentableId]=\"supplier?.id\">\n </app-incident-list>\n </mat-tab>\n <mat-tab label=\"Ratings\">\n <app-rating-list [supplierId]=\"supplier?.id\" [rateableId]=\"supplier?.id\"\n rateableType=\"Supplier\"></app-rating-list>\n </mat-tab>\n <mat-tab label=\"Stock Receipts\">\n <app-stock-receipts-list-page [supplierId]=\"supplier?.id\"></app-stock-receipts-list-page>\n </mat-tab>\n </mat-tab-group>\n </mat-card-content>\n </mat-card>\n</div>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i6$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i6$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: i1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "component", type: StockReceiptsListPageComponent, selector: "app-stock-receipts-list-page", inputs: ["product", "supplierId"], outputs: ["listUpdated"] }, { kind: "component", type: IncidentListComponent, selector: "app-incident-list", inputs: ["supplierId", "incidentableType", "incidentableId"] }, { kind: "component", type: RatingListComponent, selector: "app-rating-list", inputs: ["supplierId", "rateableType", "rateableId"] }, { kind: "component", type: SupplierInformationComponent, selector: "app-supplier-information", inputs: ["supplier"] }, { kind: "component", type: SupplierBranchesListComponent, selector: "app-supplier-branches-list", inputs: ["supplierId"] }], preserveWhitespaces: true });
5083
5198
  }
5084
5199
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierViewComponent, decorators: [{
5085
5200
  type: Component,
@@ -5137,7 +5252,7 @@ class SupplierFormButtonComponent {
5137
5252
  });
5138
5253
  }
5139
5254
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
5140
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierFormButtonComponent, isStandalone: true, selector: "app-supplier-form-button", inputs: { supplier: "supplier" }, outputs: { onSaved: "onSaved" }, ngImport: i0, template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" [class.text-secondary]=\"supplier\" (click)=\"openDialog()\">\n {{ supplier ? \"edit\" : \"add\" }}\n</mat-icon>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], preserveWhitespaces: true });
5255
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierFormButtonComponent, isStandalone: true, selector: "app-supplier-form-button", inputs: { supplier: "supplier" }, outputs: { onSaved: "onSaved" }, ngImport: i0, template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" [class.text-secondary]=\"supplier\" (click)=\"openDialog()\">\n {{ supplier ? \"edit\" : \"add\" }}\n</mat-icon>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i11$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], preserveWhitespaces: true });
5141
5256
  }
5142
5257
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierFormButtonComponent, decorators: [{
5143
5258
  type: Component,
@@ -5177,7 +5292,7 @@ class SupplierDeleteButtonComponent {
5177
5292
  }).afterClosed().subscribe(async (result) => {
5178
5293
  if (result) {
5179
5294
  try {
5180
- await lastValueFrom(this.supplierService.destroy(this.supplier.id));
5295
+ await lastValueFrom(this.supplierService.delete(this.supplier.id));
5181
5296
  this.alertService.addAlert('Successfully deleted the Supplier', 'success');
5182
5297
  this.onDelete.emit(this.supplier);
5183
5298
  }
@@ -5188,7 +5303,7 @@ class SupplierDeleteButtonComponent {
5188
5303
  });
5189
5304
  }
5190
5305
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierDeleteButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.AlertService }, { token: i1.ErrorHandlerService }, { token: SupplierService }], target: i0.ɵɵFactoryTarget.Component });
5191
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierDeleteButtonComponent, isStandalone: true, selector: "app-supplier-delete-button", inputs: { supplier: "supplier" }, outputs: { onDelete: "onDelete" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer\" *ngxPermissionsOnly=\"['supplier.delete']\" (click)=\"openDialog()\">\n delete\n</mat-icon>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: NgxPermissionsModule }, { kind: "directive", type: i5$1.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }], preserveWhitespaces: true });
5306
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierDeleteButtonComponent, isStandalone: true, selector: "app-supplier-delete-button", inputs: { supplier: "supplier" }, outputs: { onDelete: "onDelete" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer\" *ngxPermissionsOnly=\"['supplier.delete']\" (click)=\"openDialog()\">\n delete\n</mat-icon>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i11$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: NgxPermissionsModule }, { kind: "directive", type: i5$1.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }], preserveWhitespaces: true });
5192
5307
  }
5193
5308
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierDeleteButtonComponent, decorators: [{
5194
5309
  type: Component,
@@ -5203,14 +5318,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
5203
5318
  type: Output
5204
5319
  }] } });
5205
5320
 
5206
- let SuppliersListComponent = class SuppliersListComponent extends TechlifyListingControllerInterface {
5207
- spinner;
5321
+ class SuppliersListComponent extends TechlifyListingControllerInterface {
5208
5322
  fb;
5209
- supplierService;
5210
- errorHandler;
5211
- filterService;
5212
- activatedRoute;
5213
- supplierFormService;
5323
+ service;
5214
5324
  displayedColumns = [
5215
5325
  '#',
5216
5326
  'company_name',
@@ -5222,18 +5332,13 @@ let SuppliersListComponent = class SuppliersListComponent extends TechlifyListin
5222
5332
  'details',
5223
5333
  'actions',
5224
5334
  ];
5225
- constructor(spinner, fb, supplierService, errorHandler, filterService, activatedRoute, supplierFormService) {
5335
+ filterFormConfiguration = {
5336
+ supplier_type_ids: { multuple: true }
5337
+ };
5338
+ constructor(fb, service) {
5226
5339
  super();
5227
- this.spinner = spinner;
5228
5340
  this.fb = fb;
5229
- this.supplierService = supplierService;
5230
- this.errorHandler = errorHandler;
5231
- this.filterService = filterService;
5232
- this.activatedRoute = activatedRoute;
5233
- this.supplierFormService = supplierFormService;
5234
- this.page = 1;
5235
- this.perPage = 25;
5236
- this.models = [];
5341
+ this.service = service;
5237
5342
  this.filterForm = this.fb.group({
5238
5343
  search: [''],
5239
5344
  supplier_type_ids: [''],
@@ -5241,75 +5346,78 @@ let SuppliersListComponent = class SuppliersListComponent extends TechlifyListin
5241
5346
  });
5242
5347
  }
5243
5348
  ngOnInit() {
5244
- this.updateFormWithQueryParams();
5245
- this.subscribeToFormChanges();
5246
- this.subscribeToRouteChanges();
5247
- }
5248
- listenFilterChanges() {
5249
- // listen for supplier added event to update the list.
5250
- this.supplierFormService.isListUpdated().subscribe((val) => {
5251
- if (val && !this.isWorking)
5252
- this.reload();
5253
- });
5254
- // listen for form group changes.
5255
- this.filterForm.valueChanges.pipe(debounceTime$1(500), untilDestroyed(this)).subscribe(() => {
5256
- this.filterService.applyFilterToRoute(this.activatedRoute, this.filterForm.value);
5257
- this.reload();
5258
- });
5259
- }
5260
- sortColumn(event) {
5261
- var direction = event.direction.toString().toUpperCase();
5262
- this.assignFilter(event.active, direction);
5263
- }
5264
- assignFilter(column, direction) {
5265
- return this.filterForm.get('sort_by')?.setValue(column + '|' + direction);
5349
+ this.patchFiltersFromRoute();
5350
+ this.loadData();
5351
+ this.listenFilterChanges();
5266
5352
  }
5267
- async loadData() {
5268
- let filters = { ...this.requestHelperService.convertToFormData(this.filterForm.value) };
5269
- filters.page = this.page = 1;
5270
- filters.perPage = this.perPage;
5271
- try {
5272
- this.isWorking = true;
5273
- let res = await lastValueFrom(this.supplierService.index(filters));
5274
- this.models = this.models?.concat(res?.data);
5275
- this.lastPage = res.last_page;
5276
- // list is updated do not listen form isListUpdated
5277
- this.supplierFormService.listUpdated(false);
5278
- }
5279
- catch (error) {
5280
- this.errorHandler.handleError(error);
5281
- }
5282
- finally {
5283
- this.isWorking = false;
5284
- }
5353
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuppliersListComponent, deps: [{ token: i2$2.FormBuilder }, { token: SupplierService }], target: i0.ɵɵFactoryTarget.Component });
5354
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SuppliersListComponent, selector: "app-suppliers-list", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-1\">\n <h3 class=\"mb-0 fw-bold\">Suppliers</h3>\n <app-supplier-form-button class='mt-2' (onSaved)=\"reload()\"></app-supplier-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Suppliers List\">\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.company_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef>Contact</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-1\">\n\n <a class=\"text-decoration-none text-secondary\" [routerLink]=\"['/inventory/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\" *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </a>\n <app-supplier-form-button *ngxPermissionsOnly=\"['supplier.update']\" [supplier]=\"element\"\n (onSaved)=\"reload()\"></app-supplier-form-button>\n <app-supplier-delete-button [supplier]=\"element\" (onDelete)=\"reload()\"></app-supplier-delete-button>\n <app-audit-log-for-model [modelId]=\"element?.id\" modelType=\"Supplier\"\n logView=\"all\"></app-audit-log-for-model>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i11$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.AuditLogForModelComponent, selector: "app-audit-log-for-model", inputs: ["isIconView", "modelType", "modelId", "logView"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i14.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i5$1.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }, { kind: "component", type: SupplierFormButtonComponent, selector: "app-supplier-form-button", inputs: ["supplier"], outputs: ["onSaved"] }, { kind: "component", type: SupplierDeleteButtonComponent, selector: "app-supplier-delete-button", inputs: ["supplier"], outputs: ["onDelete"] }], preserveWhitespaces: true });
5355
+ }
5356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuppliersListComponent, decorators: [{
5357
+ type: Component,
5358
+ args: [{ selector: 'app-suppliers-list', template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-1\">\n <h3 class=\"mb-0 fw-bold\">Suppliers</h3>\n <app-supplier-form-button class='mt-2' (onSaved)=\"reload()\"></app-supplier-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Suppliers List\">\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.company_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef>Contact</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-1\">\n\n <a class=\"text-decoration-none text-secondary\" [routerLink]=\"['/inventory/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\" *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </a>\n <app-supplier-form-button *ngxPermissionsOnly=\"['supplier.update']\" [supplier]=\"element\"\n (onSaved)=\"reload()\"></app-supplier-form-button>\n <app-supplier-delete-button [supplier]=\"element\" (onDelete)=\"reload()\"></app-supplier-delete-button>\n <app-audit-log-for-model [modelId]=\"element?.id\" modelType=\"Supplier\"\n logView=\"all\"></app-audit-log-for-model>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n" }]
5359
+ }], ctorParameters: () => [{ type: i2$2.FormBuilder }, { type: SupplierService }] });
5360
+
5361
+ class PurchaseOrderService extends TechlifyServiceBaseClass {
5362
+ http;
5363
+ constructor(http) {
5364
+ super(http, 'purchase-orders');
5365
+ this.http = http;
5285
5366
  }
5286
- updateFormWithQueryParams() {
5287
- this.requestHelperService.updateFormWithQueryParams(this.filterForm, {
5288
- supplier_type_ids: { multiple: true },
5289
- });
5367
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PurchaseOrderService, deps: [{ token: i1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
5368
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PurchaseOrderService, providedIn: 'root' });
5369
+ }
5370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PurchaseOrderService, decorators: [{
5371
+ type: Injectable,
5372
+ args: [{
5373
+ providedIn: 'root'
5374
+ }]
5375
+ }], ctorParameters: () => [{ type: i1.HttpService }] });
5376
+
5377
+ class PurchaseOrderListingComponent extends TechlifyListingControllerInterface {
5378
+ service;
5379
+ fb;
5380
+ filterFormConfiguration = {};
5381
+ defaultSelectedColumns = [
5382
+ '#',
5383
+ 'date',
5384
+ 'po_number',
5385
+ 'supplier',
5386
+ 'details',
5387
+ 'status',
5388
+ 'items',
5389
+ ];
5390
+ get displayedColumns() {
5391
+ return this.defaultSelectedColumns.concat('actions');
5290
5392
  }
5291
- subscribeToFormChanges() {
5292
- this.filterForm.valueChanges.pipe(debounceTime$1(800)).subscribe({
5293
- next: () => {
5294
- this.requestHelperService.updateQueryParams(this.requestHelperService.convertToFormData(this.filterForm.value));
5295
- },
5393
+ constructor(service, fb) {
5394
+ super(service);
5395
+ this.service = service;
5396
+ this.fb = fb;
5397
+ this.filterForm = this.fb.group({
5398
+ search: [''],
5399
+ with: 'supplier,purchaseOrderProducts.product',
5296
5400
  });
5297
5401
  }
5298
- subscribeToRouteChanges() {
5299
- this.activatedRoute.queryParams.pipe(debounceTime$1(500), distinctUntilChanged()).subscribe(() => {
5300
- this.reload();
5301
- });
5402
+ ngOnInit() {
5403
+ this.patchFiltersFromRoute();
5404
+ this.listenFilterChanges();
5405
+ this.loadData();
5302
5406
  }
5303
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuppliersListComponent, deps: [{ token: i4$1.NgxSpinnerService }, { token: i2$2.FormBuilder }, { token: SupplierService }, { token: i1.ErrorHandlerService }, { token: i1.FilterService }, { token: i2.ActivatedRoute }, { token: SupplierFormService }], target: i0.ɵɵFactoryTarget.Component });
5304
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SuppliersListComponent, selector: "app-suppliers-list", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h3 class=\"mb-0 fw-bold\">Suppliers</h3>\n <app-supplier-form-button (onSaved)=\"reload()\"></app-supplier-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Suppliers List\">\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.company_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef>Contact</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-1\">\n\n <a class=\"text-decoration-none text-secondary\" [routerLink]=\"['/inventory/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\" *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </a>\n <app-supplier-form-button *ngxPermissionsOnly=\"['supplier.update']\" [supplier]=\"element\"\n (onSaved)=\"reload()\"></app-supplier-form-button>\n <app-supplier-delete-button [supplier]=\"element\" (onDelete)=\"reload()\"></app-supplier-delete-button>\n <app-audit-log-for-model [modelId]=\"element?.id\" modelType=\"Supplier\"\n logView=\"all\"></app-audit-log-for-model>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.AuditLogForModelComponent, selector: "app-audit-log-for-model", inputs: ["isIconView", "modelType", "modelId", "logView"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i5$1.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }, { kind: "component", type: SupplierFormButtonComponent, selector: "app-supplier-form-button", inputs: ["supplier"], outputs: ["onSaved"] }, { kind: "component", type: SupplierDeleteButtonComponent, selector: "app-supplier-delete-button", inputs: ["supplier"], outputs: ["onDelete"] }], preserveWhitespaces: true });
5305
- };
5306
- SuppliersListComponent = __decorate([
5307
- UntilDestroy()
5308
- ], SuppliersListComponent);
5309
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuppliersListComponent, decorators: [{
5407
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PurchaseOrderListingComponent, deps: [{ token: PurchaseOrderService }, { token: i2$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
5408
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: PurchaseOrderListingComponent, isStandalone: true, selector: "app-purchase-order-listing", usesInheritance: true, ngImport: i0, template: "<div class=\"d-flex flex-column gap-2\">\n\n <mat-card>\n <mat-card-content class='d-flex flex-row justify-content-between align-items-center'>\n <div class='d-flex flex-row gap-2'>\n <h5 class=\"mb-0\">Purchase Orders</h5>\n </div>\n\n <form [formGroup]='filterForm' class=\"d-flex flex-row gap-1\">\n <mat-form-field class=\"mb-0\">\n <mat-label>Search</mat-label>\n <input matInput formControlName=\"search\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Suppliers</mat-label>\n <app-searchable-selector formControlName=\"supplier_ids\" [multiple]=\"true\"\n apiUrl=\"api/suppliers\" titleField=\"company_name\" sortBy=\"company_name|asc\"></app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort>\n\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date:'mediumDate' }}</td>\n </ng-container>\n\n <!-- PO # Column -->\n <ng-container matColumnDef=\"po_number\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>PO #</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.po_number }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.supplier?.company_name }}</td>\n </ng-container>\n\n <!-- Details Column -->\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.particulars }}</td>\n </ng-container>\n\n <!-- Status Column -->\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Status</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.status }}</td>\n </ng-container>\n\n <!-- Items Column -->\n <ng-container matColumnDef=\"items\">\n <th mat-header-cell *matHeaderCellDef>Items</th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngFor=\"let item of element?.purchase_order_products; let last = last\">\n {{ item?.product?.name }}<span *ngIf=\"!last\">, </span>\n </span>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: TechlifyIconModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }], preserveWhitespaces: true });
5409
+ }
5410
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PurchaseOrderListingComponent, decorators: [{
5310
5411
  type: Component,
5311
- args: [{ selector: 'app-suppliers-list', template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h3 class=\"mb-0 fw-bold\">Suppliers</h3>\n <app-supplier-form-button (onSaved)=\"reload()\"></app-supplier-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Suppliers List\">\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.company_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef>Contact</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-1\">\n\n <a class=\"text-decoration-none text-secondary\" [routerLink]=\"['/inventory/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\" *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </a>\n <app-supplier-form-button *ngxPermissionsOnly=\"['supplier.update']\" [supplier]=\"element\"\n (onSaved)=\"reload()\"></app-supplier-form-button>\n <app-supplier-delete-button [supplier]=\"element\" (onDelete)=\"reload()\"></app-supplier-delete-button>\n <app-audit-log-for-model [modelId]=\"element?.id\" modelType=\"Supplier\"\n logView=\"all\"></app-audit-log-for-model>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n" }]
5312
- }], ctorParameters: () => [{ type: i4$1.NgxSpinnerService }, { type: i2$2.FormBuilder }, { type: SupplierService }, { type: i1.ErrorHandlerService }, { type: i1.FilterService }, { type: i2.ActivatedRoute }, { type: SupplierFormService }] });
5412
+ args: [{ selector: 'app-purchase-order-listing', standalone: true, imports: [
5413
+ CommonModule,
5414
+ MaterialModule,
5415
+ TechlifyIconModule,
5416
+ ReactiveFormsModule,
5417
+ InfiniteScrollDirective,
5418
+ SearchableSelectorModule
5419
+ ], template: "<div class=\"d-flex flex-column gap-2\">\n\n <mat-card>\n <mat-card-content class='d-flex flex-row justify-content-between align-items-center'>\n <div class='d-flex flex-row gap-2'>\n <h5 class=\"mb-0\">Purchase Orders</h5>\n </div>\n\n <form [formGroup]='filterForm' class=\"d-flex flex-row gap-1\">\n <mat-form-field class=\"mb-0\">\n <mat-label>Search</mat-label>\n <input matInput formControlName=\"search\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Suppliers</mat-label>\n <app-searchable-selector formControlName=\"supplier_ids\" [multiple]=\"true\"\n apiUrl=\"api/suppliers\" titleField=\"company_name\" sortBy=\"company_name|asc\"></app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort>\n\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date:'mediumDate' }}</td>\n </ng-container>\n\n <!-- PO # Column -->\n <ng-container matColumnDef=\"po_number\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>PO #</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.po_number }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.supplier?.company_name }}</td>\n </ng-container>\n\n <!-- Details Column -->\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.particulars }}</td>\n </ng-container>\n\n <!-- Status Column -->\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Status</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.status }}</td>\n </ng-container>\n\n <!-- Items Column -->\n <ng-container matColumnDef=\"items\">\n <th mat-header-cell *matHeaderCellDef>Items</th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngFor=\"let item of element?.purchase_order_products; let last = last\">\n {{ item?.product?.name }}<span *ngIf=\"!last\">, </span>\n </span>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n\n</div>" }]
5420
+ }], ctorParameters: () => [{ type: PurchaseOrderService }, { type: i2$2.FormBuilder }] });
5313
5421
 
5314
5422
  const routes$4 = [
5315
5423
  {
@@ -5321,6 +5429,10 @@ const routes$4 = [
5321
5429
  path: ':id/view',
5322
5430
  component: SupplierViewComponent,
5323
5431
  },
5432
+ {
5433
+ path: 'purchase-orders',
5434
+ component: PurchaseOrderListingComponent
5435
+ }
5324
5436
  ],
5325
5437
  },
5326
5438
  ];
@@ -5516,14 +5628,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
5516
5628
  class LocationFormComponent extends TechlifyFormComponentInterface {
5517
5629
  formBuilder;
5518
5630
  service;
5631
+ dialogRef;
5519
5632
  model;
5520
5633
  saved = new EventEmitter();
5521
5634
  cancelled = new EventEmitter();
5522
- isSaving;
5523
- constructor(formValidatorService, formBuilder, service) {
5635
+ constructor(formValidatorService, formBuilder, service, dialogRef) {
5524
5636
  super(formValidatorService);
5525
5637
  this.formBuilder = formBuilder;
5526
5638
  this.service = service;
5639
+ this.dialogRef = dialogRef;
5527
5640
  this.errorMessages = {
5528
5641
  title: {
5529
5642
  required: 'The title field is required.'
@@ -5531,6 +5644,7 @@ class LocationFormComponent extends TechlifyFormComponentInterface {
5531
5644
  };
5532
5645
  this.form = this.formBuilder.group({
5533
5646
  id: [''],
5647
+ parent_id: [''],
5534
5648
  title: ['', Validators.required],
5535
5649
  address: [''],
5536
5650
  description: [''],
@@ -5538,47 +5652,23 @@ class LocationFormComponent extends TechlifyFormComponentInterface {
5538
5652
  }
5539
5653
  ngOnInit() {
5540
5654
  if (this.model) {
5655
+ this.isUpdate = true;
5541
5656
  this.form.patchValue({ ...this.model });
5542
5657
  }
5543
5658
  }
5544
- save() {
5545
- this.form.markAllAsTouched();
5546
- if (this.form.invalid) {
5547
- this.alertService.addAlert('Please check the form for errors.', 'error');
5548
- return;
5549
- }
5550
- const data = this.form.value;
5551
- this.isSaving = true;
5552
- let request = this.service.store(data);
5553
- if (data?.id) {
5554
- request = this.service.update(data);
5555
- }
5556
- request.subscribe({
5557
- next: (response) => {
5558
- this.isSaving = false;
5559
- this.saved.emit(response?.item);
5560
- this.alertService.addAlert('The location saved successfully!', 'success');
5561
- },
5562
- error: () => (this.isSaving = false)
5563
- });
5564
- }
5565
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: LocationService }], target: i0.ɵɵFactoryTarget.Component });
5566
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LocationFormComponent, isStandalone: true, selector: "app-location-form", inputs: { model: "model" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column gap-1\"\n>\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Title\">\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Address</mat-label>\n <input type=\"text\" matInput formControlName=\"address\" placeholder=\"Address\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">\n Save\n </button>\n <button (click)=\"cancelled.emit()\" [disabled]=\"isSaving\" type=\"button\" mat-flat-button>\n Cancel\n </button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }], preserveWhitespaces: true });
5659
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: LocationService }, { token: i1$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
5660
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LocationFormComponent, isStandalone: true, selector: "app-location-form", inputs: { model: "model" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"submit(form.value)\" class=\"d-flex flex-column gap-1\">\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Title\">\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field techlifyFeatureEnabled=\"sub-locations\">\n <mat-label>Parent</mat-label>\n <app-searchable-selector formControlName=\"parent_id\" apiUrl='api/inventory-locations'></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Address</mat-label>\n <input type=\"text\" matInput formControlName=\"address\" placeholder=\"Address\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" type=\"submit\" mat-raised-button color=\"primary\">\n Save\n </button>\n <button (click)=\"cancelled.emit()\" [disabled]=\"isWorking\" type=\"button\" mat-flat-button>\n Cancel\n </button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "ngmodule", type: TechlifyFeatureModule }, { kind: "directive", type: i1.TechlifyFeatureEnabledDirective, selector: "[techlifyFeatureEnabled]", inputs: ["techlifyFeatureEnabled"] }], preserveWhitespaces: true });
5567
5661
  }
5568
5662
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationFormComponent, decorators: [{
5569
5663
  type: Component,
5570
5664
  args: [{ selector: 'app-location-form', standalone: true, imports: [
5571
5665
  FormsModule,
5572
- MatButton,
5573
- MatError,
5574
- MatFormField,
5575
- MatInput,
5576
- MatLabel,
5577
- NgIf,
5666
+ MaterialModule,
5578
5667
  ReactiveFormsModule,
5579
- SearchableSelectorModule
5580
- ], template: "<form\n [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column gap-1\"\n>\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Title\">\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Address</mat-label>\n <input type=\"text\" matInput formControlName=\"address\" placeholder=\"Address\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">\n Save\n </button>\n <button (click)=\"cancelled.emit()\" [disabled]=\"isSaving\" type=\"button\" mat-flat-button>\n Cancel\n </button>\n </div>\n</form>\n" }]
5581
- }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: LocationService }], propDecorators: { model: [{
5668
+ SearchableSelectorModule,
5669
+ TechlifyFeatureModule
5670
+ ], template: "<form [formGroup]=\"form\" (submit)=\"submit(form.value)\" class=\"d-flex flex-column gap-1\">\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Title\">\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field techlifyFeatureEnabled=\"sub-locations\">\n <mat-label>Parent</mat-label>\n <app-searchable-selector formControlName=\"parent_id\" apiUrl='api/inventory-locations'></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Address</mat-label>\n <input type=\"text\" matInput formControlName=\"address\" placeholder=\"Address\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" type=\"submit\" mat-raised-button color=\"primary\">\n Save\n </button>\n <button (click)=\"cancelled.emit()\" [disabled]=\"isWorking\" type=\"button\" mat-flat-button>\n Cancel\n </button>\n </div>\n</form>" }]
5671
+ }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: LocationService }, { type: i1$1.MatDialogRef }], propDecorators: { model: [{
5582
5672
  type: Input
5583
5673
  }], saved: [{
5584
5674
  type: Output
@@ -5594,14 +5684,23 @@ class LocationFormButtonComponent {
5594
5684
  this.matDialog = matDialog;
5595
5685
  }
5596
5686
  showForm(templateRef) {
5597
- this.matDialog.open(templateRef, { width: '400px' });
5687
+ this.matDialog.open(templateRef, {
5688
+ width: '400px'
5689
+ }).afterClosed().subscribe({
5690
+ next: (model) => {
5691
+ if (!model) {
5692
+ return;
5693
+ }
5694
+ this.saved.emit(model);
5695
+ }
5696
+ });
5598
5697
  }
5599
5698
  onSaved(model) {
5600
5699
  this.matDialog.closeAll();
5601
5700
  this.saved.emit(model);
5602
5701
  }
5603
5702
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
5604
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LocationFormButtonComponent, isStandalone: true, selector: "app-location-form-button", inputs: { model: "model" }, outputs: { saved: "saved" }, ngImport: i0, template: "<span\n class=\"material-symbols-outlined cursor-pointer\"\n (click)=\"showForm(formTemplate)\"\n>\n {{ model ? 'edit' : 'add' }}\n</span>\n\n<ng-template #formTemplate>\n <h3 mat-dialog-title>{{ model ? 'Edit' : 'Create' }} Location</h3>\n <app-location-form\n mat-dialog-content\n [model]=\"model\"\n (saved)=\"onSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-location-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "component", type: LocationFormComponent, selector: "app-location-form", inputs: ["model"], outputs: ["saved", "cancelled"] }], preserveWhitespaces: true });
5703
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LocationFormButtonComponent, isStandalone: true, selector: "app-location-form-button", inputs: { model: "model" }, outputs: { saved: "saved" }, ngImport: i0, template: "<span class=\"material-symbols-outlined cursor-pointer\" (click)=\"showForm(formTemplate)\">\n {{ model ? 'edit' : 'add' }}\n</span>\n\n<ng-template #formTemplate>\n <h3 mat-dialog-title> Location Form </h3>\n <app-location-form mat-dialog-content [model]=\"model\" (saved)=\"onSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"></app-location-form>\n</ng-template>", styles: [""], dependencies: [{ kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "component", type: LocationFormComponent, selector: "app-location-form", inputs: ["model"], outputs: ["saved", "cancelled"] }], preserveWhitespaces: true });
5605
5704
  }
5606
5705
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationFormButtonComponent, decorators: [{
5607
5706
  type: Component,
@@ -5609,7 +5708,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
5609
5708
  MatDialogContent,
5610
5709
  MatDialogTitle,
5611
5710
  LocationFormComponent
5612
- ], template: "<span\n class=\"material-symbols-outlined cursor-pointer\"\n (click)=\"showForm(formTemplate)\"\n>\n {{ model ? 'edit' : 'add' }}\n</span>\n\n<ng-template #formTemplate>\n <h3 mat-dialog-title>{{ model ? 'Edit' : 'Create' }} Location</h3>\n <app-location-form\n mat-dialog-content\n [model]=\"model\"\n (saved)=\"onSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-location-form>\n</ng-template>\n" }]
5711
+ ], template: "<span class=\"material-symbols-outlined cursor-pointer\" (click)=\"showForm(formTemplate)\">\n {{ model ? 'edit' : 'add' }}\n</span>\n\n<ng-template #formTemplate>\n <h3 mat-dialog-title> Location Form </h3>\n <app-location-form mat-dialog-content [model]=\"model\" (saved)=\"onSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"></app-location-form>\n</ng-template>" }]
5613
5712
  }], ctorParameters: () => [{ type: i1$1.MatDialog }], propDecorators: { model: [{
5614
5713
  type: Input
5615
5714
  }], saved: [{
@@ -5715,7 +5814,7 @@ class LocationStatusChangerComponent extends TechlifyFormComponentInterface {
5715
5814
  });
5716
5815
  }
5717
5816
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationStatusChangerComponent, deps: [{ token: i1.FormValidatorService }, { token: LocationService }, { token: i2$2.FormBuilder }, { token: i1.ErrorHandlerService }], target: i0.ɵɵFactoryTarget.Component });
5718
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LocationStatusChangerComponent, isStandalone: true, selector: "app-location-status-changer", inputs: { location: "location" }, usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-location-statuses\"\n formControlName=\"status_id\" [cache]=\"true\"></app-searchable-selector>\n </mat-form-field>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }], preserveWhitespaces: true });
5817
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LocationStatusChangerComponent, isStandalone: true, selector: "app-location-status-changer", inputs: { location: "location" }, usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector apiUrl=\"api/techlify-statuses\"\n formControlName=\"status_id\" [cache]=\"true\"></app-searchable-selector>\n </mat-form-field>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }], preserveWhitespaces: true });
5719
5818
  }
5720
5819
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationStatusChangerComponent, decorators: [{
5721
5820
  type: Component,
@@ -5724,7 +5823,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
5724
5823
  MaterialModule,
5725
5824
  ReactiveFormsModule,
5726
5825
  SearchableSelectorModule
5727
- ], template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-location-statuses\"\n formControlName=\"status_id\" [cache]=\"true\"></app-searchable-selector>\n </mat-form-field>\n</form>" }]
5826
+ ], template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector apiUrl=\"api/techlify-statuses\"\n formControlName=\"status_id\" [cache]=\"true\"></app-searchable-selector>\n </mat-form-field>\n</form>" }]
5728
5827
  }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: LocationService }, { type: i2$2.FormBuilder }, { type: i1.ErrorHandlerService }], propDecorators: { location: [{
5729
5828
  type: Input
5730
5829
  }] } });
@@ -5732,7 +5831,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
5732
5831
  class LocationListComponent extends TechlifyListingControllerInterface {
5733
5832
  service;
5734
5833
  formBuilder;
5735
- activatedRoute;
5834
+ featureService;
5736
5835
  displayedColumns = [
5737
5836
  '#',
5738
5837
  'Title',
@@ -5743,95 +5842,51 @@ class LocationListComponent extends TechlifyListingControllerInterface {
5743
5842
  'status',
5744
5843
  'Actions',
5745
5844
  ];
5746
- constructor(service, formBuilder, activatedRoute) {
5845
+ filterFormConfiguration = {};
5846
+ isSublocationsEnabled = signal(false);
5847
+ constructor(service, formBuilder, featureService) {
5747
5848
  super();
5748
5849
  this.service = service;
5749
5850
  this.formBuilder = formBuilder;
5750
- this.activatedRoute = activatedRoute;
5751
- this.lastPage = 0;
5851
+ this.featureService = featureService;
5752
5852
  this.filterForm = this.formBuilder.group({
5753
5853
  search: [''],
5754
5854
  sort_by: ['id|desc'],
5855
+ with: 'status,parent',
5856
+ withCount: 'stockReceipts,stockIssues',
5755
5857
  });
5756
5858
  }
5757
5859
  ngOnInit() {
5758
- this.requestHelperService.updateFormWithQueryParams(this.filterForm, {});
5759
- this.filterForm.valueChanges.pipe(debounceTime$1(800)).subscribe({
5760
- next: () => {
5761
- this.requestHelperService.updateQueryParams(this.requestHelperService.convertToFormData(this.filterForm.value));
5762
- }
5763
- });
5764
- // listen for route change
5765
- this.activatedRoute.queryParams
5766
- .pipe(debounceTime$1(500), distinctUntilChanged())
5767
- .subscribe((val) => {
5768
- this.reload();
5769
- });
5860
+ this.addParentColumn();
5861
+ this.patchFiltersFromRoute();
5862
+ this.listenFilterChanges();
5863
+ this.loadData();
5770
5864
  }
5771
- loadData() {
5772
- if (this.isWorking) {
5773
- return;
5865
+ addParentColumn() {
5866
+ this.isSublocationsEnabled.set(this.featureService.isFeatureExists('sub-locations'));
5867
+ if (this.isSublocationsEnabled()) {
5868
+ const index = this.displayedColumns.indexOf('Title');
5869
+ this.displayedColumns.splice(index + 1, 0, 'parent');
5774
5870
  }
5775
- const params = {
5776
- ...this.requestHelperService.convertToFormData(this.filterForm.value),
5777
- page: this.page,
5778
- perPage: this.perPage,
5779
- with: 'status',
5780
- withCount: 'stockReceipts,stockIssues',
5781
- };
5782
- this.isWorking = true;
5783
- this.service.index(params).subscribe({
5784
- next: (response) => {
5785
- this.models = this.models?.concat(response?.data);
5786
- this.lastPage = response?.last_page;
5787
- this.isWorking = false;
5788
- },
5789
- error: () => (this.isWorking = false)
5790
- });
5791
- }
5792
- onSortChange(sort) {
5793
- let { active, direction } = sort;
5794
- if (!active)
5795
- active = 'id';
5796
- if (!direction)
5797
- direction = 'desc';
5798
- this.filterForm.get('sort_by')?.setValue(active + '|' + direction);
5799
5871
  }
5800
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationListComponent, deps: [{ token: LocationService }, { token: i2$2.FormBuilder }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
5801
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LocationListComponent, isStandalone: true, selector: "app-location-list", usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <strong>Locations</strong>\n <app-location-form-button (saved)=\"modelCreated($event)\"></app-location-form-button>\n </div>\n <form class=\"d-flex justify-content-end align-items-center gap-2\" [formGroup]=\"filterForm\" (submit)=\"reload()\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search locations\" matInput formControlName=\"search\">\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table #table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"onSortChange($event)\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Title\">\n <th mat-header-cell mat-sort-header=\"title\" *matHeaderCellDef> Title </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.title }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Address\">\n <th mat-header-cell mat-sort-header=\"address\" *matHeaderCellDef> Address </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell *matHeaderCellDef> Stock Receipts </th>\n <td mat-cell *matCellDef=\"let element\">\n <span [routerLink]=\"['/inventory/stock-receipts']\" [queryParams]=\"{ location_ids: element.id }\"\n class='cursor-pointer'>\n {{element?.stock_receipts_count }} receipt(s)</span>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"stock_issues\">\n <th mat-header-cell *matHeaderCellDef> Stock Issues </th>\n <td mat-cell *matCellDef=\"let element\">\n <span [routerLink]=\"['/inventory/stock-issues']\" [queryParams]=\"{ location_ids: element.id }\"\n class='cursor-pointer'>\n {{element?.stock_issues_count }} issue(s)</span>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Description\">\n <th mat-header-cell *matHeaderCellDef> Description </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef> Status </th>\n <td mat-cell *matCellDef=\"let element\">\n <app-location-status-changer [location]=\"element\"></app-location-status-changer>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-location-form-button [model]=\"element\" (saved)=\"modelUpdated($event, i)\"></app-location-form-button>\n <a [routerLink]=\"['/inventory/locations', element?.id, 'view']\" class=\"text-decoration-none text-dark\">\n <span class=\"material-symbols-outlined\">visibility</span>\n </a>\n <span *ngIf=\"element?.stock_receipts_count == 0 && element?.stock_issues_count == 0\">\n <app-location-delete-button [model]=\"element\" (deleted)=\"modelDeleted(i)\"></app-location-delete-button>\n </span>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [""], dependencies: [{ kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "component", type: MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "directive", type: MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "directive", type: MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "component", type: LocationFormButtonComponent, selector: "app-location-form-button", inputs: ["model"], outputs: ["saved"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: LocationDeleteButtonComponent, selector: "app-location-delete-button", inputs: ["model"], outputs: ["deleted"] }, { kind: "component", type: LocationStatusChangerComponent, selector: "app-location-status-changer", inputs: ["location"] }], preserveWhitespaces: true });
5872
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationListComponent, deps: [{ token: LocationService }, { token: i2$2.FormBuilder }, { token: i1.TechlifyFeatureService }], target: i0.ɵɵFactoryTarget.Component });
5873
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LocationListComponent, isStandalone: true, selector: "app-location-list", usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <strong>Locations</strong>\n <app-location-form-button (saved)=\"reload()\"></app-location-form-button>\n </div>\n <form class=\"d-flex justify-content-end align-items-center gap-2\" [formGroup]=\"filterForm\" (submit)=\"reload()\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search locations\" matInput formControlName=\"search\">\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table #table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Title\">\n <th mat-header-cell mat-sort-header=\"title\" *matHeaderCellDef> Title </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.title }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"parent\">\n <th mat-header-cell mat-sort-header=\"parent\" *matHeaderCellDef> Parent </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.parent?.title }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Address\">\n <th mat-header-cell mat-sort-header=\"address\" *matHeaderCellDef> Address </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell *matHeaderCellDef> Stock Receipts </th>\n <td mat-cell *matCellDef=\"let element\">\n <span [routerLink]=\"['/inventory/stock-receipts']\" [queryParams]=\"{ location_ids: element.id }\"\n class='cursor-pointer'>\n {{element?.stock_receipts_count }} receipt(s)</span>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"stock_issues\">\n <th mat-header-cell *matHeaderCellDef> Stock Issues </th>\n <td mat-cell *matCellDef=\"let element\">\n <span [routerLink]=\"['/inventory/stock-issues']\" [queryParams]=\"{ location_ids: element.id }\"\n class='cursor-pointer'>\n {{element?.stock_issues_count }} issue(s)</span>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Description\">\n <th mat-header-cell *matHeaderCellDef> Description </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef> Status </th>\n <td mat-cell *matCellDef=\"let element\">\n <app-location-status-changer [location]=\"element\"></app-location-status-changer>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-location-form-button [model]=\"element\" (saved)=\"reload()\"></app-location-form-button>\n <a [routerLink]=\"['/inventory/locations', element?.id, 'view']\" class=\"text-decoration-none text-dark\">\n <span class=\"material-symbols-outlined\">visibility</span>\n </a>\n <span *ngIf=\"element?.stock_receipts_count == 0 && element?.stock_issues_count == 0\">\n <app-location-delete-button [model]=\"element\" (deleted)=\"modelDeleted(i)\"></app-location-delete-button>\n </span>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: LocationFormButtonComponent, selector: "app-location-form-button", inputs: ["model"], outputs: ["saved"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: LocationDeleteButtonComponent, selector: "app-location-delete-button", inputs: ["model"], outputs: ["deleted"] }, { kind: "component", type: LocationStatusChangerComponent, selector: "app-location-status-changer", inputs: ["location"] }], preserveWhitespaces: true });
5802
5874
  }
5803
5875
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationListComponent, decorators: [{
5804
5876
  type: Component,
5805
5877
  args: [{ selector: 'app-location-list', standalone: true, imports: [
5806
- MatCard,
5807
- MatCardContent,
5878
+ CommonModule,
5808
5879
  FormsModule,
5809
5880
  InfiniteScrollDirective,
5810
- MatCell,
5811
- MatCellDef,
5812
- MatColumnDef,
5813
- MatFormField,
5814
- MatHeaderCell,
5815
- MatHeaderRow,
5816
- MatHeaderRowDef,
5817
- MatInput,
5818
- MatLabel,
5819
- MatProgressBar,
5820
- MatRow,
5821
- MatRowDef,
5822
- MatSort,
5823
- MatSortHeader,
5824
- MatTable,
5825
- NgIf,
5881
+ MaterialModule,
5826
5882
  ReactiveFormsModule,
5827
5883
  SearchableSelectorModule,
5828
- MatHeaderCellDef,
5829
5884
  LocationFormButtonComponent,
5830
5885
  RouterLink,
5831
5886
  LocationDeleteButtonComponent,
5832
5887
  LocationStatusChangerComponent
5833
- ], template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <strong>Locations</strong>\n <app-location-form-button (saved)=\"modelCreated($event)\"></app-location-form-button>\n </div>\n <form class=\"d-flex justify-content-end align-items-center gap-2\" [formGroup]=\"filterForm\" (submit)=\"reload()\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search locations\" matInput formControlName=\"search\">\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table #table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"onSortChange($event)\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Title\">\n <th mat-header-cell mat-sort-header=\"title\" *matHeaderCellDef> Title </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.title }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Address\">\n <th mat-header-cell mat-sort-header=\"address\" *matHeaderCellDef> Address </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell *matHeaderCellDef> Stock Receipts </th>\n <td mat-cell *matCellDef=\"let element\">\n <span [routerLink]=\"['/inventory/stock-receipts']\" [queryParams]=\"{ location_ids: element.id }\"\n class='cursor-pointer'>\n {{element?.stock_receipts_count }} receipt(s)</span>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"stock_issues\">\n <th mat-header-cell *matHeaderCellDef> Stock Issues </th>\n <td mat-cell *matCellDef=\"let element\">\n <span [routerLink]=\"['/inventory/stock-issues']\" [queryParams]=\"{ location_ids: element.id }\"\n class='cursor-pointer'>\n {{element?.stock_issues_count }} issue(s)</span>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Description\">\n <th mat-header-cell *matHeaderCellDef> Description </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef> Status </th>\n <td mat-cell *matCellDef=\"let element\">\n <app-location-status-changer [location]=\"element\"></app-location-status-changer>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-location-form-button [model]=\"element\" (saved)=\"modelUpdated($event, i)\"></app-location-form-button>\n <a [routerLink]=\"['/inventory/locations', element?.id, 'view']\" class=\"text-decoration-none text-dark\">\n <span class=\"material-symbols-outlined\">visibility</span>\n </a>\n <span *ngIf=\"element?.stock_receipts_count == 0 && element?.stock_issues_count == 0\">\n <app-location-delete-button [model]=\"element\" (deleted)=\"modelDeleted(i)\"></app-location-delete-button>\n </span>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>" }]
5834
- }], ctorParameters: () => [{ type: LocationService }, { type: i2$2.FormBuilder }, { type: i2.ActivatedRoute }] });
5888
+ ], template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <strong>Locations</strong>\n <app-location-form-button (saved)=\"reload()\"></app-location-form-button>\n </div>\n <form class=\"d-flex justify-content-end align-items-center gap-2\" [formGroup]=\"filterForm\" (submit)=\"reload()\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search locations\" matInput formControlName=\"search\">\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table #table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Title\">\n <th mat-header-cell mat-sort-header=\"title\" *matHeaderCellDef> Title </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.title }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"parent\">\n <th mat-header-cell mat-sort-header=\"parent\" *matHeaderCellDef> Parent </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.parent?.title }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Address\">\n <th mat-header-cell mat-sort-header=\"address\" *matHeaderCellDef> Address </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell *matHeaderCellDef> Stock Receipts </th>\n <td mat-cell *matCellDef=\"let element\">\n <span [routerLink]=\"['/inventory/stock-receipts']\" [queryParams]=\"{ location_ids: element.id }\"\n class='cursor-pointer'>\n {{element?.stock_receipts_count }} receipt(s)</span>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"stock_issues\">\n <th mat-header-cell *matHeaderCellDef> Stock Issues </th>\n <td mat-cell *matCellDef=\"let element\">\n <span [routerLink]=\"['/inventory/stock-issues']\" [queryParams]=\"{ location_ids: element.id }\"\n class='cursor-pointer'>\n {{element?.stock_issues_count }} issue(s)</span>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Description\">\n <th mat-header-cell *matHeaderCellDef> Description </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef> Status </th>\n <td mat-cell *matCellDef=\"let element\">\n <app-location-status-changer [location]=\"element\"></app-location-status-changer>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-location-form-button [model]=\"element\" (saved)=\"reload()\"></app-location-form-button>\n <a [routerLink]=\"['/inventory/locations', element?.id, 'view']\" class=\"text-decoration-none text-dark\">\n <span class=\"material-symbols-outlined\">visibility</span>\n </a>\n <span *ngIf=\"element?.stock_receipts_count == 0 && element?.stock_issues_count == 0\">\n <app-location-delete-button [model]=\"element\" (deleted)=\"modelDeleted(i)\"></app-location-delete-button>\n </span>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>" }]
5889
+ }], ctorParameters: () => [{ type: LocationService }, { type: i2$2.FormBuilder }, { type: i1.TechlifyFeatureService }] });
5835
5890
 
5836
5891
  class LocationInformationComponent {
5837
5892
  location;
@@ -5892,7 +5947,7 @@ class LocationProductStatisticsComponent extends TechlifyListingControllerInterf
5892
5947
  });
5893
5948
  // listen for route change
5894
5949
  this.activatedRoute.queryParams
5895
- .pipe(debounceTime$1(500), distinctUntilChanged())
5950
+ .pipe(debounceTime$1(500), distinctUntilChanged$1())
5896
5951
  .subscribe((val) => {
5897
5952
  this.reload();
5898
5953
  });
@@ -6270,7 +6325,7 @@ class ShelfListComponent extends TechlifyListingControllerInterface {
6270
6325
  }
6271
6326
  });
6272
6327
  // listen for route change
6273
- this.activatedRoute.queryParams.pipe(debounceTime$1(500), distinctUntilChanged())
6328
+ this.activatedRoute.queryParams.pipe(debounceTime$1(500), distinctUntilChanged$1())
6274
6329
  .subscribe(() => this.reload());
6275
6330
  }
6276
6331
  loadData() {
@@ -6302,7 +6357,7 @@ class ShelfListComponent extends TechlifyListingControllerInterface {
6302
6357
  this.filterForm.get('sort_by')?.setValue(active + '|' + direction);
6303
6358
  }
6304
6359
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ShelfListComponent, deps: [{ token: ShelfService }, { token: i2$2.FormBuilder }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
6305
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ShelfListComponent, isStandalone: true, selector: "app-shelf-list", usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <strong>Shelves</strong>\n <app-shelf-form-button (saved)=\"modelCreated($event)\"></app-shelf-form-button>\n </div>\n <form class=\"d-flex justify-content-end align-items-center gap-2\" [formGroup]=\"filterForm\" (submit)=\"reload()\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search shelves\" matInput formControlName=\"search\">\n </mat-form-field>\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_ids\" [multiple]=\"true\" apiUrl=\"api/inventory-locations\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table #table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"onSortChange($event)\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Name\">\n <th mat-header-cell mat-sort-header=\"name\" *matHeaderCellDef> Name </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.name }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Location\">\n <th mat-header-cell mat-sort-header=\"location\" *matHeaderCellDef> Location </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.location?.title }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Type\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"type\"> Type </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Description\">\n <th mat-header-cell *matHeaderCellDef> Description </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Creator\">\n <th mat-header-cell *matHeaderCellDef> Creator </th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-shelf-form-button [model]=\"element\" (saved)=\"modelUpdated($event, i)\"></app-shelf-form-button>\n <app-shelf-delete-button [model]=\"element\" (deleted)=\"modelDeleted(i)\"></app-shelf-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MaterialModule$1 }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ShelfFormButtonComponent, selector: "app-shelf-form-button", inputs: ["model"], outputs: ["saved"] }, { kind: "component", type: ShelfDeleteButtonComponent, selector: "app-shelf-delete-button", inputs: ["model"], outputs: ["deleted"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "pipe", type: DatePipe, name: "date" }], preserveWhitespaces: true });
6360
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ShelfListComponent, isStandalone: true, selector: "app-shelf-list", usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <strong>Shelves</strong>\n <app-shelf-form-button (saved)=\"modelCreated($event)\"></app-shelf-form-button>\n </div>\n <form class=\"d-flex justify-content-end align-items-center gap-2\" [formGroup]=\"filterForm\" (submit)=\"reload()\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search shelves\" matInput formControlName=\"search\">\n </mat-form-field>\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_ids\" [multiple]=\"true\" apiUrl=\"api/inventory-locations\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table #table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"onSortChange($event)\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Name\">\n <th mat-header-cell mat-sort-header=\"name\" *matHeaderCellDef> Name </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.name }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Location\">\n <th mat-header-cell mat-sort-header=\"location\" *matHeaderCellDef> Location </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.location?.title }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Type\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"type\"> Type </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Description\">\n <th mat-header-cell *matHeaderCellDef> Description </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Creator\">\n <th mat-header-cell *matHeaderCellDef> Creator </th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-shelf-form-button [model]=\"element\" (saved)=\"modelUpdated($event, i)\"></app-shelf-form-button>\n <app-shelf-delete-button [model]=\"element\" (deleted)=\"modelDeleted(i)\"></app-shelf-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MaterialModule$1 }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ShelfFormButtonComponent, selector: "app-shelf-form-button", inputs: ["model"], outputs: ["saved"] }, { kind: "component", type: ShelfDeleteButtonComponent, selector: "app-shelf-delete-button", inputs: ["model"], outputs: ["deleted"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "pipe", type: DatePipe, name: "date" }], preserveWhitespaces: true });
6306
6361
  }
6307
6362
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ShelfListComponent, decorators: [{
6308
6363
  type: Component,
@@ -6369,4 +6424,4 @@ var shelf_module = /*#__PURE__*/Object.freeze({
6369
6424
  */
6370
6425
 
6371
6426
  export { RatingFormComponent as $, StockReceiptFormModule as A, StockReceiptFormButtonComponent as B, StockReceiptViewComponent as C, StockTransferListComponent as D, StockTransferFormComponent as E, StockTransferFormButtonComponent as F, StockTransferService as G, SupplierModule as H, InventoryCommonRoutingModule as I, SupplierFormButtonComponent as J, SupplierFormComponent as K, SuppliersListComponent as L, MeasureService as M, SupplierTypeService as N, PayeeSelectorModule as O, ProductModule as P, PayeeSelectorComponent as Q, IncidentModule as R, StockIssueService as S, TechlifyFilterComponent as T, IncidentService as U, IncidentListComponent as V, IncidentFormComponent as W, IncidentFormButtonComponent as X, RatingModule as Y, RatingService as Z, RatingListComponent as _, TechlifyFilterModule as a, RatingFormButtonComponent as a0, ExportToExcelButtonComponent as a1, LocationModule as a2, LocationService as a3, LocationListComponent as a4, LocationFormComponent as a5, LocationFormButtonComponent as a6, LocationDeleteButtonComponent as a7, ShelfModule as a8, ShelfService as a9, ShelfListComponent as aa, ShelfFormComponent as ab, ShelfFormButtonComponent as ac, ShelfDeleteButtonComponent as ad, MaterialModule as b, StockIssueFormModule as c, StockIssueFormButtonComponent as d, StockIssuanceDeleteButtonModule as e, StockIssuanceDeleteButtonComponent as f, InventoryCommonModule as g, StockSummaryService as h, ProductFormComponent as i, ProductBasicInfoComponent as j, ProductFormButtonComponent as k, ProductQuickSearchComponent as l, ProductSearchModule as m, ProductSearchComponent as n, ProductListComponent as o, ProductService as p, ProductFormService as q, ProductBatchUpdateFormComponent as r, ProductImportPageComponent as s, ProductViewPageComponent as t, StockIssueModule as u, StockIssueListComponent as v, StockIssueListModule as w, StockReceiptsModule as x, StockReceiptDeleteButtonComponent as y, StockReceiptsListPageComponent as z };
6372
- //# sourceMappingURL=techlify-inventory-common-techlify-inventory-common-f9URc8HX.mjs.map
6427
+ //# sourceMappingURL=techlify-inventory-common-techlify-inventory-common-DRw7na0D.mjs.map