techlify-inventory-common 18.8.1 → 18.10.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 (70) hide show
  1. package/esm2022/lib/inventory-common/incident/incident-form/incident-form.component.mjs +116 -0
  2. package/esm2022/lib/inventory-common/incident/incident-form-button/incident-form-button.component.mjs +45 -0
  3. package/esm2022/lib/inventory-common/incident/incident-list/incident-list.component.mjs +142 -0
  4. package/esm2022/lib/inventory-common/incident/incident-routing.module.mjs +24 -0
  5. package/esm2022/lib/inventory-common/incident/incident.module.mjs +22 -0
  6. package/esm2022/lib/inventory-common/incident/incident.service.mjs +18 -0
  7. package/esm2022/lib/inventory-common/location/location-list/location-list.component.mjs +11 -6
  8. package/esm2022/lib/inventory-common/location/location-product-statistics/location-product-statistics.component.mjs +2 -2
  9. package/esm2022/lib/inventory-common/location/location-status-changer/location-status-changer.component.mjs +66 -0
  10. package/esm2022/lib/inventory-common/location/location.service.mjs +7 -1
  11. package/esm2022/lib/inventory-common/product/product-basic-info/product-basic-info.component.mjs +3 -3
  12. package/esm2022/lib/inventory-common/product/product-form/product-form.component.mjs +3 -3
  13. package/esm2022/lib/inventory-common/product/product-list/product-list.component.mjs +3 -3
  14. package/esm2022/lib/inventory-common/product/product-location/product-location-list/product-location-list.component.mjs +7 -4
  15. package/esm2022/lib/inventory-common/product/product-view-page/product-view-page.component.mjs +15 -3
  16. package/esm2022/lib/inventory-common/rating/rating-form/rating-form.component.mjs +115 -0
  17. package/esm2022/lib/inventory-common/rating/rating-form-button/rating-form-button.component.mjs +45 -0
  18. package/esm2022/lib/inventory-common/rating/rating-list/rating-list.component.mjs +138 -0
  19. package/esm2022/lib/inventory-common/rating/rating-routing.module.mjs +23 -0
  20. package/esm2022/lib/inventory-common/rating/rating.module.mjs +22 -0
  21. package/esm2022/lib/inventory-common/rating/rating.service.mjs +18 -0
  22. package/esm2022/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.mjs +10 -4
  23. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.mjs +4 -4
  24. package/esm2022/lib/inventory-common/stock-transfer/stock-transfer-form/stock-transfer-form.component.mjs +8 -2
  25. package/esm2022/lib/inventory-common/stock-transfer/stock-transfer-form-button/stock-transfer-form-button.component.mjs +6 -3
  26. package/esm2022/lib/inventory-common/stock-transfer/stock-transfer-list/stock-transfer-list.component.mjs +6 -4
  27. package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form.component.mjs +2 -2
  28. package/esm2022/lib/inventory-common/supplier/supplier-routing.module.mjs +1 -1
  29. package/esm2022/lib/inventory-common/supplier/supplier-type.service.mjs +25 -0
  30. package/esm2022/lib/inventory-common/supplier/supplier-view/supplier-view.component.mjs +6 -4
  31. package/esm2022/lib/inventory-common/supplier/supplier.module.mjs +12 -4
  32. package/esm2022/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.mjs +3 -3
  33. package/esm2022/public-api.mjs +18 -1
  34. package/fesm2022/{techlify-inventory-common-category.module-CAPeu05n.mjs → techlify-inventory-common-category.module-BmhaQykz.mjs} +2 -2
  35. package/fesm2022/{techlify-inventory-common-category.module-CAPeu05n.mjs.map → techlify-inventory-common-category.module-BmhaQykz.mjs.map} +1 -1
  36. package/fesm2022/{techlify-inventory-common-location.module-Bpt1avqg.mjs → techlify-inventory-common-location.module-CSrRu4pQ.mjs} +69 -8
  37. package/fesm2022/techlify-inventory-common-location.module-CSrRu4pQ.mjs.map +1 -0
  38. package/fesm2022/{techlify-inventory-common-measure.module-BjJ4KTU_.mjs → techlify-inventory-common-measure.module-Dz5Lc4oT.mjs} +2 -2
  39. package/fesm2022/{techlify-inventory-common-measure.module-BjJ4KTU_.mjs.map → techlify-inventory-common-measure.module-Dz5Lc4oT.mjs.map} +1 -1
  40. package/fesm2022/{techlify-inventory-common-techlify-inventory-common-KJHI_roN.mjs → techlify-inventory-common-techlify-inventory-common-BBi2hKoE.mjs} +1172 -43
  41. package/fesm2022/techlify-inventory-common-techlify-inventory-common-BBi2hKoE.mjs.map +1 -0
  42. package/fesm2022/techlify-inventory-common.mjs +1 -1
  43. package/lib/inventory-common/incident/incident-form/incident-form.component.d.ts +21 -0
  44. package/lib/inventory-common/incident/incident-form-button/incident-form-button.component.d.ts +15 -0
  45. package/lib/inventory-common/incident/incident-list/incident-list.component.d.ts +23 -0
  46. package/lib/inventory-common/incident/incident-routing.module.d.ts +7 -0
  47. package/lib/inventory-common/incident/incident.module.d.ts +8 -0
  48. package/lib/inventory-common/incident/incident.service.d.ts +7 -0
  49. package/lib/inventory-common/location/location-status-changer/location-status-changer.component.d.ts +18 -0
  50. package/lib/inventory-common/location/location.service.d.ts +4 -0
  51. package/lib/inventory-common/product/product-location/product-location-list/product-location-list.component.d.ts +3 -2
  52. package/lib/inventory-common/product/product-view-page/product-view-page.component.d.ts +6 -0
  53. package/lib/inventory-common/rating/rating-form/rating-form.component.d.ts +21 -0
  54. package/lib/inventory-common/rating/rating-form-button/rating-form-button.component.d.ts +15 -0
  55. package/lib/inventory-common/rating/rating-list/rating-list.component.d.ts +23 -0
  56. package/lib/inventory-common/rating/rating-routing.module.d.ts +7 -0
  57. package/lib/inventory-common/rating/rating.module.d.ts +8 -0
  58. package/lib/inventory-common/rating/rating.service.d.ts +7 -0
  59. package/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.d.ts +3 -1
  60. package/lib/inventory-common/stock-transfer/stock-transfer-form/stock-transfer-form.component.d.ts +2 -1
  61. package/lib/inventory-common/stock-transfer/stock-transfer-form-button/stock-transfer-form-button.component.d.ts +2 -1
  62. package/lib/inventory-common/supplier/supplier-form/supplier-form.component.d.ts +1 -1
  63. package/lib/inventory-common/supplier/supplier-type.service.d.ts +13 -0
  64. package/lib/inventory-common/supplier/supplier.module.d.ts +3 -1
  65. package/package.json +1 -1
  66. package/public-api.d.ts +17 -0
  67. package/fesm2022/techlify-inventory-common-location.module-Bpt1avqg.mjs.map +0 -1
  68. package/fesm2022/techlify-inventory-common-supplier.module-DaTU-lMt.mjs +0 -468
  69. package/fesm2022/techlify-inventory-common-supplier.module-DaTU-lMt.mjs.map +0 -1
  70. package/fesm2022/techlify-inventory-common-techlify-inventory-common-KJHI_roN.mjs.map +0 -1
@@ -4,7 +4,7 @@ import * as i4$1 from '@angular/router';
4
4
  import { RouterModule, RouterLink, RouterLinkActive } from '@angular/router';
5
5
  import moment from 'moment';
6
6
  import * as i1 from 'ngx-techlify-core';
7
- import { TechlifyServiceBaseClass, TechlifyListingControllerInterface, TechlifyFormComponentInterface, SearchableSelectorModule, AuthenticationGuard, ImportCsvModule, TimelineFilterModule, MaterialModule as MaterialModule$1, ColumnSelectorModule } from 'ngx-techlify-core';
7
+ import { TechlifyServiceBaseClass, TechlifyListingControllerInterface, TechlifyFormComponentInterface, SearchableSelectorModule, AuthenticationGuard, ImportCsvModule, TimelineFilterModule, MaterialModule as MaterialModule$1, ColumnSelectorModule, ActionPopupComponent, AuditLogForModelModule, NoteModule } from 'ngx-techlify-core';
8
8
  import * as i8$1 from '@angular/material/icon';
9
9
  import { MatIconModule, MatIcon } from '@angular/material/icon';
10
10
  import * as i4 from '@angular/material/card';
@@ -70,11 +70,12 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
70
70
  import { MatSliderModule } from '@angular/material/slider';
71
71
  import { MatSnackBarModule } from '@angular/material/snack-bar';
72
72
  import { MatStepperModule } from '@angular/material/stepper';
73
+ import * as i6$1 from '@angular/material/tabs';
73
74
  import { MatTabsModule } from '@angular/material/tabs';
74
75
  import { MatToolbarModule } from '@angular/material/toolbar';
75
76
  import { MatTreeModule } from '@angular/material/tree';
76
77
  import moment$1 from 'moment/moment';
77
- import * as i13 from 'ngx-permissions';
78
+ import * as i5$2 from 'ngx-permissions';
78
79
  import { NgxPermissionsModule } from 'ngx-permissions';
79
80
 
80
81
  class ProductSummaryService extends TechlifyServiceBaseClass {
@@ -464,9 +465,15 @@ class LocationService extends TechlifyServiceBaseClass {
464
465
  count() {
465
466
  return this.index().pipe(map((res) => res.data.length));
466
467
  }
468
+ /**
469
+ * @todo remove this function from here
470
+ */
467
471
  productStatistics(model, params) {
468
472
  return this.httpService.get(`api/inventory-locations/${model.id}/product-statistics`, { params });
469
473
  }
474
+ updateStatus(model) {
475
+ return this.httpService.put(`api/inventory-locations/${model.id}/update-status`, { status_id: model.status_id });
476
+ }
470
477
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LocationService, deps: [{ token: i1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
471
478
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LocationService, providedIn: 'root' });
472
479
  }
@@ -1355,11 +1362,11 @@ class ProductFormComponent {
1355
1362
  return this.displayedFormSections.length > 0 && this.displayedFormSections.includes(sectionName);
1356
1363
  }
1357
1364
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductFormComponent, deps: [{ token: ProductService }, { token: i2$1.FormBuilder }, { token: i1.FormValidatorService }, { token: i1.AlertService }, { token: i5.DatePipe }, { token: ProductFormService }], target: i0.ɵɵFactoryTarget.Component });
1358
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('name')\">\n <input matInput placeholder=\"Name\" formControlName=\"name\" required />\n <mat-error *ngIf=\"isFieldValid('name')\">{{ getErrorMessage('name') }} </mat-error>\n </mat-form-field>\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 <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('sku')\">\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 <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 <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 <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('reorder point')\">\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 <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 <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('initial quantity date')\">\n <input\n matInput\n [matDatepicker]=\"pickerInitialQuantityDate\"\n placeholder=\"Initial Quantity Date\"\n formControlName=\"initial_quantity_date\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"pickerInitialQuantityDate\"></mat-datepicker-toggle>\n <mat-datepicker #pickerInitialQuantityDate></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('initial_quantity_date')\"\n >{{ 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 <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 <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('condition types')\">\n <mat-label>Condition</mat-label>\n <app-searchable-selector\n apiUrl=\"api/condition-types\"\n formControlName=\"condition_type_id\"\n ></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 <input\n matInput\n placeholder=\"Minimum Price\"\n formControlName=\"minimum_price\"\n required\n type=\"number\"\n step=\"any\"\n />\n <mat-error *ngIf=\"isFieldValid('minimum_price')\">{{ getErrorMessage('minimum_price') }} </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('maximum price')\">\n <input matInput placeholder=\"Maximum Price\" formControlName=\"maximum_price\" type=\"number\" step=\"any\" />\n </mat-form-field>\n </div>\n </div>\n <!-- <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('accounts information')\">-->\n <!-- <h3><strong>Accounts Information</strong></h3>-->\n <!-- <div fxLayout fxLayoutGap=\"0.5rem\">-->\n <!-- <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('income account')\">-->\n <!-- <mat-label>Income Account</mat-label>-->\n <!-- <app-searchable-selector apiUrl=\"api/accounts\" formControlName=\"income_account_id\"> </app-searchable-selector>-->\n <!-- </mat-form-field>-->\n <!-- <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('expense account')\">-->\n <!-- <mat-label>Expense Account</mat-label>-->\n <!-- <app-searchable-selector apiUrl=\"api/accounts\" formControlName=\"expense_account_id\">-->\n <!-- </app-searchable-selector>-->\n <!-- </mat-form-field>-->\n <!-- </div>-->\n <!-- </div>-->\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>\n", dependencies: [{ kind: "directive", type: i5.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: 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.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$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9$1.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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
1365
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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: i5.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: 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.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$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9$1.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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
1359
1366
  }
1360
1367
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductFormComponent, decorators: [{
1361
1368
  type: Component,
1362
- args: [{ selector: 'app-product-form', 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 <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('name')\">\n <input matInput placeholder=\"Name\" formControlName=\"name\" required />\n <mat-error *ngIf=\"isFieldValid('name')\">{{ getErrorMessage('name') }} </mat-error>\n </mat-form-field>\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 <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('sku')\">\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 <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 <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 <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('reorder point')\">\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 <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 <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('initial quantity date')\">\n <input\n matInput\n [matDatepicker]=\"pickerInitialQuantityDate\"\n placeholder=\"Initial Quantity Date\"\n formControlName=\"initial_quantity_date\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"pickerInitialQuantityDate\"></mat-datepicker-toggle>\n <mat-datepicker #pickerInitialQuantityDate></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('initial_quantity_date')\"\n >{{ 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 <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 <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('condition types')\">\n <mat-label>Condition</mat-label>\n <app-searchable-selector\n apiUrl=\"api/condition-types\"\n formControlName=\"condition_type_id\"\n ></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 <input\n matInput\n placeholder=\"Minimum Price\"\n formControlName=\"minimum_price\"\n required\n type=\"number\"\n step=\"any\"\n />\n <mat-error *ngIf=\"isFieldValid('minimum_price')\">{{ getErrorMessage('minimum_price') }} </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('maximum price')\">\n <input matInput placeholder=\"Maximum Price\" formControlName=\"maximum_price\" type=\"number\" step=\"any\" />\n </mat-form-field>\n </div>\n </div>\n <!-- <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('accounts information')\">-->\n <!-- <h3><strong>Accounts Information</strong></h3>-->\n <!-- <div fxLayout fxLayoutGap=\"0.5rem\">-->\n <!-- <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('income account')\">-->\n <!-- <mat-label>Income Account</mat-label>-->\n <!-- <app-searchable-selector apiUrl=\"api/accounts\" formControlName=\"income_account_id\"> </app-searchable-selector>-->\n <!-- </mat-form-field>-->\n <!-- <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('expense account')\">-->\n <!-- <mat-label>Expense Account</mat-label>-->\n <!-- <app-searchable-selector apiUrl=\"api/accounts\" formControlName=\"expense_account_id\">-->\n <!-- </app-searchable-selector>-->\n <!-- </mat-form-field>-->\n <!-- </div>-->\n <!-- </div>-->\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>\n" }]
1369
+ args: [{ selector: 'app-product-form', 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>" }]
1363
1370
  }], ctorParameters: () => [{ type: ProductService }, { type: i2$1.FormBuilder }, { type: i1.FormValidatorService }, { type: i1.AlertService }, { type: i5.DatePipe }, { type: ProductFormService }], propDecorators: { saved: [{
1364
1371
  type: Output
1365
1372
  }], cancelled: [{
@@ -1622,14 +1629,14 @@ let ProductListComponent = class ProductListComponent extends TechlifyListingCon
1622
1629
  this.exportInProgress = hideColumns;
1623
1630
  }
1624
1631
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductListComponent, deps: [{ token: i2$1.FormBuilder }, { token: i1$1.MatDialog }, { token: i4$1.ActivatedRoute }, { token: ProductService }, { token: i1.RequestHelperService }, { token: ProductFormService }], target: i0.ɵɵFactoryTarget.Component });
1625
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 class=\"mt-2\"></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer mt-1 material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\" (onExportStart)=\"handleExport(true)\" (onExportEnd)=\"handleExport(false)\"></app-export-to-excel-button>\n <app-column-selector\n mode=\"icon\"\n class=\"mb-2 d-print-none\"\n [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"\n ></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_balance }}\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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4$1.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", "stockIssuance", "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: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.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: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i15.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.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$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i6.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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns"], 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: i5.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i5.DatePipe, name: "date" }], preserveWhitespaces: true });
1632
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 class=\"mt-2\"></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer mt-1 material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\" (onExportStart)=\"handleExport(true)\" (onExportEnd)=\"handleExport(false)\"></app-export-to-excel-button>\n <app-column-selector\n mode=\"icon\"\n class=\"mb-2 d-print-none\"\n [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"\n ></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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4$1.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", "stockIssuance", "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: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.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: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i15.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.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$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i6.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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns"], 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: i5.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i5.DatePipe, name: "date" }], preserveWhitespaces: true });
1626
1633
  };
1627
1634
  ProductListComponent = __decorate([
1628
1635
  UntilDestroy()
1629
1636
  ], ProductListComponent);
1630
1637
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductListComponent, decorators: [{
1631
1638
  type: Component,
1632
- 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 class=\"mt-2\"></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer mt-1 material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\" (onExportStart)=\"handleExport(true)\" (onExportEnd)=\"handleExport(false)\"></app-export-to-excel-button>\n <app-column-selector\n mode=\"icon\"\n class=\"mb-2 d-print-none\"\n [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"\n ></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_balance }}\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" }]
1639
+ 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 class=\"mt-2\"></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer mt-1 material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\" (onExportStart)=\"handleExport(true)\" (onExportEnd)=\"handleExport(false)\"></app-export-to-excel-button>\n <app-column-selector\n mode=\"icon\"\n class=\"mb-2 d-print-none\"\n [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"\n ></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" }]
1633
1640
  }], ctorParameters: () => [{ type: i2$1.FormBuilder }, { type: i1$1.MatDialog }, { type: i4$1.ActivatedRoute }, { type: ProductService }, { type: i1.RequestHelperService }, { type: ProductFormService }] });
1634
1641
 
1635
1642
  class ProductNavBarComponent {
@@ -1764,7 +1771,7 @@ let StockReceiptsListPageComponent = class StockReceiptsListPageComponent extend
1764
1771
  const params = {
1765
1772
  page: this.page,
1766
1773
  perPage: this.perPage,
1767
- with: "creator,supplier,product.measure,product.categories,location",
1774
+ with: "creator,supplier,product.measure,product.categories,location,stockTransfer",
1768
1775
  ...this.requestHelperService.convertToFormData(this.filterForm.value),
1769
1776
  };
1770
1777
  this.isWorking = true;
@@ -1821,14 +1828,14 @@ let StockReceiptsListPageComponent = class StockReceiptsListPageComponent extend
1821
1828
  });
1822
1829
  }
1823
1830
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockReceiptsListPageComponent, deps: [{ token: StockReceiptService }, { token: i2$1.FormBuilder }, { token: i1.RequestHelperService }, { token: i4$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
1824
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 mt-1 material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector mode=\"icon\" class=\"mb-2 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\"\n (selectionChange)=\"onDurationChange($event)\" [showClearButton]=\"true\" [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"></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)=\"reload(); listUpdated.emit()\" 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?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n <app-product-category-badges [product]=\"element?.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?.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?.quantity }} {{ element?.product?.measure?.title }}</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?.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?.location_id, 'view']\">\n {{ element?.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?.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?.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 class=\"d-flex gap-1\">\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 </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>", styles: [""], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.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: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { 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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.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: i9.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: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i2$2.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"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: StockReceiptDeleteButtonComponent, selector: "app-stock-receipt-delete-button", inputs: ["stockReceipt"], outputs: ["deleted"] }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i5.DatePipe, name: "date" }], preserveWhitespaces: true });
1831
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 mt-1 material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector mode=\"icon\" class=\"mb-2 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\"\n (selectionChange)=\"onDurationChange($event)\" [showClearButton]=\"true\" [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"></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)=\"reload(); listUpdated.emit()\" 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?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n <app-product-category-badges [product]=\"element?.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?.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?.quantity }} {{ element?.product?.measure?.title }}</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?.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?.location_id, 'view']\">\n {{ element?.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?.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?.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 <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 <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>", styles: [""], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.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: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { 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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.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: i9.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: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i2$2.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"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: StockReceiptDeleteButtonComponent, selector: "app-stock-receipt-delete-button", inputs: ["stockReceipt"], outputs: ["deleted"] }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i5.DatePipe, name: "date" }], preserveWhitespaces: true });
1825
1832
  };
1826
1833
  StockReceiptsListPageComponent = __decorate([
1827
1834
  UntilDestroy()
1828
1835
  ], StockReceiptsListPageComponent);
1829
1836
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockReceiptsListPageComponent, decorators: [{
1830
1837
  type: Component,
1831
- args: [{ selector: 'app-stock-receipts-list-page', 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 mt-1 material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector mode=\"icon\" class=\"mb-2 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\"\n (selectionChange)=\"onDurationChange($event)\" [showClearButton]=\"true\" [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"></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)=\"reload(); listUpdated.emit()\" 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?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n <app-product-category-badges [product]=\"element?.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?.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?.quantity }} {{ element?.product?.measure?.title }}</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?.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?.location_id, 'view']\">\n {{ element?.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?.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?.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 class=\"d-flex gap-1\">\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 </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>" }]
1838
+ args: [{ selector: 'app-stock-receipts-list-page', 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 mt-1 material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector mode=\"icon\" class=\"mb-2 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\"\n (selectionChange)=\"onDurationChange($event)\" [showClearButton]=\"true\" [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"></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)=\"reload(); listUpdated.emit()\" 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?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n <app-product-category-badges [product]=\"element?.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?.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?.quantity }} {{ element?.product?.measure?.title }}</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?.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?.location_id, 'view']\">\n {{ element?.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?.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?.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 <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 <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>" }]
1832
1839
  }], ctorParameters: () => [{ type: StockReceiptService }, { type: i2$1.FormBuilder }, { type: i1.RequestHelperService }, { type: i4$1.ActivatedRoute }], propDecorators: { product: [{
1833
1840
  type: Input
1834
1841
  }], supplierId: [{
@@ -1887,6 +1894,8 @@ class StockIssuancesListComponent extends TechlifyListingControllerInterface {
1887
1894
  issuableType;
1888
1895
  issuableId;
1889
1896
  label = 'Stock Issues';
1897
+ showActions = true;
1898
+ showFilters = true;
1890
1899
  listUpdated = new EventEmitter();
1891
1900
  defaultSelectedColumns = [
1892
1901
  'no', 'product', 'sku', 'date', 'quantity', 'measure', 'location', 'related', 'particulars',
@@ -1935,7 +1944,7 @@ class StockIssuancesListComponent extends TechlifyListingControllerInterface {
1935
1944
  const params = {
1936
1945
  page: this.page,
1937
1946
  perPage: this.perPage,
1938
- with: 'creator,product.measure,issuable.fixedAsset,product.categories,location',
1947
+ with: 'creator,product.measure,issuable.fixedAsset,product.categories,location,stockTransfer',
1939
1948
  ...this.requestHelperService.convertToFormData(this.filterForm.value),
1940
1949
  };
1941
1950
  if (this.issuableId && this.issuableType) {
@@ -1996,11 +2005,11 @@ class StockIssuancesListComponent extends TechlifyListingControllerInterface {
1996
2005
  }, { emitEvent: false });
1997
2006
  }
1998
2007
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockIssuancesListComponent, deps: [{ token: i2$1.FormBuilder }, { token: i1.RequestHelperService }, { token: StockIssuanceService }, { token: i4$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
1999
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StockIssuancesListComponent, selector: "app-stock-issuances-list", inputs: { product: "product", issuableType: "issuableType", issuableId: "issuableId", label: "label" }, 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\" (saved)=\"reload()\"\n class=\"mt-2\"></app-stock-issue-form-button>\n\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer mt-1 material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector mode=\"icon\" class=\"mb-2 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\"\n (selectionChange)=\"onDurationChange($event)\" [showClearButton]=\"true\" [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"></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?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n <app-product-category-badges [product]=\"element?.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?.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?.location_id, 'view']\">\n {{ element?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>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?.quantity }} {{ element?.product?.measure?.title }}</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?.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?.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 class=\"d-flex gap-1\">\n <app-stock-issue-form-button [product]=\"element.product\" [stockIssuance]=\"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 </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>", styles: [""], dependencies: [{ kind: "directive", type: i5.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.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: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.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$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i6.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", "stockIssuance", "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: i4$1.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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.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"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i5.DatePipe, name: "date" }], preserveWhitespaces: true });
2008
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StockIssuancesListComponent, selector: "app-stock-issuances-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\" (saved)=\"reload()\"\n class=\"mt-2\"></app-stock-issue-form-button>\n\n <span *ngIf=\"showActions\" matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer mt-1 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\"\n (selectionChange)=\"onDurationChange($event)\" [showClearButton]=\"true\" [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"></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?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n <app-product-category-badges [product]=\"element?.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?.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?.location_id, 'view']\">\n {{ element?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>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?.quantity }} {{ element?.product?.measure?.title }}</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?.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?.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 <app-stock-issue-form-button [product]=\"element.product\" [stockIssuance]=\"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 <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: "directive", type: i5.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.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: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.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$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i6.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", "stockIssuance", "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: i4$1.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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.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"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i5.DatePipe, name: "date" }], preserveWhitespaces: true });
2000
2009
  }
2001
2010
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockIssuancesListComponent, decorators: [{
2002
2011
  type: Component,
2003
- args: [{ selector: 'app-stock-issuances-list', 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\" (saved)=\"reload()\"\n class=\"mt-2\"></app-stock-issue-form-button>\n\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer mt-1 material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector mode=\"icon\" class=\"mb-2 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\"\n (selectionChange)=\"onDurationChange($event)\" [showClearButton]=\"true\" [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"></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?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n <app-product-category-badges [product]=\"element?.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?.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?.location_id, 'view']\">\n {{ element?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>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?.quantity }} {{ element?.product?.measure?.title }}</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?.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?.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 class=\"d-flex gap-1\">\n <app-stock-issue-form-button [product]=\"element.product\" [stockIssuance]=\"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 </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>" }]
2012
+ args: [{ selector: 'app-stock-issuances-list', 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\" (saved)=\"reload()\"\n class=\"mt-2\"></app-stock-issue-form-button>\n\n <span *ngIf=\"showActions\" matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer mt-1 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\"\n (selectionChange)=\"onDurationChange($event)\" [showClearButton]=\"true\" [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"></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?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n <app-product-category-badges [product]=\"element?.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?.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?.location_id, 'view']\">\n {{ element?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>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?.quantity }} {{ element?.product?.measure?.title }}</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?.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?.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 <app-stock-issue-form-button [product]=\"element.product\" [stockIssuance]=\"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 <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" }]
2004
2013
  }], ctorParameters: () => [{ type: i2$1.FormBuilder }, { type: i1.RequestHelperService }, { type: StockIssuanceService }, { type: i4$1.ActivatedRoute }], propDecorators: { product: [{
2005
2014
  type: Input
2006
2015
  }], issuableType: [{
@@ -2009,6 +2018,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2009
2018
  type: Input
2010
2019
  }], label: [{
2011
2020
  type: Input
2021
+ }], showActions: [{
2022
+ type: Input
2023
+ }], showFilters: [{
2024
+ type: Input
2012
2025
  }], listUpdated: [{
2013
2026
  type: Output
2014
2027
  }] } });
@@ -2032,6 +2045,7 @@ class StockTransferFormComponent extends TechlifyFormComponentInterface {
2032
2045
  alertService;
2033
2046
  service;
2034
2047
  productId;
2048
+ locationFromId;
2035
2049
  saved = new EventEmitter();
2036
2050
  cancelled = new EventEmitter();
2037
2051
  isWorking = false;
@@ -2090,9 +2104,12 @@ class StockTransferFormComponent extends TechlifyFormComponentInterface {
2090
2104
  if (this.productId) {
2091
2105
  this.form.get('product_id')?.setValue(this.productId);
2092
2106
  }
2107
+ if (this.locationFromId) {
2108
+ this.form.get('location_from_id')?.setValue(this.locationFromId);
2109
+ }
2093
2110
  }
2094
2111
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockTransferFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$1.FormBuilder }, { token: i1.AlertService }, { token: StockTransferService }], target: i0.ɵɵFactoryTarget.Component });
2095
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StockTransferFormComponent, isStandalone: true, selector: "app-stock-transfer-form", inputs: { productId: "productId" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"d-flex flex-column justify-content-start gap-0\"\n (ngSubmit)=\"save()\"\n>\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input formControlName=\"date\" matInput [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">{{ getErrorMessage('date') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location From</mat-label>\n <app-searchable-selector\n formControlName=\"location_from_id\"\n apiUrl=\"api/inventory-locations\"\n ></app-searchable-selector>\n <mat-hint>Where are we taking stock from?</mat-hint>\n <mat-error *ngIf=\"isFieldValid('location_from_id')\">{{ getErrorMessage('location_from_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location To</mat-label>\n <app-searchable-selector\n formControlName=\"location_to_id\"\n apiUrl=\"api/inventory-locations\"\n ></app-searchable-selector>\n <mat-hint>Where are we taking stock to?</mat-hint>\n <mat-error *ngIf=\"isFieldValid('location_to_id')\">{{ getErrorMessage('location_to_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput placeholder=\"Quantity\" formControlName=\"quantity\" type=\"number\">\n <mat-error *ngIf=\"isFieldValid('quantity')\">{{ getErrorMessage('quantity') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></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 [disabled]=\"isWorking\" type=\"button\" mat-flat-button (click)=\"cancelled.emit()\">\n Cancel\n </button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { 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: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], preserveWhitespaces: true });
2112
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StockTransferFormComponent, isStandalone: true, selector: "app-stock-transfer-form", inputs: { productId: "productId", locationFromId: "locationFromId" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"d-flex flex-column justify-content-start gap-0\"\n (ngSubmit)=\"save()\"\n>\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input formControlName=\"date\" matInput [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">{{ getErrorMessage('date') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location From</mat-label>\n <app-searchable-selector\n formControlName=\"location_from_id\"\n apiUrl=\"api/inventory-locations\"\n ></app-searchable-selector>\n <mat-hint>Where are we taking stock from?</mat-hint>\n <mat-error *ngIf=\"isFieldValid('location_from_id')\">{{ getErrorMessage('location_from_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location To</mat-label>\n <app-searchable-selector\n formControlName=\"location_to_id\"\n apiUrl=\"api/inventory-locations\"\n ></app-searchable-selector>\n <mat-hint>Where are we taking stock to?</mat-hint>\n <mat-error *ngIf=\"isFieldValid('location_to_id')\">{{ getErrorMessage('location_to_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput placeholder=\"Quantity\" formControlName=\"quantity\" type=\"number\">\n <mat-error *ngIf=\"isFieldValid('quantity')\">{{ getErrorMessage('quantity') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></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 [disabled]=\"isWorking\" type=\"button\" mat-flat-button (click)=\"cancelled.emit()\">\n Cancel\n </button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { 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: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], preserveWhitespaces: true });
2096
2113
  }
2097
2114
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockTransferFormComponent, decorators: [{
2098
2115
  type: Component,
@@ -2113,6 +2130,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2113
2130
  ], template: "<form\n [formGroup]=\"form\"\n class=\"d-flex flex-column justify-content-start gap-0\"\n (ngSubmit)=\"save()\"\n>\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input formControlName=\"date\" matInput [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">{{ getErrorMessage('date') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location From</mat-label>\n <app-searchable-selector\n formControlName=\"location_from_id\"\n apiUrl=\"api/inventory-locations\"\n ></app-searchable-selector>\n <mat-hint>Where are we taking stock from?</mat-hint>\n <mat-error *ngIf=\"isFieldValid('location_from_id')\">{{ getErrorMessage('location_from_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location To</mat-label>\n <app-searchable-selector\n formControlName=\"location_to_id\"\n apiUrl=\"api/inventory-locations\"\n ></app-searchable-selector>\n <mat-hint>Where are we taking stock to?</mat-hint>\n <mat-error *ngIf=\"isFieldValid('location_to_id')\">{{ getErrorMessage('location_to_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput placeholder=\"Quantity\" formControlName=\"quantity\" type=\"number\">\n <mat-error *ngIf=\"isFieldValid('quantity')\">{{ getErrorMessage('quantity') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></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 [disabled]=\"isWorking\" type=\"button\" mat-flat-button (click)=\"cancelled.emit()\">\n Cancel\n </button>\n </div>\n</form>\n" }]
2114
2131
  }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$1.FormBuilder }, { type: i1.AlertService }, { type: StockTransferService }], propDecorators: { productId: [{
2115
2132
  type: Input
2133
+ }], locationFromId: [{
2134
+ type: Input
2116
2135
  }], saved: [{
2117
2136
  type: Output
2118
2137
  }], cancelled: [{
@@ -2122,6 +2141,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2122
2141
  class StockTransferFormButtonComponent {
2123
2142
  matDialog;
2124
2143
  productId;
2144
+ locationFromId;
2125
2145
  saved = new EventEmitter();
2126
2146
  matDialogRef;
2127
2147
  constructor(matDialog) {
@@ -2135,7 +2155,7 @@ class StockTransferFormButtonComponent {
2135
2155
  this.matDialogRef.close();
2136
2156
  }
2137
2157
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockTransferFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
2138
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StockTransferFormButtonComponent, isStandalone: true, selector: "app-stock-transfer-form-button", inputs: { productId: "productId" }, outputs: { saved: "saved" }, ngImport: i0, template: "<span\n class=\"material-symbols-outlined text-secondary cursor-pointer\"\n matTooltip=\"Stock Transfer\"\n (click)=\"showForm(formTemplate)\"\n>\n move_up\n</span>\n\n<ng-template #formTemplate>\n <h3 mat-dialog-title>Stock Transfer</h3>\n <app-stock-transfer-form\n mat-dialog-content\n [productId]=\"productId\"\n (cancelled)=\"matDialogRef.close()\"\n (saved)=\"onSaved($event)\"\n ></app-stock-transfer-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: StockTransferFormComponent, selector: "app-stock-transfer-form", inputs: ["productId"], outputs: ["saved", "cancelled"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }], preserveWhitespaces: true });
2158
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StockTransferFormButtonComponent, isStandalone: true, selector: "app-stock-transfer-form-button", inputs: { productId: "productId", locationFromId: "locationFromId" }, outputs: { saved: "saved" }, ngImport: i0, template: "<span\n class=\"material-symbols-outlined text-secondary cursor-pointer\"\n matTooltip=\"Stock Transfer\"\n (click)=\"showForm(formTemplate)\"\n>\n move_up\n</span>\n\n<ng-template #formTemplate>\n <h3 mat-dialog-title>Stock Transfer</h3>\n <app-stock-transfer-form\n mat-dialog-content\n [locationFromId]=\"locationFromId\"\n [productId]=\"productId\"\n (cancelled)=\"matDialogRef.close()\"\n (saved)=\"onSaved($event)\"\n ></app-stock-transfer-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: StockTransferFormComponent, selector: "app-stock-transfer-form", inputs: ["productId", "locationFromId"], outputs: ["saved", "cancelled"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }], preserveWhitespaces: true });
2139
2159
  }
2140
2160
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockTransferFormButtonComponent, decorators: [{
2141
2161
  type: Component,
@@ -2144,9 +2164,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2144
2164
  StockTransferFormComponent,
2145
2165
  MatDialogTitle,
2146
2166
  MatDialogContent
2147
- ], template: "<span\n class=\"material-symbols-outlined text-secondary cursor-pointer\"\n matTooltip=\"Stock Transfer\"\n (click)=\"showForm(formTemplate)\"\n>\n move_up\n</span>\n\n<ng-template #formTemplate>\n <h3 mat-dialog-title>Stock Transfer</h3>\n <app-stock-transfer-form\n mat-dialog-content\n [productId]=\"productId\"\n (cancelled)=\"matDialogRef.close()\"\n (saved)=\"onSaved($event)\"\n ></app-stock-transfer-form>\n</ng-template>\n" }]
2167
+ ], template: "<span\n class=\"material-symbols-outlined text-secondary cursor-pointer\"\n matTooltip=\"Stock Transfer\"\n (click)=\"showForm(formTemplate)\"\n>\n move_up\n</span>\n\n<ng-template #formTemplate>\n <h3 mat-dialog-title>Stock Transfer</h3>\n <app-stock-transfer-form\n mat-dialog-content\n [locationFromId]=\"locationFromId\"\n [productId]=\"productId\"\n (cancelled)=\"matDialogRef.close()\"\n (saved)=\"onSaved($event)\"\n ></app-stock-transfer-form>\n</ng-template>\n" }]
2148
2168
  }], ctorParameters: () => [{ type: i1$1.MatDialog }], propDecorators: { productId: [{
2149
2169
  type: Input
2170
+ }], locationFromId: [{
2171
+ type: Input
2150
2172
  }], saved: [{
2151
2173
  type: Output
2152
2174
  }] } });
@@ -2174,6 +2196,7 @@ class ProductLocationListComponent extends TechlifyListingControllerInterface {
2174
2196
  statisticsService;
2175
2197
  errorHandler;
2176
2198
  product;
2199
+ updated = new EventEmitter();
2177
2200
  constructor(statisticsService, errorHandler) {
2178
2201
  super();
2179
2202
  this.statisticsService = statisticsService;
@@ -2201,7 +2224,7 @@ class ProductLocationListComponent extends TechlifyListingControllerInterface {
2201
2224
  });
2202
2225
  }
2203
2226
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductLocationListComponent, deps: [{ token: ProductStatisticsService }, { token: i1.ErrorHandlerService }], target: i0.ɵɵFactoryTarget.Component });
2204
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ProductLocationListComponent, isStandalone: true, selector: "app-product-location-list", inputs: { product: "product" }, 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\" [productId]=\"product?.id\"\n (saved)=\"reload()\"></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: i5.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$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: StockTransferFormButtonComponent, selector: "app-stock-transfer-form-button", inputs: ["productId"], outputs: ["saved"] }], preserveWhitespaces: true });
2227
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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\" [locationFromId]=\"element?.id\" [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: i5.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$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: StockTransferFormButtonComponent, selector: "app-stock-transfer-form-button", inputs: ["productId", "locationFromId"], outputs: ["saved"] }], preserveWhitespaces: true });
2205
2228
  }
2206
2229
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductLocationListComponent, decorators: [{
2207
2230
  type: Component,
@@ -2209,9 +2232,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2209
2232
  CommonModule,
2210
2233
  MaterialModule,
2211
2234
  StockTransferFormButtonComponent
2212
- ], 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\" [productId]=\"product?.id\"\n (saved)=\"reload()\"></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>" }]
2235
+ ], 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\" [locationFromId]=\"element?.id\" [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>" }]
2213
2236
  }], ctorParameters: () => [{ type: ProductStatisticsService }, { type: i1.ErrorHandlerService }], propDecorators: { product: [{
2214
2237
  type: Input
2238
+ }], updated: [{
2239
+ type: Output
2215
2240
  }] } });
2216
2241
 
2217
2242
  class StockTransferListComponent extends TechlifyListingControllerInterface {
@@ -2265,15 +2290,16 @@ class StockTransferListComponent extends TechlifyListingControllerInterface {
2265
2290
  });
2266
2291
  }
2267
2292
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockTransferListComponent, deps: [{ token: StockTransferService }, { token: i2$1.FormBuilder }, { token: i1.ErrorHandlerService }], target: i0.ɵɵFactoryTarget.Component });
2268
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StockTransferListComponent, isStandalone: true, selector: "app-stock-transfer-list", inputs: { productId: "productId" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content 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 Transfers</h3>\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()\">\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>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=\"quantity\">\n <th mat-header-cell *matHeaderCellDef>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>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>To</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.location_to?.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>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.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.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.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"] }], preserveWhitespaces: true });
2293
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StockTransferListComponent, isStandalone: true, selector: "app-stock-transfer-list", inputs: { productId: "productId" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content 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 \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()\">\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>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=\"quantity\">\n <th mat-header-cell *matHeaderCellDef>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>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>To</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.location_to?.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>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.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.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.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", "locationFromId"], outputs: ["saved"] }], preserveWhitespaces: true });
2269
2294
  }
2270
2295
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockTransferListComponent, decorators: [{
2271
2296
  type: Component,
2272
2297
  args: [{ selector: 'app-stock-transfer-list', standalone: true, imports: [
2273
2298
  CommonModule,
2274
2299
  MaterialModule,
2275
- InfiniteScrollDirective
2276
- ], template: "<mat-card>\n <mat-card-content 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 Transfers</h3>\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()\">\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>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=\"quantity\">\n <th mat-header-cell *matHeaderCellDef>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>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>To</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.location_to?.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>" }]
2300
+ InfiniteScrollDirective,
2301
+ StockTransferFormButtonComponent
2302
+ ], template: "<mat-card>\n <mat-card-content 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 \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()\">\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>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=\"quantity\">\n <th mat-header-cell *matHeaderCellDef>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>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>To</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.location_to?.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>" }]
2277
2303
  }], ctorParameters: () => [{ type: StockTransferService }, { type: i2$1.FormBuilder }, { type: i1.ErrorHandlerService }], propDecorators: { productId: [{
2278
2304
  type: Input
2279
2305
  }] } });
@@ -2381,11 +2407,11 @@ class ProductBasicInfoComponent {
2381
2407
  });
2382
2408
  }
2383
2409
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductBasicInfoComponent, deps: [{ token: StockSummaryService }], target: i0.ɵɵFactoryTarget.Component });
2384
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ProductBasicInfoComponent, selector: "app-product-basic-info", inputs: { product: "product" }, outputs: { saved: "saved", deleted: "deleted" }, ngImport: i0, template: "<mat-card *ngIf=\"product\" class=\"w-100\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center mb-1 mb-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> campaign </span>\n <strong class=\"mb-0 text-dark\">{{ product?.name }}</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-product-form-button [product]=\"product\" (saved)=\"onProductSaved($event)\"></app-product-form-button>\n <app-product-delete-button [product]=\"product\" (deleted)=\"deleted.emit()\"></app-product-delete-button>\n </div>\n </mat-card-content>\n <mat-divider></mat-divider>\n\n\n <mat-card-content class='d-flex flex-column gap-2'>\n <div class=\"d-flex flex-wrap gap-1 my-3\">\n <span class=\"badge text-bg-secondary\" *ngFor=\"let category of product?.categories\">\n {{ category?.title }}\n </span>\n </div>\n\n <div class=\"d-flex justify-content-between align-items-start\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">SKU</small>\n <p class=\"mb-0\">{{ product?.sku }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Type</small>\n <p class=\"mb-0\">{{ product?.type?.title }}</p>\n </div>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Measure</small>\n <p class=\"mb-0\">{{ product?.measure?.title }}</p>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Reorder Point</small>\n <p class=\"mb-0\">{{ product?.reorder_point }}</p>\n </div>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-start align-items-start gap-1\">\n <div *ngIf=\"product?.description\" class=\"mb-2 d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Description</small>\n <p class=\"mb-0\">{{ product?.description }}</p>\n </div>\n\n <div>\n <div class=\"mt-2 d-flex justify-content-between align-items-start\">\n\n <!-- Stock Receipts -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Stock Receipts</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> arrow_downward </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ stockSummary?.stock_receipts_quantity_sum }}\n </p>\n </div>\n <small *ngIf=\"product?.last_stock_receipt\" class=\"text-secondary w-75\">\n Latest On {{ product?.last_stock_receipt?.date | date }}\n </small>\n </div>\n\n <!-- Stock Issues -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Stock Issuances</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ stockSummary?.stock_issuances_quantity_sum }}\n </p>\n </div>\n <small *ngIf=\"product?.last_stock_issuance\" class=\"text-secondary w-75\">\n Latest On {{ product?.last_stock_issuance?.date | date }}\n </small>\n </div>\n\n\n <!-- On Hand -->\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">On Hand</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> inventory_2 </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ product?.stock_on_hand }}\n </p>\n </div>\n </div>\n </div>\n </div>\n </mat-card-content>\n</mat-card>", styles: [""], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.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$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"], outputs: ["saved"] }, { kind: "component", type: ProductDeleteButtonComponent, selector: "app-product-delete-button", inputs: ["product"], outputs: ["deleted"] }, { kind: "pipe", type: i5.DatePipe, name: "date" }], preserveWhitespaces: true });
2410
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ProductBasicInfoComponent, selector: "app-product-basic-info", inputs: { product: "product" }, outputs: { saved: "saved", deleted: "deleted" }, ngImport: i0, template: "<mat-card *ngIf=\"product\" class=\"w-100\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center mb-1 mb-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> campaign </span>\n <strong class=\"mb-0 text-dark\">{{ product?.name }}</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-product-form-button [product]=\"product\" (saved)=\"onProductSaved($event)\"></app-product-form-button>\n <app-product-delete-button [product]=\"product\" (deleted)=\"deleted.emit()\"></app-product-delete-button>\n </div>\n </mat-card-content>\n <mat-divider></mat-divider>\n\n\n <mat-card-content class='d-flex flex-column gap-2'>\n <div class=\"d-flex flex-wrap gap-1 my-3\">\n <span class=\"badge text-bg-secondary\" *ngFor=\"let category of product?.categories\">\n {{ category?.title }}\n </span>\n </div>\n\n <div class=\"d-flex justify-content-between align-items-start\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">SKU</small>\n <p class=\"mb-0\">{{ product?.sku }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Initial Quantity</small>\n <p class=\"mb-0\">{{ product?.initial_quantity }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Type</small>\n <p class=\"mb-0\">{{ product?.type?.title }}</p>\n </div>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Measure</small>\n <p class=\"mb-0\">{{ product?.measure?.title }}</p>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Reorder Point</small>\n <p class=\"mb-0\">{{ product?.reorder_point }}</p>\n </div>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-start align-items-start gap-1\">\n <div *ngIf=\"product?.description\" class=\"mb-2 d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Description</small>\n <p class=\"mb-0\">{{ product?.description }}</p>\n </div>\n\n <div>\n <div class=\"mt-2 d-flex justify-content-between align-items-start\">\n\n <!-- Stock Receipts -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Stock Receipts</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> arrow_downward </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ stockSummary?.stock_receipts_quantity_sum }}\n </p>\n </div>\n <small *ngIf=\"product?.last_stock_receipt\" class=\"text-secondary w-75\">\n Latest On {{ product?.last_stock_receipt?.date | date }}\n </small>\n </div>\n\n <!-- Stock Issues -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Stock Issues</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ stockSummary?.stock_issuances_quantity_sum }}\n </p>\n </div>\n <small *ngIf=\"product?.last_stock_issuance\" class=\"text-secondary w-75\">\n Latest On {{ product?.last_stock_issuance?.date | date }}\n </small>\n </div>\n\n\n <!-- On Hand -->\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">On Hand</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> inventory_2 </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ product?.stock_on_hand }}\n </p>\n </div>\n </div>\n </div>\n </div>\n </mat-card-content>\n</mat-card>", styles: [""], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.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$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"], outputs: ["saved"] }, { kind: "component", type: ProductDeleteButtonComponent, selector: "app-product-delete-button", inputs: ["product"], outputs: ["deleted"] }, { kind: "pipe", type: i5.DatePipe, name: "date" }], preserveWhitespaces: true });
2385
2411
  }
2386
2412
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductBasicInfoComponent, decorators: [{
2387
2413
  type: Component,
2388
- args: [{ selector: 'app-product-basic-info', template: "<mat-card *ngIf=\"product\" class=\"w-100\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center mb-1 mb-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> campaign </span>\n <strong class=\"mb-0 text-dark\">{{ product?.name }}</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-product-form-button [product]=\"product\" (saved)=\"onProductSaved($event)\"></app-product-form-button>\n <app-product-delete-button [product]=\"product\" (deleted)=\"deleted.emit()\"></app-product-delete-button>\n </div>\n </mat-card-content>\n <mat-divider></mat-divider>\n\n\n <mat-card-content class='d-flex flex-column gap-2'>\n <div class=\"d-flex flex-wrap gap-1 my-3\">\n <span class=\"badge text-bg-secondary\" *ngFor=\"let category of product?.categories\">\n {{ category?.title }}\n </span>\n </div>\n\n <div class=\"d-flex justify-content-between align-items-start\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">SKU</small>\n <p class=\"mb-0\">{{ product?.sku }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Type</small>\n <p class=\"mb-0\">{{ product?.type?.title }}</p>\n </div>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Measure</small>\n <p class=\"mb-0\">{{ product?.measure?.title }}</p>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Reorder Point</small>\n <p class=\"mb-0\">{{ product?.reorder_point }}</p>\n </div>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-start align-items-start gap-1\">\n <div *ngIf=\"product?.description\" class=\"mb-2 d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Description</small>\n <p class=\"mb-0\">{{ product?.description }}</p>\n </div>\n\n <div>\n <div class=\"mt-2 d-flex justify-content-between align-items-start\">\n\n <!-- Stock Receipts -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Stock Receipts</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> arrow_downward </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ stockSummary?.stock_receipts_quantity_sum }}\n </p>\n </div>\n <small *ngIf=\"product?.last_stock_receipt\" class=\"text-secondary w-75\">\n Latest On {{ product?.last_stock_receipt?.date | date }}\n </small>\n </div>\n\n <!-- Stock Issues -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Stock Issuances</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ stockSummary?.stock_issuances_quantity_sum }}\n </p>\n </div>\n <small *ngIf=\"product?.last_stock_issuance\" class=\"text-secondary w-75\">\n Latest On {{ product?.last_stock_issuance?.date | date }}\n </small>\n </div>\n\n\n <!-- On Hand -->\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">On Hand</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> inventory_2 </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ product?.stock_on_hand }}\n </p>\n </div>\n </div>\n </div>\n </div>\n </mat-card-content>\n</mat-card>" }]
2414
+ args: [{ selector: 'app-product-basic-info', template: "<mat-card *ngIf=\"product\" class=\"w-100\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center mb-1 mb-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> campaign </span>\n <strong class=\"mb-0 text-dark\">{{ product?.name }}</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-product-form-button [product]=\"product\" (saved)=\"onProductSaved($event)\"></app-product-form-button>\n <app-product-delete-button [product]=\"product\" (deleted)=\"deleted.emit()\"></app-product-delete-button>\n </div>\n </mat-card-content>\n <mat-divider></mat-divider>\n\n\n <mat-card-content class='d-flex flex-column gap-2'>\n <div class=\"d-flex flex-wrap gap-1 my-3\">\n <span class=\"badge text-bg-secondary\" *ngFor=\"let category of product?.categories\">\n {{ category?.title }}\n </span>\n </div>\n\n <div class=\"d-flex justify-content-between align-items-start\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">SKU</small>\n <p class=\"mb-0\">{{ product?.sku }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Initial Quantity</small>\n <p class=\"mb-0\">{{ product?.initial_quantity }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Type</small>\n <p class=\"mb-0\">{{ product?.type?.title }}</p>\n </div>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Measure</small>\n <p class=\"mb-0\">{{ product?.measure?.title }}</p>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Reorder Point</small>\n <p class=\"mb-0\">{{ product?.reorder_point }}</p>\n </div>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-start align-items-start gap-1\">\n <div *ngIf=\"product?.description\" class=\"mb-2 d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Description</small>\n <p class=\"mb-0\">{{ product?.description }}</p>\n </div>\n\n <div>\n <div class=\"mt-2 d-flex justify-content-between align-items-start\">\n\n <!-- Stock Receipts -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Stock Receipts</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> arrow_downward </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ stockSummary?.stock_receipts_quantity_sum }}\n </p>\n </div>\n <small *ngIf=\"product?.last_stock_receipt\" class=\"text-secondary w-75\">\n Latest On {{ product?.last_stock_receipt?.date | date }}\n </small>\n </div>\n\n <!-- Stock Issues -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Stock Issues</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ stockSummary?.stock_issuances_quantity_sum }}\n </p>\n </div>\n <small *ngIf=\"product?.last_stock_issuance\" class=\"text-secondary w-75\">\n Latest On {{ product?.last_stock_issuance?.date | date }}\n </small>\n </div>\n\n\n <!-- On Hand -->\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">On Hand</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> inventory_2 </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ product?.stock_on_hand }}\n </p>\n </div>\n </div>\n </div>\n </div>\n </mat-card-content>\n</mat-card>" }]
2389
2415
  }], ctorParameters: () => [{ type: StockSummaryService }], propDecorators: { product: [{
2390
2416
  type: Input
2391
2417
  }], saved: [{
@@ -2402,6 +2428,9 @@ class ProductViewPageComponent {
2402
2428
  id;
2403
2429
  isLoading;
2404
2430
  productLocationList;
2431
+ stockTransferList;
2432
+ stockReceiptsListPage;
2433
+ stockIssueListPage;
2405
2434
  constructor(productService, activatedRoute, location) {
2406
2435
  this.productService = productService;
2407
2436
  this.activatedRoute = activatedRoute;
@@ -2446,14 +2475,23 @@ class ProductViewPageComponent {
2446
2475
  this.location.back();
2447
2476
  }
2448
2477
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductViewPageComponent, deps: [{ token: ProductService }, { token: i4$1.ActivatedRoute }, { token: i5.Location }], target: i0.ɵɵFactoryTarget.Component });
2449
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ProductViewPageComponent, selector: "app-product-view-page", viewQueries: [{ propertyName: "productLocationList", first: true, predicate: ["productLocationList"], 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\" #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 [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-receipts-list-page>\n\n <app-stock-issuances-list [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-issuances-list>\n\n <app-stock-transfer-list *ngIf=\"product\" [productId]=\"product.id\"></app-stock-transfer-list>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i5.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: StockIssuancesListComponent, selector: "app-stock-issuances-list", inputs: ["product", "issuableType", "issuableId", "label"], outputs: ["listUpdated"] }, { kind: "component", type: i6.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"] }, { 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 });
2478
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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-issuances-list #stockIssueListPage [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-issuances-list>\n\n <app-stock-transfer-list #stockTransferList *ngIf=\"product\" [productId]=\"product.id\"></app-stock-transfer-list>\n </div>\n </div>", dependencies: [{ kind: "directive", type: i5.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: StockIssuancesListComponent, selector: "app-stock-issuances-list", inputs: ["product", "issuableType", "issuableId", "label", "showActions", "showFilters"], outputs: ["listUpdated"] }, { kind: "component", type: i6.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 });
2450
2479
  }
2451
2480
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductViewPageComponent, decorators: [{
2452
2481
  type: Component,
2453
- 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\" #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 [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-receipts-list-page>\n\n <app-stock-issuances-list [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-issuances-list>\n\n <app-stock-transfer-list *ngIf=\"product\" [productId]=\"product.id\"></app-stock-transfer-list>\n </div>\n</div>" }]
2482
+ 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-issuances-list #stockIssueListPage [product]=\"product\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-issuances-list>\n\n <app-stock-transfer-list #stockTransferList *ngIf=\"product\" [productId]=\"product.id\"></app-stock-transfer-list>\n </div>\n </div>" }]
2454
2483
  }], ctorParameters: () => [{ type: ProductService }, { type: i4$1.ActivatedRoute }, { type: i5.Location }], propDecorators: { productLocationList: [{
2455
2484
  type: ViewChild,
2456
2485
  args: ['productLocationList']
2486
+ }], stockTransferList: [{
2487
+ type: ViewChild,
2488
+ args: ['stockTransferList']
2489
+ }], stockReceiptsListPage: [{
2490
+ type: ViewChild,
2491
+ args: ['stockReceiptsListPage']
2492
+ }], stockIssueListPage: [{
2493
+ type: ViewChild,
2494
+ args: ['stockIssueListPage']
2457
2495
  }] } });
2458
2496
 
2459
2497
  class ProductImportPageComponent {
@@ -2519,7 +2557,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2519
2557
  args: [{ selector: 'app-product-import-page', template: "<app-import-csv [config]=\"importConfig\"></app-import-csv>\n" }]
2520
2558
  }], ctorParameters: () => [] });
2521
2559
 
2522
- const routes$3 = [
2560
+ const routes$6 = [
2523
2561
  {
2524
2562
  path: '',
2525
2563
  component: ProductNavBarComponent,
@@ -2556,12 +2594,12 @@ const routes$3 = [
2556
2594
  class ProductRoutingModule {
2557
2595
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2558
2596
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ProductRoutingModule, imports: [i4$1.RouterModule], exports: [RouterModule] });
2559
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductRoutingModule, imports: [RouterModule.forChild(routes$3), RouterModule] });
2597
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductRoutingModule, imports: [RouterModule.forChild(routes$6), RouterModule] });
2560
2598
  }
2561
2599
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductRoutingModule, decorators: [{
2562
2600
  type: NgModule,
2563
2601
  args: [{
2564
- imports: [RouterModule.forChild(routes$3)],
2602
+ imports: [RouterModule.forChild(routes$6)],
2565
2603
  exports: [RouterModule],
2566
2604
  }]
2567
2605
  }] });
@@ -2701,7 +2739,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2701
2739
  ], template: "<app-import-csv [config]=\"importConfig\"></app-import-csv>" }]
2702
2740
  }], ctorParameters: () => [] });
2703
2741
 
2704
- const routes$2 = [
2742
+ const routes$5 = [
2705
2743
  {
2706
2744
  path: '',
2707
2745
  component: StockReceiptsListPageComponent,
@@ -2715,12 +2753,12 @@ const routes$2 = [
2715
2753
  class StockReceiptsRoutingModule {
2716
2754
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockReceiptsRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2717
2755
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: StockReceiptsRoutingModule, imports: [i4$1.RouterModule], exports: [RouterModule] });
2718
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockReceiptsRoutingModule, imports: [RouterModule.forChild(routes$2), RouterModule] });
2756
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockReceiptsRoutingModule, imports: [RouterModule.forChild(routes$5), RouterModule] });
2719
2757
  }
2720
2758
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockReceiptsRoutingModule, decorators: [{
2721
2759
  type: NgModule,
2722
2760
  args: [{
2723
- imports: [RouterModule.forChild(routes$2)],
2761
+ imports: [RouterModule.forChild(routes$5)],
2724
2762
  exports: [RouterModule],
2725
2763
  }]
2726
2764
  }] });
@@ -2811,7 +2849,7 @@ class TechlifyFilterComponent {
2811
2849
  : '';
2812
2850
  }
2813
2851
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TechlifyFilterComponent, deps: [{ token: i1.RequestHelperService }, { token: i4$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
2814
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.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: 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: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.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: i11$2.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: i13.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }], preserveWhitespaces: true });
2852
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.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: 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: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.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: i11$2.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$2.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }], preserveWhitespaces: true });
2815
2853
  }
2816
2854
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TechlifyFilterComponent, decorators: [{
2817
2855
  type: Component,
@@ -3670,7 +3708,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3670
3708
  ], 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>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\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\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 <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_stock_receipt.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=\"last_stock_receipt.amount\">\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>" }]
3671
3709
  }], ctorParameters: () => [{ type: InventoryValueReportService }, { type: i4$1.ActivatedRoute }, { type: i1.RequestHelperService }, { type: i2$1.FormBuilder }] });
3672
3710
 
3673
- const routes$1 = [
3711
+ const routes$4 = [
3674
3712
  {
3675
3713
  path: 'reports/low-stock-report',
3676
3714
  component: LowStockReportComponent,
@@ -3681,15 +3719,15 @@ const routes$1 = [
3681
3719
  },
3682
3720
  {
3683
3721
  path: 'suppliers',
3684
- loadChildren: () => import('./techlify-inventory-common-supplier.module-DaTU-lMt.mjs').then((m) => m.SupplierModule),
3722
+ loadChildren: () => Promise.resolve().then(function () { return supplier_module; }).then((m) => m.SupplierModule),
3685
3723
  },
3686
3724
  {
3687
3725
  path: 'locations',
3688
- loadChildren: () => import('./techlify-inventory-common-location.module-Bpt1avqg.mjs').then((mod) => mod.LocationModule),
3726
+ loadChildren: () => import('./techlify-inventory-common-location.module-CSrRu4pQ.mjs').then((mod) => mod.LocationModule),
3689
3727
  },
3690
3728
  {
3691
3729
  path: "measures",
3692
- loadChildren: () => import('./techlify-inventory-common-measure.module-BjJ4KTU_.mjs').then((mod) => mod.MeasureModule),
3730
+ loadChildren: () => import('./techlify-inventory-common-measure.module-Dz5Lc4oT.mjs').then((mod) => mod.MeasureModule),
3693
3731
  },
3694
3732
  {
3695
3733
  path: 'stock-issuances',
@@ -3701,7 +3739,7 @@ const routes$1 = [
3701
3739
  },
3702
3740
  {
3703
3741
  path: 'categories',
3704
- loadChildren: () => import('./techlify-inventory-common-category.module-CAPeu05n.mjs').then((mod) => mod.CategoryModule),
3742
+ loadChildren: () => import('./techlify-inventory-common-category.module-BmhaQykz.mjs').then((mod) => mod.CategoryModule),
3705
3743
  },
3706
3744
  {
3707
3745
  path: 'products',
@@ -3720,12 +3758,12 @@ const routes$1 = [
3720
3758
  class InventoryCommonRoutingModule {
3721
3759
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InventoryCommonRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3722
3760
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: InventoryCommonRoutingModule, imports: [i4$1.RouterModule], exports: [RouterModule] });
3723
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InventoryCommonRoutingModule, imports: [RouterModule.forChild(routes$1), RouterModule] });
3761
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InventoryCommonRoutingModule, imports: [RouterModule.forChild(routes$4), RouterModule] });
3724
3762
  }
3725
3763
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InventoryCommonRoutingModule, decorators: [{
3726
3764
  type: NgModule,
3727
3765
  args: [{
3728
- imports: [RouterModule.forChild(routes$1)],
3766
+ imports: [RouterModule.forChild(routes$4)],
3729
3767
  exports: [RouterModule],
3730
3768
  }]
3731
3769
  }] });
@@ -3842,7 +3880,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3842
3880
  ], template: "<app-import-csv [config]=\"importConfig\"></app-import-csv>" }]
3843
3881
  }], ctorParameters: () => [] });
3844
3882
 
3845
- const routes = [
3883
+ const routes$3 = [
3846
3884
  {
3847
3885
  path: '',
3848
3886
  component: StockIssuancesListComponent,
@@ -3856,12 +3894,12 @@ const routes = [
3856
3894
  class StockIssuancesRoutingModule {
3857
3895
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockIssuancesRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3858
3896
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: StockIssuancesRoutingModule, imports: [i4$1.RouterModule], exports: [RouterModule] });
3859
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockIssuancesRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
3897
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockIssuancesRoutingModule, imports: [RouterModule.forChild(routes$3), RouterModule] });
3860
3898
  }
3861
3899
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockIssuancesRoutingModule, decorators: [{
3862
3900
  type: NgModule,
3863
3901
  args: [{
3864
- imports: [RouterModule.forChild(routes)],
3902
+ imports: [RouterModule.forChild(routes$3)],
3865
3903
  exports: [RouterModule],
3866
3904
  }]
3867
3905
  }] });
@@ -3923,6 +3961,1097 @@ var stockIssuances_module = /*#__PURE__*/Object.freeze({
3923
3961
  StockIssuancesModule: StockIssuancesModule
3924
3962
  });
3925
3963
 
3964
+ class IncidentService extends TechlifyServiceBaseClass {
3965
+ constructor(httpService) {
3966
+ super(httpService, 'incidents');
3967
+ }
3968
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentService, deps: [{ token: i1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
3969
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentService, providedIn: 'root' });
3970
+ }
3971
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentService, decorators: [{
3972
+ type: Injectable,
3973
+ args: [{
3974
+ providedIn: 'root'
3975
+ }]
3976
+ }], ctorParameters: () => [{ type: i1.HttpService }] });
3977
+
3978
+ class IncidentFormComponent extends TechlifyFormComponentInterface {
3979
+ formBuilder;
3980
+ alertService;
3981
+ incidentService;
3982
+ incident;
3983
+ incidentableType;
3984
+ incidentableId;
3985
+ saved = new EventEmitter();
3986
+ cancelled = new EventEmitter();
3987
+ isWorking = false;
3988
+ constructor(formValidatorService, formBuilder, alertService, incidentService) {
3989
+ super(formValidatorService);
3990
+ this.formBuilder = formBuilder;
3991
+ this.alertService = alertService;
3992
+ this.incidentService = incidentService;
3993
+ this.errorMessages = {
3994
+ date: {
3995
+ required: 'The date field is required.'
3996
+ },
3997
+ classification_id: {
3998
+ required: 'The classification field is required.'
3999
+ }
4000
+ };
4001
+ this.form = this.formBuilder.group({
4002
+ id: [''],
4003
+ date: ['', Validators.required],
4004
+ classification_id: ['', Validators.required],
4005
+ cost: [''],
4006
+ details: [''],
4007
+ incidentable_id: [''],
4008
+ incidentable_type: ['']
4009
+ });
4010
+ }
4011
+ ngOnInit() {
4012
+ if (this.incidentableType && this.incidentableId) {
4013
+ this.form.patchValue({
4014
+ incidentable_type: this.incidentableType,
4015
+ incidentable_id: this.incidentableId
4016
+ });
4017
+ }
4018
+ if (this.incident) {
4019
+ const data = { ...this.incident };
4020
+ if (data?.date) {
4021
+ data.date = new Date(data.date);
4022
+ }
4023
+ this.form.patchValue(data);
4024
+ }
4025
+ }
4026
+ save() {
4027
+ this.form.markAllAsTouched();
4028
+ if (this.form.invalid) {
4029
+ this.alertService.addAlert('Please check the form for errors.', 'error');
4030
+ return;
4031
+ }
4032
+ const data = {
4033
+ ...this.form.value
4034
+ };
4035
+ if (data?.date) {
4036
+ data.date = moment$1(data.date).format('YYYY-MM-DD');
4037
+ }
4038
+ let request = this.incidentService.store(data);
4039
+ if (data?.id) {
4040
+ request = this.incidentService.update(data);
4041
+ }
4042
+ this.isWorking = true;
4043
+ request.subscribe({
4044
+ next: (response) => {
4045
+ this.saved.emit(response?.item);
4046
+ this.isWorking = false;
4047
+ this.alertService.addAlert('The incident saved successfully!', 'success');
4048
+ },
4049
+ error: () => (this.isWorking = false)
4050
+ });
4051
+ }
4052
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$1.FormBuilder }, { token: i1.AlertService }, { token: IncidentService }], target: i0.ɵɵFactoryTarget.Component });
4053
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: IncidentFormComponent, isStandalone: true, selector: "app-incident-form", inputs: { incident: "incident", incidentableType: "incidentableType", incidentableId: "incidentableId" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput formControlName=\"date\" [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker #picker></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>Classification</mat-label>\n <app-searchable-selector\n required\n formControlName=\"classification_id\"\n apiUrl=\"api/incident-classifications\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('classification_id')\">\n {{ getErrorMessage('classification_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Cost</mat-label>\n <input matInput type=\"number\" formControlName=\"cost\" placeholder=\"Cost\"/>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <textarea matInput formControlName=\"details\" rows=\"3\" placeholder=\"Details\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancelled.emit()\">Cancel</button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { 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: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.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: "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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], preserveWhitespaces: true });
4054
+ }
4055
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentFormComponent, decorators: [{
4056
+ type: Component,
4057
+ args: [{ selector: 'app-incident-form', standalone: true, imports: [
4058
+ MatFormField,
4059
+ MatLabel,
4060
+ MatInput,
4061
+ MatDatepickerInput,
4062
+ MatDatepicker,
4063
+ ReactiveFormsModule,
4064
+ SearchableSelectorModule,
4065
+ MatButton,
4066
+ MatError,
4067
+ NgIf
4068
+ ], template: "<form [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput formControlName=\"date\" [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker #picker></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>Classification</mat-label>\n <app-searchable-selector\n required\n formControlName=\"classification_id\"\n apiUrl=\"api/incident-classifications\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('classification_id')\">\n {{ getErrorMessage('classification_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Cost</mat-label>\n <input matInput type=\"number\" formControlName=\"cost\" placeholder=\"Cost\"/>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <textarea matInput formControlName=\"details\" rows=\"3\" placeholder=\"Details\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancelled.emit()\">Cancel</button>\n </div>\n</form>\n" }]
4069
+ }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$1.FormBuilder }, { type: i1.AlertService }, { type: IncidentService }], propDecorators: { incident: [{
4070
+ type: Input
4071
+ }], incidentableType: [{
4072
+ type: Input
4073
+ }], incidentableId: [{
4074
+ type: Input
4075
+ }], saved: [{
4076
+ type: Output
4077
+ }], cancelled: [{
4078
+ type: Output
4079
+ }] } });
4080
+
4081
+ class IncidentFormButtonComponent {
4082
+ matDialog;
4083
+ incident;
4084
+ incidentableType;
4085
+ incidentableId;
4086
+ saved = new EventEmitter();
4087
+ constructor(matDialog) {
4088
+ this.matDialog = matDialog;
4089
+ }
4090
+ showForm(templateRef) {
4091
+ this.matDialog.open(templateRef, { width: '400px' });
4092
+ }
4093
+ onSaved(category) {
4094
+ this.matDialog.closeAll();
4095
+ this.saved.emit(category);
4096
+ }
4097
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
4098
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: IncidentFormButtonComponent, isStandalone: true, selector: "app-incident-form-button", inputs: { incident: "incident", incidentableType: "incidentableType", incidentableId: "incidentableId" }, outputs: { saved: "saved" }, ngImport: i0, template: "<mat-icon\n *ngIf=\"!incident\"\n color=\"primary\"\n class=\"cursor-pointer\"\n (click)=\"showForm(formTemplate)\"\n>\n add\n</mat-icon>\n\n<mat-icon\n *ngIf=\"incident\"\n class=\"cursor-pointer\"\n (click)=\"showForm(formTemplate)\"\n>\n edit\n</mat-icon>\n\n<ng-template #formTemplate>\n <h3 mat-dialog-title class=\"mb-0\">\n {{ incident ? 'Edit' : 'Create' }} Incident\n </h3>\n <div mat-dialog-content>\n <app-incident-form\n [incident]=\"incident\"\n [incidentableId]=\"incidentableId\"\n [incidentableType]=\"incidentableType\"\n (saved)=\"onSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-incident-form>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: IncidentFormComponent, selector: "app-incident-form", inputs: ["incident", "incidentableType", "incidentableId"], outputs: ["saved", "cancelled"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }], preserveWhitespaces: true });
4099
+ }
4100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentFormButtonComponent, decorators: [{
4101
+ type: Component,
4102
+ args: [{ selector: 'app-incident-form-button', standalone: true, imports: [
4103
+ MatIcon,
4104
+ IncidentFormComponent,
4105
+ NgIf,
4106
+ MatDialogTitle,
4107
+ MatDialogContent
4108
+ ], template: "<mat-icon\n *ngIf=\"!incident\"\n color=\"primary\"\n class=\"cursor-pointer\"\n (click)=\"showForm(formTemplate)\"\n>\n add\n</mat-icon>\n\n<mat-icon\n *ngIf=\"incident\"\n class=\"cursor-pointer\"\n (click)=\"showForm(formTemplate)\"\n>\n edit\n</mat-icon>\n\n<ng-template #formTemplate>\n <h3 mat-dialog-title class=\"mb-0\">\n {{ incident ? 'Edit' : 'Create' }} Incident\n </h3>\n <div mat-dialog-content>\n <app-incident-form\n [incident]=\"incident\"\n [incidentableId]=\"incidentableId\"\n [incidentableType]=\"incidentableType\"\n (saved)=\"onSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-incident-form>\n </div>\n</ng-template>\n" }]
4109
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }], propDecorators: { incident: [{
4110
+ type: Input
4111
+ }], incidentableType: [{
4112
+ type: Input
4113
+ }], incidentableId: [{
4114
+ type: Input
4115
+ }], saved: [{
4116
+ type: Output
4117
+ }] } });
4118
+
4119
+ class IncidentListComponent extends TechlifyListingControllerInterface {
4120
+ formBuilder;
4121
+ requestHelperService;
4122
+ activatedRoute;
4123
+ incidentService;
4124
+ supplierId;
4125
+ incidentableType;
4126
+ incidentableId;
4127
+ displayedColumns = [
4128
+ 'No',
4129
+ 'Date',
4130
+ 'Classification',
4131
+ 'Cost',
4132
+ 'Details',
4133
+ 'Creator',
4134
+ 'Actions',
4135
+ ];
4136
+ constructor(formBuilder, requestHelperService, activatedRoute, incidentService) {
4137
+ super();
4138
+ this.formBuilder = formBuilder;
4139
+ this.requestHelperService = requestHelperService;
4140
+ this.activatedRoute = activatedRoute;
4141
+ this.incidentService = incidentService;
4142
+ this.lastPage = 0;
4143
+ this.filterForm = this.formBuilder.group({
4144
+ search: [''],
4145
+ classification_ids: [''],
4146
+ sort_by: ['created_at|desc'],
4147
+ incidentable_types: [''],
4148
+ incidentable_ids: [''],
4149
+ });
4150
+ }
4151
+ ngOnInit() {
4152
+ if (this.incidentableType && this.incidentableId) {
4153
+ this.filterForm.patchValue({
4154
+ incidentable_types: this.incidentableType,
4155
+ incidentable_ids: this.incidentableId
4156
+ });
4157
+ }
4158
+ this.requestHelperService.updateFormWithQueryParams(this.filterForm, {
4159
+ classification_ids: { multiple: true }
4160
+ });
4161
+ this.filterForm.valueChanges.pipe(debounceTime$1(800)).subscribe({
4162
+ next: () => {
4163
+ this.requestHelperService.updateQueryParams(this.requestHelperService.convertToFormData(this.filterForm.value));
4164
+ }
4165
+ });
4166
+ // listen for route change
4167
+ this.activatedRoute.queryParams
4168
+ .pipe(debounceTime$1(500), distinctUntilChanged())
4169
+ .subscribe((val) => {
4170
+ this.reload();
4171
+ });
4172
+ }
4173
+ loadData() {
4174
+ this.isWorking = true;
4175
+ const params = {
4176
+ ...this.requestHelperService.convertToFormData(this.filterForm.value),
4177
+ page: this.page,
4178
+ perPage: this.perPage,
4179
+ with: 'classification,creator'
4180
+ };
4181
+ this.incidentService.index(params).subscribe({
4182
+ next: (response) => {
4183
+ this.models = this.models.concat(response?.data);
4184
+ this.lastPage = response?.last_page;
4185
+ this.isWorking = false;
4186
+ }
4187
+ });
4188
+ }
4189
+ onSortChange(sort) {
4190
+ let { direction, active } = sort;
4191
+ if (!active) {
4192
+ active = 'created_at';
4193
+ direction = 'desc';
4194
+ }
4195
+ if (!direction) {
4196
+ direction = 'desc';
4197
+ }
4198
+ this.filterForm.get('sort_by')?.setValue(active + '|' + direction);
4199
+ }
4200
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentListComponent, deps: [{ token: i2$1.FormBuilder }, { token: i1.RequestHelperService }, { token: i4$1.ActivatedRoute }, { token: IncidentService }], target: i0.ɵɵFactoryTarget.Component });
4201
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: IncidentListComponent, isStandalone: true, selector: "app-incident-list", inputs: { supplierId: "supplierId", incidentableType: "incidentableType", incidentableId: "incidentableId" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gal-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h2 class=\"mb-0\">Incidents</h2>\n <app-incident-form-button\n *ngxPermissionsOnly=\"['incident.create']\"\n incidentableType=\"Supplier\"\n [incidentableId]=\"supplierId\"\n (saved)=\"reload()\"\n ></app-incident-form-button>\n </div>\n <form\n [formGroup]=\"filterForm\" (submit)=\"reload()\"\n class=\"d-flex justify-content-end align-items-center gap-3\"\n >\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search Details\" matInput formControlName=\"search\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Classification</mat-label>\n <app-searchable-selector\n apiUrl=\"api/incident-classifications\"\n [enableSearch]=\"false\"\n formControlName=\"classification_ids\"\n [multiple]=\"true\"\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\n mat-table [dataSource]=\"models\" class=\"w-100\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n >\n\n <!-- No 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 <!-- Date Column -->\n <ng-container matColumnDef=\"Date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"date\"> Date </th>\n <td mat-cell *matCellDef=\"let element\"> {{ element?.date | date }} </td>\n </ng-container>\n\n <!-- Classification Column -->\n <ng-container matColumnDef=\"Classification\">\n <th mat-header-cell *matHeaderCellDef> Classification </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.classification?.title }}\n </td>\n </ng-container>\n\n <!-- Cost Column -->\n <ng-container matColumnDef=\"Cost\">\n <th mat-header-cell *matHeaderCellDef> Cost </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.cost | currency }}\n </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\">\n {{ element?.details }}\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 <app-incident-form-button\n *ngxPermissionsOnly=\"['incident.update']\"\n [incident]=\"element\"\n incidentableType=\"Supplier\"\n [incidentableId]=\"supplierId\"\n (saved)=\"reload()\"\n ></app-incident-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 <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { kind: "pipe", type: DatePipe, name: "date" }, { 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: "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: "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: "directive", type: MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "pipe", type: CurrencyPipe, name: "currency" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { 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: "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: "component", type: IncidentFormButtonComponent, selector: "app-incident-form-button", inputs: ["incident", "incidentableType", "incidentableId"], outputs: ["saved"] }, { kind: "ngmodule", type: NgxPermissionsModule }, { kind: "directive", type: i5$2.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }], preserveWhitespaces: true });
4202
+ }
4203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentListComponent, decorators: [{
4204
+ type: Component,
4205
+ args: [{ selector: 'app-incident-list', standalone: true, imports: [
4206
+ MatCard,
4207
+ MatCardContent,
4208
+ DatePipe,
4209
+ InfiniteScrollDirective,
4210
+ MatCell,
4211
+ MatCellDef,
4212
+ MatColumnDef,
4213
+ MatHeaderCell,
4214
+ MatHeaderRow,
4215
+ MatHeaderRowDef,
4216
+ MatProgressBar,
4217
+ MatRow,
4218
+ MatRowDef,
4219
+ MatSort,
4220
+ MatSortHeader,
4221
+ MatTable,
4222
+ NgIf,
4223
+ MatHeaderCellDef,
4224
+ CurrencyPipe,
4225
+ ReactiveFormsModule,
4226
+ MatFormField,
4227
+ MatInput,
4228
+ MatLabel,
4229
+ SearchableSelectorModule,
4230
+ IncidentFormButtonComponent,
4231
+ NgxPermissionsModule
4232
+ ], template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gal-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h2 class=\"mb-0\">Incidents</h2>\n <app-incident-form-button\n *ngxPermissionsOnly=\"['incident.create']\"\n incidentableType=\"Supplier\"\n [incidentableId]=\"supplierId\"\n (saved)=\"reload()\"\n ></app-incident-form-button>\n </div>\n <form\n [formGroup]=\"filterForm\" (submit)=\"reload()\"\n class=\"d-flex justify-content-end align-items-center gap-3\"\n >\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search Details\" matInput formControlName=\"search\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Classification</mat-label>\n <app-searchable-selector\n apiUrl=\"api/incident-classifications\"\n [enableSearch]=\"false\"\n formControlName=\"classification_ids\"\n [multiple]=\"true\"\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\n mat-table [dataSource]=\"models\" class=\"w-100\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n >\n\n <!-- No 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 <!-- Date Column -->\n <ng-container matColumnDef=\"Date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"date\"> Date </th>\n <td mat-cell *matCellDef=\"let element\"> {{ element?.date | date }} </td>\n </ng-container>\n\n <!-- Classification Column -->\n <ng-container matColumnDef=\"Classification\">\n <th mat-header-cell *matHeaderCellDef> Classification </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.classification?.title }}\n </td>\n </ng-container>\n\n <!-- Cost Column -->\n <ng-container matColumnDef=\"Cost\">\n <th mat-header-cell *matHeaderCellDef> Cost </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.cost | currency }}\n </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\">\n {{ element?.details }}\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 <app-incident-form-button\n *ngxPermissionsOnly=\"['incident.update']\"\n [incident]=\"element\"\n incidentableType=\"Supplier\"\n [incidentableId]=\"supplierId\"\n (saved)=\"reload()\"\n ></app-incident-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 <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n" }]
4233
+ }], ctorParameters: () => [{ type: i2$1.FormBuilder }, { type: i1.RequestHelperService }, { type: i4$1.ActivatedRoute }, { type: IncidentService }], propDecorators: { supplierId: [{
4234
+ type: Input
4235
+ }], incidentableType: [{
4236
+ type: Input
4237
+ }], incidentableId: [{
4238
+ type: Input
4239
+ }] } });
4240
+
4241
+ class RatingService extends TechlifyServiceBaseClass {
4242
+ constructor(httpService) {
4243
+ super(httpService, 'ratings');
4244
+ }
4245
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingService, deps: [{ token: i1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
4246
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingService, providedIn: 'root' });
4247
+ }
4248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingService, decorators: [{
4249
+ type: Injectable,
4250
+ args: [{
4251
+ providedIn: 'root'
4252
+ }]
4253
+ }], ctorParameters: () => [{ type: i1.HttpService }] });
4254
+
4255
+ class RatingFormComponent extends TechlifyFormComponentInterface {
4256
+ formBuilder;
4257
+ alertService;
4258
+ ratingService;
4259
+ rating;
4260
+ rateableType;
4261
+ rateableId;
4262
+ saved = new EventEmitter();
4263
+ cancelled = new EventEmitter();
4264
+ isWorking = false;
4265
+ constructor(formValidatorService, formBuilder, alertService, ratingService) {
4266
+ super(formValidatorService);
4267
+ this.formBuilder = formBuilder;
4268
+ this.alertService = alertService;
4269
+ this.ratingService = ratingService;
4270
+ this.errorMessages = {
4271
+ date: {
4272
+ required: 'The date field is required.'
4273
+ },
4274
+ grade_id: {
4275
+ required: 'The grade field is required.'
4276
+ }
4277
+ };
4278
+ this.form = this.formBuilder.group({
4279
+ id: [''],
4280
+ date: ['', Validators.required],
4281
+ grade_id: ['', Validators.required],
4282
+ details: [''],
4283
+ rateable_type: [''],
4284
+ rateable_id: ['']
4285
+ });
4286
+ }
4287
+ ngOnInit() {
4288
+ if (this.rateableId && this.rateableType) {
4289
+ this.form.patchValue({
4290
+ rateable_id: this.rateableId,
4291
+ rateable_type: this.rateableType
4292
+ });
4293
+ }
4294
+ if (this.rating) {
4295
+ const data = { ...this.rating };
4296
+ if (data?.date) {
4297
+ data.date = new Date(data.date);
4298
+ }
4299
+ this.form.patchValue(data);
4300
+ }
4301
+ }
4302
+ save() {
4303
+ this.form.markAllAsTouched();
4304
+ if (this.form.invalid) {
4305
+ this.alertService.addAlert('Please check the form for errors.', 'error');
4306
+ return;
4307
+ }
4308
+ const data = {
4309
+ ...this.form.value
4310
+ };
4311
+ if (data?.date) {
4312
+ data.date = moment$1(data.date).format('YYYY-MM-DD');
4313
+ }
4314
+ let request = this.ratingService.store(data);
4315
+ if (data?.id) {
4316
+ request = this.ratingService.update(data);
4317
+ }
4318
+ this.isWorking = true;
4319
+ request.subscribe({
4320
+ next: (response) => {
4321
+ this.saved.emit(response?.item);
4322
+ this.isWorking = false;
4323
+ this.alertService.addAlert('The rating saved successfully!', 'success');
4324
+ },
4325
+ error: () => (this.isWorking = false)
4326
+ });
4327
+ }
4328
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$1.FormBuilder }, { token: i1.AlertService }, { token: RatingService }], target: i0.ɵɵFactoryTarget.Component });
4329
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RatingFormComponent, isStandalone: true, selector: "app-rating-form", inputs: { rating: "rating", rateableType: "rateableType", rateableId: "rateableId" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput formControlName=\"date\" [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker #picker></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>Grade</mat-label>\n <app-searchable-selector\n required\n formControlName=\"grade_id\"\n apiUrl=\"api/rating-grades\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('grade_id')\">\n {{ getErrorMessage('grade_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <textarea matInput formControlName=\"details\" rows=\"3\" placeholder=\"Details\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancelled.emit()\">Cancel</button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { 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: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.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: "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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], preserveWhitespaces: true });
4330
+ }
4331
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingFormComponent, decorators: [{
4332
+ type: Component,
4333
+ args: [{ selector: 'app-rating-form', standalone: true, imports: [
4334
+ MatFormField,
4335
+ MatLabel,
4336
+ MatInput,
4337
+ MatDatepickerInput,
4338
+ MatDatepicker,
4339
+ ReactiveFormsModule,
4340
+ SearchableSelectorModule,
4341
+ MatButton,
4342
+ MatError,
4343
+ NgIf
4344
+ ], template: "<form [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput formControlName=\"date\" [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker #picker></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>Grade</mat-label>\n <app-searchable-selector\n required\n formControlName=\"grade_id\"\n apiUrl=\"api/rating-grades\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('grade_id')\">\n {{ getErrorMessage('grade_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <textarea matInput formControlName=\"details\" rows=\"3\" placeholder=\"Details\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancelled.emit()\">Cancel</button>\n </div>\n</form>\n" }]
4345
+ }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$1.FormBuilder }, { type: i1.AlertService }, { type: RatingService }], propDecorators: { rating: [{
4346
+ type: Input
4347
+ }], rateableType: [{
4348
+ type: Input
4349
+ }], rateableId: [{
4350
+ type: Input
4351
+ }], saved: [{
4352
+ type: Output
4353
+ }], cancelled: [{
4354
+ type: Output
4355
+ }] } });
4356
+
4357
+ class RatingFormButtonComponent {
4358
+ matDialog;
4359
+ rating;
4360
+ rateableType;
4361
+ rateableId;
4362
+ saved = new EventEmitter();
4363
+ constructor(matDialog) {
4364
+ this.matDialog = matDialog;
4365
+ }
4366
+ showForm(templateRef) {
4367
+ this.matDialog.open(templateRef, { width: '400px' });
4368
+ }
4369
+ onSaved(category) {
4370
+ this.matDialog.closeAll();
4371
+ this.saved.emit(category);
4372
+ }
4373
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
4374
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RatingFormButtonComponent, isStandalone: true, selector: "app-rating-form-button", inputs: { rating: "rating", rateableType: "rateableType", rateableId: "rateableId" }, outputs: { saved: "saved" }, ngImport: i0, template: "<mat-icon\n *ngIf=\"!rating\"\n color=\"primary\"\n class=\"cursor-pointer\"\n (click)=\"showForm(formTemplate)\"\n>\n add\n</mat-icon>\n\n<mat-icon\n *ngIf=\"rating\"\n class=\"cursor-pointer\"\n (click)=\"showForm(formTemplate)\"\n>\n edit\n</mat-icon>\n\n<ng-template #formTemplate>\n <h3 mat-dialog-title class=\"mb-0\">\n {{ rating ? 'Edit' : 'Create' }} Rating\n </h3>\n <div mat-dialog-content>\n <app-rating-form\n [rating]=\"rating\"\n [rateableId]=\"rateableId\"\n [rateableType]=\"rateableType\"\n (saved)=\"onSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-rating-form>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: RatingFormComponent, selector: "app-rating-form", inputs: ["rating", "rateableType", "rateableId"], outputs: ["saved", "cancelled"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }], preserveWhitespaces: true });
4375
+ }
4376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingFormButtonComponent, decorators: [{
4377
+ type: Component,
4378
+ args: [{ selector: 'app-rating-form-button', standalone: true, imports: [
4379
+ MatIcon,
4380
+ RatingFormComponent,
4381
+ NgIf,
4382
+ MatDialogTitle,
4383
+ MatDialogContent
4384
+ ], template: "<mat-icon\n *ngIf=\"!rating\"\n color=\"primary\"\n class=\"cursor-pointer\"\n (click)=\"showForm(formTemplate)\"\n>\n add\n</mat-icon>\n\n<mat-icon\n *ngIf=\"rating\"\n class=\"cursor-pointer\"\n (click)=\"showForm(formTemplate)\"\n>\n edit\n</mat-icon>\n\n<ng-template #formTemplate>\n <h3 mat-dialog-title class=\"mb-0\">\n {{ rating ? 'Edit' : 'Create' }} Rating\n </h3>\n <div mat-dialog-content>\n <app-rating-form\n [rating]=\"rating\"\n [rateableId]=\"rateableId\"\n [rateableType]=\"rateableType\"\n (saved)=\"onSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-rating-form>\n </div>\n</ng-template>\n" }]
4385
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }], propDecorators: { rating: [{
4386
+ type: Input
4387
+ }], rateableType: [{
4388
+ type: Input
4389
+ }], rateableId: [{
4390
+ type: Input
4391
+ }], saved: [{
4392
+ type: Output
4393
+ }] } });
4394
+
4395
+ class RatingListComponent extends TechlifyListingControllerInterface {
4396
+ formBuilder;
4397
+ requestHelperService;
4398
+ activatedRoute;
4399
+ ratingService;
4400
+ supplierId;
4401
+ rateableType;
4402
+ rateableId;
4403
+ displayedColumns = [
4404
+ 'No',
4405
+ 'Date',
4406
+ 'Grade',
4407
+ 'Details',
4408
+ 'Creator',
4409
+ 'Actions',
4410
+ ];
4411
+ constructor(formBuilder, requestHelperService, activatedRoute, ratingService) {
4412
+ super();
4413
+ this.formBuilder = formBuilder;
4414
+ this.requestHelperService = requestHelperService;
4415
+ this.activatedRoute = activatedRoute;
4416
+ this.ratingService = ratingService;
4417
+ this.lastPage = 0;
4418
+ this.filterForm = this.formBuilder.group({
4419
+ search: [''],
4420
+ grade_ids: [''],
4421
+ rateable_types: [''],
4422
+ rateable_ids: [''],
4423
+ sort_by: ['created_at|desc']
4424
+ });
4425
+ }
4426
+ ngOnInit() {
4427
+ if (this.rateableId && this.rateableType) {
4428
+ this.filterForm.patchValue({
4429
+ rateable_types: this.rateableType,
4430
+ rateable_ids: this.rateableId
4431
+ });
4432
+ }
4433
+ this.requestHelperService.updateFormWithQueryParams(this.filterForm, {
4434
+ grade_ids: { multiple: true }
4435
+ });
4436
+ this.filterForm.valueChanges.pipe(debounceTime$1(800)).subscribe({
4437
+ next: () => {
4438
+ this.requestHelperService.updateQueryParams(this.requestHelperService.convertToFormData(this.filterForm.value));
4439
+ }
4440
+ });
4441
+ // listen for route change
4442
+ this.activatedRoute.queryParams
4443
+ .pipe(debounceTime$1(500), distinctUntilChanged())
4444
+ .subscribe((val) => {
4445
+ this.reload();
4446
+ });
4447
+ }
4448
+ loadData() {
4449
+ this.isWorking = true;
4450
+ const params = {
4451
+ ...this.requestHelperService.convertToFormData(this.filterForm.value),
4452
+ page: this.page,
4453
+ perPage: this.perPage,
4454
+ with: 'grade,creator'
4455
+ };
4456
+ this.ratingService.index(params).subscribe({
4457
+ next: (response) => {
4458
+ this.models = this.models.concat(response?.data);
4459
+ this.lastPage = response?.last_page;
4460
+ this.isWorking = false;
4461
+ }
4462
+ });
4463
+ }
4464
+ onSortChange(sort) {
4465
+ let { direction, active } = sort;
4466
+ if (!active) {
4467
+ active = 'created_at';
4468
+ direction = 'desc';
4469
+ }
4470
+ if (!direction) {
4471
+ direction = 'desc';
4472
+ }
4473
+ this.filterForm.get('sort_by')?.setValue(active + '|' + direction);
4474
+ }
4475
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingListComponent, deps: [{ token: i2$1.FormBuilder }, { token: i1.RequestHelperService }, { token: i4$1.ActivatedRoute }, { token: RatingService }], target: i0.ɵɵFactoryTarget.Component });
4476
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RatingListComponent, isStandalone: true, selector: "app-rating-list", inputs: { supplierId: "supplierId", rateableType: "rateableType", rateableId: "rateableId" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gal-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h2 class=\"mb-0\">Ratings</h2>\n <app-rating-form-button\n [rateableId]=\"supplierId\" rateableType=\"Supplier\"\n (saved)=\"reload()\"\n ></app-rating-form-button>\n </div>\n <form\n [formGroup]=\"filterForm\" (submit)=\"reload()\"\n class=\"d-flex justify-content-end align-items-center gap-3\"\n >\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search\" matInput formControlName=\"search\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Grade</mat-label>\n <app-searchable-selector\n apiUrl=\"api/rating-grades\"\n [enableSearch]=\"false\"\n formControlName=\"grade_ids\"\n [multiple]=\"true\"\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\n mat-table [dataSource]=\"models\" class=\"w-100\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n >\n\n <!-- No 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 <!-- Date Column -->\n <ng-container matColumnDef=\"Date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"date\"> Date </th>\n <td mat-cell *matCellDef=\"let element\"> {{ element?.date | date }} </td>\n </ng-container>\n\n <!-- Grade Column -->\n <ng-container matColumnDef=\"Grade\">\n <th mat-header-cell *matHeaderCellDef> Grade </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.grade?.title }}\n </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\">\n {{ element?.details }}\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 <app-rating-form-button\n [rating]=\"element\" (saved)=\"reload()\"\n [rateableId]=\"supplierId\" rateableType=\"Supplier\"\n ></app-rating-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 <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { 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: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { 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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.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: MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "component", type: RatingFormButtonComponent, selector: "app-rating-form-button", inputs: ["rating", "rateableType", "rateableId"], outputs: ["saved"] }], preserveWhitespaces: true });
4477
+ }
4478
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingListComponent, decorators: [{
4479
+ type: Component,
4480
+ args: [{ selector: 'app-rating-list', standalone: true, imports: [
4481
+ CurrencyPipe,
4482
+ DatePipe,
4483
+ InfiniteScrollDirective,
4484
+ MatCard,
4485
+ MatCardContent,
4486
+ MatCell,
4487
+ MatCellDef,
4488
+ MatColumnDef,
4489
+ MatFormField,
4490
+ MatHeaderCell,
4491
+ MatHeaderRow,
4492
+ MatHeaderRowDef,
4493
+ MatInput,
4494
+ MatLabel,
4495
+ MatProgressBar,
4496
+ MatRow,
4497
+ MatRowDef,
4498
+ MatSort,
4499
+ MatSortHeader,
4500
+ MatTable,
4501
+ NgIf,
4502
+ ReactiveFormsModule,
4503
+ SearchableSelectorModule,
4504
+ MatHeaderCellDef,
4505
+ RatingFormButtonComponent
4506
+ ], template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gal-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h2 class=\"mb-0\">Ratings</h2>\n <app-rating-form-button\n [rateableId]=\"supplierId\" rateableType=\"Supplier\"\n (saved)=\"reload()\"\n ></app-rating-form-button>\n </div>\n <form\n [formGroup]=\"filterForm\" (submit)=\"reload()\"\n class=\"d-flex justify-content-end align-items-center gap-3\"\n >\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search\" matInput formControlName=\"search\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Grade</mat-label>\n <app-searchable-selector\n apiUrl=\"api/rating-grades\"\n [enableSearch]=\"false\"\n formControlName=\"grade_ids\"\n [multiple]=\"true\"\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\n mat-table [dataSource]=\"models\" class=\"w-100\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n >\n\n <!-- No 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 <!-- Date Column -->\n <ng-container matColumnDef=\"Date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"date\"> Date </th>\n <td mat-cell *matCellDef=\"let element\"> {{ element?.date | date }} </td>\n </ng-container>\n\n <!-- Grade Column -->\n <ng-container matColumnDef=\"Grade\">\n <th mat-header-cell *matHeaderCellDef> Grade </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.grade?.title }}\n </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\">\n {{ element?.details }}\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 <app-rating-form-button\n [rating]=\"element\" (saved)=\"reload()\"\n [rateableId]=\"supplierId\" rateableType=\"Supplier\"\n ></app-rating-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 <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n" }]
4507
+ }], ctorParameters: () => [{ type: i2$1.FormBuilder }, { type: i1.RequestHelperService }, { type: i4$1.ActivatedRoute }, { type: RatingService }], propDecorators: { supplierId: [{
4508
+ type: Input
4509
+ }], rateableType: [{
4510
+ type: Input
4511
+ }], rateableId: [{
4512
+ type: Input
4513
+ }] } });
4514
+
4515
+ class SupplierInformationComponent {
4516
+ dialog;
4517
+ supplierService;
4518
+ alertService;
4519
+ router;
4520
+ errorService;
4521
+ supplier;
4522
+ constructor(dialog, supplierService, alertService, router, errorService) {
4523
+ this.dialog = dialog;
4524
+ this.supplierService = supplierService;
4525
+ this.alertService = alertService;
4526
+ this.router = router;
4527
+ this.errorService = errorService;
4528
+ }
4529
+ modifySupplier(model) {
4530
+ const dialogRef = this.dialog.open(SupplierFormComponent, {
4531
+ width: '600px',
4532
+ data: {
4533
+ details: model,
4534
+ },
4535
+ });
4536
+ dialogRef.afterClosed().subscribe((result) => {
4537
+ if (result) {
4538
+ location.reload();
4539
+ }
4540
+ });
4541
+ }
4542
+ deleteSupplier(id) {
4543
+ const dialogRef = this.dialog.open(ActionPopupComponent, {
4544
+ width: '400px',
4545
+ data: {
4546
+ title: 'Delete Supplier',
4547
+ message: 'Are you sure you want to delete this supplier?',
4548
+ },
4549
+ autoFocus: false,
4550
+ });
4551
+ dialogRef.afterClosed().subscribe(async (result) => {
4552
+ if (result) {
4553
+ try {
4554
+ const result = await this.supplierService.destroy(id);
4555
+ this.alertService.addAlert('Successfully Deleted Supplier', 'success');
4556
+ }
4557
+ catch (error) {
4558
+ this.errorService.handleError(error);
4559
+ }
4560
+ finally {
4561
+ this.router.navigateByUrl('/suppliers');
4562
+ }
4563
+ }
4564
+ });
4565
+ }
4566
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierInformationComponent, deps: [{ token: i1$1.MatDialog }, { token: SupplierService }, { token: i1.AlertService }, { token: i4$1.Router }, { token: i1.ErrorHandlerService }], target: i0.ɵɵFactoryTarget.Component });
4567
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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: i5.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$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i8$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: ["modelType", "modelId", "logView"] }], preserveWhitespaces: true });
4568
+ }
4569
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierInformationComponent, decorators: [{
4570
+ type: Component,
4571
+ args: [{ selector: 'app-supplier-information', 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" }]
4572
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: SupplierService }, { type: i1.AlertService }, { type: i4$1.Router }, { type: i1.ErrorHandlerService }], propDecorators: { supplier: [{
4573
+ type: Input
4574
+ }] } });
4575
+
4576
+ class SupplierViewComponent {
4577
+ supplierService;
4578
+ route;
4579
+ router;
4580
+ supplier;
4581
+ supplierId = 0;
4582
+ selectedTabIndex = 0;
4583
+ isLoading = false;
4584
+ constructor(supplierService, route, router) {
4585
+ this.supplierService = supplierService;
4586
+ this.route = route;
4587
+ this.router = router;
4588
+ }
4589
+ ngOnInit() {
4590
+ this.route.firstChild?.url.subscribe((url) => {
4591
+ if (url[0].path === 'ratings') {
4592
+ this.selectedTabIndex = 1;
4593
+ }
4594
+ else if (url[0].path === 'estimates') {
4595
+ this.selectedTabIndex = 2;
4596
+ }
4597
+ else {
4598
+ this.selectedTabIndex = 0;
4599
+ }
4600
+ });
4601
+ this.supplierId = this.route.snapshot.params['id'];
4602
+ this.getSupplier(this.supplierId);
4603
+ }
4604
+ onTabChange(event) {
4605
+ switch (event.index) {
4606
+ case 0:
4607
+ this.router.navigate(['incidents'], { relativeTo: this.route });
4608
+ return;
4609
+ case 1:
4610
+ this.router.navigate(['ratings'], { relativeTo: this.route });
4611
+ return;
4612
+ case 2:
4613
+ this.router.navigate(['estimates'], { relativeTo: this.route });
4614
+ return;
4615
+ }
4616
+ }
4617
+ async getSupplier(id) {
4618
+ this.isLoading = true;
4619
+ let result = await lastValueFrom(this.supplierService.show(id));
4620
+ this.isLoading = false;
4621
+ this.supplier = result.item;
4622
+ }
4623
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierViewComponent, deps: [{ token: SupplierService }, { token: i4$1.ActivatedRoute }, { token: i4$1.Router }], target: i0.ɵɵFactoryTarget.Component });
4624
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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=\"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\" 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>\n", dependencies: [{ kind: "directive", type: i5.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.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"] }], preserveWhitespaces: true });
4625
+ }
4626
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierViewComponent, decorators: [{
4627
+ type: Component,
4628
+ args: [{ selector: 'app-supplier-view', 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=\"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\" 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>\n" }]
4629
+ }], ctorParameters: () => [{ type: SupplierService }, { type: i4$1.ActivatedRoute }, { type: i4$1.Router }] });
4630
+
4631
+ class SupplierFormService extends TechlifyFormService {
4632
+ constructor() {
4633
+ super();
4634
+ }
4635
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierFormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4636
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierFormService, providedIn: 'root' });
4637
+ }
4638
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierFormService, decorators: [{
4639
+ type: Injectable,
4640
+ args: [{
4641
+ providedIn: 'root',
4642
+ }]
4643
+ }], ctorParameters: () => [] });
4644
+
4645
+ class SupplierComponent {
4646
+ dialog;
4647
+ supplierFormService;
4648
+ constructor(dialog, supplierFormService) {
4649
+ this.dialog = dialog;
4650
+ this.supplierFormService = supplierFormService;
4651
+ }
4652
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierComponent, deps: [{ token: i1$1.MatDialog }, { token: SupplierFormService }], target: i0.ɵɵFactoryTarget.Component });
4653
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SupplierComponent, selector: "app-supplier", ngImport: i0, template: "<div>\n <router-outlet></router-outlet>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i4$1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], preserveWhitespaces: true });
4654
+ }
4655
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierComponent, decorators: [{
4656
+ type: Component,
4657
+ args: [{ selector: 'app-supplier', template: "<div>\n <router-outlet></router-outlet>\n</div>\n" }]
4658
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: SupplierFormService }] });
4659
+
4660
+ class SupplierFormButtonComponent {
4661
+ matDialog;
4662
+ supplier;
4663
+ onSaved = new EventEmitter();
4664
+ constructor(matDialog) {
4665
+ this.matDialog = matDialog;
4666
+ }
4667
+ ngOnInit() {
4668
+ }
4669
+ openDialog() {
4670
+ this.matDialog.open(SupplierFormComponent, {
4671
+ width: '600px',
4672
+ data: {
4673
+ details: this.supplier
4674
+ },
4675
+ }).afterClosed().subscribe((result) => {
4676
+ if (result) {
4677
+ this.onSaved.emit(result);
4678
+ }
4679
+ });
4680
+ }
4681
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
4682
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], preserveWhitespaces: true });
4683
+ }
4684
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierFormButtonComponent, decorators: [{
4685
+ type: Component,
4686
+ args: [{ selector: 'app-supplier-form-button', standalone: true, imports: [
4687
+ CommonModule,
4688
+ MaterialModule
4689
+ ], template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" [class.text-secondary]=\"supplier\" (click)=\"openDialog()\">\n {{ supplier ? \"edit\" : \"add\" }}\n</mat-icon>" }]
4690
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }], propDecorators: { supplier: [{
4691
+ type: Input
4692
+ }], onSaved: [{
4693
+ type: Output
4694
+ }] } });
4695
+
4696
+ class SupplierDeleteButtonComponent {
4697
+ dialog;
4698
+ alertService;
4699
+ errorHandler;
4700
+ supplierService;
4701
+ supplier;
4702
+ onDelete = new EventEmitter();
4703
+ constructor(dialog, alertService, errorHandler, supplierService) {
4704
+ this.dialog = dialog;
4705
+ this.alertService = alertService;
4706
+ this.errorHandler = errorHandler;
4707
+ this.supplierService = supplierService;
4708
+ }
4709
+ ngOnInit() {
4710
+ }
4711
+ openDialog() {
4712
+ this.dialog.open(ActionPopupComponent, {
4713
+ width: '400px',
4714
+ data: {
4715
+ title: 'Delete Supplier',
4716
+ message: 'Are you sure you want to delete the Supplier?',
4717
+ },
4718
+ autoFocus: false,
4719
+ }).afterClosed().subscribe(async (result) => {
4720
+ if (result) {
4721
+ try {
4722
+ await lastValueFrom(this.supplierService.destroy(this.supplier.id));
4723
+ this.alertService.addAlert('Successfully deleted the Supplier', 'success');
4724
+ this.onDelete.emit(this.supplier);
4725
+ }
4726
+ catch (error) {
4727
+ this.errorHandler.handleError(error);
4728
+ }
4729
+ }
4730
+ });
4731
+ }
4732
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierDeleteButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.AlertService }, { token: i1.ErrorHandlerService }, { token: SupplierService }], target: i0.ɵɵFactoryTarget.Component });
4733
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: NgxPermissionsModule }, { kind: "directive", type: i5$2.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }], preserveWhitespaces: true });
4734
+ }
4735
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierDeleteButtonComponent, decorators: [{
4736
+ type: Component,
4737
+ args: [{ selector: 'app-supplier-delete-button', standalone: true, imports: [
4738
+ CommonModule,
4739
+ MaterialModule,
4740
+ NgxPermissionsModule
4741
+ ], template: "<mat-icon class=\"cursor-pointer\" *ngxPermissionsOnly=\"['supplier.delete']\" (click)=\"openDialog()\">\n delete\n</mat-icon>" }]
4742
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i1.AlertService }, { type: i1.ErrorHandlerService }, { type: SupplierService }], propDecorators: { supplier: [{
4743
+ type: Input
4744
+ }], onDelete: [{
4745
+ type: Output
4746
+ }] } });
4747
+
4748
+ let SuppliersListComponent = class SuppliersListComponent extends TechlifyListingControllerInterface {
4749
+ spinner;
4750
+ fb;
4751
+ supplierService;
4752
+ errorHandler;
4753
+ filterService;
4754
+ activatedRoute;
4755
+ alertService;
4756
+ dialog;
4757
+ supplierFormService;
4758
+ requestHelperService;
4759
+ displayedColumns = [
4760
+ '#',
4761
+ 'company_name',
4762
+ 'type',
4763
+ 'contact_name',
4764
+ 'phone',
4765
+ 'address',
4766
+ 'email',
4767
+ 'details',
4768
+ 'actions',
4769
+ ];
4770
+ constructor(spinner, fb, supplierService, errorHandler, filterService, activatedRoute, alertService, dialog, supplierFormService, requestHelperService) {
4771
+ super();
4772
+ this.spinner = spinner;
4773
+ this.fb = fb;
4774
+ this.supplierService = supplierService;
4775
+ this.errorHandler = errorHandler;
4776
+ this.filterService = filterService;
4777
+ this.activatedRoute = activatedRoute;
4778
+ this.alertService = alertService;
4779
+ this.dialog = dialog;
4780
+ this.supplierFormService = supplierFormService;
4781
+ this.requestHelperService = requestHelperService;
4782
+ this.page = 1;
4783
+ this.perPage = 25;
4784
+ this.models = [];
4785
+ this.filterForm = this.fb.group({
4786
+ search: [''],
4787
+ supplier_type_ids: [''],
4788
+ sort_by: ['created_at|desc'],
4789
+ });
4790
+ }
4791
+ ngOnInit() {
4792
+ this.updateFormWithQueryParams();
4793
+ this.subscribeToFormChanges();
4794
+ this.subscribeToRouteChanges();
4795
+ }
4796
+ listenForChanges() {
4797
+ // listen for supplier added event to update the list.
4798
+ this.supplierFormService.isListUpdated().subscribe((val) => {
4799
+ if (val && !this.isWorking)
4800
+ this.reload();
4801
+ });
4802
+ // listen for form group changes.
4803
+ this.filterForm.valueChanges.pipe(debounceTime$1(500), untilDestroyed(this)).subscribe(() => {
4804
+ this.filterService.applyFilterToRoute(this.activatedRoute, this.filterForm.value);
4805
+ this.reload();
4806
+ });
4807
+ }
4808
+ sortColumn(event) {
4809
+ var direction = event.direction.toString().toUpperCase();
4810
+ this.assignFilter(event.active, direction);
4811
+ }
4812
+ assignFilter(column, direction) {
4813
+ return this.filterForm.get('sort_by')?.setValue(column + '|' + direction);
4814
+ }
4815
+ async loadData() {
4816
+ let filters = { ...this.requestHelperService.convertToFormData(this.filterForm.value) };
4817
+ filters.page = this.page = 1;
4818
+ filters.perPage = this.perPage;
4819
+ try {
4820
+ this.isWorking = true;
4821
+ let res = await lastValueFrom(this.supplierService.index(filters));
4822
+ this.models = this.models?.concat(res?.data);
4823
+ this.lastPage = res.last_page;
4824
+ // list is updated do not listen form isListUpdated
4825
+ this.supplierFormService.listUpdated(false);
4826
+ }
4827
+ catch (error) {
4828
+ this.errorHandler.handleError(error);
4829
+ }
4830
+ finally {
4831
+ this.isWorking = false;
4832
+ }
4833
+ }
4834
+ updateFormWithQueryParams() {
4835
+ this.requestHelperService.updateFormWithQueryParams(this.filterForm, {
4836
+ supplier_type_ids: { multiple: true },
4837
+ });
4838
+ }
4839
+ subscribeToFormChanges() {
4840
+ this.filterForm.valueChanges.pipe(debounceTime$1(800)).subscribe({
4841
+ next: () => {
4842
+ this.requestHelperService.updateQueryParams(this.requestHelperService.convertToFormData(this.filterForm.value));
4843
+ },
4844
+ });
4845
+ }
4846
+ subscribeToRouteChanges() {
4847
+ this.activatedRoute.queryParams.pipe(debounceTime$1(500), distinctUntilChanged()).subscribe(() => {
4848
+ this.reload();
4849
+ });
4850
+ }
4851
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuppliersListComponent, deps: [{ token: i4$2.NgxSpinnerService }, { token: i2$1.FormBuilder }, { token: SupplierService }, { token: i1.ErrorHandlerService }, { token: i1.FilterService }, { token: i4$1.ActivatedRoute }, { token: i1.AlertService }, { token: i1$1.MatDialog }, { token: SupplierFormService }, { token: i1.RequestHelperService }], target: i0.ɵɵFactoryTarget.Component });
4852
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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()\" class=\"mt-2\"></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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4$1.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: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.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: i6.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$2.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: ["modelType", "modelId", "logView"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.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$2.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 });
4853
+ };
4854
+ SuppliersListComponent = __decorate([
4855
+ UntilDestroy()
4856
+ ], SuppliersListComponent);
4857
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuppliersListComponent, decorators: [{
4858
+ type: Component,
4859
+ 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()\" class=\"mt-2\"></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" }]
4860
+ }], ctorParameters: () => [{ type: i4$2.NgxSpinnerService }, { type: i2$1.FormBuilder }, { type: SupplierService }, { type: i1.ErrorHandlerService }, { type: i1.FilterService }, { type: i4$1.ActivatedRoute }, { type: i1.AlertService }, { type: i1$1.MatDialog }, { type: SupplierFormService }, { type: i1.RequestHelperService }] });
4861
+
4862
+ const routes$2 = [
4863
+ {
4864
+ path: '',
4865
+ component: SupplierComponent,
4866
+ children: [
4867
+ { path: '', component: SuppliersListComponent },
4868
+ {
4869
+ path: ':id/view',
4870
+ component: SupplierViewComponent,
4871
+ },
4872
+ ],
4873
+ },
4874
+ ];
4875
+ class SupplierRoutingModule {
4876
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4877
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SupplierRoutingModule, imports: [i4$1.RouterModule], exports: [RouterModule] });
4878
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierRoutingModule, imports: [RouterModule.forChild(routes$2), RouterModule] });
4879
+ }
4880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierRoutingModule, decorators: [{
4881
+ type: NgModule,
4882
+ args: [{
4883
+ imports: [RouterModule.forChild(routes$2)],
4884
+ exports: [RouterModule],
4885
+ }]
4886
+ }] });
4887
+
4888
+ class SupplierModule {
4889
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4890
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SupplierModule, declarations: [SupplierComponent,
4891
+ SupplierViewComponent,
4892
+ SuppliersListComponent,
4893
+ SupplierFormComponent,
4894
+ SupplierInformationComponent], imports: [CommonModule,
4895
+ SupplierRoutingModule,
4896
+ MaterialModule,
4897
+ SearchableSelectorModule,
4898
+ AuditLogForModelModule,
4899
+ NoteModule,
4900
+ FlexModule,
4901
+ ReactiveFormsModule,
4902
+ InfiniteScrollModule,
4903
+ NgxPermissionsModule,
4904
+ SupplierFormButtonComponent,
4905
+ SupplierDeleteButtonComponent,
4906
+ StockReceiptsModule,
4907
+ IncidentListComponent,
4908
+ RatingListComponent] });
4909
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierModule, imports: [CommonModule,
4910
+ SupplierRoutingModule,
4911
+ MaterialModule,
4912
+ SearchableSelectorModule,
4913
+ AuditLogForModelModule,
4914
+ NoteModule,
4915
+ FlexModule,
4916
+ ReactiveFormsModule,
4917
+ InfiniteScrollModule,
4918
+ NgxPermissionsModule,
4919
+ SupplierFormButtonComponent,
4920
+ SupplierDeleteButtonComponent,
4921
+ StockReceiptsModule,
4922
+ IncidentListComponent,
4923
+ RatingListComponent] });
4924
+ }
4925
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierModule, decorators: [{
4926
+ type: NgModule,
4927
+ args: [{
4928
+ declarations: [
4929
+ SupplierComponent,
4930
+ SupplierViewComponent,
4931
+ SuppliersListComponent,
4932
+ SupplierFormComponent,
4933
+ SupplierInformationComponent,
4934
+ ],
4935
+ imports: [
4936
+ CommonModule,
4937
+ SupplierRoutingModule,
4938
+ MaterialModule,
4939
+ SearchableSelectorModule,
4940
+ AuditLogForModelModule,
4941
+ NoteModule,
4942
+ FlexModule,
4943
+ ReactiveFormsModule,
4944
+ InfiniteScrollModule,
4945
+ NgxPermissionsModule,
4946
+ SupplierFormButtonComponent,
4947
+ SupplierDeleteButtonComponent,
4948
+ StockReceiptsModule,
4949
+ IncidentListComponent,
4950
+ RatingListComponent
4951
+ ],
4952
+ }]
4953
+ }] });
4954
+
4955
+ var supplier_module = /*#__PURE__*/Object.freeze({
4956
+ __proto__: null,
4957
+ SupplierModule: SupplierModule
4958
+ });
4959
+
4960
+ class SupplierTypeService {
4961
+ httpService;
4962
+ constructor(httpService) {
4963
+ this.httpService = httpService;
4964
+ }
4965
+ /**
4966
+ * get all suppliers from API
4967
+ *
4968
+ */
4969
+ index() {
4970
+ return this.httpService.get(`api/supplier-types`);
4971
+ }
4972
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierTypeService, deps: [{ token: i1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
4973
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierTypeService, providedIn: 'root' });
4974
+ }
4975
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierTypeService, decorators: [{
4976
+ type: Injectable,
4977
+ args: [{
4978
+ providedIn: 'root',
4979
+ }]
4980
+ }], ctorParameters: () => [{ type: i1.HttpService }] });
4981
+
4982
+ const routes$1 = [
4983
+ {
4984
+ path: '',
4985
+ component: IncidentListComponent
4986
+ }
4987
+ ];
4988
+ class IncidentRoutingModule {
4989
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4990
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: IncidentRoutingModule, imports: [i4$1.RouterModule], exports: [RouterModule] });
4991
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentRoutingModule, imports: [RouterModule.forChild(routes$1), RouterModule] });
4992
+ }
4993
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentRoutingModule, decorators: [{
4994
+ type: NgModule,
4995
+ args: [{
4996
+ imports: [RouterModule.forChild(routes$1)],
4997
+ exports: [RouterModule]
4998
+ }]
4999
+ }] });
5000
+
5001
+ class IncidentModule {
5002
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5003
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: IncidentModule, imports: [CommonModule,
5004
+ IncidentRoutingModule] });
5005
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentModule, imports: [CommonModule,
5006
+ IncidentRoutingModule] });
5007
+ }
5008
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IncidentModule, decorators: [{
5009
+ type: NgModule,
5010
+ args: [{
5011
+ declarations: [],
5012
+ imports: [
5013
+ CommonModule,
5014
+ IncidentRoutingModule
5015
+ ]
5016
+ }]
5017
+ }] });
5018
+
5019
+ const routes = [
5020
+ {
5021
+ path: '', component: RatingListComponent
5022
+ }
5023
+ ];
5024
+ class RatingRoutingModule {
5025
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5026
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: RatingRoutingModule, imports: [i4$1.RouterModule], exports: [RouterModule] });
5027
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
5028
+ }
5029
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingRoutingModule, decorators: [{
5030
+ type: NgModule,
5031
+ args: [{
5032
+ imports: [RouterModule.forChild(routes)],
5033
+ exports: [RouterModule]
5034
+ }]
5035
+ }] });
5036
+
5037
+ class RatingModule {
5038
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5039
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: RatingModule, imports: [CommonModule,
5040
+ RatingRoutingModule] });
5041
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingModule, imports: [CommonModule,
5042
+ RatingRoutingModule] });
5043
+ }
5044
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingModule, decorators: [{
5045
+ type: NgModule,
5046
+ args: [{
5047
+ declarations: [],
5048
+ imports: [
5049
+ CommonModule,
5050
+ RatingRoutingModule
5051
+ ]
5052
+ }]
5053
+ }] });
5054
+
3926
5055
  /*
3927
5056
  * Public API Surface of inventory-common
3928
5057
  */
@@ -3931,5 +5060,5 @@ var stockIssuances_module = /*#__PURE__*/Object.freeze({
3931
5060
  * Generated bundle index. Do not edit.
3932
5061
  */
3933
5062
 
3934
- export { InventoryCommonRoutingModule as I, LocationService as L, MaterialModule as M, ProductModule as P, SupplierFormComponent as S, TechlifyFormService as T, SupplierService as a, StockReceiptsListPageComponent as b, StockReceiptsModule as c, ProductCategoryBadgesComponent as d, StockTransferFormButtonComponent as e, MeasureService as f, TechlifyFilterComponent as g, TechlifyFilterModule as h, InventoryCommonModule as i, StockSummaryService as j, ProductFormComponent as k, ProductBasicInfoComponent as l, ProductFormButtonComponent as m, StockIssuancesModule as n, StockIssuancesListComponent as o, StockIssuancesListModule as p };
3935
- //# sourceMappingURL=techlify-inventory-common-techlify-inventory-common-KJHI_roN.mjs.map
5063
+ export { RatingFormButtonComponent as A, InventoryCommonRoutingModule as I, LocationService as L, MaterialModule as M, ProductModule as P, RatingModule as R, StockTransferFormButtonComponent as S, TechlifyFilterComponent as T, ProductCategoryBadgesComponent as a, MeasureService as b, TechlifyFilterModule as c, InventoryCommonModule as d, StockSummaryService as e, ProductFormComponent as f, ProductBasicInfoComponent as g, ProductFormButtonComponent as h, StockIssuancesModule as i, StockIssuancesListComponent as j, StockIssuancesListModule as k, SupplierModule as l, SupplierFormButtonComponent as m, SupplierFormComponent as n, SuppliersListComponent as o, SupplierTypeService as p, PayeeSelectorModule as q, PayeeSelectorComponent as r, IncidentModule as s, IncidentService as t, IncidentListComponent as u, IncidentFormComponent as v, IncidentFormButtonComponent as w, RatingService as x, RatingListComponent as y, RatingFormComponent as z };
5064
+ //# sourceMappingURL=techlify-inventory-common-techlify-inventory-common-BBi2hKoE.mjs.map