techlify-inventory-common 18.0.1 → 18.1.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.
- package/esm2022/lib/inventory-common/product/product-list/product-list.component.mjs +30 -40
- package/esm2022/lib/inventory-common/product/product.module.mjs +7 -4
- package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form.component.mjs +9 -10
- package/esm2022/lib/inventory-common/supplier/supplier.module.mjs +7 -3
- package/esm2022/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.mjs +77 -118
- package/fesm2022/{techlify-inventory-common-category.module-Stn6e73V.mjs → techlify-inventory-common-category.module-CNm2bEsx.mjs} +2 -2
- package/fesm2022/{techlify-inventory-common-category.module-Stn6e73V.mjs.map → techlify-inventory-common-category.module-CNm2bEsx.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-measure.module-CirswKXn.mjs → techlify-inventory-common-measure.module-BEaRHh5Z.mjs} +2 -2
- package/fesm2022/{techlify-inventory-common-measure.module-CirswKXn.mjs.map → techlify-inventory-common-measure.module-BEaRHh5Z.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-product.module-qdeafFV5.mjs → techlify-inventory-common-product.module-BV9Cy88x.mjs} +34 -38
- package/fesm2022/techlify-inventory-common-product.module-BV9Cy88x.mjs.map +1 -0
- package/fesm2022/{techlify-inventory-common-stock-issuances-list.module-CyFDxARk.mjs → techlify-inventory-common-stock-issuances-list.module-Dt6gx-ji.mjs} +2 -2
- package/fesm2022/{techlify-inventory-common-stock-issuances-list.module-CyFDxARk.mjs.map → techlify-inventory-common-stock-issuances-list.module-Dt6gx-ji.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-stock-issuances.module-Dm9i2kcf.mjs → techlify-inventory-common-stock-issuances.module-BQRRP-hW.mjs} +4 -4
- package/fesm2022/{techlify-inventory-common-stock-issuances.module-Dm9i2kcf.mjs.map → techlify-inventory-common-stock-issuances.module-BQRRP-hW.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-stock-receipt-form.module-BZDrN7la.mjs → techlify-inventory-common-stock-receipt-form.module-DND0GNlf.mjs} +2 -2
- package/fesm2022/{techlify-inventory-common-stock-receipt-form.module-BZDrN7la.mjs.map → techlify-inventory-common-stock-receipt-form.module-DND0GNlf.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-stock-receipts.module-CUPdWteR.mjs → techlify-inventory-common-stock-receipts.module-BvYaKITT.mjs} +3 -3
- package/fesm2022/{techlify-inventory-common-stock-receipts.module-CUPdWteR.mjs.map → techlify-inventory-common-stock-receipts.module-BvYaKITT.mjs.map} +1 -1
- package/fesm2022/techlify-inventory-common-supplier-form.component-DVBnhiyH.mjs +177 -0
- package/fesm2022/techlify-inventory-common-supplier-form.component-DVBnhiyH.mjs.map +1 -0
- package/fesm2022/{techlify-inventory-common-supplier.module-gzHesNtQ.mjs → techlify-inventory-common-supplier.module-Bwa7gx14.mjs} +73 -130
- package/fesm2022/techlify-inventory-common-supplier.module-Bwa7gx14.mjs.map +1 -0
- package/fesm2022/{techlify-inventory-common-techlify-inventory-common-Czyc0jLI.mjs → techlify-inventory-common-techlify-inventory-common-GFYF7JCA.mjs} +7 -7
- package/fesm2022/{techlify-inventory-common-techlify-inventory-common-Czyc0jLI.mjs.map → techlify-inventory-common-techlify-inventory-common-GFYF7JCA.mjs.map} +1 -1
- package/fesm2022/techlify-inventory-common.mjs +1 -1
- package/lib/inventory-common/product/product-list/product-list.component.d.ts +5 -7
- package/lib/inventory-common/product/product.module.d.ts +1 -1
- package/lib/inventory-common/supplier/supplier.module.d.ts +2 -1
- package/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.d.ts +14 -24
- package/package.json +1 -1
- package/esm2022/lib/inventory-common/supplier/supplier-type.service.mjs +0 -25
- package/fesm2022/techlify-inventory-common-product.module-qdeafFV5.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-supplier-form.component-CHmMG7O8.mjs +0 -178
- package/fesm2022/techlify-inventory-common-supplier-form.component-CHmMG7O8.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-supplier.module-gzHesNtQ.mjs.map +0 -1
- package/lib/inventory-common/supplier/supplier-type.service.d.ts +0 -13
|
@@ -4,13 +4,13 @@ import * as i4 from '@angular/common';
|
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { __decorate } from 'tslib';
|
|
6
6
|
import * as i2 from '@angular/forms';
|
|
7
|
-
import { Validators,
|
|
7
|
+
import { Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
8
8
|
import * as i1 from '@angular/material/dialog';
|
|
9
9
|
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
10
|
-
import { P as ProductService, S as StockSummaryService } from './techlify-inventory-common-techlify-inventory-common-
|
|
10
|
+
import { P as ProductService, S as StockSummaryService } from './techlify-inventory-common-techlify-inventory-common-GFYF7JCA.mjs';
|
|
11
11
|
import * as i3 from 'ngx-spinner';
|
|
12
12
|
import * as i1$1 from 'ngx-techlify-core';
|
|
13
|
-
import { TechlifyServiceBaseClass, TechlifyFormComponentInterface, TechlifyListingControllerInterface, AuthenticationGuard, MaterialModule, SearchableSelectorModule, TimelineFilterModule, ImportCsvModule } from 'ngx-techlify-core';
|
|
13
|
+
import { TechlifyServiceBaseClass, TechlifyFormComponentInterface, TechlifyListingControllerInterface, AuthenticationGuard, MaterialModule, SearchableSelectorModule, TimelineFilterModule, ImportCsvModule, ColumnSelectorModule } from 'ngx-techlify-core';
|
|
14
14
|
import * as i7 from '@angular/material/button';
|
|
15
15
|
import * as i6 from '@angular/material/form-field';
|
|
16
16
|
import * as i7$1 from '@angular/material/input';
|
|
@@ -31,13 +31,13 @@ import { InfiniteScrollModule } from 'ngx-infinite-scroll';
|
|
|
31
31
|
import moment from 'moment';
|
|
32
32
|
import { T as TechlifyFormService } from './techlify-inventory-common-techlify-form-service-CiVfwYTS.mjs';
|
|
33
33
|
import * as i9 from '@angular/material/datepicker';
|
|
34
|
-
import { a as StockReceiptFormButtonComponent, S as StockReceiptFormModule } from './techlify-inventory-common-stock-receipt-form.module-
|
|
35
|
-
import { c as StockIssueFormButtonComponent, S as StockIssuancesListComponent, a as StockIssueFormModule, b as StockIssuancesListModule } from './techlify-inventory-common-stock-issuances-list.module-
|
|
34
|
+
import { a as StockReceiptFormButtonComponent, S as StockReceiptFormModule } from './techlify-inventory-common-stock-receipt-form.module-DND0GNlf.mjs';
|
|
35
|
+
import { c as StockIssueFormButtonComponent, S as StockIssuancesListComponent, a as StockIssueFormModule, b as StockIssuancesListModule } from './techlify-inventory-common-stock-issuances-list.module-Dt6gx-ji.mjs';
|
|
36
36
|
import * as i3$2 from '@angular/material/card';
|
|
37
37
|
import * as i2$2 from '@angular/material/tooltip';
|
|
38
38
|
import * as i7$2 from '@angular/material/progress-bar';
|
|
39
39
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
40
|
-
import { S as StockReceiptsListPageComponent, a as StockReceiptsModule } from './techlify-inventory-common-stock-receipts.module-
|
|
40
|
+
import { S as StockReceiptsListPageComponent, a as StockReceiptsModule } from './techlify-inventory-common-stock-receipts.module-BvYaKITT.mjs';
|
|
41
41
|
import * as i6$2 from '@angular/material/divider';
|
|
42
42
|
|
|
43
43
|
const errorMessages$1 = {
|
|
@@ -486,33 +486,26 @@ let ProductListComponent = class ProductListComponent {
|
|
|
486
486
|
products = [];
|
|
487
487
|
dataSource = new MatTableDataSource();
|
|
488
488
|
isLoading = false;
|
|
489
|
-
|
|
490
|
-
{ def:
|
|
491
|
-
{ def:
|
|
492
|
-
{ def:
|
|
493
|
-
{ def:
|
|
494
|
-
{ def:
|
|
495
|
-
{ def:
|
|
496
|
-
{ def:
|
|
497
|
-
{ def:
|
|
498
|
-
{ def:
|
|
499
|
-
{ def:
|
|
500
|
-
{ def:
|
|
489
|
+
columnConfig = [
|
|
490
|
+
{ label: '#', def: '#', isSelected: true, isEditable: true },
|
|
491
|
+
{ label: 'Name', def: 'name', isSelected: true, isEditable: true },
|
|
492
|
+
{ label: 'SKU', def: 'sku', isSelected: true, isEditable: true },
|
|
493
|
+
{ label: 'Categories', def: 'categories', isSelected: true, isEditable: true },
|
|
494
|
+
{ label: 'Initial Quantity', def: 'initial_quantity', isSelected: true, isEditable: true },
|
|
495
|
+
{ label: 'Reorder Point', def: 'reorder_point', isSelected: true, isEditable: true },
|
|
496
|
+
{ label: 'Stock Receipts', def: 'stock_receipts', isSelected: true, isEditable: true },
|
|
497
|
+
{ label: 'Stock Issuances', def: 'stock_issuances', isSelected: true, isEditable: true },
|
|
498
|
+
{ label: 'On Hand', def: 'on_hand', isSelected: true, isEditable: true },
|
|
499
|
+
{ label: 'Sale Price', def: 'sale_price', isSelected: true, isEditable: true },
|
|
500
|
+
{ label: 'Income Account', def: 'income_account', isSelected: false, isEditable: true },
|
|
501
|
+
{ label: 'Expense Account', def: 'expense_account', isSelected: false, isEditable: true },
|
|
502
|
+
{ label: 'Creator', def: 'creator', isSelected: false, isEditable: true },
|
|
503
|
+
{ label: 'Actions', def: 'Actions', isSelected: true, isEditable: true },
|
|
501
504
|
];
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
"categories",
|
|
507
|
-
"sku",
|
|
508
|
-
"initial_quantity",
|
|
509
|
-
"initial_quantity_date",
|
|
510
|
-
"reorder_point",
|
|
511
|
-
"sale_price",
|
|
512
|
-
"income_account",
|
|
513
|
-
"expense_account",
|
|
514
|
-
"Actions",
|
|
515
|
-
]);
|
|
505
|
+
selectedColumns = this.columnConfig.filter(col => col.isSelected);
|
|
506
|
+
get displayedColumns() {
|
|
507
|
+
return this.selectedColumns.map(col => col.def);
|
|
508
|
+
}
|
|
516
509
|
importId;
|
|
517
510
|
constructor(fb, dialog, activatedRoute, productService, requestHelperService, productFormService) {
|
|
518
511
|
this.fb = fb;
|
|
@@ -565,7 +558,7 @@ let ProductListComponent = class ProductListComponent {
|
|
|
565
558
|
params.page = this.page;
|
|
566
559
|
params.perPage = this.perPage;
|
|
567
560
|
params.num_items = this.num_items + "|" + this.currentPage;
|
|
568
|
-
params.with = "categories,lastStockReceipt,lastStockIssuance";
|
|
561
|
+
params.with = "categories,lastStockReceipt,lastStockIssuance,creator";
|
|
569
562
|
if (this.importId) {
|
|
570
563
|
params.import_id = this.importId;
|
|
571
564
|
}
|
|
@@ -617,14 +610,14 @@ let ProductListComponent = class ProductListComponent {
|
|
|
617
610
|
}
|
|
618
611
|
}
|
|
619
612
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductListComponent, deps: [{ token: i2.FormBuilder }, { token: i1.MatDialog }, { token: i2$1.ActivatedRoute }, { token: ProductService }, { token: i1$1.RequestHelperService }, { token: ProductFormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
620
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ProductListComponent, selector: "app-product-list", ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form\n [formGroup]=\"filterForm\"\n class=\"d-flex justify-content-between align-items-center gap-2\"\n >\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 <mat-icon\n routerLink=\"import\"\n class=\"cursor-pointer\"\n matTooltip=\"Import\"\n >\n download\n </mat-icon>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field style=\"width: 120px\">\n <input matInput placeholder=\"Product\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: 120px\">\n <mat-label>Category</mat-label>\n <app-searchable-selector\n apiUrl=\"api/product-categories\"\n formControlName=\"category_ids\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field style=\"width: 120px\">\n <mat-label>Type</mat-label>\n <app-searchable-selector\n apiUrl=\"api/product-types\"\n formControlName=\"type_ids\"\n titleField=\"title\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n <!-- <mat-form-field style=\"width: 150px\">-->\n <!-- <mat-label>Income Account</mat-label>-->\n <!-- <app-searchable-selector-->\n <!-- apiUrl=\"api/accounts\"-->\n <!-- formControlName=\"income_account_ids\"-->\n <!-- titleField=\"title\"-->\n <!-- [multiple]=\"true\"-->\n <!-- >-->\n <!-- </app-searchable-selector>-->\n <!-- </mat-form-field>-->\n <!-- <mat-form-field style=\"width: 150px\">-->\n <!-- <mat-label>Expense Account</mat-label>-->\n <!-- <app-searchable-selector-->\n <!-- apiUrl=\"api/accounts\"-->\n <!-- formControlName=\"expense_account_ids\"-->\n <!-- titleField=\"title\"-->\n <!-- [multiple]=\"true\"-->\n <!-- >-->\n <!-- </app-searchable-selector>-->\n <!-- </mat-form-field>-->\n <mat-form-field>\n <mat-label>Columns</mat-label>\n <mat-select [formControl]=\"displayedColumns\" multiple>\n <mat-option\n *ngFor=\"let column of columnDefinitions\"\n [value]=\"column.def\"\n [disabled]=\"!column.isShow\"\n >\n {{ column?.def }}</mat-option\n >\n </mat-select>\n </mat-form-field>\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n matSortDisableClear=\"true\"\n aria-describedby=\"Products List\"\n >\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\">{{ element.name }}</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\">{{ element.type?.title }}</td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Category</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div\n *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\"\n >\n <span\n class=\"badge badge-primary\"\n *ngFor=\"let category of element?.categories\"\n >\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 <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>\n Initial Quantity\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.initial_quantity }}\n </td>\n </ng-container>\n\n <!-- Initial Quantity Date Column -->\n <ng-container matColumnDef=\"initial_quantity_date\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>\n Initial Quantity Date\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.initial_quantity_date }}\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 <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-product-form-button\n [product]=\"element\"\n ></app-product-form-button>\n <mat-icon\n class=\"cursor-pointer\"\n matTooltip=\"View\"\n [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"\n >\n remove_red_eye\n </mat-icon>\n\n <app-stock-receipt-form-button\n [product]=\"element\"\n (saved)=\"reload()\"\n ></app-stock-receipt-form-button>\n\n <app-stock-issue-form-button\n [product]=\"element\"\n (saved)=\"reload()\"\n ></app-stock-issue-form-button>\n </div>\n </td>\n </ng-container>\n <tr\n mat-header-row\n *matHeaderRowDef=\"displayedColumns.value; sticky: true\"\n ></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns.value\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i1$1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: StockReceiptFormButtonComponent, selector: "app-stock-receipt-form-button", inputs: ["product", "stockReceipt", "icon"], outputs: ["saved"] }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssuance", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$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: i10$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i11.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i5.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i3$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$2.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i7$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i10$2.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"], outputs: ["saved"] }, { kind: "pipe", type: i4.CurrencyPipe, name: "currency" }], preserveWhitespaces: true });
|
|
613
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ProductListComponent, selector: "app-product-list", ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form\n [formGroup]=\"filterForm\"\n class=\"d-flex justify-content-between align-items-center gap-2\"\n >\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Products</h3>\n <app-product-form-button class=\"mt-2\"></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer mt-1 material-symbols-outlined\">\n file_save\n </span>\n <app-column-selector\n mode=\"icon\"\n class=\"mb-2 d-print-none\"\n [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"\n ></app-column-selector>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field style=\"width: 120px\">\n <input matInput placeholder=\"Product\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: 120px\">\n <mat-label>Category</mat-label>\n <app-searchable-selector\n apiUrl=\"api/product-categories\"\n formControlName=\"category_ids\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field style=\"width: 120px\">\n <mat-label>Type</mat-label>\n <app-searchable-selector\n apiUrl=\"api/product-types\"\n formControlName=\"type_ids\"\n titleField=\"title\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n <!-- <mat-form-field style=\"width: 150px\">-->\n <!-- <mat-label>Income Account</mat-label>-->\n <!-- <app-searchable-selector-->\n <!-- apiUrl=\"api/accounts\"-->\n <!-- formControlName=\"income_account_ids\"-->\n <!-- titleField=\"title\"-->\n <!-- [multiple]=\"true\"-->\n <!-- >-->\n <!-- </app-searchable-selector>-->\n <!-- </mat-form-field>-->\n <!-- <mat-form-field style=\"width: 150px\">-->\n <!-- <mat-label>Expense Account</mat-label>-->\n <!-- <app-searchable-selector-->\n <!-- apiUrl=\"api/accounts\"-->\n <!-- formControlName=\"expense_account_ids\"-->\n <!-- titleField=\"title\"-->\n <!-- [multiple]=\"true\"-->\n <!-- >-->\n <!-- </app-searchable-selector>-->\n <!-- </mat-form-field>-->\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n matSortDisableClear=\"true\"\n aria-describedby=\"Products List\"\n >\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\">{{ element.type?.title }}</small>\n </div>\n </td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div\n *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\"\n >\n <span\n class=\"badge bg-secondary\"\n *ngFor=\"let category of element?.categories\"\n >\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 <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>\n Initial Quantity\n </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>\n Stock Receipts\n </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\">\n last added on {{ element?.last_stock_receipt?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Issuances Column -->\n <ng-container matColumnDef=\"stock_issuances\">\n <th mat-header-cell mat-sort-header=\"stock_issuances_sum_quantity\" *matHeaderCellDef>\n Stock Issuances\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_issuances_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_issuance\">\n last issued on {{ element?.last_stock_issuance?.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_balance\" *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_balance }}\n </td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"reorder_point\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reorder_point }}\n </td>\n </ng-container>\n\n <!-- Selling Price Column -->\n <ng-container matColumnDef=\"sale_price\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Selling Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.sale_price | currency }}\n </td>\n </ng-container>\n\n <!-- Income Account Column -->\n <ng-container matColumnDef=\"income_account\">\n <th mat-header-cell *matHeaderCellDef>Income Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.income_account?.title }}\n </td>\n </ng-container>\n\n <!-- Expense Account Column -->\n <ng-container matColumnDef=\"expense_account\">\n <th mat-header-cell *matHeaderCellDef>Expense Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.expense_account?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-product-form-button\n [product]=\"element\"\n ></app-product-form-button>\n <mat-icon\n class=\"cursor-pointer\"\n matTooltip=\"View\"\n [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"\n >\n remove_red_eye\n </mat-icon>\n\n <app-stock-receipt-form-button\n [product]=\"element\"\n (saved)=\"reload()\"\n ></app-stock-receipt-form-button>\n\n <app-stock-issue-form-button\n [product]=\"element\"\n (saved)=\"reload()\"\n ></app-stock-issue-form-button>\n </div>\n </td>\n </ng-container>\n <tr\n mat-header-row\n *matHeaderRowDef=\"displayedColumns; sticky: true\"\n ></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i1$1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: StockReceiptFormButtonComponent, selector: "app-stock-receipt-form-button", inputs: ["product", "stockReceipt", "icon"], outputs: ["saved"] }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssuance", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$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: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i5.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i3$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$2.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i7$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i10$2.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1$1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"], outputs: ["saved"] }, { kind: "pipe", type: i4.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i4.DatePipe, name: "date" }], preserveWhitespaces: true });
|
|
621
614
|
};
|
|
622
615
|
ProductListComponent = __decorate([
|
|
623
616
|
UntilDestroy()
|
|
624
617
|
], ProductListComponent);
|
|
625
618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductListComponent, decorators: [{
|
|
626
619
|
type: Component,
|
|
627
|
-
args: [{ selector: "app-product-list", template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form\n [formGroup]=\"filterForm\"\n class=\"d-flex justify-content-between align-items-center gap-2\"\n >\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 <
|
|
620
|
+
args: [{ selector: "app-product-list", template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form\n [formGroup]=\"filterForm\"\n class=\"d-flex justify-content-between align-items-center gap-2\"\n >\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Products</h3>\n <app-product-form-button class=\"mt-2\"></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer mt-1 material-symbols-outlined\">\n file_save\n </span>\n <app-column-selector\n mode=\"icon\"\n class=\"mb-2 d-print-none\"\n [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"\n ></app-column-selector>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field style=\"width: 120px\">\n <input matInput placeholder=\"Product\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: 120px\">\n <mat-label>Category</mat-label>\n <app-searchable-selector\n apiUrl=\"api/product-categories\"\n formControlName=\"category_ids\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field style=\"width: 120px\">\n <mat-label>Type</mat-label>\n <app-searchable-selector\n apiUrl=\"api/product-types\"\n formControlName=\"type_ids\"\n titleField=\"title\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n <!-- <mat-form-field style=\"width: 150px\">-->\n <!-- <mat-label>Income Account</mat-label>-->\n <!-- <app-searchable-selector-->\n <!-- apiUrl=\"api/accounts\"-->\n <!-- formControlName=\"income_account_ids\"-->\n <!-- titleField=\"title\"-->\n <!-- [multiple]=\"true\"-->\n <!-- >-->\n <!-- </app-searchable-selector>-->\n <!-- </mat-form-field>-->\n <!-- <mat-form-field style=\"width: 150px\">-->\n <!-- <mat-label>Expense Account</mat-label>-->\n <!-- <app-searchable-selector-->\n <!-- apiUrl=\"api/accounts\"-->\n <!-- formControlName=\"expense_account_ids\"-->\n <!-- titleField=\"title\"-->\n <!-- [multiple]=\"true\"-->\n <!-- >-->\n <!-- </app-searchable-selector>-->\n <!-- </mat-form-field>-->\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n matSortDisableClear=\"true\"\n aria-describedby=\"Products List\"\n >\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\">{{ element.type?.title }}</small>\n </div>\n </td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div\n *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\"\n >\n <span\n class=\"badge bg-secondary\"\n *ngFor=\"let category of element?.categories\"\n >\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 <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>\n Initial Quantity\n </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>\n Stock Receipts\n </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\">\n last added on {{ element?.last_stock_receipt?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Issuances Column -->\n <ng-container matColumnDef=\"stock_issuances\">\n <th mat-header-cell mat-sort-header=\"stock_issuances_sum_quantity\" *matHeaderCellDef>\n Stock Issuances\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_issuances_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_issuance\">\n last issued on {{ element?.last_stock_issuance?.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_balance\" *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_balance }}\n </td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"reorder_point\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reorder_point }}\n </td>\n </ng-container>\n\n <!-- Selling Price Column -->\n <ng-container matColumnDef=\"sale_price\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Selling Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.sale_price | currency }}\n </td>\n </ng-container>\n\n <!-- Income Account Column -->\n <ng-container matColumnDef=\"income_account\">\n <th mat-header-cell *matHeaderCellDef>Income Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.income_account?.title }}\n </td>\n </ng-container>\n\n <!-- Expense Account Column -->\n <ng-container matColumnDef=\"expense_account\">\n <th mat-header-cell *matHeaderCellDef>Expense Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.expense_account?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-product-form-button\n [product]=\"element\"\n ></app-product-form-button>\n <mat-icon\n class=\"cursor-pointer\"\n matTooltip=\"View\"\n [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"\n >\n remove_red_eye\n </mat-icon>\n\n <app-stock-receipt-form-button\n [product]=\"element\"\n (saved)=\"reload()\"\n ></app-stock-receipt-form-button>\n\n <app-stock-issue-form-button\n [product]=\"element\"\n (saved)=\"reload()\"\n ></app-stock-issue-form-button>\n </div>\n </td>\n </ng-container>\n <tr\n mat-header-row\n *matHeaderRowDef=\"displayedColumns; sticky: true\"\n ></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n" }]
|
|
628
621
|
}], ctorParameters: () => [{ type: i2.FormBuilder }, { type: i1.MatDialog }, { type: i2$1.ActivatedRoute }, { type: ProductService }, { type: i1$1.RequestHelperService }, { type: ProductFormService }] });
|
|
629
622
|
|
|
630
623
|
class ProductNavBarComponent {
|
|
@@ -1107,7 +1100,8 @@ class ProductModule {
|
|
|
1107
1100
|
InfiniteScrollModule,
|
|
1108
1101
|
FlexModule,
|
|
1109
1102
|
ReactiveFormsModule,
|
|
1110
|
-
FormsModule
|
|
1103
|
+
FormsModule,
|
|
1104
|
+
ColumnSelectorModule], exports: [ProductFormComponent,
|
|
1111
1105
|
ProductBasicInfoComponent,
|
|
1112
1106
|
ProductFormButtonComponent] });
|
|
1113
1107
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductModule, imports: [CommonModule,
|
|
@@ -1125,7 +1119,8 @@ class ProductModule {
|
|
|
1125
1119
|
InfiniteScrollModule,
|
|
1126
1120
|
FlexModule,
|
|
1127
1121
|
ReactiveFormsModule,
|
|
1128
|
-
FormsModule
|
|
1122
|
+
FormsModule,
|
|
1123
|
+
ColumnSelectorModule] });
|
|
1129
1124
|
}
|
|
1130
1125
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductModule, decorators: [{
|
|
1131
1126
|
type: NgModule,
|
|
@@ -1159,6 +1154,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1159
1154
|
FlexModule,
|
|
1160
1155
|
ReactiveFormsModule,
|
|
1161
1156
|
FormsModule,
|
|
1157
|
+
ColumnSelectorModule,
|
|
1162
1158
|
],
|
|
1163
1159
|
exports: [
|
|
1164
1160
|
ProductFormComponent,
|
|
@@ -1169,4 +1165,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1169
1165
|
}] });
|
|
1170
1166
|
|
|
1171
1167
|
export { ProductModule };
|
|
1172
|
-
//# sourceMappingURL=techlify-inventory-common-product.module-
|
|
1168
|
+
//# sourceMappingURL=techlify-inventory-common-product.module-BV9Cy88x.mjs.map
|