techlify-inventory-common 18.38.2 → 18.40.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 (34) hide show
  1. package/esm2022/lib/inventory-common/product/product-basic-info/product-basic-info.component.mjs +3 -3
  2. package/esm2022/lib/inventory-common/product/product-list/product-list.component.mjs +28 -37
  3. package/esm2022/lib/inventory-common/product/product-view-page/product-view-page.component.mjs +1 -1
  4. package/esm2022/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.mjs +18 -7
  5. package/esm2022/lib/inventory-common/stock-issue/stock-issue-list/stock-issue-list.component.mjs +11 -2
  6. package/esm2022/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.component.mjs +5 -10
  7. package/esm2022/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.module.mjs +5 -6
  8. package/esm2022/lib/inventory-common/stock-issue/stock-issue-product-form/stock-issue-product-form.component.mjs +7 -7
  9. package/esm2022/lib/inventory-common/stock-issue/stock-issue-products-list/stock-issue-products-list.component.mjs +25 -9
  10. package/esm2022/lib/inventory-common/stock-issue/stock-issue.module.mjs +7 -3
  11. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-list/stock-receipt-product-list.component.mjs +3 -3
  12. package/fesm2022/{techlify-inventory-common-category.module-CKpiM1p_.mjs → techlify-inventory-common-category.module-CiZXYGS7.mjs} +2 -2
  13. package/fesm2022/{techlify-inventory-common-category.module-CKpiM1p_.mjs.map → techlify-inventory-common-category.module-CiZXYGS7.mjs.map} +1 -1
  14. package/fesm2022/{techlify-inventory-common-measure.module-DMkQVem6.mjs → techlify-inventory-common-measure.module-D9tk7RWL.mjs} +2 -2
  15. package/fesm2022/{techlify-inventory-common-measure.module-DMkQVem6.mjs.map → techlify-inventory-common-measure.module-D9tk7RWL.mjs.map} +1 -1
  16. package/fesm2022/{techlify-inventory-common-purchase-order-view.component-DswAv0_x.mjs → techlify-inventory-common-purchase-order-view.component-CsmrVmZs.mjs} +2 -2
  17. package/fesm2022/{techlify-inventory-common-purchase-order-view.component-DswAv0_x.mjs.map → techlify-inventory-common-purchase-order-view.component-CsmrVmZs.mjs.map} +1 -1
  18. package/fesm2022/{techlify-inventory-common-stock-issue-form.component-DAnutTOL.mjs → techlify-inventory-common-stock-issue-form.component-CnjtA7Hb.mjs} +19 -8
  19. package/fesm2022/techlify-inventory-common-stock-issue-form.component-CnjtA7Hb.mjs.map +1 -0
  20. package/fesm2022/{techlify-inventory-common-stock-issue-view.component-D4IpVw8z.mjs → techlify-inventory-common-stock-issue-view.component-zoK_HeFx.mjs} +2 -2
  21. package/fesm2022/{techlify-inventory-common-stock-issue-view.component-D4IpVw8z.mjs.map → techlify-inventory-common-stock-issue-view.component-zoK_HeFx.mjs.map} +1 -1
  22. package/fesm2022/{techlify-inventory-common-techlify-inventory-common-SNPp2SDU.mjs → techlify-inventory-common-techlify-inventory-common-CHc35QxL.mjs} +119 -106
  23. package/fesm2022/techlify-inventory-common-techlify-inventory-common-CHc35QxL.mjs.map +1 -0
  24. package/fesm2022/techlify-inventory-common.mjs +1 -1
  25. package/lib/inventory-common/product/product-list/product-list.component.d.ts +0 -1
  26. package/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.d.ts +8 -3
  27. package/lib/inventory-common/stock-issue/stock-issue-list/stock-issue-list.component.d.ts +6 -1
  28. package/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.component.d.ts +5 -3
  29. package/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.module.d.ts +1 -2
  30. package/lib/inventory-common/stock-issue/stock-issue-products-list/stock-issue-products-list.component.d.ts +12 -3
  31. package/lib/inventory-common/stock-issue/stock-issue.module.d.ts +2 -1
  32. package/package.json +1 -1
  33. package/fesm2022/techlify-inventory-common-stock-issue-form.component-DAnutTOL.mjs.map +0 -1
  34. package/fesm2022/techlify-inventory-common-techlify-inventory-common-SNPp2SDU.mjs.map +0 -1
@@ -1,16 +1,16 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, Input, Inject, NgModule, EventEmitter, Output, input, output, effect, ViewChild, signal, forwardRef } from '@angular/core';
2
+ import { Injectable, Component, Input, Inject, NgModule, EventEmitter, Output, input, output, effect, ViewChild, model, signal, forwardRef } from '@angular/core';
3
3
  import * as i4$1 from '@angular/router';
4
4
  import { RouterLink, RouterModule, RouterLinkActive } from '@angular/router';
5
5
  import moment$1 from 'moment';
6
6
  import * as i1 from 'ngx-techlify-core';
7
- import { TechlifyService, TechlifyListComponent, TechlifyFormComponent, SearchableSelectorModule, TechlifyIconModule, TechlifyFeatureModule, FormConfigurationUtilityService, AuthenticationGuard, ImportCsvModule, TimelineFilterModule, MaterialModule as MaterialModule$1, ColumnSelectorModule, EntityFilesViewAllModule, NoteModule, TechlifyDeleteButtonComponent, FormConfigurationForFormModule, FileDropperModule, DocumentViewerModule, ActionPopupComponent, AuditLogForModelModule } from 'ngx-techlify-core';
7
+ import { TechlifyService, TechlifyListComponent, TechlifyFormComponent, SearchableSelectorModule, TechlifyIconModule, TechlifyFeatureModule, FormConfigurationUtilityService, AuthenticationGuard, ImportCsvModule, TimelineFilterModule, MaterialModule as MaterialModule$1, ColumnSelectorModule, EntityFilesViewAllModule, NoteModule, TechlifyDeleteButtonComponent, TechlifyFormButtonComponent, FormConfigurationForFormModule, FileDropperModule, DocumentViewerModule, ActionPopupComponent, AuditLogForModelModule } from 'ngx-techlify-core';
8
8
  import * as i11$1 from '@angular/material/icon';
9
9
  import { MatIconModule, MatIcon } from '@angular/material/icon';
10
10
  import * as i4 from '@angular/material/card';
11
11
  import { MatCard, MatCardContent, MatCardModule } from '@angular/material/card';
12
12
  import * as i3 from '@angular/common';
13
- import { NgIf, CommonModule, NgForOf, CurrencyPipe, DatePipe } from '@angular/common';
13
+ import { NgIf, CommonModule, NgForOf, DatePipe, CurrencyPipe } from '@angular/common';
14
14
  import * as i8 from '@angular/material/table';
15
15
  import { MatTableDataSource, MatTableModule, MatCell, MatCellDef, MatColumnDef, MatHeaderCell, MatHeaderRow, MatHeaderRowDef, MatRow, MatRowDef, MatTable, MatHeaderCellDef, MatFooterCell, MatFooterRow, MatFooterRowDef, MatFooterCellDef } from '@angular/material/table';
16
16
  import * as i9 from '@angular/material/progress-bar';
@@ -714,49 +714,40 @@ let ProductListComponent = class ProductListComponent extends TechlifyListCompon
714
714
  productService;
715
715
  productFormService;
716
716
  selection = new SelectionModel(true, []);
717
- // Columns to use during Excel export
718
- customExportColumns = [
719
- '#',
720
- 'name',
721
- 'type',
722
- 'sku',
723
- 'categories',
724
- 'reorder_point',
725
- 'stock_receipts',
726
- 'stock_issues',
727
- 'on_hand',
728
- 'measure',
729
- 'sale_price'
730
- ];
731
717
  exportInProgress = false;
732
718
  columnConfig = [
719
+ { label: '#', def: '#', isSelected: true, isEditable: false },
720
+ { label: 'Name', def: 'name', isSelected: true, isEditable: false },
721
+ { label: 'SKU', def: 'sku', isSelected: true, isEditable: false },
722
+ { label: 'Average Cost', def: 'average_cost', isSelected: false, isEditable: true },
723
+ { label: 'Categories', def: 'categories', isSelected: true, isEditable: false },
724
+ { label: 'Description', def: 'description', isSelected: true, isEditable: false, isExportable: false },
725
+ { label: 'Reorder Point', def: 'reorder_point', isSelected: true, isEditable: false },
726
+ { label: 'Stock Receipts', def: 'stock_receipts', isSelected: true, isEditable: false },
727
+ { label: 'Stock Issues', def: 'stock_issues', isSelected: true, isEditable: false },
728
+ { label: 'On Hand', def: 'on_hand', isSelected: true, isEditable: false },
729
+ { label: 'Measure', def: 'measure', isSelected: true, isEditable: false },
730
+ { label: 'Sale Price', def: 'sale_price', isSelected: true, isEditable: false },
731
+ { label: 'Type', def: 'type', isSelected: false, isEditable: false, isExportable: true },
733
732
  { label: 'Initial Quantity', def: 'initial_quantity', isSelected: false, isEditable: true },
734
733
  { label: 'Income Account', def: 'income_account', isSelected: false, isEditable: true },
735
734
  { label: 'Expense Account', def: 'expense_account', isSelected: false, isEditable: true },
736
735
  { label: 'Creator', def: 'creator', isSelected: false, isEditable: true },
736
+ { label: 'Actions', def: 'Actions', isSelected: true, isEditable: false, isExportable: false },
737
+ { label: 'Select', def: 'Select', isSelected: true, isEditable: false, isExportable: false },
737
738
  ];
738
739
  selectedColumns = this.columnConfig.filter((col) => col.isSelected);
739
740
  get displayedColumns() {
740
- if (this.exportInProgress) {
741
- return this.customExportColumns;
742
- }
743
- const selectedCols = this.selectedColumns.map(col => col.def);
744
- const defaultCols = [
745
- '#',
746
- 'name',
747
- 'sku',
748
- 'categories',
749
- 'description',
750
- 'reorder_point',
751
- 'stock_receipts',
752
- 'stock_issues',
753
- 'on_hand',
754
- 'measure',
755
- 'sale_price'
756
- ];
757
- const cols = defaultCols.concat(...selectedCols);
758
- cols.push('Actions', 'Select');
759
- return cols;
741
+ const selectedDefs = new Set(this.selectedColumns.map(col => col.def));
742
+ return this.columnConfig.filter(col => {
743
+ if (this.exportInProgress) {
744
+ if (col.isExportable === true)
745
+ return true;
746
+ if (col.isExportable === false)
747
+ return false;
748
+ }
749
+ return selectedDefs.has(col.def);
750
+ }).map(col => col.def);
760
751
  }
761
752
  importId;
762
753
  constructor(fb, dialog, activatedRoute, productService, productFormService) {
@@ -856,14 +847,14 @@ let ProductListComponent = class ProductListComponent extends TechlifyListCompon
856
847
  this.exportInProgress = hideColumns;
857
848
  }
858
849
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductListComponent, deps: [{ token: i2$1.FormBuilder }, { token: i1$1.MatDialog }, { token: i4$1.ActivatedRoute }, { token: ProductService }, { token: ProductFormService }], target: i0.ɵɵFactoryTarget.Component });
859
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductListComponent, selector: "app-product-list", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Products</h3>\n <app-product-form-button></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\" (onExportStart)=\"handleExport(true)\"\n (onExportEnd)=\"handleExport(false)\">\n </app-export-to-excel-button>\n <app-column-selector mode=\"icon\" class=\"d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field class='fl-md'>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_ids\" titleField=\"title\"\n [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<div class=\"d-flex justify-content-start gap-3\">\n <mat-card [class.flex-fill]=\"!selection.isEmpty()\" [class.w-100]=\"selection.isEmpty()\">\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" matSortDisableClear=\"true\" aria-describedby=\"Products List\"\n id=\"productTable\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Name Column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"[element?.id, 'view']\">{{ element.name }}</a>\n <small class=\"text-secondary\" *ngIf=\"element.type && !exportInProgress\">\n {{ element.type?.title }}\n </small>\n </div>\n </td>\n </ng-container>\n\n <!-- Type Column -->\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\">\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.sku }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Initial Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element.initial_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.initial_quantity_date\">\n on {{ element?.initial_quantity_date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Receipts Column -->\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell mat-sort-header=\"stock_receipts_sum_quantity\" *matHeaderCellDef>Stock Receipts</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_receipts_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_receipt && !exportInProgress\">\n Latest on {{ element?.last_stock_receipt?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Issues Column -->\n <ng-container matColumnDef=\"stock_issues\">\n <th mat-header-cell mat-sort-header=\"stock_issues_sum_quantity\" *matHeaderCellDef>Stock Issues</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_issues_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_issue && !exportInProgress\">\n Latest on {{ element?.last_stock_issue?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell mat-sort-header='stock_on_hand' *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Measure</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"reorder_point\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reorder_point }}\n </td>\n </ng-container>\n\n <!-- Selling Price Column -->\n <ng-container matColumnDef=\"sale_price\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Selling Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.sale_price | currency }}\n </td>\n </ng-container>\n\n <!-- Income Account Column -->\n <ng-container matColumnDef=\"income_account\">\n <th mat-header-cell *matHeaderCellDef>Income Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.income_account?.title }}\n </td>\n </ng-container>\n\n <!-- Expense Account Column -->\n <ng-container matColumnDef=\"expense_account\">\n <th mat-header-cell *matHeaderCellDef>Expense Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.expense_account?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-techlify-icon name='view' [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"></app-techlify-icon>\n\n <app-product-form-button [product]=\"element\"></app-product-form-button>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Select\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllRowsSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllRowsSelected()\" [aria-label]=\"checkboxLabel()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\" [aria-label]=\"checkboxLabel(row)\">\n </mat-checkbox>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <mat-card *ngIf=\"!selection.isEmpty()\" class=\"batch-update-card\">\n <mat-card-content>\n <app-product-batch-update-form [selection]=\"selection\" (updated)=\"reload()\"></app-product-batch-update-form>\n </mat-card-content>\n </mat-card>\n</div>", styles: [".batch-update-card{width:15%;min-width:300px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: 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", "isEmitInitialEvent", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i8$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i8.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i8.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i8.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8.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: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i2$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", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: ExportToExcelButtonComponent, selector: "app-export-to-excel-button", inputs: ["tableId", "fileName"], outputs: ["onExportStart", "onExportEnd"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"] }, { kind: "component", type: ProductBatchUpdateFormComponent, selector: "app-product-batch-update-form", inputs: ["selection"], outputs: ["updated"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
850
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductListComponent, selector: "app-product-list", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Products</h3>\n <app-product-form-button></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\" (onExportStart)=\"handleExport(true)\"\n (onExportEnd)=\"handleExport(false)\">\n </app-export-to-excel-button>\n <app-column-selector mode=\"icon\" class=\"d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field class='fl-md'>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_ids\" titleField=\"title\"\n [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<div class=\"d-flex justify-content-start gap-3\">\n <mat-card [class.flex-fill]=\"!selection.isEmpty()\" [class.w-100]=\"selection.isEmpty()\">\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" matSortDisableClear=\"true\" aria-describedby=\"Products List\"\n id=\"productTable\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Name Column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"[element?.id, 'view']\">{{ element.name }}</a>\n <small class=\"text-secondary\" *ngIf=\"element.type && !exportInProgress\">\n {{ element.type?.title }}\n </small>\n </div>\n </td>\n </ng-container>\n\n <!-- Type Column -->\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\">\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.sku }}</td>\n </ng-container>\n\n <!-- Average Cost Column -->\n <ng-container matColumnDef=\"average_cost\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Average Cost</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.average_cost | currency }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Initial Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element.initial_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.initial_quantity_date\">\n on {{ element?.initial_quantity_date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Receipts Column -->\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell mat-sort-header=\"stock_receipts_sum_quantity\" *matHeaderCellDef>Stock Receipts</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_receipts_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_receipt && !exportInProgress\">\n Latest on {{ element?.last_stock_receipt?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Issues Column -->\n <ng-container matColumnDef=\"stock_issues\">\n <th mat-header-cell mat-sort-header=\"stock_issues_sum_quantity\" *matHeaderCellDef>Stock Issues</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_issues_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_issue && !exportInProgress\">\n Latest on {{ element?.last_stock_issue?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell mat-sort-header='stock_on_hand' *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Measure</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"reorder_point\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reorder_point }}\n </td>\n </ng-container>\n\n <!-- Selling Price Column -->\n <ng-container matColumnDef=\"sale_price\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Selling Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.sale_price | currency }}\n </td>\n </ng-container>\n\n <!-- Income Account Column -->\n <ng-container matColumnDef=\"income_account\">\n <th mat-header-cell *matHeaderCellDef>Income Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.income_account?.title }}\n </td>\n </ng-container>\n\n <!-- Expense Account Column -->\n <ng-container matColumnDef=\"expense_account\">\n <th mat-header-cell *matHeaderCellDef>Expense Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.expense_account?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-techlify-icon name='view' [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"></app-techlify-icon>\n\n <app-product-form-button [product]=\"element\"></app-product-form-button>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Select\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllRowsSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllRowsSelected()\" [aria-label]=\"checkboxLabel()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\" [aria-label]=\"checkboxLabel(row)\">\n </mat-checkbox>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <mat-card *ngIf=\"!selection.isEmpty()\" class=\"batch-update-card\">\n <mat-card-content>\n <app-product-batch-update-form [selection]=\"selection\" (updated)=\"reload()\"></app-product-batch-update-form>\n </mat-card-content>\n </mat-card>\n</div>", styles: [".batch-update-card{width:15%;min-width:300px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: 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", "isEmitInitialEvent", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i8$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i8.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i8.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i8.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8.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: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i2$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", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: ExportToExcelButtonComponent, selector: "app-export-to-excel-button", inputs: ["tableId", "fileName"], outputs: ["onExportStart", "onExportEnd"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"] }, { kind: "component", type: ProductBatchUpdateFormComponent, selector: "app-product-batch-update-form", inputs: ["selection"], outputs: ["updated"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
860
851
  };
861
852
  ProductListComponent = __decorate([
862
853
  UntilDestroy()
863
854
  ], ProductListComponent);
864
855
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductListComponent, decorators: [{
865
856
  type: Component,
866
- args: [{ selector: 'app-product-list', template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Products</h3>\n <app-product-form-button></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\" (onExportStart)=\"handleExport(true)\"\n (onExportEnd)=\"handleExport(false)\">\n </app-export-to-excel-button>\n <app-column-selector mode=\"icon\" class=\"d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field class='fl-md'>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_ids\" titleField=\"title\"\n [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<div class=\"d-flex justify-content-start gap-3\">\n <mat-card [class.flex-fill]=\"!selection.isEmpty()\" [class.w-100]=\"selection.isEmpty()\">\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" matSortDisableClear=\"true\" aria-describedby=\"Products List\"\n id=\"productTable\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Name Column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"[element?.id, 'view']\">{{ element.name }}</a>\n <small class=\"text-secondary\" *ngIf=\"element.type && !exportInProgress\">\n {{ element.type?.title }}\n </small>\n </div>\n </td>\n </ng-container>\n\n <!-- Type Column -->\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\">\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.sku }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Initial Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element.initial_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.initial_quantity_date\">\n on {{ element?.initial_quantity_date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Receipts Column -->\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell mat-sort-header=\"stock_receipts_sum_quantity\" *matHeaderCellDef>Stock Receipts</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_receipts_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_receipt && !exportInProgress\">\n Latest on {{ element?.last_stock_receipt?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Issues Column -->\n <ng-container matColumnDef=\"stock_issues\">\n <th mat-header-cell mat-sort-header=\"stock_issues_sum_quantity\" *matHeaderCellDef>Stock Issues</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_issues_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_issue && !exportInProgress\">\n Latest on {{ element?.last_stock_issue?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell mat-sort-header='stock_on_hand' *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Measure</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"reorder_point\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reorder_point }}\n </td>\n </ng-container>\n\n <!-- Selling Price Column -->\n <ng-container matColumnDef=\"sale_price\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Selling Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.sale_price | currency }}\n </td>\n </ng-container>\n\n <!-- Income Account Column -->\n <ng-container matColumnDef=\"income_account\">\n <th mat-header-cell *matHeaderCellDef>Income Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.income_account?.title }}\n </td>\n </ng-container>\n\n <!-- Expense Account Column -->\n <ng-container matColumnDef=\"expense_account\">\n <th mat-header-cell *matHeaderCellDef>Expense Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.expense_account?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-techlify-icon name='view' [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"></app-techlify-icon>\n\n <app-product-form-button [product]=\"element\"></app-product-form-button>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Select\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllRowsSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllRowsSelected()\" [aria-label]=\"checkboxLabel()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\" [aria-label]=\"checkboxLabel(row)\">\n </mat-checkbox>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <mat-card *ngIf=\"!selection.isEmpty()\" class=\"batch-update-card\">\n <mat-card-content>\n <app-product-batch-update-form [selection]=\"selection\" (updated)=\"reload()\"></app-product-batch-update-form>\n </mat-card-content>\n </mat-card>\n</div>", styles: [".batch-update-card{width:15%;min-width:300px}\n"] }]
857
+ args: [{ selector: 'app-product-list', template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Products</h3>\n <app-product-form-button></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\" (onExportStart)=\"handleExport(true)\"\n (onExportEnd)=\"handleExport(false)\">\n </app-export-to-excel-button>\n <app-column-selector mode=\"icon\" class=\"d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field class='fl-md'>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_ids\" titleField=\"title\"\n [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<div class=\"d-flex justify-content-start gap-3\">\n <mat-card [class.flex-fill]=\"!selection.isEmpty()\" [class.w-100]=\"selection.isEmpty()\">\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" matSortDisableClear=\"true\" aria-describedby=\"Products List\"\n id=\"productTable\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Name Column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"[element?.id, 'view']\">{{ element.name }}</a>\n <small class=\"text-secondary\" *ngIf=\"element.type && !exportInProgress\">\n {{ element.type?.title }}\n </small>\n </div>\n </td>\n </ng-container>\n\n <!-- Type Column -->\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\">\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.sku }}</td>\n </ng-container>\n\n <!-- Average Cost Column -->\n <ng-container matColumnDef=\"average_cost\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Average Cost</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.average_cost | currency }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Initial Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element.initial_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.initial_quantity_date\">\n on {{ element?.initial_quantity_date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Receipts Column -->\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell mat-sort-header=\"stock_receipts_sum_quantity\" *matHeaderCellDef>Stock Receipts</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_receipts_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_receipt && !exportInProgress\">\n Latest on {{ element?.last_stock_receipt?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Issues Column -->\n <ng-container matColumnDef=\"stock_issues\">\n <th mat-header-cell mat-sort-header=\"stock_issues_sum_quantity\" *matHeaderCellDef>Stock Issues</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_issues_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_issue && !exportInProgress\">\n Latest on {{ element?.last_stock_issue?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell mat-sort-header='stock_on_hand' *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Measure</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"reorder_point\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reorder_point }}\n </td>\n </ng-container>\n\n <!-- Selling Price Column -->\n <ng-container matColumnDef=\"sale_price\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Selling Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.sale_price | currency }}\n </td>\n </ng-container>\n\n <!-- Income Account Column -->\n <ng-container matColumnDef=\"income_account\">\n <th mat-header-cell *matHeaderCellDef>Income Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.income_account?.title }}\n </td>\n </ng-container>\n\n <!-- Expense Account Column -->\n <ng-container matColumnDef=\"expense_account\">\n <th mat-header-cell *matHeaderCellDef>Expense Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.expense_account?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-techlify-icon name='view' [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"></app-techlify-icon>\n\n <app-product-form-button [product]=\"element\"></app-product-form-button>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Select\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllRowsSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllRowsSelected()\" [aria-label]=\"checkboxLabel()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\" [aria-label]=\"checkboxLabel(row)\">\n </mat-checkbox>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <mat-card *ngIf=\"!selection.isEmpty()\" class=\"batch-update-card\">\n <mat-card-content>\n <app-product-batch-update-form [selection]=\"selection\" (updated)=\"reload()\"></app-product-batch-update-form>\n </mat-card-content>\n </mat-card>\n</div>", styles: [".batch-update-card{width:15%;min-width:300px}\n"] }]
867
858
  }], ctorParameters: () => [{ type: i2$1.FormBuilder }, { type: i1$1.MatDialog }, { type: i4$1.ActivatedRoute }, { type: ProductService }, { type: ProductFormService }] });
868
859
 
869
860
  class ProductNavBarComponent {
@@ -1113,14 +1104,14 @@ let StockReceiptProductsListComponent = class StockReceiptProductsListComponent
1113
1104
  }
1114
1105
  }
1115
1106
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptProductsListComponent, deps: [{ token: StockReceiptProductService }, { token: i2$1.FormBuilder }, { token: i1.TechlifyFeatureService }], target: i0.ɵɵFactoryTarget.Component });
1116
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: StockReceiptProductsListComponent, selector: "app-stock-receipt-product-list", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, isProductView: { classPropertyName: "isProductView", publicName: "isProductView", isSignal: true, isRequired: false, transformFunction: null }, selectedColumns: { classPropertyName: "selectedColumns", publicName: "selectedColumns", isSignal: true, isRequired: false, transformFunction: null }, exportInProgress: { classPropertyName: "exportInProgress", publicName: "exportInProgress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { listUpdated: "listUpdated", columnConfigReady: "columnConfigReady" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-header *ngIf=\"isProductView()\" class=\"d-flex align-items-center gap-2\">\n <mat-card-title>Stock Receipts</mat-card-title>\n <app-techlify-icon role='button' name='add' [routerLink]=\"['/inventory/stock-receipts/form']\"\n class='ms-2'></app-techlify-icon>\n </mat-card-header>\n\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Receipt Products\" infiniteScroll\n id=\"stockReceiptTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\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 <ng-container matColumnDef=\"receipt_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Receipt ID\">Receipt #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/stock-receipts', element?.stock_receipt_id, 'view']\">\n {{ element?.stock_receipt_id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </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 <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges [product]=\"element?.product\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngFor=\"let category of element?.product?.categories; let last = last\">\n {{ category?.title }}<ng-container *ngIf=\"!last\">, </ng-container>\n </span>\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?.stock_receipt?.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\">\n {{ element?.quantity }} {{ element?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Measure Column -->\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\">{{ element?.purchase_price | currency }}</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\">{{ element?.amount | currency }}</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\">{{ element?.stock_receipt?.supplier?.company_name }}</td>\n </ng-container>\n\n <!-- Supplier Contact Column -->\n <ng-container matColumnDef=\"supplier_contact\">\n <th mat-header-cell *matHeaderCellDef>Supplier Contact</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt?.supplier?.contact_name }}</td>\n </ng-container>\n\n <!-- Supplier Phone Column -->\n <ng-container matColumnDef=\"supplier_phone\">\n <th mat-header-cell *matHeaderCellDef>Supplier Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt?.supplier?.phone }}</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?.stock_receipt?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.stock_receipt?.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 text-secondary\">\n <app-techlify-icon role='button' name='view' class='text-secondary'\n [routerLink]=\"['/inventory', 'stock-receipts', element?.stock_receipt_id, 'view']\"></app-techlify-icon>\n <app-stock-receipt-product-form-button [stockReceiptId]=\"element?.stock_receipt_id\"\n [stockReceiptProduct]=\"element\" (saved)=\"reload(); listUpdated.emit(true)\">\n </app-stock-receipt-product-form-button>\n <app-techlify-delete-button [model]=\"element?.stock_receipt\" [service]=\"service\"\n [data]=\"{ title: element?.product?.name, type: 'Stock Receipt Product' }\"\n (deleted)=\"reload(); listUpdated.emit(true)\">\n </app-techlify-delete-button>\n </div>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-receipt_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalPurchasePrice | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalValue | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier_contact\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier_phone\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i8.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i8.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i8.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i8.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i8.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i4$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { 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: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "component", type: i1.TechlifyDeleteButtonComponent, selector: "app-techlify-delete-button", inputs: ["data", "model", "message", "service"], outputs: ["deleted"] }, { kind: "component", type: StockReceiptProductFormButtonComponent, selector: "app-stock-receipt-product-form-button", inputs: ["stockReceiptProduct", "stockReceiptId"], outputs: ["saved"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
1107
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: StockReceiptProductsListComponent, selector: "app-stock-receipt-product-list", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, isProductView: { classPropertyName: "isProductView", publicName: "isProductView", isSignal: true, isRequired: false, transformFunction: null }, selectedColumns: { classPropertyName: "selectedColumns", publicName: "selectedColumns", isSignal: true, isRequired: false, transformFunction: null }, exportInProgress: { classPropertyName: "exportInProgress", publicName: "exportInProgress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { listUpdated: "listUpdated", columnConfigReady: "columnConfigReady" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-header *ngIf=\"isProductView()\" class=\"d-flex align-items-center gap-2\">\n <mat-card-title>Stock Receipts</mat-card-title>\n <app-techlify-icon role='button' name='add' [routerLink]=\"['/inventory/stock-receipts/form']\"\n class='ms-2'></app-techlify-icon>\n </mat-card-header>\n\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Receipt Products\" infiniteScroll\n id=\"stockReceiptTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\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 <ng-container matColumnDef=\"receipt_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Receipt ID\">Receipt #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/stock-receipts', element?.stock_receipt_id, 'view']\">\n {{ element?.stock_receipt_id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </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 <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges [product]=\"element?.product\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngFor=\"let category of element?.product?.categories; let last = last\">\n {{ category?.title }}<ng-container *ngIf=\"!last\">, </ng-container>\n </span>\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?.stock_receipt?.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\">\n {{ element?.quantity }} {{ element?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Measure Column -->\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\">{{ element?.purchase_price | currency }}</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\">{{ element?.amount | currency }}</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\">{{ element?.stock_receipt?.supplier?.company_name }}</td>\n </ng-container>\n\n <!-- Supplier Contact Column -->\n <ng-container matColumnDef=\"supplier_contact\">\n <th mat-header-cell *matHeaderCellDef>Supplier Contact</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt?.supplier?.contact_name }}</td>\n </ng-container>\n\n <!-- Supplier Phone Column -->\n <ng-container matColumnDef=\"supplier_phone\">\n <th mat-header-cell *matHeaderCellDef>Supplier Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt?.supplier?.phone }}</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?.stock_receipt?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.stock_receipt?.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 text-secondary\">\n <app-techlify-icon role='button' name='view' class='text-secondary'\n [routerLink]=\"['/inventory', 'stock-receipts', element?.stock_receipt_id, 'view']\"></app-techlify-icon>\n <app-stock-receipt-product-form-button [stockReceiptId]=\"element?.stock_receipt_id\"\n [stockReceiptProduct]=\"element\" (saved)=\"reload(); listUpdated.emit(true)\">\n </app-stock-receipt-product-form-button>\n <app-techlify-delete-button [model]=\"element\" [service]=\"service\"\n [data]=\"{ title: element?.product?.name, type: 'Stock Receipt Product' }\"\n (deleted)=\"reload(); listUpdated.emit(true)\">\n </app-techlify-delete-button>\n </div>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-receipt_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalPurchasePrice | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalValue | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier_contact\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier_phone\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i8.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i8.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i8.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i8.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i8.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i4$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { 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: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "component", type: i1.TechlifyDeleteButtonComponent, selector: "app-techlify-delete-button", inputs: ["data", "model", "message", "service"], outputs: ["deleted"] }, { kind: "component", type: StockReceiptProductFormButtonComponent, selector: "app-stock-receipt-product-form-button", inputs: ["stockReceiptProduct", "stockReceiptId"], outputs: ["saved"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
1117
1108
  };
1118
1109
  StockReceiptProductsListComponent = __decorate([
1119
1110
  UntilDestroy()
1120
1111
  ], StockReceiptProductsListComponent);
1121
1112
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptProductsListComponent, decorators: [{
1122
1113
  type: Component,
1123
- args: [{ selector: 'app-stock-receipt-product-list', template: "<mat-card>\n <mat-card-header *ngIf=\"isProductView()\" class=\"d-flex align-items-center gap-2\">\n <mat-card-title>Stock Receipts</mat-card-title>\n <app-techlify-icon role='button' name='add' [routerLink]=\"['/inventory/stock-receipts/form']\"\n class='ms-2'></app-techlify-icon>\n </mat-card-header>\n\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Receipt Products\" infiniteScroll\n id=\"stockReceiptTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\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 <ng-container matColumnDef=\"receipt_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Receipt ID\">Receipt #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/stock-receipts', element?.stock_receipt_id, 'view']\">\n {{ element?.stock_receipt_id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </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 <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges [product]=\"element?.product\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngFor=\"let category of element?.product?.categories; let last = last\">\n {{ category?.title }}<ng-container *ngIf=\"!last\">, </ng-container>\n </span>\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?.stock_receipt?.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\">\n {{ element?.quantity }} {{ element?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Measure Column -->\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\">{{ element?.purchase_price | currency }}</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\">{{ element?.amount | currency }}</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\">{{ element?.stock_receipt?.supplier?.company_name }}</td>\n </ng-container>\n\n <!-- Supplier Contact Column -->\n <ng-container matColumnDef=\"supplier_contact\">\n <th mat-header-cell *matHeaderCellDef>Supplier Contact</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt?.supplier?.contact_name }}</td>\n </ng-container>\n\n <!-- Supplier Phone Column -->\n <ng-container matColumnDef=\"supplier_phone\">\n <th mat-header-cell *matHeaderCellDef>Supplier Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt?.supplier?.phone }}</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?.stock_receipt?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.stock_receipt?.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 text-secondary\">\n <app-techlify-icon role='button' name='view' class='text-secondary'\n [routerLink]=\"['/inventory', 'stock-receipts', element?.stock_receipt_id, 'view']\"></app-techlify-icon>\n <app-stock-receipt-product-form-button [stockReceiptId]=\"element?.stock_receipt_id\"\n [stockReceiptProduct]=\"element\" (saved)=\"reload(); listUpdated.emit(true)\">\n </app-stock-receipt-product-form-button>\n <app-techlify-delete-button [model]=\"element?.stock_receipt\" [service]=\"service\"\n [data]=\"{ title: element?.product?.name, type: 'Stock Receipt Product' }\"\n (deleted)=\"reload(); listUpdated.emit(true)\">\n </app-techlify-delete-button>\n </div>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-receipt_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalPurchasePrice | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalValue | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier_contact\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier_phone\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"] }]
1114
+ args: [{ selector: 'app-stock-receipt-product-list', template: "<mat-card>\n <mat-card-header *ngIf=\"isProductView()\" class=\"d-flex align-items-center gap-2\">\n <mat-card-title>Stock Receipts</mat-card-title>\n <app-techlify-icon role='button' name='add' [routerLink]=\"['/inventory/stock-receipts/form']\"\n class='ms-2'></app-techlify-icon>\n </mat-card-header>\n\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Receipt Products\" infiniteScroll\n id=\"stockReceiptTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\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 <ng-container matColumnDef=\"receipt_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Receipt ID\">Receipt #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/stock-receipts', element?.stock_receipt_id, 'view']\">\n {{ element?.stock_receipt_id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </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 <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges [product]=\"element?.product\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngFor=\"let category of element?.product?.categories; let last = last\">\n {{ category?.title }}<ng-container *ngIf=\"!last\">, </ng-container>\n </span>\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?.stock_receipt?.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\">\n {{ element?.quantity }} {{ element?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Measure Column -->\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\">{{ element?.purchase_price | currency }}</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\">{{ element?.amount | currency }}</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\">{{ element?.stock_receipt?.supplier?.company_name }}</td>\n </ng-container>\n\n <!-- Supplier Contact Column -->\n <ng-container matColumnDef=\"supplier_contact\">\n <th mat-header-cell *matHeaderCellDef>Supplier Contact</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt?.supplier?.contact_name }}</td>\n </ng-container>\n\n <!-- Supplier Phone Column -->\n <ng-container matColumnDef=\"supplier_phone\">\n <th mat-header-cell *matHeaderCellDef>Supplier Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt?.supplier?.phone }}</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?.stock_receipt?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.stock_receipt?.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 text-secondary\">\n <app-techlify-icon role='button' name='view' class='text-secondary'\n [routerLink]=\"['/inventory', 'stock-receipts', element?.stock_receipt_id, 'view']\"></app-techlify-icon>\n <app-stock-receipt-product-form-button [stockReceiptId]=\"element?.stock_receipt_id\"\n [stockReceiptProduct]=\"element\" (saved)=\"reload(); listUpdated.emit(true)\">\n </app-stock-receipt-product-form-button>\n <app-techlify-delete-button [model]=\"element\" [service]=\"service\"\n [data]=\"{ title: element?.product?.name, type: 'Stock Receipt Product' }\"\n (deleted)=\"reload(); listUpdated.emit(true)\">\n </app-techlify-delete-button>\n </div>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-receipt_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalPurchasePrice | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalValue | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier_contact\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier_phone\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"] }]
1124
1115
  }], ctorParameters: () => [{ type: StockReceiptProductService }, { type: i2$1.FormBuilder }, { type: i1.TechlifyFeatureService }] });
1125
1116
 
1126
1117
  class StockIssueProductService extends TechlifyService {
@@ -1167,7 +1158,7 @@ class StockIssueProductFormComponent extends TechlifyFormComponent {
1167
1158
  this.form.get('location_id')?.valueChanges.pipe(debounceTime$1(50), distinctUntilChanged()).subscribe((val) => {
1168
1159
  this.resetBatchSelector(val);
1169
1160
  });
1170
- const product = this.data.stockIssueProduct;
1161
+ const product = this.data.model;
1171
1162
  if (product) {
1172
1163
  this.isUpdate = true;
1173
1164
  this.form.patchValue(product, { emitEvent: false });
@@ -1175,9 +1166,9 @@ class StockIssueProductFormComponent extends TechlifyFormComponent {
1175
1166
  }
1176
1167
  }
1177
1168
  onBatchItemsChange() {
1178
- if (this.data.stockIssueProduct && !this.isBatchPatched && this.batchSelector) {
1179
- this.form.get('batch_id')?.setValue(this.data.stockIssueProduct.batch_id);
1180
- this.batchSelector.selectedValue = this.data.stockIssueProduct.batch;
1169
+ if (this.data.model && !this.isBatchPatched && this.batchSelector) {
1170
+ this.form.get('batch_id')?.setValue(this.data.model.batch_id);
1171
+ this.batchSelector.selectedValue = this.data.model.batch;
1181
1172
  this.isBatchPatched = true;
1182
1173
  }
1183
1174
  }
@@ -1200,7 +1191,7 @@ class StockIssueProductFormComponent extends TechlifyFormComponent {
1200
1191
  this.dialogRef.close();
1201
1192
  }
1202
1193
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueProductFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$1.FormBuilder }, { token: StockIssueProductService }, { token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
1203
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueProductFormComponent, isStandalone: true, selector: "app-stock-issue-product-form", viewQueries: [{ propertyName: "batchSelector", first: true, predicate: ["batchSelector"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<h3 mat-dialog-title class='text-center'>Stock Issue Product Form</h3>\n\n<mat-dialog-content>\n <form [formGroup]=\"form\" (submit)=\"submit(form.getRawValue())\" class=\"d-flex flex-column gap-3 mt-2\">\n\n <mat-form-field class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n [selectedValue]=\"data.stockIssueProduct?.product\" [cache]=\"true\"></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('product_id')\">{{ getErrorMessage('product_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Quantity</mat-label>\n <input matInput type=\"number\" formControlName=\"quantity\" min=\"0.01\" step=\"any\">\n <mat-error *ngIf=\"isFieldValid('quantity')\">{{ getErrorMessage('quantity') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"\n [selectedValue]=\"data.stockIssueProduct?.location\" titleField=\"title\"></app-searchable-selector>\n </mat-form-field>\n\n <ng-container *ngIf=\"form.value?.location_id && batchesApiUrl\">\n <mat-form-field class=\"w-100\" techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSelector formControlName=\"batch_id\"\n [apiUrl]=\"batchesApiUrl\" [enableSearch]=\"false\"\n (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end gap-2\">\n <button mat-flat-button type=\"button\" [disabled]=\"isWorking\" (click)=\"cancel()\">Cancel</button>\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isWorking\">Save</button>\n </div>\n\n </form>\n</mat-dialog-content>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.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.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.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { 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: MaterialModule }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: 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", "isEmitInitialEvent", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "ngmodule", type: TechlifyFeatureModule }, { kind: "directive", type: i1.TechlifyFeatureEnabledDirective, selector: "[techlifyFeatureEnabled]", inputs: ["techlifyFeatureEnabled"] }], preserveWhitespaces: true });
1194
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueProductFormComponent, isStandalone: true, selector: "app-stock-issue-product-form", viewQueries: [{ propertyName: "batchSelector", first: true, predicate: ["batchSelector"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<h3 mat-dialog-title class='text-center'>Stock Issue Product Form</h3>\n\n<mat-dialog-content>\n <form [formGroup]=\"form\" (submit)=\"submit(form.getRawValue())\" class=\"d-flex flex-column gap-3 mt-2\">\n\n <mat-form-field class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n [selectedValue]=\"data?.product\" [cache]=\"true\"></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('product_id')\">{{ getErrorMessage('product_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Quantity</mat-label>\n <input matInput type=\"number\" formControlName=\"quantity\" min=\"0.01\" step=\"any\">\n <mat-error *ngIf=\"isFieldValid('quantity')\">{{ getErrorMessage('quantity') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"\n [selectedValue]=\"data.stockIssueProduct?.location\" titleField=\"title\"></app-searchable-selector>\n </mat-form-field>\n\n <ng-container *ngIf=\"form.value?.location_id && batchesApiUrl\">\n <mat-form-field class=\"w-100\" techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSelector formControlName=\"batch_id\"\n [apiUrl]=\"batchesApiUrl\" [enableSearch]=\"false\"\n (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end gap-2\">\n <button mat-flat-button type=\"button\" [disabled]=\"isWorking\" (click)=\"cancel()\">Cancel</button>\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isWorking\">Save</button>\n </div>\n\n </form>\n</mat-dialog-content>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.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.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.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { 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: MaterialModule }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: 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", "isEmitInitialEvent", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "ngmodule", type: TechlifyFeatureModule }, { kind: "directive", type: i1.TechlifyFeatureEnabledDirective, selector: "[techlifyFeatureEnabled]", inputs: ["techlifyFeatureEnabled"] }], preserveWhitespaces: true });
1204
1195
  }
1205
1196
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueProductFormComponent, decorators: [{
1206
1197
  type: Component,
@@ -1212,7 +1203,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1212
1203
  TechlifyFeatureModule,
1213
1204
  MatDialogTitle,
1214
1205
  MatDialogContent,
1215
- ], template: "<h3 mat-dialog-title class='text-center'>Stock Issue Product Form</h3>\n\n<mat-dialog-content>\n <form [formGroup]=\"form\" (submit)=\"submit(form.getRawValue())\" class=\"d-flex flex-column gap-3 mt-2\">\n\n <mat-form-field class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n [selectedValue]=\"data.stockIssueProduct?.product\" [cache]=\"true\"></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('product_id')\">{{ getErrorMessage('product_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Quantity</mat-label>\n <input matInput type=\"number\" formControlName=\"quantity\" min=\"0.01\" step=\"any\">\n <mat-error *ngIf=\"isFieldValid('quantity')\">{{ getErrorMessage('quantity') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"\n [selectedValue]=\"data.stockIssueProduct?.location\" titleField=\"title\"></app-searchable-selector>\n </mat-form-field>\n\n <ng-container *ngIf=\"form.value?.location_id && batchesApiUrl\">\n <mat-form-field class=\"w-100\" techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSelector formControlName=\"batch_id\"\n [apiUrl]=\"batchesApiUrl\" [enableSearch]=\"false\"\n (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end gap-2\">\n <button mat-flat-button type=\"button\" [disabled]=\"isWorking\" (click)=\"cancel()\">Cancel</button>\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isWorking\">Save</button>\n </div>\n\n </form>\n</mat-dialog-content>\n" }]
1206
+ ], template: "<h3 mat-dialog-title class='text-center'>Stock Issue Product Form</h3>\n\n<mat-dialog-content>\n <form [formGroup]=\"form\" (submit)=\"submit(form.getRawValue())\" class=\"d-flex flex-column gap-3 mt-2\">\n\n <mat-form-field class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n [selectedValue]=\"data?.product\" [cache]=\"true\"></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('product_id')\">{{ getErrorMessage('product_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Quantity</mat-label>\n <input matInput type=\"number\" formControlName=\"quantity\" min=\"0.01\" step=\"any\">\n <mat-error *ngIf=\"isFieldValid('quantity')\">{{ getErrorMessage('quantity') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"\n [selectedValue]=\"data.stockIssueProduct?.location\" titleField=\"title\"></app-searchable-selector>\n </mat-form-field>\n\n <ng-container *ngIf=\"form.value?.location_id && batchesApiUrl\">\n <mat-form-field class=\"w-100\" techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSelector formControlName=\"batch_id\"\n [apiUrl]=\"batchesApiUrl\" [enableSearch]=\"false\"\n (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end gap-2\">\n <button mat-flat-button type=\"button\" [disabled]=\"isWorking\" (click)=\"cancel()\">Cancel</button>\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isWorking\">Save</button>\n </div>\n\n </form>\n</mat-dialog-content>\n" }]
1216
1207
  }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$1.FormBuilder }, { type: StockIssueProductService }, { type: i1$1.MatDialogRef }, { type: undefined, decorators: [{
1217
1208
  type: Inject,
1218
1209
  args: [MAT_DIALOG_DATA]
@@ -1221,51 +1212,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
1221
1212
  args: ['batchSelector']
1222
1213
  }] } });
1223
1214
 
1224
- class StockIssueProductFormButtonComponent {
1225
- dialog;
1226
- stockIssueProduct = input();
1227
- stockIssueId = input.required();
1228
- saved = output();
1229
- constructor(dialog) {
1230
- this.dialog = dialog;
1231
- }
1232
- open() {
1233
- this.dialog.open(StockIssueProductFormComponent, {
1234
- width: '500px',
1235
- data: {
1236
- stockIssueId: this.stockIssueId(),
1237
- stockIssueProduct: this.stockIssueProduct() ?? null,
1238
- },
1239
- }).afterClosed().subscribe((item) => {
1240
- if (item) {
1241
- this.saved.emit(item);
1242
- }
1243
- });
1244
- }
1245
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueProductFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1246
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: StockIssueProductFormButtonComponent, isStandalone: true, selector: "app-stock-issue-product-form-button", inputs: { stockIssueProduct: { classPropertyName: "stockIssueProduct", publicName: "stockIssueProduct", isSignal: true, isRequired: false, transformFunction: null }, stockIssueId: { classPropertyName: "stockIssueId", publicName: "stockIssueId", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { saved: "saved" }, ngImport: i0, template: "<app-techlify-icon role=\"button\" [name]=\"stockIssueProduct() ? 'edit' : 'add'\" (click)=\"open()\">\n</app-techlify-icon>\n", dependencies: [{ kind: "ngmodule", type: TechlifyIconModule }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }], preserveWhitespaces: true });
1247
- }
1248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueProductFormButtonComponent, decorators: [{
1249
- type: Component,
1250
- args: [{ selector: 'app-stock-issue-product-form-button', standalone: true, imports: [TechlifyIconModule], template: "<app-techlify-icon role=\"button\" [name]=\"stockIssueProduct() ? 'edit' : 'add'\" (click)=\"open()\">\n</app-techlify-icon>\n" }]
1251
- }], ctorParameters: () => [{ type: i1$1.MatDialog }] });
1252
-
1253
1215
  let StockIssueProductListComponent = class StockIssueProductListComponent extends TechlifyListComponent {
1254
1216
  service;
1255
1217
  formBuilder;
1256
1218
  featureService;
1219
+ datePipe;
1257
1220
  filters = input({});
1258
1221
  isProductView = input(false);
1259
- selectedColumns = input([]);
1222
+ selectedColumns = model([]);
1260
1223
  exportInProgress = input(false);
1261
1224
  listUpdated = output();
1262
1225
  columnConfigReady = output();
1226
+ issuableData = input(null);
1227
+ stockIssueProductForm = signal(StockIssueProductFormComponent);
1263
1228
  productViewHiddenColumns = ['product', 'sku', 'measure'];
1264
1229
  _defaultSelectedColumns = [];
1265
1230
  columnConfig = [
1266
1231
  { label: '#', def: 'no', isSelected: true, isEditable: false },
1267
1232
  { label: 'Issue #', def: 'issue_number', isSelected: true, isEditable: false },
1268
1233
  { label: 'Product', def: 'product', isSelected: true, isEditable: false },
1234
+ { label: 'Average Cost', def: 'average_cost', isSelected: false, isEditable: true },
1269
1235
  { label: 'Product Categories', def: 'product_categories', isSelected: false, isEditable: true, isExportable: false },
1270
1236
  { label: 'Categories', def: 'categories', isSelected: false, isEditable: false, isExportable: true },
1271
1237
  { label: 'SKU', def: 'sku', isSelected: true, isEditable: false },
@@ -1302,11 +1268,12 @@ let StockIssueProductListComponent = class StockIssueProductListComponent extend
1302
1268
  get footerColumns() {
1303
1269
  return this.displayedColumns.map(col => `footer-${col}`);
1304
1270
  }
1305
- constructor(service, formBuilder, featureService) {
1271
+ constructor(service, formBuilder, featureService, datePipe) {
1306
1272
  super();
1307
1273
  this.service = service;
1308
1274
  this.formBuilder = formBuilder;
1309
1275
  this.featureService = featureService;
1276
+ this.datePipe = datePipe;
1310
1277
  this.filterFormConfiguration = {
1311
1278
  date_from: { date: true },
1312
1279
  date_to: { date: true },
@@ -1350,6 +1317,16 @@ let StockIssueProductListComponent = class StockIssueProductListComponent extend
1350
1317
  this.listenFilterChanges();
1351
1318
  this.loadData();
1352
1319
  }
1320
+ loadData() {
1321
+ let filters = this.filterForm.value;
1322
+ filters.date_from = this.datePipe.transform(filters.date_from, 'yyyy-mm-dd') ?? '';
1323
+ filters.date_to = this.datePipe.transform(filters.date_to, 'yyyy-mm-dd') ?? '';
1324
+ if (this.issuableData()) {
1325
+ filters.issuable_ids = this.issuableData()?.issuable_id;
1326
+ filters.issuable_type = this.issuableData()?.issuable_type;
1327
+ }
1328
+ super.loadData(filters);
1329
+ }
1353
1330
  loadFeatures() {
1354
1331
  if (this.featureService.isFeatureExists('product-batch-numbers')) {
1355
1332
  const qtyIndex = this.columnConfig.findIndex(c => c.def === 'quantity');
@@ -1358,16 +1335,16 @@ let StockIssueProductListComponent = class StockIssueProductListComponent extend
1358
1335
  }
1359
1336
  }
1360
1337
  }
1361
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueProductListComponent, deps: [{ token: StockIssueProductService }, { token: i2$1.FormBuilder }, { token: i1.TechlifyFeatureService }], target: i0.ɵɵFactoryTarget.Component });
1362
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: StockIssueProductListComponent, selector: "app-stock-issue-products-list", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, isProductView: { classPropertyName: "isProductView", publicName: "isProductView", isSignal: true, isRequired: false, transformFunction: null }, selectedColumns: { classPropertyName: "selectedColumns", publicName: "selectedColumns", isSignal: true, isRequired: false, transformFunction: null }, exportInProgress: { classPropertyName: "exportInProgress", publicName: "exportInProgress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { listUpdated: "listUpdated", columnConfigReady: "columnConfigReady" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-header *ngIf=\"isProductView()\" class=\"d-flex align-items-center gap-2\">\n <mat-card-title>Stock Issues</mat-card-title>\n <app-techlify-icon role='button' name='add'\n [routerLink]=\"['/inventory/stock-issues/form']\"></app-techlify-icon>\n </mat-card-header>\n\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issue Products\" infiniteScroll\n id=\"stockIssueTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\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 <ng-container matColumnDef=\"issue_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Issue ID\">Issue #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/stock-issues', element?.stock_issue_id, 'view']\">\n {{ element?.stock_issue_id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </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 <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges [product]=\"element?.product\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngFor=\"let category of element?.product?.categories; let last = last\">\n {{ category?.title }}<ng-container *ngIf=\"!last\">, </ng-container>\n </span>\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?.stock_issue?.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\">\n {{ element?.quantity }} {{ element?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Measure Column -->\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 <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-dark\" *ngIf=\"element?.stock_issue?.issuable\"\n [routerLink]=\"['/maintenances', element?.stock_issue?.issuable_id, 'view']\">\n Maintenance for {{ element?.stock_issue?.issuable?.fixed_asset?.name }}\n </a>\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 <!-- 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?.stock_issue?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.stock_issue?.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 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', element?.stock_issue_id, 'view']\"></app-techlify-icon>\n <app-stock-issue-product-form-button [stockIssueProduct]=\"element\" [stockIssueId]=\"element?.stock_issue_id\"\n (saved)=\"reload()\">\n </app-stock-issue-product-form-button>\n <app-techlify-delete-button [service]=\"service\" [model]=\"element\"\n [data]='{title: element?.product?.name, type: \"Stock Issue Product\"}'\n (deleted)=\"reload()\"></app-techlify-delete-button>\n </div>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-issue_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i8.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i8.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i8.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i8.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i8.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i4$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "component", type: StockIssueProductFormButtonComponent, selector: "app-stock-issue-product-form-button", inputs: ["stockIssueProduct", "stockIssueId"], outputs: ["saved"] }, { kind: "component", type: i1.TechlifyDeleteButtonComponent, selector: "app-techlify-delete-button", inputs: ["data", "model", "message", "service"], outputs: ["deleted"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
1338
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueProductListComponent, deps: [{ token: StockIssueProductService }, { token: i2$1.FormBuilder }, { token: i1.TechlifyFeatureService }, { token: i3.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
1339
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: StockIssueProductListComponent, selector: "app-stock-issue-products-list", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, isProductView: { classPropertyName: "isProductView", publicName: "isProductView", isSignal: true, isRequired: false, transformFunction: null }, selectedColumns: { classPropertyName: "selectedColumns", publicName: "selectedColumns", isSignal: true, isRequired: false, transformFunction: null }, exportInProgress: { classPropertyName: "exportInProgress", publicName: "exportInProgress", isSignal: true, isRequired: false, transformFunction: null }, issuableData: { classPropertyName: "issuableData", publicName: "issuableData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedColumns: "selectedColumnsChange", listUpdated: "listUpdated", columnConfigReady: "columnConfigReady" }, providers: [DatePipe], usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-header *ngIf=\"isProductView()\" class=\"d-flex align-items-center gap-2\">\n <mat-card-title>Stock Issues</mat-card-title>\n <app-techlify-icon role='button' name='add' [routerLink]=\"['/inventory/stock-issues/form']\"></app-techlify-icon>\n <app-column-selector *ngIf=\"columnConfig.length > 0\" mode=\"icon\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </mat-card-header>\n\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issue Products\" infiniteScroll\n id=\"stockIssueTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\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 <ng-container matColumnDef=\"issue_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Issue ID\">Issue #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/stock-issues', element?.stock_issue_id, 'view']\">\n {{ element?.stock_issue_id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </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 <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Average Price Column -->\n <ng-container matColumnDef=\"average_cost\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Average Cost</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.average_cost | currency: 'USD'}}\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges [product]=\"element?.product\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngFor=\"let category of element?.product?.categories; let last = last\">\n {{ category?.title }}<ng-container *ngIf=\"!last\">, </ng-container>\n </span>\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?.stock_issue?.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\">\n {{ element?.quantity }} {{ element?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Measure Column -->\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 <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-dark\" *ngIf=\"element?.stock_issue?.issuable\"\n [routerLink]=\"['/maintenances', element?.stock_issue?.issuable_id, 'view']\">\n Maintenance for {{ element?.stock_issue?.issuable?.fixed_asset?.name }}\n </a>\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 <!-- 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?.stock_issue?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.stock_issue?.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 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', element?.stock_issue_id, 'view']\"></app-techlify-icon>\n <app-techlify-form-button [component]=\"stockIssueProductForm()\" [model]=\"element\"\n [data]=\"{ stockIssueId: element?.stock_issue_id, product: element?.product }\" width=\"500px\"\n (saved)=\"modelsUpdatedById($event)\">\n </app-techlify-form-button>\n <app-techlify-delete-button [service]=\"service\" [model]=\"element\"\n [data]='{title: element?.product?.name, type: \"Stock Issue Product\"}'\n (deleted)=\"reload()\"></app-techlify-delete-button>\n </div>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-issue_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-average_cost\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i8.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i8.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i8.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i8.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i8.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i4$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "component", type: i1.TechlifyFormButtonComponent, selector: "app-techlify-form-button", inputs: ["component", "model", "data", "width"], outputs: ["saved"] }, { kind: "component", type: i1.TechlifyDeleteButtonComponent, selector: "app-techlify-delete-button", inputs: ["data", "model", "message", "service"], outputs: ["deleted"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
1363
1340
  };
1364
1341
  StockIssueProductListComponent = __decorate([
1365
1342
  UntilDestroy()
1366
1343
  ], StockIssueProductListComponent);
1367
1344
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueProductListComponent, decorators: [{
1368
1345
  type: Component,
1369
- args: [{ selector: 'app-stock-issue-products-list', template: "<mat-card>\n <mat-card-header *ngIf=\"isProductView()\" class=\"d-flex align-items-center gap-2\">\n <mat-card-title>Stock Issues</mat-card-title>\n <app-techlify-icon role='button' name='add'\n [routerLink]=\"['/inventory/stock-issues/form']\"></app-techlify-icon>\n </mat-card-header>\n\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issue Products\" infiniteScroll\n id=\"stockIssueTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\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 <ng-container matColumnDef=\"issue_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Issue ID\">Issue #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/stock-issues', element?.stock_issue_id, 'view']\">\n {{ element?.stock_issue_id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </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 <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges [product]=\"element?.product\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngFor=\"let category of element?.product?.categories; let last = last\">\n {{ category?.title }}<ng-container *ngIf=\"!last\">, </ng-container>\n </span>\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?.stock_issue?.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\">\n {{ element?.quantity }} {{ element?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Measure Column -->\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 <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-dark\" *ngIf=\"element?.stock_issue?.issuable\"\n [routerLink]=\"['/maintenances', element?.stock_issue?.issuable_id, 'view']\">\n Maintenance for {{ element?.stock_issue?.issuable?.fixed_asset?.name }}\n </a>\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 <!-- 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?.stock_issue?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.stock_issue?.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 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', element?.stock_issue_id, 'view']\"></app-techlify-icon>\n <app-stock-issue-product-form-button [stockIssueProduct]=\"element\" [stockIssueId]=\"element?.stock_issue_id\"\n (saved)=\"reload()\">\n </app-stock-issue-product-form-button>\n <app-techlify-delete-button [service]=\"service\" [model]=\"element\"\n [data]='{title: element?.product?.name, type: \"Stock Issue Product\"}'\n (deleted)=\"reload()\"></app-techlify-delete-button>\n </div>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-issue_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>" }]
1370
- }], ctorParameters: () => [{ type: StockIssueProductService }, { type: i2$1.FormBuilder }, { type: i1.TechlifyFeatureService }] });
1346
+ args: [{ selector: 'app-stock-issue-products-list', providers: [DatePipe], template: "<mat-card>\n <mat-card-header *ngIf=\"isProductView()\" class=\"d-flex align-items-center gap-2\">\n <mat-card-title>Stock Issues</mat-card-title>\n <app-techlify-icon role='button' name='add' [routerLink]=\"['/inventory/stock-issues/form']\"></app-techlify-icon>\n <app-column-selector *ngIf=\"columnConfig.length > 0\" mode=\"icon\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </mat-card-header>\n\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issue Products\" infiniteScroll\n id=\"stockIssueTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\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 <ng-container matColumnDef=\"issue_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Issue ID\">Issue #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/stock-issues', element?.stock_issue_id, 'view']\">\n {{ element?.stock_issue_id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </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 <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.product?.id, 'view']\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Average Price Column -->\n <ng-container matColumnDef=\"average_cost\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Average Cost</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.average_cost | currency: 'USD'}}\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges [product]=\"element?.product\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngFor=\"let category of element?.product?.categories; let last = last\">\n {{ category?.title }}<ng-container *ngIf=\"!last\">, </ng-container>\n </span>\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?.stock_issue?.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\">\n {{ element?.quantity }} {{ element?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Measure Column -->\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 <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-dark\" *ngIf=\"element?.stock_issue?.issuable\"\n [routerLink]=\"['/maintenances', element?.stock_issue?.issuable_id, 'view']\">\n Maintenance for {{ element?.stock_issue?.issuable?.fixed_asset?.name }}\n </a>\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 <!-- 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?.stock_issue?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.stock_issue?.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 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', element?.stock_issue_id, 'view']\"></app-techlify-icon>\n <app-techlify-form-button [component]=\"stockIssueProductForm()\" [model]=\"element\"\n [data]=\"{ stockIssueId: element?.stock_issue_id, product: element?.product }\" width=\"500px\"\n (saved)=\"modelsUpdatedById($event)\">\n </app-techlify-form-button>\n <app-techlify-delete-button [service]=\"service\" [model]=\"element\"\n [data]='{title: element?.product?.name, type: \"Stock Issue Product\"}'\n (deleted)=\"reload()\"></app-techlify-delete-button>\n </div>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-issue_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-average_cost\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>" }]
1347
+ }], ctorParameters: () => [{ type: StockIssueProductService }, { type: i2$1.FormBuilder }, { type: i1.TechlifyFeatureService }, { type: i3.DatePipe }] });
1371
1348
 
1372
1349
  class StockTransferService extends TechlifyService {
1373
1350
  constructor(httpService) {
@@ -1749,11 +1726,11 @@ class ProductBasicInfoComponent {
1749
1726
  });
1750
1727
  }
1751
1728
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductBasicInfoComponent, deps: [{ token: StockSummaryService }, { token: ProductService }], target: i0.ɵɵFactoryTarget.Component });
1752
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", 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\n <!-- Header: Image + Product Info + Actions -->\n <mat-card-content class=\"d-flex gap-3 align-items-start\">\n <div class=\"product-image-container rounded overflow-hidden flex-shrink-0\">\n <img *ngIf=\"product?.image_file_url\" [src]=\"product.image_file_url\" alt=\"{{ product?.name }}\"\n class=\"w-100 h-100 object-fit-cover\" />\n <div *ngIf=\"!product?.image_file_url\"\n class=\"w-100 h-100 bg-secondary-subtle d-flex align-items-center justify-content-center rounded\">\n <span class=\"material-symbols-outlined text-secondary\" style=\"font-size: 40px;\">inventory_2</span>\n </div>\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"d-flex justify-content-between align-items-start\">\n <div>\n <h5 class=\"fw-semibold mb-1\">{{ product?.name }}</h5>\n <div class=\"d-flex align-items-center gap-1 text-secondary small flex-wrap\">\n <span>{{ product?.sku }}</span>\n <span> \u2022 </span>\n <span>{{ product?.type?.title }}</span>\n <span> \u2022 </span>\n <span class=\"material-symbols-outlined\" style=\"font-size: 16px;\">view_in_ar</span>\n <span>{{ product?.measure?.title }}</span>\n </div>\n </div>\n <div class=\"d-flex gap-2 flex-shrink-0 align-middle text-secondary\">\n <app-product-form-button [product]=\"product\" (saved)=\"onProductSaved($event)\"></app-product-form-button>\n <app-techlify-delete-button [model]=\"product\" [data]=\"{type: 'Product', title: product?.name}\"\n [service]=\"service\"></app-techlify-delete-button>\n </div>\n </div>\n\n <!-- Categories -->\n <div *ngIf=\"product?.categories?.length\" class=\"d-flex flex-wrap gap-1 mt-2\">\n <span class=\"badge border bg-light text-dark fw-medium\" *ngFor=\"let category of product?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </div>\n </mat-card-content>\n\n <!-- Stock Summary Row -->\n <mat-card-content class=\"d-flex flex-row justify-content-between py-3\">\n <!-- Stock Receipts -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column\">\n <small class=\"text-secondary\">Stock Receipts</small>\n <p class=\"mb-0 fw-semibold fs-2\">{{ stockSummary?.stock_receipts_quantity_sum | number }}</p>\n <small *ngIf=\"product?.last_stock_receipt\" class=\"text-secondary\">\n Last Added On {{ product?.last_stock_receipt?.date | date: 'MMM d, y' }}\n </small>\n </div>\n\n <!-- Stock Issues -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column\">\n <small class=\"text-secondary\">Stock Issues</small>\n <p class=\"mb-0 fw-semibold fs-2\">{{ stockSummary?.stock_issuances_quantity_sum | number }}</p>\n <small *ngIf=\"product?.last_stock_issue\" class=\"text-secondary\">\n Last Added On {{ product?.last_stock_issue?.date | date: 'MMM d, y' }}\n </small>\n </div>\n\n <!-- On Hand -->\n <div class=\"d-flex flex-column\">\n <small class=\"text-secondary\">On Hand</small>\n <p class=\"mb-0 fw-semibold fs-2 text-success\"\n [ngClass]=\"{ 'text-danger': product?.stock_on_hand < product?.reorder_point }\">{{ product?.stock_on_hand |\n number }}</p>\n <small *ngIf=\"product?.reorder_point\" class=\"text-secondary\">\n Reorder At {{ product?.reorder_point }}\n </small>\n </div>\n </mat-card-content>\n\n <!-- Description -->\n <mat-card-content *ngIf=\"product?.description\" class=\"pt-2\">\n <small class=\"text-secondary\">Description</small>\n <p class=\"mb-0 mt-1\">{{ product?.description }}</p>\n </mat-card-content>\n\n <div class=\"d-flex flex-row justify-content-around align-items-center w-100 mt-2\">\n <ngx-barcode6 [bc-value]=\"product?.sku\" [bc-display-value]=\"true\">\n </ngx-barcode6>\n\n <qrcode [qrdata]=\"product?.sku\" [width]=\"128\"></qrcode>\n </div>\n\n</mat-card>", styles: [".product-image-container{width:80px;height:80px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5$1.QRCodeComponent, selector: "qrcode", inputs: ["allowEmptyString", "colorDark", "colorLight", "cssClass", "elementType", "errorCorrectionLevel", "imageSrc", "imageHeight", "imageWidth", "margin", "qrdata", "scale", "version", "width", "alt", "ariaLabel", "title"], outputs: ["qrCodeURL"] }, { kind: "component", type: i6$2.NgxBarcode6, selector: "ngx-barcode6", inputs: ["bc-element-type", "bc-class", "bc-format", "bc-line-color", "bc-width", "bc-height", "bc-display-value", "bc-font-options", "bc-font", "bc-text-align", "bc-text-position", "bc-text-margin", "bc-font-size", "bc-background", "bc-margin", "bc-margin-top", "bc-margin-bottom", "bc-margin-left", "bc-margin-right", "bc-value", "bc-valid"] }, { kind: "component", type: i1.TechlifyDeleteButtonComponent, selector: "app-techlify-delete-button", inputs: ["data", "model", "message", "service"], outputs: ["deleted"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"] }, { kind: "pipe", type: i3.DecimalPipe, name: "number" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
1729
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", 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\n <!-- Header: Image + Product Info + Actions -->\n <mat-card-content class=\"d-flex gap-3 align-items-start\">\n <div class=\"product-image-container rounded overflow-hidden flex-shrink-0\">\n <img *ngIf=\"product?.image_file_url\" [src]=\"product.image_file_url\" alt=\"{{ product?.name }}\"\n class=\"w-100 h-100 object-fit-cover\" />\n <div *ngIf=\"!product?.image_file_url\"\n class=\"w-100 h-100 bg-secondary-subtle d-flex align-items-center justify-content-center rounded\">\n <span class=\"material-symbols-outlined text-secondary\" style=\"font-size: 40px;\">inventory_2</span>\n </div>\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"d-flex justify-content-between align-items-start\">\n <div>\n <h5 class=\"fw-semibold mb-1\">{{ product?.name }}</h5>\n <div class=\"d-flex align-items-center gap-1 text-secondary small flex-wrap\">\n <span>{{ product?.sku }}</span>\n <span> \u2022 </span>\n <span>{{ product?.type?.title }}</span>\n <span> \u2022 </span>\n <span class=\"material-symbols-outlined\" style=\"font-size: 16px;\">view_in_ar</span>\n <span>{{ product?.measure?.title }}</span>\n </div>\n <div *ngIf=\"product?.average_cost != null\" class=\"d-flex align-items-center gap-1 text-secondary small\">\n <i class=\"fa-solid fa-money-bill\"></i>\n <span>{{ product?.average_cost | currency }}</span>\n </div>\n </div>\n <div class=\"d-flex gap-2 flex-shrink-0 align-middle text-secondary\">\n <app-product-form-button [product]=\"product\" (saved)=\"onProductSaved($event)\"></app-product-form-button>\n <app-techlify-delete-button [model]=\"product\" [data]=\"{type: 'Product', title: product?.name}\"\n [service]=\"service\"></app-techlify-delete-button>\n </div>\n </div>\n\n <!-- Categories -->\n <div *ngIf=\"product?.categories?.length\" class=\"d-flex flex-wrap gap-1 mt-2\">\n <span class=\"badge border bg-light text-dark fw-medium\" *ngFor=\"let category of product?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </div>\n </mat-card-content>\n\n <!-- Stock Summary Row -->\n <mat-card-content class=\"d-flex flex-row justify-content-between py-3\">\n <!-- Stock Receipts -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column\">\n <small class=\"text-secondary\">Stock Receipts</small>\n <p class=\"mb-0 fw-semibold fs-2\">{{ stockSummary?.stock_receipts_quantity_sum | number }}</p>\n <small *ngIf=\"product?.last_stock_receipt\" class=\"text-secondary\">\n Last Added On {{ product?.last_stock_receipt?.date | date: 'MMM d, y' }}\n </small>\n </div>\n\n <!-- Stock Issues -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column\">\n <small class=\"text-secondary\">Stock Issues</small>\n <p class=\"mb-0 fw-semibold fs-2\">{{ stockSummary?.stock_issuances_quantity_sum | number }}</p>\n <small *ngIf=\"product?.last_stock_issue\" class=\"text-secondary\">\n Last Added On {{ product?.last_stock_issue?.date | date: 'MMM d, y' }}\n </small>\n </div>\n\n <!-- On Hand -->\n <div class=\"d-flex flex-column\">\n <small class=\"text-secondary\">On Hand</small>\n <p class=\"mb-0 fw-semibold fs-2 text-success\"\n [ngClass]=\"{ 'text-danger': product?.stock_on_hand < product?.reorder_point }\">{{ product?.stock_on_hand |\n number }}</p>\n <small *ngIf=\"product?.reorder_point\" class=\"text-secondary\">\n Reorder At {{ product?.reorder_point }}\n </small>\n </div>\n </mat-card-content>\n\n <!-- Description -->\n <mat-card-content *ngIf=\"product?.description\" class=\"pt-2\">\n <small class=\"text-secondary\">Description</small>\n <p class=\"mb-0 mt-1\">{{ product?.description }}</p>\n </mat-card-content>\n\n <div class=\"d-flex flex-row justify-content-around align-items-center w-100 mt-2\">\n <ngx-barcode6 [bc-value]=\"product?.sku\" [bc-display-value]=\"true\">\n </ngx-barcode6>\n\n <qrcode [qrdata]=\"product?.sku\" [width]=\"128\"></qrcode>\n </div>\n\n</mat-card>", styles: [".product-image-container{width:80px;height:80px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5$1.QRCodeComponent, selector: "qrcode", inputs: ["allowEmptyString", "colorDark", "colorLight", "cssClass", "elementType", "errorCorrectionLevel", "imageSrc", "imageHeight", "imageWidth", "margin", "qrdata", "scale", "version", "width", "alt", "ariaLabel", "title"], outputs: ["qrCodeURL"] }, { kind: "component", type: i6$2.NgxBarcode6, selector: "ngx-barcode6", inputs: ["bc-element-type", "bc-class", "bc-format", "bc-line-color", "bc-width", "bc-height", "bc-display-value", "bc-font-options", "bc-font", "bc-text-align", "bc-text-position", "bc-text-margin", "bc-font-size", "bc-background", "bc-margin", "bc-margin-top", "bc-margin-bottom", "bc-margin-left", "bc-margin-right", "bc-value", "bc-valid"] }, { kind: "component", type: i1.TechlifyDeleteButtonComponent, selector: "app-techlify-delete-button", inputs: ["data", "model", "message", "service"], outputs: ["deleted"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"] }, { kind: "pipe", type: i3.DecimalPipe, name: "number" }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
1753
1730
  }
1754
1731
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductBasicInfoComponent, decorators: [{
1755
1732
  type: Component,
1756
- args: [{ selector: 'app-product-basic-info', template: "<mat-card *ngIf=\"product\" class=\"w-100\">\n\n <!-- Header: Image + Product Info + Actions -->\n <mat-card-content class=\"d-flex gap-3 align-items-start\">\n <div class=\"product-image-container rounded overflow-hidden flex-shrink-0\">\n <img *ngIf=\"product?.image_file_url\" [src]=\"product.image_file_url\" alt=\"{{ product?.name }}\"\n class=\"w-100 h-100 object-fit-cover\" />\n <div *ngIf=\"!product?.image_file_url\"\n class=\"w-100 h-100 bg-secondary-subtle d-flex align-items-center justify-content-center rounded\">\n <span class=\"material-symbols-outlined text-secondary\" style=\"font-size: 40px;\">inventory_2</span>\n </div>\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"d-flex justify-content-between align-items-start\">\n <div>\n <h5 class=\"fw-semibold mb-1\">{{ product?.name }}</h5>\n <div class=\"d-flex align-items-center gap-1 text-secondary small flex-wrap\">\n <span>{{ product?.sku }}</span>\n <span> \u2022 </span>\n <span>{{ product?.type?.title }}</span>\n <span> \u2022 </span>\n <span class=\"material-symbols-outlined\" style=\"font-size: 16px;\">view_in_ar</span>\n <span>{{ product?.measure?.title }}</span>\n </div>\n </div>\n <div class=\"d-flex gap-2 flex-shrink-0 align-middle text-secondary\">\n <app-product-form-button [product]=\"product\" (saved)=\"onProductSaved($event)\"></app-product-form-button>\n <app-techlify-delete-button [model]=\"product\" [data]=\"{type: 'Product', title: product?.name}\"\n [service]=\"service\"></app-techlify-delete-button>\n </div>\n </div>\n\n <!-- Categories -->\n <div *ngIf=\"product?.categories?.length\" class=\"d-flex flex-wrap gap-1 mt-2\">\n <span class=\"badge border bg-light text-dark fw-medium\" *ngFor=\"let category of product?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </div>\n </mat-card-content>\n\n <!-- Stock Summary Row -->\n <mat-card-content class=\"d-flex flex-row justify-content-between py-3\">\n <!-- Stock Receipts -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column\">\n <small class=\"text-secondary\">Stock Receipts</small>\n <p class=\"mb-0 fw-semibold fs-2\">{{ stockSummary?.stock_receipts_quantity_sum | number }}</p>\n <small *ngIf=\"product?.last_stock_receipt\" class=\"text-secondary\">\n Last Added On {{ product?.last_stock_receipt?.date | date: 'MMM d, y' }}\n </small>\n </div>\n\n <!-- Stock Issues -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column\">\n <small class=\"text-secondary\">Stock Issues</small>\n <p class=\"mb-0 fw-semibold fs-2\">{{ stockSummary?.stock_issuances_quantity_sum | number }}</p>\n <small *ngIf=\"product?.last_stock_issue\" class=\"text-secondary\">\n Last Added On {{ product?.last_stock_issue?.date | date: 'MMM d, y' }}\n </small>\n </div>\n\n <!-- On Hand -->\n <div class=\"d-flex flex-column\">\n <small class=\"text-secondary\">On Hand</small>\n <p class=\"mb-0 fw-semibold fs-2 text-success\"\n [ngClass]=\"{ 'text-danger': product?.stock_on_hand < product?.reorder_point }\">{{ product?.stock_on_hand |\n number }}</p>\n <small *ngIf=\"product?.reorder_point\" class=\"text-secondary\">\n Reorder At {{ product?.reorder_point }}\n </small>\n </div>\n </mat-card-content>\n\n <!-- Description -->\n <mat-card-content *ngIf=\"product?.description\" class=\"pt-2\">\n <small class=\"text-secondary\">Description</small>\n <p class=\"mb-0 mt-1\">{{ product?.description }}</p>\n </mat-card-content>\n\n <div class=\"d-flex flex-row justify-content-around align-items-center w-100 mt-2\">\n <ngx-barcode6 [bc-value]=\"product?.sku\" [bc-display-value]=\"true\">\n </ngx-barcode6>\n\n <qrcode [qrdata]=\"product?.sku\" [width]=\"128\"></qrcode>\n </div>\n\n</mat-card>", styles: [".product-image-container{width:80px;height:80px}\n"] }]
1733
+ args: [{ selector: 'app-product-basic-info', template: "<mat-card *ngIf=\"product\" class=\"w-100\">\n\n <!-- Header: Image + Product Info + Actions -->\n <mat-card-content class=\"d-flex gap-3 align-items-start\">\n <div class=\"product-image-container rounded overflow-hidden flex-shrink-0\">\n <img *ngIf=\"product?.image_file_url\" [src]=\"product.image_file_url\" alt=\"{{ product?.name }}\"\n class=\"w-100 h-100 object-fit-cover\" />\n <div *ngIf=\"!product?.image_file_url\"\n class=\"w-100 h-100 bg-secondary-subtle d-flex align-items-center justify-content-center rounded\">\n <span class=\"material-symbols-outlined text-secondary\" style=\"font-size: 40px;\">inventory_2</span>\n </div>\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"d-flex justify-content-between align-items-start\">\n <div>\n <h5 class=\"fw-semibold mb-1\">{{ product?.name }}</h5>\n <div class=\"d-flex align-items-center gap-1 text-secondary small flex-wrap\">\n <span>{{ product?.sku }}</span>\n <span> \u2022 </span>\n <span>{{ product?.type?.title }}</span>\n <span> \u2022 </span>\n <span class=\"material-symbols-outlined\" style=\"font-size: 16px;\">view_in_ar</span>\n <span>{{ product?.measure?.title }}</span>\n </div>\n <div *ngIf=\"product?.average_cost != null\" class=\"d-flex align-items-center gap-1 text-secondary small\">\n <i class=\"fa-solid fa-money-bill\"></i>\n <span>{{ product?.average_cost | currency }}</span>\n </div>\n </div>\n <div class=\"d-flex gap-2 flex-shrink-0 align-middle text-secondary\">\n <app-product-form-button [product]=\"product\" (saved)=\"onProductSaved($event)\"></app-product-form-button>\n <app-techlify-delete-button [model]=\"product\" [data]=\"{type: 'Product', title: product?.name}\"\n [service]=\"service\"></app-techlify-delete-button>\n </div>\n </div>\n\n <!-- Categories -->\n <div *ngIf=\"product?.categories?.length\" class=\"d-flex flex-wrap gap-1 mt-2\">\n <span class=\"badge border bg-light text-dark fw-medium\" *ngFor=\"let category of product?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </div>\n </mat-card-content>\n\n <!-- Stock Summary Row -->\n <mat-card-content class=\"d-flex flex-row justify-content-between py-3\">\n <!-- Stock Receipts -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column\">\n <small class=\"text-secondary\">Stock Receipts</small>\n <p class=\"mb-0 fw-semibold fs-2\">{{ stockSummary?.stock_receipts_quantity_sum | number }}</p>\n <small *ngIf=\"product?.last_stock_receipt\" class=\"text-secondary\">\n Last Added On {{ product?.last_stock_receipt?.date | date: 'MMM d, y' }}\n </small>\n </div>\n\n <!-- Stock Issues -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column\">\n <small class=\"text-secondary\">Stock Issues</small>\n <p class=\"mb-0 fw-semibold fs-2\">{{ stockSummary?.stock_issuances_quantity_sum | number }}</p>\n <small *ngIf=\"product?.last_stock_issue\" class=\"text-secondary\">\n Last Added On {{ product?.last_stock_issue?.date | date: 'MMM d, y' }}\n </small>\n </div>\n\n <!-- On Hand -->\n <div class=\"d-flex flex-column\">\n <small class=\"text-secondary\">On Hand</small>\n <p class=\"mb-0 fw-semibold fs-2 text-success\"\n [ngClass]=\"{ 'text-danger': product?.stock_on_hand < product?.reorder_point }\">{{ product?.stock_on_hand |\n number }}</p>\n <small *ngIf=\"product?.reorder_point\" class=\"text-secondary\">\n Reorder At {{ product?.reorder_point }}\n </small>\n </div>\n </mat-card-content>\n\n <!-- Description -->\n <mat-card-content *ngIf=\"product?.description\" class=\"pt-2\">\n <small class=\"text-secondary\">Description</small>\n <p class=\"mb-0 mt-1\">{{ product?.description }}</p>\n </mat-card-content>\n\n <div class=\"d-flex flex-row justify-content-around align-items-center w-100 mt-2\">\n <ngx-barcode6 [bc-value]=\"product?.sku\" [bc-display-value]=\"true\">\n </ngx-barcode6>\n\n <qrcode [qrdata]=\"product?.sku\" [width]=\"128\"></qrcode>\n </div>\n\n</mat-card>", styles: [".product-image-container{width:80px;height:80px}\n"] }]
1757
1734
  }], ctorParameters: () => [{ type: StockSummaryService }, { type: ProductService }], propDecorators: { product: [{
1758
1735
  type: Input
1759
1736
  }], saved: [{
@@ -1817,7 +1794,7 @@ class ProductViewPageComponent {
1817
1794
  this.location.back();
1818
1795
  }
1819
1796
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductViewPageComponent, deps: [{ token: ProductService }, { token: i4$1.ActivatedRoute }, { token: i3.Location }], target: i0.ɵɵFactoryTarget.Component });
1820
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductViewPageComponent, selector: "app-product-view-page", viewQueries: [{ propertyName: "productLocationList", first: true, predicate: ["productLocationList"], descendants: true }, { propertyName: "stockTransferList", first: true, predicate: ["stockTransferList"], descendants: true }, { propertyName: "stockReceiptsListPage", first: true, predicate: ["stockReceiptsListPage"], descendants: true }, { propertyName: "stockIssueProductListPage", first: true, predicate: ["stockIssueProductListPage"], 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 w-100\">\n <div *ngIf=\"product\" class=\"d-flex justify-content-start align-items-start gap-3 w-100\">\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(); stockIssueProductListPage.reload()\"\n #productLocationList></app-product-location-list>\n\n <app-note-list labelText=\"Notes\" viewMode=\"timeline\" modelType=\"Product\"\n [relatedModelId]=\"product.id\"></app-note-list>\n\n </div>\n <div class=\"d-flex flex-column gap-3 w-100\">\n <app-stock-receipt-product-list #stockReceiptsListPage [filters]=\"{ product_ids: product?.id }\"\n [isProductView]=\"true\" (listUpdated)=\"getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-receipt-product-list>\n\n <app-stock-issue-products-list #stockIssueProductListPage [isProductView]=\"true\"\n [filters]=\"{ product_ids: product?.id }\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-issue-products-list>\n\n <app-stock-transfer-list #stockTransferList *ngIf=\"product\" [productId]=\"product.id\"></app-stock-transfer-list>\n </div>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: StockReceiptProductsListComponent, selector: "app-stock-receipt-product-list", inputs: ["filters", "isProductView", "selectedColumns", "exportInProgress"], outputs: ["listUpdated", "columnConfigReady"] }, { kind: "component", type: StockIssueProductListComponent, selector: "app-stock-issue-products-list", inputs: ["filters", "isProductView", "selectedColumns", "exportInProgress"], outputs: ["listUpdated", "columnConfigReady"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: ProductLocationListComponent, selector: "app-product-location-list", inputs: ["product"], outputs: ["updated"] }, { kind: "component", type: StockTransferListComponent, selector: "app-stock-transfer-list", inputs: ["productId"] }, { kind: "component", type: i1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "component", type: ProductBasicInfoComponent, selector: "app-product-basic-info", inputs: ["product"], outputs: ["saved", "deleted"] }], preserveWhitespaces: true });
1797
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductViewPageComponent, selector: "app-product-view-page", viewQueries: [{ propertyName: "productLocationList", first: true, predicate: ["productLocationList"], descendants: true }, { propertyName: "stockTransferList", first: true, predicate: ["stockTransferList"], descendants: true }, { propertyName: "stockReceiptsListPage", first: true, predicate: ["stockReceiptsListPage"], descendants: true }, { propertyName: "stockIssueProductListPage", first: true, predicate: ["stockIssueProductListPage"], 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 w-100\">\n <div *ngIf=\"product\" class=\"d-flex justify-content-start align-items-start gap-3 w-100\">\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(); stockIssueProductListPage.reload()\"\n #productLocationList></app-product-location-list>\n\n <app-note-list labelText=\"Notes\" viewMode=\"timeline\" modelType=\"Product\"\n [relatedModelId]=\"product.id\"></app-note-list>\n\n </div>\n <div class=\"d-flex flex-column gap-3 w-100\">\n <app-stock-receipt-product-list #stockReceiptsListPage [filters]=\"{ product_ids: product?.id }\"\n [isProductView]=\"true\" (listUpdated)=\"getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-receipt-product-list>\n\n <app-stock-issue-products-list #stockIssueProductListPage [isProductView]=\"true\"\n [filters]=\"{ product_ids: product?.id }\" (listUpdated)=\"\n getProduct(this.id);\n productBasicInfoComponent.loadProductStocksSummary();\n productLocationList.reload();\n \"></app-stock-issue-products-list>\n\n <app-stock-transfer-list #stockTransferList *ngIf=\"product\" [productId]=\"product.id\"></app-stock-transfer-list>\n </div>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: StockReceiptProductsListComponent, selector: "app-stock-receipt-product-list", inputs: ["filters", "isProductView", "selectedColumns", "exportInProgress"], outputs: ["listUpdated", "columnConfigReady"] }, { kind: "component", type: StockIssueProductListComponent, selector: "app-stock-issue-products-list", inputs: ["filters", "isProductView", "selectedColumns", "exportInProgress", "issuableData"], outputs: ["selectedColumnsChange", "listUpdated", "columnConfigReady"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: ProductLocationListComponent, selector: "app-product-location-list", inputs: ["product"], outputs: ["updated"] }, { kind: "component", type: StockTransferListComponent, selector: "app-stock-transfer-list", inputs: ["productId"] }, { kind: "component", type: i1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "component", type: ProductBasicInfoComponent, selector: "app-product-basic-info", inputs: ["product"], outputs: ["saved", "deleted"] }], preserveWhitespaces: true });
1821
1798
  }
1822
1799
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductViewPageComponent, decorators: [{
1823
1800
  type: Component,
@@ -3886,6 +3863,7 @@ let StockIssueListComponent = class StockIssueListComponent extends TechlifyList
3886
3863
  exportInProgress = input(false);
3887
3864
  listUpdated = output();
3888
3865
  columnConfigReady = output();
3866
+ issuableData = input(null);
3889
3867
  _defaultSelectedColumns = [];
3890
3868
  columnConfig = [
3891
3869
  { label: '#', def: 'no', isSelected: true, isEditable: false },
@@ -3975,6 +3953,14 @@ let StockIssueListComponent = class StockIssueListComponent extends TechlifyList
3975
3953
  this.listenFilterChanges();
3976
3954
  this.loadData();
3977
3955
  }
3956
+ loadData() {
3957
+ let filters = this.filterForm.value;
3958
+ if (this.issuableData()) {
3959
+ filters.issuable_ids = this.issuableData()?.issuable_id;
3960
+ filters.issuable_type = this.issuableData()?.issuable_type;
3961
+ }
3962
+ super.loadData(filters);
3963
+ }
3978
3964
  loadFeatures() {
3979
3965
  if (this.featureService.isFeatureExists('product-batch-numbers')) {
3980
3966
  const qtyIndex = this.columnConfig.findIndex(c => c.def === 'quantity');
@@ -3987,7 +3973,7 @@ let StockIssueListComponent = class StockIssueListComponent extends TechlifyList
3987
3973
  this.router.navigate(['/inventory/stock-issues', model?.id, 'view']);
3988
3974
  }
3989
3975
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueListComponent, deps: [{ token: StockIssueService }, { token: i2$1.FormBuilder }, { token: i4$1.Router }, { token: i1.TechlifyFeatureService }], target: i0.ɵɵFactoryTarget.Component });
3990
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: StockIssueListComponent, selector: "app-stock-issue-list", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, selectedColumns: { classPropertyName: "selectedColumns", publicName: "selectedColumns", isSignal: true, isRequired: false, transformFunction: null }, exportInProgress: { classPropertyName: "exportInProgress", publicName: "exportInProgress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { listUpdated: "listUpdated", columnConfigReady: "columnConfigReady" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issues\" infiniteScroll\n id=\"stockIssueTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\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 <ng-container matColumnDef=\"issue_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Issue ID\">Issue #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"['/inventory/stock-issues', element?.id, 'view']\">\n {{ element?.id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </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 <ul class=\"mb-0 ps-3\">\n <li *ngFor=\"let sip of element?.stock_issue_products\">\n {{ sip?.quantity }} {{ sip?.product?.measure?.title }} <em>of</em>\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', sip?.product?.id, 'view']\">\n {{ sip?.product?.name }}\n </a>\n </li>\n </ul>\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges\n [product]=\"element?.stock_issue_products[0]?.product\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product?.sku }}</td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngFor=\"let category of element?.stock_issue_products[0]?.product?.categories; let last = last\">\n {{ category?.title }}<ng-container *ngIf=\"!last\">, </ng-container>\n </span>\n </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\">\n {{ element?.stock_issue_products[0]?.quantity }}\n {{ element?.stock_issue_products[0]?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.stock_issue_products[0]?.batch?.batch_number\">\n {{ element?.stock_issue_products[0]?.batch?.batch_number }}\n </p>\n <small class=\"text-secondary\" *ngIf=\"element?.stock_issue_products[0]?.batch?.expires_on\">\n Expires {{ element?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Measure Column -->\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_issue_products[0]?.location_id, 'view']\">\n {{ element?.stock_issue_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-dark\" *ngIf=\"element?.issuable\" [routerLink]=\"['/maintenances', element?.issuable_id, 'view']\">\n Maintenance for {{ element?.issuable?.fixed_asset?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', element?.id, 'view']\"></app-techlify-icon>\n <app-stock-issue-form-button [stockIssue]=\"element\"\n (saved)=\"reload(); listUpdated.emit(true)\"></app-stock-issue-form-button>\n <app-techlify-delete-button [model]=\"element\" [service]=\"service\"\n [data]=\"{ title: element?.id, type: 'Stock Receipt Product' }\" (deleted)=\"reload();\">\n </app-techlify-delete-button>\n </div>\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-issue_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i8.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i8.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i8.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i8.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i8.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssueProduct", "stockIssue", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i4$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "component", type: i1.TechlifyDeleteButtonComponent, selector: "app-techlify-delete-button", inputs: ["data", "model", "message", "service"], outputs: ["deleted"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
3976
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: StockIssueListComponent, selector: "app-stock-issue-list", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, selectedColumns: { classPropertyName: "selectedColumns", publicName: "selectedColumns", isSignal: true, isRequired: false, transformFunction: null }, exportInProgress: { classPropertyName: "exportInProgress", publicName: "exportInProgress", isSignal: true, isRequired: false, transformFunction: null }, issuableData: { classPropertyName: "issuableData", publicName: "issuableData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { listUpdated: "listUpdated", columnConfigReady: "columnConfigReady" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issues\" infiniteScroll\n id=\"stockIssueTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\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 <ng-container matColumnDef=\"issue_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Issue ID\">Issue #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"['/inventory/stock-issues', element?.id, 'view']\">\n {{ element?.id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </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 <ul class=\"mb-0 ps-3\">\n <li *ngFor=\"let sip of element?.stock_issue_products\">\n {{ sip?.quantity }} {{ sip?.product?.measure?.title }} <em>of</em>\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', sip?.product?.id, 'view']\">\n {{ sip?.product?.name }}\n </a>\n </li>\n </ul>\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges\n [product]=\"element?.stock_issue_products[0]?.product\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product?.sku }}</td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngFor=\"let category of element?.stock_issue_products[0]?.product?.categories; let last = last\">\n {{ category?.title }}<ng-container *ngIf=\"!last\">, </ng-container>\n </span>\n </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\">\n {{ element?.stock_issue_products[0]?.quantity }}\n {{ element?.stock_issue_products[0]?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.stock_issue_products[0]?.batch?.batch_number\">\n {{ element?.stock_issue_products[0]?.batch?.batch_number }}\n </p>\n <small class=\"text-secondary\" *ngIf=\"element?.stock_issue_products[0]?.batch?.expires_on\">\n Expires {{ element?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Measure Column -->\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_issue_products[0]?.location_id, 'view']\">\n {{ element?.stock_issue_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-dark\" *ngIf=\"element?.issuable\" [routerLink]=\"['/maintenances', element?.issuable_id, 'view']\">\n Maintenance for {{ element?.issuable?.fixed_asset?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', element?.id, 'view']\"></app-techlify-icon>\n <app-stock-issue-form-button [stockIssue]=\"element\"\n (saved)=\"reload(); listUpdated.emit(true)\"></app-stock-issue-form-button>\n <app-techlify-delete-button [model]=\"element\" [service]=\"service\"\n [data]=\"{ title: element?.id, type: 'Stock Receipt Product' }\" (deleted)=\"reload();\">\n </app-techlify-delete-button>\n </div>\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-issue_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i8.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i8.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i8.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i8.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i8.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssueProduct", "stockIssue", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i4$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "component", type: i1.TechlifyDeleteButtonComponent, selector: "app-techlify-delete-button", inputs: ["data", "model", "message", "service"], outputs: ["deleted"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
3991
3977
  };
3992
3978
  StockIssueListComponent = __decorate([
3993
3979
  UntilDestroy()
@@ -4000,8 +3986,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
4000
3986
  let StockIssuePageComponent = class StockIssuePageComponent {
4001
3987
  formBuilder;
4002
3988
  product;
4003
- issuableType;
4004
- issuableId;
4005
3989
  label = 'Stock Issues';
4006
3990
  showActions = true;
4007
3991
  showFilters = true;
@@ -4010,6 +3994,7 @@ let StockIssuePageComponent = class StockIssuePageComponent {
4010
3994
  groupedList;
4011
3995
  selectedView = signal('itemized');
4012
3996
  exportInProgress = signal(false);
3997
+ issuableData = input(null);
4013
3998
  columnConfig = [];
4014
3999
  selectedColumns = [];
4015
4000
  filterForm;
@@ -4042,20 +4027,16 @@ let StockIssuePageComponent = class StockIssuePageComponent {
4042
4027
  this.selectedColumns = config.filter(col => col.isSelected);
4043
4028
  }
4044
4029
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssuePageComponent, deps: [{ token: i2$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
4045
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssuePageComponent, selector: "app-stock-issue-page", inputs: { product: "product", issuableType: "issuableType", issuableId: "issuableId", label: "label", showActions: "showActions", showFilters: "showFilters" }, outputs: { listUpdated: "listUpdated" }, viewQueries: [{ propertyName: "itemizedList", first: true, predicate: StockIssueProductListComponent, descendants: true }, { propertyName: "groupedList", first: true, predicate: StockIssueListComponent, descendants: 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 <div class=\"d-flex gap-2 align-items-center ms-2 d-print-none\">\n <app-techlify-icon role='button' name='add'\n [routerLink]=\"['/inventory/stock-issues/form']\"></app-techlify-icon>\n\n <span *ngIf=\"showActions\" matTooltip=\"Import\" routerLink=\"import\"\n class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-export-to-excel-button tableId=\"stockIssueTable\" fileName=\"Stock Issues\"\n (onExportStart)=\"exportInProgress.set(true)\" (onExportEnd)=\"exportInProgress.set(false)\">\n </app-export-to-excel-button>\n\n <app-column-selector *ngIf=\"showActions && columnConfig.length > 0\" mode=\"icon\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n\n <mat-button-toggle-group class=\"view-toggle\" [value]=\"selectedView()\" (change)=\"selectedView.set($event.value)\">\n <mat-button-toggle value=\"itemized\">Itemized</mat-button-toggle>\n <mat-button-toggle value=\"grouped\">Grouped</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <form [formGroup]=\"filterForm\" *ngIf=\"showFilters\" class=\"d-flex align-items-center gap-2 flex-wrap\">\n <mat-form-field class='fl-md'>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>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 class='fl-sm'>\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<app-stock-issue-products-list *ngIf=\"selectedView() === 'itemized'\" [filters]=\"filtersValue()\"\n [isProductView]=\"!!product\" [selectedColumns]=\"selectedColumns\" [exportInProgress]=\"exportInProgress()\"\n (columnConfigReady)=\"onColumnConfigReady($event)\" (listUpdated)=\"listUpdated.emit($event)\">\n</app-stock-issue-products-list>\n\n<app-stock-issue-list *ngIf=\"selectedView() === 'grouped'\" [filters]=\"filtersValue()\"\n [selectedColumns]=\"selectedColumns\" [exportInProgress]=\"exportInProgress()\"\n (columnConfigReady)=\"onColumnConfigReady($event)\" (listUpdated)=\"listUpdated.emit($event)\">\n</app-stock-issue-list>", styles: [":host ::ng-deep .view-toggle{--mat-standard-button-toggle-height: 28px;font-size:12px}:host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3$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: i3$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: 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", "isEmitInitialEvent", "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: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "component", type: ExportToExcelButtonComponent, selector: "app-export-to-excel-button", inputs: ["tableId", "fileName"], outputs: ["onExportStart", "onExportEnd"] }, { kind: "component", type: StockIssueListComponent, selector: "app-stock-issue-list", inputs: ["filters", "selectedColumns", "exportInProgress"], outputs: ["listUpdated", "columnConfigReady"] }, { kind: "component", type: StockIssueProductListComponent, selector: "app-stock-issue-products-list", inputs: ["filters", "isProductView", "selectedColumns", "exportInProgress"], outputs: ["listUpdated", "columnConfigReady"] }], preserveWhitespaces: true });
4030
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: StockIssuePageComponent, selector: "app-stock-issue-page", inputs: { product: { classPropertyName: "product", publicName: "product", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: false, isRequired: false, transformFunction: null }, showFilters: { classPropertyName: "showFilters", publicName: "showFilters", isSignal: false, isRequired: false, transformFunction: null }, issuableData: { classPropertyName: "issuableData", publicName: "issuableData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { listUpdated: "listUpdated" }, viewQueries: [{ propertyName: "itemizedList", first: true, predicate: StockIssueProductListComponent, descendants: true }, { propertyName: "groupedList", first: true, predicate: StockIssueListComponent, descendants: 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 <div class=\"d-flex gap-2 align-items-center ms-2 d-print-none\">\n <app-techlify-icon role='button' name='add'\n [routerLink]=\"['/inventory/stock-issues/form']\" [queryParams]=\"issuableData()\"></app-techlify-icon>\n\n <span *ngIf=\"showActions\" matTooltip=\"Import\" routerLink=\"import\"\n class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-export-to-excel-button tableId=\"stockIssueTable\" fileName=\"Stock Issues\"\n (onExportStart)=\"exportInProgress.set(true)\" (onExportEnd)=\"exportInProgress.set(false)\">\n </app-export-to-excel-button>\n\n <app-column-selector *ngIf=\"showActions && columnConfig.length > 0\" mode=\"icon\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n\n <mat-button-toggle-group class=\"view-toggle\" [value]=\"selectedView()\" (change)=\"selectedView.set($event.value)\">\n <mat-button-toggle value=\"itemized\">Itemized</mat-button-toggle>\n <mat-button-toggle value=\"grouped\">Grouped</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <form [formGroup]=\"filterForm\" *ngIf=\"showFilters\" class=\"d-flex align-items-center gap-2 flex-wrap\">\n <mat-form-field class='fl-md'>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>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 class='fl-sm'>\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<app-stock-issue-products-list *ngIf=\"selectedView() === 'itemized'\" [filters]=\"filtersValue()\"\n [isProductView]=\"!!product\" [selectedColumns]=\"selectedColumns\" [exportInProgress]=\"exportInProgress()\"\n (columnConfigReady)=\"onColumnConfigReady($event)\" (listUpdated)=\"listUpdated.emit($event)\" [issuableData]=\"issuableData()\">\n</app-stock-issue-products-list>\n\n<app-stock-issue-list *ngIf=\"selectedView() === 'grouped'\" [filters]=\"filtersValue()\"\n [selectedColumns]=\"selectedColumns\" [exportInProgress]=\"exportInProgress()\"\n (columnConfigReady)=\"onColumnConfigReady($event)\" (listUpdated)=\"listUpdated.emit($event)\" [issuableData]=\"issuableData()\">\n</app-stock-issue-list>", styles: [":host ::ng-deep .view-toggle{--mat-standard-button-toggle-height: 28px;font-size:12px}:host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3$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: i3$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: 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", "isEmitInitialEvent", "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: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "component", type: ExportToExcelButtonComponent, selector: "app-export-to-excel-button", inputs: ["tableId", "fileName"], outputs: ["onExportStart", "onExportEnd"] }, { kind: "component", type: StockIssueListComponent, selector: "app-stock-issue-list", inputs: ["filters", "selectedColumns", "exportInProgress", "issuableData"], outputs: ["listUpdated", "columnConfigReady"] }, { kind: "component", type: StockIssueProductListComponent, selector: "app-stock-issue-products-list", inputs: ["filters", "isProductView", "selectedColumns", "exportInProgress", "issuableData"], outputs: ["selectedColumnsChange", "listUpdated", "columnConfigReady"] }], preserveWhitespaces: true });
4046
4031
  };
4047
4032
  StockIssuePageComponent = __decorate([
4048
4033
  UntilDestroy()
4049
4034
  ], StockIssuePageComponent);
4050
4035
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssuePageComponent, decorators: [{
4051
4036
  type: Component,
4052
- args: [{ selector: 'app-stock-issue-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\">{{ label }}</h3>\n\n <div class=\"d-flex gap-2 align-items-center ms-2 d-print-none\">\n <app-techlify-icon role='button' name='add'\n [routerLink]=\"['/inventory/stock-issues/form']\"></app-techlify-icon>\n\n <span *ngIf=\"showActions\" matTooltip=\"Import\" routerLink=\"import\"\n class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-export-to-excel-button tableId=\"stockIssueTable\" fileName=\"Stock Issues\"\n (onExportStart)=\"exportInProgress.set(true)\" (onExportEnd)=\"exportInProgress.set(false)\">\n </app-export-to-excel-button>\n\n <app-column-selector *ngIf=\"showActions && columnConfig.length > 0\" mode=\"icon\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n\n <mat-button-toggle-group class=\"view-toggle\" [value]=\"selectedView()\" (change)=\"selectedView.set($event.value)\">\n <mat-button-toggle value=\"itemized\">Itemized</mat-button-toggle>\n <mat-button-toggle value=\"grouped\">Grouped</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <form [formGroup]=\"filterForm\" *ngIf=\"showFilters\" class=\"d-flex align-items-center gap-2 flex-wrap\">\n <mat-form-field class='fl-md'>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>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 class='fl-sm'>\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<app-stock-issue-products-list *ngIf=\"selectedView() === 'itemized'\" [filters]=\"filtersValue()\"\n [isProductView]=\"!!product\" [selectedColumns]=\"selectedColumns\" [exportInProgress]=\"exportInProgress()\"\n (columnConfigReady)=\"onColumnConfigReady($event)\" (listUpdated)=\"listUpdated.emit($event)\">\n</app-stock-issue-products-list>\n\n<app-stock-issue-list *ngIf=\"selectedView() === 'grouped'\" [filters]=\"filtersValue()\"\n [selectedColumns]=\"selectedColumns\" [exportInProgress]=\"exportInProgress()\"\n (columnConfigReady)=\"onColumnConfigReady($event)\" (listUpdated)=\"listUpdated.emit($event)\">\n</app-stock-issue-list>", styles: [":host ::ng-deep .view-toggle{--mat-standard-button-toggle-height: 28px;font-size:12px}:host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"] }]
4037
+ args: [{ selector: 'app-stock-issue-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\">{{ label }}</h3>\n\n <div class=\"d-flex gap-2 align-items-center ms-2 d-print-none\">\n <app-techlify-icon role='button' name='add'\n [routerLink]=\"['/inventory/stock-issues/form']\" [queryParams]=\"issuableData()\"></app-techlify-icon>\n\n <span *ngIf=\"showActions\" matTooltip=\"Import\" routerLink=\"import\"\n class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-export-to-excel-button tableId=\"stockIssueTable\" fileName=\"Stock Issues\"\n (onExportStart)=\"exportInProgress.set(true)\" (onExportEnd)=\"exportInProgress.set(false)\">\n </app-export-to-excel-button>\n\n <app-column-selector *ngIf=\"showActions && columnConfig.length > 0\" mode=\"icon\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n\n <mat-button-toggle-group class=\"view-toggle\" [value]=\"selectedView()\" (change)=\"selectedView.set($event.value)\">\n <mat-button-toggle value=\"itemized\">Itemized</mat-button-toggle>\n <mat-button-toggle value=\"grouped\">Grouped</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <form [formGroup]=\"filterForm\" *ngIf=\"showFilters\" class=\"d-flex align-items-center gap-2 flex-wrap\">\n <mat-form-field class='fl-md'>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>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 class='fl-sm'>\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<app-stock-issue-products-list *ngIf=\"selectedView() === 'itemized'\" [filters]=\"filtersValue()\"\n [isProductView]=\"!!product\" [selectedColumns]=\"selectedColumns\" [exportInProgress]=\"exportInProgress()\"\n (columnConfigReady)=\"onColumnConfigReady($event)\" (listUpdated)=\"listUpdated.emit($event)\" [issuableData]=\"issuableData()\">\n</app-stock-issue-products-list>\n\n<app-stock-issue-list *ngIf=\"selectedView() === 'grouped'\" [filters]=\"filtersValue()\"\n [selectedColumns]=\"selectedColumns\" [exportInProgress]=\"exportInProgress()\"\n (columnConfigReady)=\"onColumnConfigReady($event)\" (listUpdated)=\"listUpdated.emit($event)\" [issuableData]=\"issuableData()\">\n</app-stock-issue-list>", styles: [":host ::ng-deep .view-toggle{--mat-standard-button-toggle-height: 28px;font-size:12px}:host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"] }]
4053
4038
  }], ctorParameters: () => [{ type: i2$1.FormBuilder }], propDecorators: { product: [{
4054
4039
  type: Input
4055
- }], issuableType: [{
4056
- type: Input
4057
- }], issuableId: [{
4058
- type: Input
4059
4040
  }], label: [{
4060
4041
  type: Input
4061
4042
  }], showActions: [{
@@ -4090,7 +4071,7 @@ class StockIssuePageModule {
4090
4071
  ColumnSelectorModule,
4091
4072
  TechlifyIconModule,
4092
4073
  ExportToExcelButtonComponent,
4093
- StockIssueProductFormButtonComponent,
4074
+ TechlifyFormButtonComponent,
4094
4075
  TechlifyDeleteButtonComponent], exports: [StockIssuePageComponent,
4095
4076
  StockIssueListComponent,
4096
4077
  StockIssueProductListComponent] });
@@ -4106,7 +4087,7 @@ class StockIssuePageModule {
4106
4087
  ColumnSelectorModule,
4107
4088
  TechlifyIconModule,
4108
4089
  ExportToExcelButtonComponent,
4109
- StockIssueProductFormButtonComponent,
4090
+ TechlifyFormButtonComponent,
4110
4091
  TechlifyDeleteButtonComponent] });
4111
4092
  }
4112
4093
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssuePageModule, decorators: [{
@@ -4132,7 +4113,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
4132
4113
  ColumnSelectorModule,
4133
4114
  TechlifyIconModule,
4134
4115
  ExportToExcelButtonComponent,
4135
- StockIssueProductFormButtonComponent,
4116
+ TechlifyFormButtonComponent,
4136
4117
  TechlifyDeleteButtonComponent
4137
4118
  ],
4138
4119
  exports: [
@@ -4681,7 +4662,7 @@ const routes$6 = [
4681
4662
  },
4682
4663
  {
4683
4664
  path: "measures",
4684
- loadChildren: () => import('./techlify-inventory-common-measure.module-DMkQVem6.mjs').then((mod) => mod.MeasureModule),
4665
+ loadChildren: () => import('./techlify-inventory-common-measure.module-D9tk7RWL.mjs').then((mod) => mod.MeasureModule),
4685
4666
  },
4686
4667
  {
4687
4668
  path: 'stock-issues',
@@ -4693,7 +4674,7 @@ const routes$6 = [
4693
4674
  },
4694
4675
  {
4695
4676
  path: 'categories',
4696
- loadChildren: () => import('./techlify-inventory-common-category.module-CKpiM1p_.mjs').then((mod) => mod.CategoryModule),
4677
+ loadChildren: () => import('./techlify-inventory-common-category.module-CiZXYGS7.mjs').then((mod) => mod.CategoryModule),
4697
4678
  },
4698
4679
  {
4699
4680
  path: 'products',
@@ -5010,17 +4991,17 @@ const routes$5 = [
5010
4991
  },
5011
4992
  {
5012
4993
  path: 'form',
5013
- loadComponent: () => import('./techlify-inventory-common-stock-issue-form.component-DAnutTOL.mjs').then(m => m.StockIssueFormComponent),
4994
+ loadComponent: () => import('./techlify-inventory-common-stock-issue-form.component-CnjtA7Hb.mjs').then(m => m.StockIssueFormComponent),
5014
4995
  canLoad: [AuthenticationGuard]
5015
4996
  },
5016
4997
  {
5017
4998
  path: 'form/:id',
5018
- loadComponent: () => import('./techlify-inventory-common-stock-issue-form.component-DAnutTOL.mjs').then(m => m.StockIssueFormComponent),
4999
+ loadComponent: () => import('./techlify-inventory-common-stock-issue-form.component-CnjtA7Hb.mjs').then(m => m.StockIssueFormComponent),
5019
5000
  canLoad: [AuthenticationGuard]
5020
5001
  },
5021
5002
  {
5022
5003
  path: ':id/view',
5023
- loadComponent: () => import('./techlify-inventory-common-stock-issue-view.component-D4IpVw8z.mjs').then(m => m.StockIssueViewComponent),
5004
+ loadComponent: () => import('./techlify-inventory-common-stock-issue-view.component-zoK_HeFx.mjs').then(m => m.StockIssueViewComponent),
5024
5005
  canLoad: [AuthenticationGuard]
5025
5006
  }
5026
5007
  ];
@@ -5047,7 +5028,8 @@ class StockIssueModule {
5047
5028
  StockIssueFormModule,
5048
5029
  MatDialogModule,
5049
5030
  MatButtonModule,
5050
- StockIssuePageModule] });
5031
+ StockIssuePageModule,
5032
+ TechlifyFormButtonComponent] });
5051
5033
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueModule, imports: [CommonModule,
5052
5034
  StockIssueRoutingModule,
5053
5035
  MatCardModule,
@@ -5056,7 +5038,8 @@ class StockIssueModule {
5056
5038
  StockIssueFormModule,
5057
5039
  MatDialogModule,
5058
5040
  MatButtonModule,
5059
- StockIssuePageModule] });
5041
+ StockIssuePageModule,
5042
+ TechlifyFormButtonComponent] });
5060
5043
  }
5061
5044
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueModule, decorators: [{
5062
5045
  type: NgModule,
@@ -5073,6 +5056,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
5073
5056
  MatDialogModule,
5074
5057
  MatButtonModule,
5075
5058
  StockIssuePageModule,
5059
+ TechlifyFormButtonComponent
5076
5060
  ],
5077
5061
  }]
5078
5062
  }] });
@@ -5082,6 +5066,35 @@ var stockIssue_module = /*#__PURE__*/Object.freeze({
5082
5066
  StockIssueModule: StockIssueModule
5083
5067
  });
5084
5068
 
5069
+ class StockIssueProductFormButtonComponent {
5070
+ dialog;
5071
+ stockIssueProduct = input();
5072
+ stockIssueId = input.required();
5073
+ saved = output();
5074
+ constructor(dialog) {
5075
+ this.dialog = dialog;
5076
+ }
5077
+ open() {
5078
+ this.dialog.open(StockIssueProductFormComponent, {
5079
+ width: '500px',
5080
+ data: {
5081
+ stockIssueId: this.stockIssueId(),
5082
+ stockIssueProduct: this.stockIssueProduct() ?? null,
5083
+ },
5084
+ }).afterClosed().subscribe((item) => {
5085
+ if (item) {
5086
+ this.saved.emit(item);
5087
+ }
5088
+ });
5089
+ }
5090
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueProductFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
5091
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: StockIssueProductFormButtonComponent, isStandalone: true, selector: "app-stock-issue-product-form-button", inputs: { stockIssueProduct: { classPropertyName: "stockIssueProduct", publicName: "stockIssueProduct", isSignal: true, isRequired: false, transformFunction: null }, stockIssueId: { classPropertyName: "stockIssueId", publicName: "stockIssueId", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { saved: "saved" }, ngImport: i0, template: "<app-techlify-icon role=\"button\" [name]=\"stockIssueProduct() ? 'edit' : 'add'\" (click)=\"open()\">\n</app-techlify-icon>\n", dependencies: [{ kind: "ngmodule", type: TechlifyIconModule }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }], preserveWhitespaces: true });
5092
+ }
5093
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueProductFormButtonComponent, decorators: [{
5094
+ type: Component,
5095
+ args: [{ selector: 'app-stock-issue-product-form-button', standalone: true, imports: [TechlifyIconModule], template: "<app-techlify-icon role=\"button\" [name]=\"stockIssueProduct() ? 'edit' : 'add'\" (click)=\"open()\">\n</app-techlify-icon>\n" }]
5096
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }] });
5097
+
5085
5098
  class IncidentService extends TechlifyService {
5086
5099
  constructor(httpService) {
5087
5100
  super(httpService, 'incidents');
@@ -6299,7 +6312,7 @@ const routes$4 = [
6299
6312
  },
6300
6313
  {
6301
6314
  path: 'purchase-orders/:id/view',
6302
- loadComponent: () => import('./techlify-inventory-common-purchase-order-view.component-DswAv0_x.mjs').then(m => m.PurchaseOrderViewComponent)
6315
+ loadComponent: () => import('./techlify-inventory-common-purchase-order-view.component-CsmrVmZs.mjs').then(m => m.PurchaseOrderViewComponent)
6303
6316
  }
6304
6317
  ],
6305
6318
  },
@@ -7184,4 +7197,4 @@ var shelf_module = /*#__PURE__*/Object.freeze({
7184
7197
  */
7185
7198
 
7186
7199
  export { PayeeSelectorComponent as $, StockIssueProductFormComponent as A, StockIssueProductFormButtonComponent as B, StockReceiptsModule as C, StockReceiptPageComponent as D, StockReceiptListComponent as E, StockReceiptProductsListComponent as F, StockReceiptSimpleFormModule as G, StockReceiptFormButtonComponent as H, InventoryCommonRoutingModule as I, StockReceiptViewComponent as J, StockReceiptProductFormComponent as K, LocationService as L, MeasureService as M, StockReceiptProductFormButtonComponent as N, StockTransferListComponent as O, PurchaseOrderService as P, StockTransferFormComponent as Q, StockTransferFormButtonComponent as R, StockIssueService as S, TechlifyFilterComponent as T, StockTransferService as U, SupplierModule as V, SupplierFormButtonComponent as W, SupplierFormComponent as X, SuppliersListComponent as Y, SupplierTypeService as Z, PayeeSelectorModule as _, TechlifyFilterModule as a, IncidentModule as a0, IncidentService as a1, IncidentListComponent as a2, IncidentFormComponent as a3, IncidentFormButtonComponent as a4, RatingModule as a5, RatingService as a6, RatingListComponent as a7, RatingFormComponent as a8, RatingFormButtonComponent as a9, ExportToExcelButtonComponent as aa, LocationModule as ab, LocationListComponent as ac, LocationFormComponent as ad, LocationFormButtonComponent as ae, ShelfModule as af, ShelfService as ag, ShelfListComponent as ah, ShelfFormComponent as ai, ShelfFormButtonComponent as aj, MaterialModule as b, LocationSelectorComponent as c, StockIssueFormModule as d, StockIssueFormButtonComponent as e, InventoryCommonModule as f, StockSummaryService as g, ProductModule as h, ProductFormComponent as i, ProductBasicInfoComponent as j, ProductFormButtonComponent as k, ProductQuickSearchComponent as l, ProductSearchModule as m, ProductSearchComponent as n, ProductListComponent as o, ProductService as p, ProductFormService as q, ProductBatchUpdateFormComponent as r, ProductImportPageComponent as s, ProductViewPageComponent as t, StockIssueModule as u, StockIssuePageComponent as v, StockIssuePageModule as w, StockIssueListComponent as x, StockIssueProductListComponent as y, StockIssueProductService as z };
7187
- //# sourceMappingURL=techlify-inventory-common-techlify-inventory-common-SNPp2SDU.mjs.map
7200
+ //# sourceMappingURL=techlify-inventory-common-techlify-inventory-common-CHc35QxL.mjs.map