techlify-inventory-common 18.25.0 → 18.27.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/category/category-form/category-form.component.mjs +4 -6
- package/esm2022/lib/inventory-common/incident/incident-form/incident-form.component.mjs +4 -7
- package/esm2022/lib/inventory-common/incident/incident-list/incident-list.component.mjs +1 -1
- package/esm2022/lib/inventory-common/location/location-form/location-form.component.mjs +4 -6
- package/esm2022/lib/inventory-common/location/location-list/location-list.component.mjs +1 -1
- package/esm2022/lib/inventory-common/location/location-product-statistics/location-product-statistics.component.mjs +1 -1
- package/esm2022/lib/inventory-common/location/location-status-changer/location-status-changer.component.mjs +4 -6
- package/esm2022/lib/inventory-common/location/shelf/shelf-form/shelf-form.component.mjs +4 -6
- package/esm2022/lib/inventory-common/location/shelf/shelf-list/shelf-list.component.mjs +1 -1
- package/esm2022/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.mjs +4 -7
- package/esm2022/lib/inventory-common/measure/measures-list/measures-list.component.mjs +1 -1
- package/esm2022/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.mjs +1 -1
- package/esm2022/lib/inventory-common/product/product-batch-update-form/product-batch-update-form.component.mjs +4 -6
- package/esm2022/lib/inventory-common/product/product-list/product-list.component.mjs +4 -4
- package/esm2022/lib/inventory-common/product/product-location/product-location-list/product-location-list.component.mjs +1 -1
- package/esm2022/lib/inventory-common/product/product-quick-search/product-quick-search.component.mjs +1 -1
- package/esm2022/lib/inventory-common/product/product.module.mjs +1 -5
- package/esm2022/lib/inventory-common/rating/rating-form/rating-form.component.mjs +4 -7
- package/esm2022/lib/inventory-common/rating/rating-list/rating-list.component.mjs +1 -1
- package/esm2022/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.mjs +1 -1
- package/esm2022/lib/inventory-common/reports/low-stock-report/low-stock-report.component.mjs +1 -1
- package/esm2022/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.mjs +4 -7
- package/esm2022/lib/inventory-common/stock-issuances/stock-issue-list/stock-issue-list.component.mjs +13 -14
- package/esm2022/lib/inventory-common/stock-issuances/stock-issue-view/stock-issue-view.component.mjs +3 -3
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.mjs +4 -7
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.mjs +14 -14
- package/esm2022/lib/inventory-common/stock-transfer/stock-transfer-form/stock-transfer-form.component.mjs +4 -7
- package/esm2022/lib/inventory-common/stock-transfer/stock-transfer-list/stock-transfer-list.component.mjs +1 -1
- package/esm2022/lib/inventory-common/supplier/supplier-branch-delete-button/supplier-branch-delete-button.component.mjs +63 -0
- package/esm2022/lib/inventory-common/supplier/supplier-branch-form/supplier-branch-form-button/supplier-branch-form-button.component.mjs +47 -0
- package/esm2022/lib/inventory-common/supplier/supplier-branch-form/supplier-branch-form.component.mjs +79 -0
- package/esm2022/lib/inventory-common/supplier/supplier-branch.service.mjs +18 -0
- package/esm2022/lib/inventory-common/supplier/supplier-branches-list/supplier-branches-list.component.mjs +79 -0
- package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form.component.mjs +4 -7
- package/esm2022/lib/inventory-common/supplier/supplier-view/supplier-view.component.mjs +4 -3
- package/esm2022/lib/inventory-common/supplier/supplier.module.mjs +22 -9
- package/esm2022/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.mjs +20 -25
- package/fesm2022/{techlify-inventory-common-category.module-CW1zB9DQ.mjs → techlify-inventory-common-category.module-S6Val92n.mjs} +11 -13
- package/fesm2022/techlify-inventory-common-category.module-S6Val92n.mjs.map +1 -0
- package/fesm2022/{techlify-inventory-common-measure.module-DJqtbIad.mjs → techlify-inventory-common-measure.module-BhHMV-wL.mjs} +9 -12
- package/fesm2022/techlify-inventory-common-measure.module-BhHMV-wL.mjs.map +1 -0
- package/fesm2022/{techlify-inventory-common-stock-issue-view.component-eeonvCBl.mjs → techlify-inventory-common-stock-issue-view.component-CltIudzA.mjs} +4 -4
- package/fesm2022/{techlify-inventory-common-stock-issue-view.component-eeonvCBl.mjs.map → techlify-inventory-common-stock-issue-view.component-CltIudzA.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-techlify-inventory-common-EAdspCEd.mjs → techlify-inventory-common-techlify-inventory-common-f9URc8HX.mjs} +340 -296
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-f9URc8HX.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common.mjs +1 -1
- package/lib/inventory-common/category/category-form/category-form.component.d.ts +2 -3
- package/lib/inventory-common/incident/incident-form/incident-form.component.d.ts +2 -4
- package/lib/inventory-common/location/location-form/location-form.component.d.ts +3 -4
- package/lib/inventory-common/location/location-list/location-list.component.d.ts +1 -1
- package/lib/inventory-common/location/location-product-statistics/location-product-statistics.component.d.ts +1 -1
- package/lib/inventory-common/location/location-status-changer/location-status-changer.component.d.ts +3 -4
- package/lib/inventory-common/location/shelf/shelf-form/shelf-form.component.d.ts +3 -4
- package/lib/inventory-common/location/shelf/shelf-list/shelf-list.component.d.ts +1 -1
- package/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.d.ts +2 -4
- package/lib/inventory-common/product/product-batch-update-form/product-batch-update-form.component.d.ts +2 -3
- package/lib/inventory-common/product/product.module.d.ts +8 -9
- package/lib/inventory-common/rating/rating-form/rating-form.component.d.ts +2 -4
- package/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.d.ts +1 -1
- package/lib/inventory-common/reports/low-stock-report/low-stock-report.component.d.ts +1 -1
- package/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.d.ts +2 -4
- package/lib/inventory-common/stock-issuances/stock-issue-list/stock-issue-list.component.d.ts +1 -2
- package/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.d.ts +2 -4
- package/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.d.ts +1 -2
- package/lib/inventory-common/stock-transfer/stock-transfer-form/stock-transfer-form.component.d.ts +3 -5
- package/lib/inventory-common/stock-transfer/stock-transfer-list/stock-transfer-list.component.d.ts +1 -1
- package/lib/inventory-common/supplier/supplier-branch-delete-button/supplier-branch-delete-button.component.d.ts +18 -0
- package/lib/inventory-common/supplier/supplier-branch-form/supplier-branch-form-button/supplier-branch-form-button.component.d.ts +13 -0
- package/lib/inventory-common/supplier/supplier-branch-form/supplier-branch-form.component.d.ts +22 -0
- package/lib/inventory-common/supplier/supplier-branch.service.d.ts +7 -0
- package/lib/inventory-common/supplier/supplier-branches-list/supplier-branches-list.component.d.ts +18 -0
- package/lib/inventory-common/supplier/supplier-form/supplier-form.component.d.ts +2 -4
- package/lib/inventory-common/supplier/supplier.module.d.ts +18 -14
- package/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.d.ts +2 -5
- package/package.json +1 -1
- package/esm2022/lib/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.mjs +0 -54
- package/esm2022/lib/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.mjs +0 -77
- package/esm2022/lib/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.mjs +0 -35
- package/esm2022/lib/inventory-common/product/product-tax/product-tax.module.mjs +0 -22
- package/esm2022/lib/inventory-common/product/product-tax/product-tax.service.mjs +0 -18
- package/fesm2022/techlify-inventory-common-category.module-CW1zB9DQ.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-measure.module-DJqtbIad.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-EAdspCEd.mjs.map +0 -1
- package/lib/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.d.ts +0 -26
- package/lib/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.d.ts +0 -21
- package/lib/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.d.ts +0 -13
- package/lib/inventory-common/product/product-tax/product-tax.module.d.ts +0 -12
- package/lib/inventory-common/product/product-tax/product-tax.service.d.ts +0 -7
|
@@ -5,7 +5,7 @@ import { RouterLink, RouterModule, RouterLinkActive } from '@angular/router';
|
|
|
5
5
|
import moment from 'moment';
|
|
6
6
|
import * as i1 from 'ngx-techlify-core';
|
|
7
7
|
import { TechlifyServiceBaseClass, TechlifyListingControllerInterface, TechlifyFormComponentInterface, SearchableSelectorModule, AuthenticationGuard, TechlifyFeatureModule, ImportCsvModule, TimelineFilterModule, MaterialModule as MaterialModule$1, ColumnSelectorModule, EntityFilesViewAllModule, NoteModule, TechlifyIconModule, ActionPopupComponent, AuditLogForModelModule } from 'ngx-techlify-core';
|
|
8
|
-
import * as
|
|
8
|
+
import * as i3$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';
|
|
@@ -19,7 +19,7 @@ import * as i11 from 'ngx-infinite-scroll';
|
|
|
19
19
|
import { InfiniteScrollDirective, InfiniteScrollModule } from 'ngx-infinite-scroll';
|
|
20
20
|
import * as i2$1 from 'angular-google-charts';
|
|
21
21
|
import { ChartType, GoogleChartsModule } from 'angular-google-charts';
|
|
22
|
-
import * as
|
|
22
|
+
import * as i8 from '@angular/material/form-field';
|
|
23
23
|
import { MatFormFieldModule, MatFormField, MatLabel, MatSuffix, MatError, MatHint } from '@angular/material/form-field';
|
|
24
24
|
import * as i9$1 from '@angular/material/input';
|
|
25
25
|
import { MatInputModule, MatInput } from '@angular/material/input';
|
|
@@ -287,7 +287,7 @@ class ProductMeasureFormComponent {
|
|
|
287
287
|
return this.formValidatorService.getErrorMessage(field, this.productMeasureForm, errorMessages$1);
|
|
288
288
|
}
|
|
289
289
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductMeasureFormComponent, deps: [{ token: MeasureService }, { token: i2$2.FormBuilder }, { token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i4$1.NgxSpinnerService }, { token: i1.FormValidatorService }, { token: i1.ErrorHandlerService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
290
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductMeasureFormComponent, selector: "app-product-measure-form", ngImport: i0, template: "<div>\n <form [formGroup]=\"productMeasureForm\" (ngSubmit)=\"save()\">\n <h3 class=\"text-center\">Create/Update Product Measure</h3>\n <div fxLayout=\"column\">\n <div fxLayout=\"column\">\n <mat-form-field>\n <input matInput placeholder=\"Title\" formControlName=\"title\" required />\n <mat-error *ngIf=\"isFieldValid('title')\">{{ getErrorMessage('title') }} </mat-error>\n </mat-form-field>\n <mat-form-field>\n <input matInput placeholder=\"Description\" formControlName=\"description\" required />\n <mat-error *ngIf=\"isFieldValid('description')\">{{ getErrorMessage('description') }} </mat-error>\n </mat-form-field>\n <div fxFlex=\"100%\" fxLayout fxLayoutGap=\"1rem\">\n <button mat-button class=\"mt-2\" type=\"button\" (click)=\"dialogRef.close()\">Cancel</button>\n <button mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">Save</button>\n </div>\n </div>\n </div>\n </form>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type:
|
|
290
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductMeasureFormComponent, selector: "app-product-measure-form", ngImport: i0, template: "<div>\n <form [formGroup]=\"productMeasureForm\" (ngSubmit)=\"save()\">\n <h3 class=\"text-center\">Create/Update Product Measure</h3>\n <div fxLayout=\"column\">\n <div fxLayout=\"column\">\n <mat-form-field>\n <input matInput placeholder=\"Title\" formControlName=\"title\" required />\n <mat-error *ngIf=\"isFieldValid('title')\">{{ getErrorMessage('title') }} </mat-error>\n </mat-form-field>\n <mat-form-field>\n <input matInput placeholder=\"Description\" formControlName=\"description\" required />\n <mat-error *ngIf=\"isFieldValid('description')\">{{ getErrorMessage('description') }} </mat-error>\n </mat-form-field>\n <div fxFlex=\"100%\" fxLayout fxLayoutGap=\"1rem\">\n <button mat-button class=\"mt-2\" type=\"button\" (click)=\"dialogRef.close()\">Cancel</button>\n <button mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">Save</button>\n </div>\n </div>\n </div>\n </form>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
|
|
291
291
|
}
|
|
292
292
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductMeasureFormComponent, decorators: [{
|
|
293
293
|
type: Component,
|
|
@@ -408,7 +408,7 @@ let ProductMeasuresListComponent = class ProductMeasuresListComponent {
|
|
|
408
408
|
//Add 'implements OnDestroy' to the class.
|
|
409
409
|
}
|
|
410
410
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductMeasuresListComponent, deps: [{ token: i2$2.FormBuilder }, { token: i1$1.MatDialog }, { token: i1.FilterService }, { token: i2.ActivatedRoute }, { token: MeasureService }], target: i0.ɵɵFactoryTarget.Component });
|
|
411
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductMeasuresListComponent, selector: "app-product-measure-list", ngImport: i0, template: "<div fxLayout=\"column\">\n <div class=\"text-center\" fxLayoutAlign=\"center center\">\n <h3 fxLayout>\n <span class=\"mt-1\"> Product Measures </span>\n <button mat-raised-button class=\"ml-2\" color=\"primary\" (click)=\"modifyProductMeasure()\">\n <mat-icon>add</mat-icon>\n Product Measure\n </button>\n </h3>\n </div>\n\n <div fxLayout>\n <form [formGroup]=\"filterFormGroup\" fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field>\n <input matInput placeholder=\"Item Name, Description, etc.\" formControlName=\"search\" />\n </mat-form-field>\n </form>\n\n <mat-form-field class=\"ml-2\" fxFlex=\"0 1 calc(11.11% - 0.5rem)\">\n <mat-label>Columns</mat-label>\n <mat-select [(ngModel)]=\"displayedColumns\" multiple name=\"column\">\n <mat-option *ngFor=\"let column of columnDefinitions\" [value]=\"column.def\" [disabled]=\"!column.isShow\">\n {{ column?.def }}</mat-option\n >\n </mat-select>\n </mat-form-field>\n </div>\n\n <table\n mat-table\n #table\n [dataSource]=\"dataSource\"\n class=\"mat-elevation-z8 w-100 mt-4 table-hover\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n infiniteScrollContainer=\"mat-sidenav-content\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n matSortDisableClear=\"true\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"Title\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.title }}</td>\n </ng-container>\n\n <!-- Description Column -->\n <ng-container matColumnDef=\"Description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary\" fxLayoutGap=\"1rem\">\n <button mat-icon-button (click)=\"modifyProductMeasure(element)\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatLabel, selector: "mat-label" }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], preserveWhitespaces: true });
|
|
411
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductMeasuresListComponent, selector: "app-product-measure-list", ngImport: i0, template: "<div fxLayout=\"column\">\n <div class=\"text-center\" fxLayoutAlign=\"center center\">\n <h3 fxLayout>\n <span class=\"mt-1\"> Product Measures </span>\n <button mat-raised-button class=\"ml-2\" color=\"primary\" (click)=\"modifyProductMeasure()\">\n <mat-icon>add</mat-icon>\n Product Measure\n </button>\n </h3>\n </div>\n\n <div fxLayout>\n <form [formGroup]=\"filterFormGroup\" fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field>\n <input matInput placeholder=\"Item Name, Description, etc.\" formControlName=\"search\" />\n </mat-form-field>\n </form>\n\n <mat-form-field class=\"ml-2\" fxFlex=\"0 1 calc(11.11% - 0.5rem)\">\n <mat-label>Columns</mat-label>\n <mat-select [(ngModel)]=\"displayedColumns\" multiple name=\"column\">\n <mat-option *ngFor=\"let column of columnDefinitions\" [value]=\"column.def\" [disabled]=\"!column.isShow\">\n {{ column?.def }}</mat-option\n >\n </mat-select>\n </mat-form-field>\n </div>\n\n <table\n mat-table\n #table\n [dataSource]=\"dataSource\"\n class=\"mat-elevation-z8 w-100 mt-4 table-hover\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n infiniteScrollContainer=\"mat-sidenav-content\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n matSortDisableClear=\"true\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"Title\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.title }}</td>\n </ng-container>\n\n <!-- Description Column -->\n <ng-container matColumnDef=\"Description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary\" fxLayoutGap=\"1rem\">\n <button mat-icon-button (click)=\"modifyProductMeasure(element)\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], preserveWhitespaces: true });
|
|
412
412
|
};
|
|
413
413
|
ProductMeasuresListComponent = __decorate([
|
|
414
414
|
UntilDestroy()
|
|
@@ -543,7 +543,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
543
543
|
|
|
544
544
|
class SupplierFormComponent extends TechlifyFormComponentInterface {
|
|
545
545
|
fb;
|
|
546
|
-
alertService;
|
|
547
546
|
spinnerService;
|
|
548
547
|
dialogRef;
|
|
549
548
|
errorService;
|
|
@@ -560,13 +559,11 @@ class SupplierFormComponent extends TechlifyFormComponentInterface {
|
|
|
560
559
|
required: 'The address field is required',
|
|
561
560
|
},
|
|
562
561
|
};
|
|
563
|
-
isWorking = false;
|
|
564
562
|
isUpdateMode = false;
|
|
565
563
|
supplierForm;
|
|
566
|
-
constructor(fb, formValidatorService,
|
|
564
|
+
constructor(fb, formValidatorService, spinnerService, dialogRef, errorService, data, supplierService) {
|
|
567
565
|
super(formValidatorService);
|
|
568
566
|
this.fb = fb;
|
|
569
|
-
this.alertService = alertService;
|
|
570
567
|
this.spinnerService = spinnerService;
|
|
571
568
|
this.dialogRef = dialogRef;
|
|
572
569
|
this.errorService = errorService;
|
|
@@ -620,13 +617,13 @@ class SupplierFormComponent extends TechlifyFormComponentInterface {
|
|
|
620
617
|
getErrorMessage(field) {
|
|
621
618
|
return this.formValidatorService.getErrorMessage(field, this.supplierForm, this.errorMessages);
|
|
622
619
|
}
|
|
623
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierFormComponent, deps: [{ token: i2$2.FormBuilder }, { token: i1.FormValidatorService }, { token:
|
|
624
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierFormComponent, selector: "app-supplier-form", usesInheritance: true, ngImport: i0, template: "<form (ngSubmit)=\"submit()\" [formGroup]=\"supplierForm\" class=\"mat-typography\">\n <div class=\"d-flex flex-column justify-content-start gap-2\" mat-dialog-content>\n <h2 class=\"mb-2\">{{ isUpdateMode ? 'Edit' : 'Create' }} Supplier</h2>\n <mat-form-field>\n <mat-label>Company Name</mat-label>\n <input autocomplete=\"off\" formControlName=\"company_name\" matInput placeholder=\"Company Name\" required />\n <mat-error *ngIf=\"isFieldValid('company_name')\">\n {{ getErrorMessage('company_name') }}\n </mat-error>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Contact Name</mat-label>\n <input autocomplete=\"off\" formControlName=\"contact_name\" matInput placeholder=\"Contact Name\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Types</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_id\" titleField=\"title\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('supplier_type_id')\">\n {{ getErrorMessage('supplier_type_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Phone</mat-label>\n <input autocomplete=\"off\" formControlName=\"phone\" matInput placeholder=\"Phone\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input autocomplete=\"off\" formControlName=\"email\" matInput placeholder=\"Email\" type=\"email\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Address</mat-label>\n <input autocomplete=\"off\" formControlName=\"address\" matInput placeholder=\"Address\" />\n <mat-error *ngIf=\"isFieldValid('address')\">\n {{ getErrorMessage('address') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <input autocomplete=\"off\" formControlName=\"details\" matInput placeholder=\"Details\" />\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button (click)=\"dialogRef.close()\" [disabled]=\"isWorking\" mat-flat-button type=\"button\">Cancel</button>\n <button [disabled]=\"isWorking\" color=\"primary\" mat-raised-button type=\"submit\">Save</button>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type:
|
|
620
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierFormComponent, deps: [{ token: i2$2.FormBuilder }, { token: i1.FormValidatorService }, { token: i4$1.NgxSpinnerService }, { token: i1$1.MatDialogRef }, { token: i1.ErrorHandlerService }, { token: MAT_DIALOG_DATA }, { token: SupplierService }], target: i0.ɵɵFactoryTarget.Component });
|
|
621
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierFormComponent, selector: "app-supplier-form", usesInheritance: true, ngImport: i0, template: "<form (ngSubmit)=\"submit()\" [formGroup]=\"supplierForm\" class=\"mat-typography\">\n <div class=\"d-flex flex-column justify-content-start gap-2\" mat-dialog-content>\n <h2 class=\"mb-2\">{{ isUpdateMode ? 'Edit' : 'Create' }} Supplier</h2>\n <mat-form-field>\n <mat-label>Company Name</mat-label>\n <input autocomplete=\"off\" formControlName=\"company_name\" matInput placeholder=\"Company Name\" required />\n <mat-error *ngIf=\"isFieldValid('company_name')\">\n {{ getErrorMessage('company_name') }}\n </mat-error>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Contact Name</mat-label>\n <input autocomplete=\"off\" formControlName=\"contact_name\" matInput placeholder=\"Contact Name\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Types</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_id\" titleField=\"title\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('supplier_type_id')\">\n {{ getErrorMessage('supplier_type_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Phone</mat-label>\n <input autocomplete=\"off\" formControlName=\"phone\" matInput placeholder=\"Phone\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input autocomplete=\"off\" formControlName=\"email\" matInput placeholder=\"Email\" type=\"email\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Address</mat-label>\n <input autocomplete=\"off\" formControlName=\"address\" matInput placeholder=\"Address\" />\n <mat-error *ngIf=\"isFieldValid('address')\">\n {{ getErrorMessage('address') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <input autocomplete=\"off\" formControlName=\"details\" matInput placeholder=\"Details\" />\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button (click)=\"dialogRef.close()\" [disabled]=\"isWorking\" mat-flat-button type=\"button\">Cancel</button>\n <button [disabled]=\"isWorking\" color=\"primary\" mat-raised-button type=\"submit\">Save</button>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
|
|
625
622
|
}
|
|
626
623
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierFormComponent, decorators: [{
|
|
627
624
|
type: Component,
|
|
628
625
|
args: [{ selector: 'app-supplier-form', template: "<form (ngSubmit)=\"submit()\" [formGroup]=\"supplierForm\" class=\"mat-typography\">\n <div class=\"d-flex flex-column justify-content-start gap-2\" mat-dialog-content>\n <h2 class=\"mb-2\">{{ isUpdateMode ? 'Edit' : 'Create' }} Supplier</h2>\n <mat-form-field>\n <mat-label>Company Name</mat-label>\n <input autocomplete=\"off\" formControlName=\"company_name\" matInput placeholder=\"Company Name\" required />\n <mat-error *ngIf=\"isFieldValid('company_name')\">\n {{ getErrorMessage('company_name') }}\n </mat-error>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Contact Name</mat-label>\n <input autocomplete=\"off\" formControlName=\"contact_name\" matInput placeholder=\"Contact Name\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Types</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_id\" titleField=\"title\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('supplier_type_id')\">\n {{ getErrorMessage('supplier_type_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Phone</mat-label>\n <input autocomplete=\"off\" formControlName=\"phone\" matInput placeholder=\"Phone\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input autocomplete=\"off\" formControlName=\"email\" matInput placeholder=\"Email\" type=\"email\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Address</mat-label>\n <input autocomplete=\"off\" formControlName=\"address\" matInput placeholder=\"Address\" />\n <mat-error *ngIf=\"isFieldValid('address')\">\n {{ getErrorMessage('address') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <input autocomplete=\"off\" formControlName=\"details\" matInput placeholder=\"Details\" />\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button (click)=\"dialogRef.close()\" [disabled]=\"isWorking\" mat-flat-button type=\"button\">Cancel</button>\n <button [disabled]=\"isWorking\" color=\"primary\" mat-raised-button type=\"submit\">Save</button>\n </div>\n </div>\n</form>\n" }]
|
|
629
|
-
}], ctorParameters: () => [{ type: i2$2.FormBuilder }, { type: i1.FormValidatorService }, { type:
|
|
626
|
+
}], ctorParameters: () => [{ type: i2$2.FormBuilder }, { type: i1.FormValidatorService }, { type: i4$1.NgxSpinnerService }, { type: i1$1.MatDialogRef }, { type: i1.ErrorHandlerService }, { type: undefined, decorators: [{
|
|
630
627
|
type: Inject,
|
|
631
628
|
args: [MAT_DIALOG_DATA]
|
|
632
629
|
}] }, { type: SupplierService }] });
|
|
@@ -659,7 +656,7 @@ class PayeeSelectorComponent {
|
|
|
659
656
|
useExisting: forwardRef(() => PayeeSelectorComponent),
|
|
660
657
|
multi: true,
|
|
661
658
|
},
|
|
662
|
-
], ngImport: i0, template: "<mat-form-field [appearance]=\"appearance\" class=\"w-100\">\n <mat-label>{{ label }}</mat-label>\n <app-searchable-selector\n apiUrl=\"api/suppliers\"\n titleField=\"company_name\"\n sortBy=\"company_name|asc\"\n [required]=\"required\"\n [(ngModel)]=\"value\"\n #payeeSelector=\"ngModel\"\n name=\"payeeSelector\"\n [add]=\"showAddButton\"\n [itemComponent]=\"SupplierFormComponent\"\n (ngModelChange)=\"onChange($event)\"\n [addConfig]=\"{ width: '600px' }\"\n [ngModelOptions]=\"{ standalone: true }\"\n [multiple]=\"multiple\"\n >\n </app-searchable-selector>\n <mat-error *ngIf=\"payeeSelector.invalid && payeeSelector.touched\"> The payee field is required. </mat-error>\n</mat-form-field>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type:
|
|
659
|
+
], ngImport: i0, template: "<mat-form-field [appearance]=\"appearance\" class=\"w-100\">\n <mat-label>{{ label }}</mat-label>\n <app-searchable-selector\n apiUrl=\"api/suppliers\"\n titleField=\"company_name\"\n sortBy=\"company_name|asc\"\n [required]=\"required\"\n [(ngModel)]=\"value\"\n #payeeSelector=\"ngModel\"\n name=\"payeeSelector\"\n [add]=\"showAddButton\"\n [itemComponent]=\"SupplierFormComponent\"\n (ngModelChange)=\"onChange($event)\"\n [addConfig]=\"{ width: '600px' }\"\n [ngModelOptions]=\"{ standalone: true }\"\n [multiple]=\"multiple\"\n >\n </app-searchable-selector>\n <mat-error *ngIf=\"payeeSelector.invalid && payeeSelector.touched\"> The payee field is required. </mat-error>\n</mat-form-field>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], preserveWhitespaces: true });
|
|
663
660
|
}
|
|
664
661
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PayeeSelectorComponent, decorators: [{
|
|
665
662
|
type: Component,
|
|
@@ -685,7 +682,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
685
682
|
class StockReceiptFormComponent extends TechlifyFormComponentInterface {
|
|
686
683
|
formBuilder;
|
|
687
684
|
stockReceiptService;
|
|
688
|
-
alertService;
|
|
689
685
|
dateUtils;
|
|
690
686
|
locationService;
|
|
691
687
|
product;
|
|
@@ -694,13 +690,11 @@ class StockReceiptFormComponent extends TechlifyFormComponentInterface {
|
|
|
694
690
|
latestLocationId;
|
|
695
691
|
saved = new EventEmitter();
|
|
696
692
|
cancelled = new EventEmitter();
|
|
697
|
-
isWorking;
|
|
698
693
|
locationsCountValue = 0;
|
|
699
|
-
constructor(formValidatorService, formBuilder, stockReceiptService,
|
|
694
|
+
constructor(formValidatorService, formBuilder, stockReceiptService, dateUtils, locationService) {
|
|
700
695
|
super(formValidatorService);
|
|
701
696
|
this.formBuilder = formBuilder;
|
|
702
697
|
this.stockReceiptService = stockReceiptService;
|
|
703
|
-
this.alertService = alertService;
|
|
704
698
|
this.dateUtils = dateUtils;
|
|
705
699
|
this.locationService = locationService;
|
|
706
700
|
this.errorMessages = {
|
|
@@ -829,13 +823,13 @@ class StockReceiptFormComponent extends TechlifyFormComponentInterface {
|
|
|
829
823
|
const amount = parseFloat(purchase_price) * parseFloat(quantity) || 0;
|
|
830
824
|
this.form.get('amount')?.setValue(amount);
|
|
831
825
|
}
|
|
832
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: StockReceiptService }, { token: i1.
|
|
833
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockReceiptFormComponent, selector: "app-stock-receipt-form", inputs: { product: "product", stockReceipt: "stockReceipt", stockReceiptProduct: "stockReceiptProduct", latestLocationId: "latestLocationId" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<h3 class=\"text-center\">{{ stockReceipt?.id ? 'Edit' : 'Receive' }} Stock for {{ product?.name }}</h3>\n<form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n <app-payee-selector label=\"Supplier\" formControlName=\"supplier_id\" appearance=\"fill\"\n [showAddButton]=\"true\"></app-payee-selector>\n\n <mat-form-field *ngIf=\"locationsCount > 1\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('quantity')\">\n {{ getErrorMessage('quantity') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Purchase Price</mat-label>\n <input matInput formControlName=\"purchase_price\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('purchase_price')\">\n {{ getErrorMessage('purchase_price') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Total Value</mat-label>\n <input matInput formControlName=\"amount\" readonly type=\"number\" min=\"0\" />\n </mat-form-field>\n\n <div techlifyFeatureEnabled=\"product-batch-numbers\" class=\"d-flex flex-column gap-2 w-100\">\n <mat-form-field>\n <mat-label>Batch #</mat-label>\n <input type=\"text\" formControlName=\"batch_number\" matInput placeholder=\"Batch #\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Expires On</mat-label>\n <input matInput [matDatepicker]=\"expiresOnPicker\" formControlName=\"expires_on\" (focus)=\"expiresOnPicker.open()\" />\n <mat-datepicker #expiresOnPicker></mat-datepicker>\n </mat-form-field>\n </div>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"cancelled.emit()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PayeeSelectorComponent, selector: "app-payee-selector", inputs: ["label", "appearance", "required", "showAddButton", "multiple"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type:
|
|
826
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: StockReceiptService }, { token: i1.DateUtils }, { token: LocationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
827
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockReceiptFormComponent, selector: "app-stock-receipt-form", inputs: { product: "product", stockReceipt: "stockReceipt", stockReceiptProduct: "stockReceiptProduct", latestLocationId: "latestLocationId" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<h3 class=\"text-center\">{{ stockReceipt?.id ? 'Edit' : 'Receive' }} Stock for {{ product?.name }}</h3>\n<form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n <app-payee-selector label=\"Supplier\" formControlName=\"supplier_id\" appearance=\"fill\"\n [showAddButton]=\"true\"></app-payee-selector>\n\n <mat-form-field *ngIf=\"locationsCount > 1\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('quantity')\">\n {{ getErrorMessage('quantity') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Purchase Price</mat-label>\n <input matInput formControlName=\"purchase_price\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('purchase_price')\">\n {{ getErrorMessage('purchase_price') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Total Value</mat-label>\n <input matInput formControlName=\"amount\" readonly type=\"number\" min=\"0\" />\n </mat-form-field>\n\n <div techlifyFeatureEnabled=\"product-batch-numbers\" class=\"d-flex flex-column gap-2 w-100\">\n <mat-form-field>\n <mat-label>Batch #</mat-label>\n <input type=\"text\" formControlName=\"batch_number\" matInput placeholder=\"Batch #\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Expires On</mat-label>\n <input matInput [matDatepicker]=\"expiresOnPicker\" formControlName=\"expires_on\" (focus)=\"expiresOnPicker.open()\" />\n <mat-datepicker #expiresOnPicker></mat-datepicker>\n </mat-form-field>\n </div>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"cancelled.emit()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PayeeSelectorComponent, selector: "app-payee-selector", inputs: ["label", "appearance", "required", "showAddButton", "multiple"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: i1.TechlifyFeatureEnabledDirective, selector: "[techlifyFeatureEnabled]", inputs: ["techlifyFeatureEnabled"] }], preserveWhitespaces: true });
|
|
834
828
|
}
|
|
835
829
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormComponent, decorators: [{
|
|
836
830
|
type: Component,
|
|
837
831
|
args: [{ selector: 'app-stock-receipt-form', template: "<h3 class=\"text-center\">{{ stockReceipt?.id ? 'Edit' : 'Receive' }} Stock for {{ product?.name }}</h3>\n<form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n <app-payee-selector label=\"Supplier\" formControlName=\"supplier_id\" appearance=\"fill\"\n [showAddButton]=\"true\"></app-payee-selector>\n\n <mat-form-field *ngIf=\"locationsCount > 1\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('quantity')\">\n {{ getErrorMessage('quantity') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Purchase Price</mat-label>\n <input matInput formControlName=\"purchase_price\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('purchase_price')\">\n {{ getErrorMessage('purchase_price') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Total Value</mat-label>\n <input matInput formControlName=\"amount\" readonly type=\"number\" min=\"0\" />\n </mat-form-field>\n\n <div techlifyFeatureEnabled=\"product-batch-numbers\" class=\"d-flex flex-column gap-2 w-100\">\n <mat-form-field>\n <mat-label>Batch #</mat-label>\n <input type=\"text\" formControlName=\"batch_number\" matInput placeholder=\"Batch #\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Expires On</mat-label>\n <input matInput [matDatepicker]=\"expiresOnPicker\" formControlName=\"expires_on\" (focus)=\"expiresOnPicker.open()\" />\n <mat-datepicker #expiresOnPicker></mat-datepicker>\n </mat-form-field>\n </div>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"cancelled.emit()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n</form>\n" }]
|
|
838
|
-
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: StockReceiptService }, { type: i1.
|
|
832
|
+
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: StockReceiptService }, { type: i1.DateUtils }, { type: LocationService }], propDecorators: { product: [{
|
|
839
833
|
type: Input
|
|
840
834
|
}], stockReceipt: [{
|
|
841
835
|
type: Input
|
|
@@ -902,7 +896,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
902
896
|
class StockIssueFormComponent extends TechlifyFormComponentInterface {
|
|
903
897
|
formBuilder;
|
|
904
898
|
stockIssueService;
|
|
905
|
-
alertService;
|
|
906
899
|
dateUtils;
|
|
907
900
|
locationService;
|
|
908
901
|
product;
|
|
@@ -913,15 +906,13 @@ class StockIssueFormComponent extends TechlifyFormComponentInterface {
|
|
|
913
906
|
saved = new EventEmitter();
|
|
914
907
|
cancelled = new EventEmitter();
|
|
915
908
|
batchSearchableSelector;
|
|
916
|
-
isWorking;
|
|
917
909
|
locationsCountValue = 0;
|
|
918
910
|
batchesApiUrl = '';
|
|
919
911
|
isBatchPatched = false;
|
|
920
|
-
constructor(formValidatorService, formBuilder, stockIssueService,
|
|
912
|
+
constructor(formValidatorService, formBuilder, stockIssueService, dateUtils, locationService) {
|
|
921
913
|
super(formValidatorService);
|
|
922
914
|
this.formBuilder = formBuilder;
|
|
923
915
|
this.stockIssueService = stockIssueService;
|
|
924
|
-
this.alertService = alertService;
|
|
925
916
|
this.dateUtils = dateUtils;
|
|
926
917
|
this.locationService = locationService;
|
|
927
918
|
this.errorMessages = {
|
|
@@ -1064,13 +1055,13 @@ class StockIssueFormComponent extends TechlifyFormComponentInterface {
|
|
|
1064
1055
|
}
|
|
1065
1056
|
});
|
|
1066
1057
|
}
|
|
1067
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: StockIssueService }, { token: i1.
|
|
1068
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueFormComponent, selector: "app-stock-issue-form", inputs: { product: "product", stockIssueProduct: "stockIssueProduct", stockIssue: "stockIssue", issuableType: "issuableType", issuableId: "issuableId" }, outputs: { saved: "saved", cancelled: "cancelled" }, viewQueries: [{ propertyName: "batchSearchableSelector", first: true, predicate: ["batchSearchableSelector"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<h3 class=\"text-center\">{{ stockIssue?.id ? 'Edit' : 'Issue' }} Stock for {{ product?.name }}</h3>\n<form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n <mat-form-field *ngIf=\"!product\">\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n (selectedValueChange)=\"onProductChange($event)\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"locationsCount > 1\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"\n [selectedValue]=\"stockIssue?.stock_issue_products[0]?.location\"></app-searchable-selector>\n </mat-form-field>\n\n <ng-container *ngIf=\"locationsCount > 1 && form.value?.location_id && batchesApiUrl\">\n <mat-form-field techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSearchableSelector formControlName=\"batch_id\"\n [apiUrl]=\"batchesApiUrl\" [enableSearch]=\"false\"\n (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('quantity')\">\n {{ getErrorMessage('quantity') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"cancelled.emit()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type:
|
|
1058
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: StockIssueService }, { token: i1.DateUtils }, { token: LocationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1059
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueFormComponent, selector: "app-stock-issue-form", inputs: { product: "product", stockIssueProduct: "stockIssueProduct", stockIssue: "stockIssue", issuableType: "issuableType", issuableId: "issuableId" }, outputs: { saved: "saved", cancelled: "cancelled" }, viewQueries: [{ propertyName: "batchSearchableSelector", first: true, predicate: ["batchSearchableSelector"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<h3 class=\"text-center\">{{ stockIssue?.id ? 'Edit' : 'Issue' }} Stock for {{ product?.name }}</h3>\n<form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n <mat-form-field *ngIf=\"!product\">\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n (selectedValueChange)=\"onProductChange($event)\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"locationsCount > 1\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"\n [selectedValue]=\"stockIssue?.stock_issue_products[0]?.location\"></app-searchable-selector>\n </mat-form-field>\n\n <ng-container *ngIf=\"locationsCount > 1 && form.value?.location_id && batchesApiUrl\">\n <mat-form-field techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSearchableSelector formControlName=\"batch_id\"\n [apiUrl]=\"batchesApiUrl\" [enableSearch]=\"false\"\n (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('quantity')\">\n {{ getErrorMessage('quantity') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"cancelled.emit()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: i1.TechlifyFeatureEnabledDirective, selector: "[techlifyFeatureEnabled]", inputs: ["techlifyFeatureEnabled"] }], preserveWhitespaces: true });
|
|
1069
1060
|
}
|
|
1070
1061
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormComponent, decorators: [{
|
|
1071
1062
|
type: Component,
|
|
1072
1063
|
args: [{ selector: 'app-stock-issue-form', template: "<h3 class=\"text-center\">{{ stockIssue?.id ? 'Edit' : 'Issue' }} Stock for {{ product?.name }}</h3>\n<form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n <mat-form-field *ngIf=\"!product\">\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n (selectedValueChange)=\"onProductChange($event)\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"locationsCount > 1\">\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\"\n [selectedValue]=\"stockIssue?.stock_issue_products[0]?.location\"></app-searchable-selector>\n </mat-form-field>\n\n <ng-container *ngIf=\"locationsCount > 1 && form.value?.location_id && batchesApiUrl\">\n <mat-form-field techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSearchableSelector formControlName=\"batch_id\"\n [apiUrl]=\"batchesApiUrl\" [enableSearch]=\"false\"\n (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n <mat-error *ngIf=\"isFieldValid('quantity')\">\n {{ getErrorMessage('quantity') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"cancelled.emit()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n</form>" }]
|
|
1073
|
-
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: StockIssueService }, { type: i1.
|
|
1064
|
+
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: StockIssueService }, { type: i1.DateUtils }, { type: LocationService }], propDecorators: { product: [{
|
|
1074
1065
|
type: Input
|
|
1075
1066
|
}], stockIssueProduct: [{
|
|
1076
1067
|
type: Input
|
|
@@ -1466,7 +1457,7 @@ class ProductFormComponent {
|
|
|
1466
1457
|
return this.displayedFormSections.length > 0 && this.displayedFormSections.includes(sectionName);
|
|
1467
1458
|
}
|
|
1468
1459
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductFormComponent, deps: [{ token: ProductService }, { token: i2$2.FormBuilder }, { token: i1.FormValidatorService }, { token: i1.AlertService }, { token: i3.DatePipe }, { token: ProductFormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1469
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductFormComponent, selector: "app-product-form", inputs: { product: "product", displayedFormFields: "displayedFormFields", displayedFormSections: "displayedFormSections" }, outputs: { saved: "saved", cancelled: "cancelled" }, ngImport: i0, template: "<form [formGroup]=\"productForm\" (submit)=\"save()\">\n <h3 class=\"text-center\">{{ product?.id ? 'Update' : 'Create' }} Product</h3>\n <div fxLayout=\"column\">\n <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('basic information')\">\n <h3><strong>Basic Information</strong></h3>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('name')\">\n <mat-label>Name</mat-label>\n <input matInput placeholder=\"Name\" formControlName=\"name\" required />\n <mat-error *ngIf=\"isFieldValid('name')\">{{ getErrorMessage('name') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('product type')\">\n <mat-label>Product Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_id\"> </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('type_id')\">{{ getErrorMessage('type_id') }} </mat-error>\n </mat-form-field>\n </div>\n\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('sku')\">\n <mat-label>SKU</mat-label>\n <input matInput placeholder=\"SKU\" formControlName=\"sku\" />\n <mat-error *ngIf=\"isFieldValid('sku')\">{{ getErrorMessage('sku') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\">\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('category_ids')\">\n {{ getErrorMessage('category_ids') }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"100%\" *ngIf=\"isFormFieldShown('description')\">\n <mat-label>Description</mat-label>\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n </div>\n </div>\n\n <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('inventory information')\">\n <h3><strong>Inventory Information</strong></h3>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('product measure')\">\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_id\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('measure_id')\">{{ getErrorMessage('measure_id') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('reorder point')\">\n <mat-label>Reorder Point</mat-label>\n <input matInput placeholder=\"Reorder Point\" formControlName=\"reorder_point\" type=\"number\" />\n <mat-error *ngIf=\"isFieldValid('reorder_point')\">{{ getErrorMessage('reorder_point') }} </mat-error>\n </mat-form-field>\n </div>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('initial quantity')\">\n <mat-label>Initial Quantity</mat-label>\n <input matInput placeholder=\"Initial Quantity\" formControlName=\"initial_quantity\" />\n <mat-error *ngIf=\"isFieldValid('initial_quantity')\">{{ getErrorMessage('initial_quantity') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('initial quantity date')\">\n <mat-label>Initial Quantity Date</mat-label>\n <input matInput [matDatepicker]=\"pickerInitialQuantityDate\" placeholder=\"Initial Quantity Date\"\n formControlName=\"initial_quantity_date\" />\n <mat-datepicker-toggle matSuffix [for]=\"pickerInitialQuantityDate\"></mat-datepicker-toggle>\n <mat-datepicker #pickerInitialQuantityDate></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('initial_quantity_date')\">{{ getErrorMessage('initial_quantity_date') }}\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('sales information')\">\n <h3><strong>Sale Information</strong></h3>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('sales price')\">\n <mat-label>Selling Price</mat-label>\n <input matInput placeholder=\"Selling Price\" formControlName=\"sale_price\" required type=\"number\" step=\"any\" />\n <mat-error *ngIf=\"isFieldValid('sale_price')\">{{ getErrorMessage('sale_price') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('condition types')\">\n <mat-label>Condition</mat-label>\n <app-searchable-selector apiUrl=\"api/condition-types\"\n formControlName=\"condition_type_id\"></app-searchable-selector>\n </mat-form-field>\n </div>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('minimum price')\">\n <mat-label>Minimum Price</mat-label>\n <input matInput placeholder=\"Minimum Price\" formControlName=\"minimum_price\" required type=\"number\"\n step=\"any\" />\n <mat-error *ngIf=\"isFieldValid('minimum_price')\">{{ getErrorMessage('minimum_price') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('maximum price')\">\n <mat-label>Maximum Price</mat-label>\n <input matInput placeholder=\"Maximum Price\" formControlName=\"maximum_price\" type=\"number\" step=\"any\" />\n </mat-form-field>\n </div>\n </div>\n\n <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n <button [disabled]=\"isWorking\" mat-button class=\"mt-2\" type=\"button\" (click)=\"cancelled.emit(true)\">\n Cancel\n </button>\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">Save</button>\n </div>\n </div>\n</form>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i7$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
|
|
1460
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductFormComponent, selector: "app-product-form", inputs: { product: "product", displayedFormFields: "displayedFormFields", displayedFormSections: "displayedFormSections" }, outputs: { saved: "saved", cancelled: "cancelled" }, ngImport: i0, template: "<form [formGroup]=\"productForm\" (submit)=\"save()\">\n <h3 class=\"text-center\">{{ product?.id ? 'Update' : 'Create' }} Product</h3>\n <div fxLayout=\"column\">\n <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('basic information')\">\n <h3><strong>Basic Information</strong></h3>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('name')\">\n <mat-label>Name</mat-label>\n <input matInput placeholder=\"Name\" formControlName=\"name\" required />\n <mat-error *ngIf=\"isFieldValid('name')\">{{ getErrorMessage('name') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('product type')\">\n <mat-label>Product Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_id\"> </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('type_id')\">{{ getErrorMessage('type_id') }} </mat-error>\n </mat-form-field>\n </div>\n\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('sku')\">\n <mat-label>SKU</mat-label>\n <input matInput placeholder=\"SKU\" formControlName=\"sku\" />\n <mat-error *ngIf=\"isFieldValid('sku')\">{{ getErrorMessage('sku') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\">\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('category_ids')\">\n {{ getErrorMessage('category_ids') }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"100%\" *ngIf=\"isFormFieldShown('description')\">\n <mat-label>Description</mat-label>\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n </div>\n </div>\n\n <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('inventory information')\">\n <h3><strong>Inventory Information</strong></h3>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('product measure')\">\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_id\">\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('measure_id')\">{{ getErrorMessage('measure_id') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('reorder point')\">\n <mat-label>Reorder Point</mat-label>\n <input matInput placeholder=\"Reorder Point\" formControlName=\"reorder_point\" type=\"number\" />\n <mat-error *ngIf=\"isFieldValid('reorder_point')\">{{ getErrorMessage('reorder_point') }} </mat-error>\n </mat-form-field>\n </div>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('initial quantity')\">\n <mat-label>Initial Quantity</mat-label>\n <input matInput placeholder=\"Initial Quantity\" formControlName=\"initial_quantity\" />\n <mat-error *ngIf=\"isFieldValid('initial_quantity')\">{{ getErrorMessage('initial_quantity') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('initial quantity date')\">\n <mat-label>Initial Quantity Date</mat-label>\n <input matInput [matDatepicker]=\"pickerInitialQuantityDate\" placeholder=\"Initial Quantity Date\"\n formControlName=\"initial_quantity_date\" />\n <mat-datepicker-toggle matSuffix [for]=\"pickerInitialQuantityDate\"></mat-datepicker-toggle>\n <mat-datepicker #pickerInitialQuantityDate></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('initial_quantity_date')\">{{ getErrorMessage('initial_quantity_date') }}\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <div fxLayout=\"column\" *ngIf=\"isFormSectionShown('sales information')\">\n <h3><strong>Sale Information</strong></h3>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('sales price')\">\n <mat-label>Selling Price</mat-label>\n <input matInput placeholder=\"Selling Price\" formControlName=\"sale_price\" required type=\"number\" step=\"any\" />\n <mat-error *ngIf=\"isFieldValid('sale_price')\">{{ getErrorMessage('sale_price') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('condition types')\">\n <mat-label>Condition</mat-label>\n <app-searchable-selector apiUrl=\"api/condition-types\"\n formControlName=\"condition_type_id\"></app-searchable-selector>\n </mat-form-field>\n </div>\n <div fxLayout fxLayoutGap=\"0.5rem\">\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('minimum price')\">\n <mat-label>Minimum Price</mat-label>\n <input matInput placeholder=\"Minimum Price\" formControlName=\"minimum_price\" required type=\"number\"\n step=\"any\" />\n <mat-error *ngIf=\"isFieldValid('minimum_price')\">{{ getErrorMessage('minimum_price') }} </mat-error>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"50%\" *ngIf=\"isFormFieldShown('maximum price')\">\n <mat-label>Maximum Price</mat-label>\n <input matInput placeholder=\"Maximum Price\" formControlName=\"maximum_price\" type=\"number\" step=\"any\" />\n </mat-form-field>\n </div>\n </div>\n\n <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n <button [disabled]=\"isWorking\" mat-button class=\"mt-2\" type=\"button\" (click)=\"cancelled.emit(true)\">\n Cancel\n </button>\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">Save</button>\n </div>\n </div>\n</form>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
|
|
1470
1461
|
}
|
|
1471
1462
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductFormComponent, decorators: [{
|
|
1472
1463
|
type: Component,
|
|
@@ -1506,7 +1497,7 @@ class ProductFormButtonComponent {
|
|
|
1506
1497
|
this.productFormService.listUpdated(true);
|
|
1507
1498
|
}
|
|
1508
1499
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductFormButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: ProductFormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1509
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: { product: "product" }, outputs: { saved: "saved" }, ngImport: i0, template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" [class.text-secondary]=\"product\" (click)=\"showForm(addProductForm)\">\n {{ product ? 'edit' : 'add' }}\n</mat-icon>\n\n<ng-template #addProductForm>\n <app-product-form\n [product]=\"product\"\n mat-dialog-content\n (saved)=\"onProductSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-product-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type:
|
|
1500
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: { product: "product" }, outputs: { saved: "saved" }, ngImport: i0, template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" [class.text-secondary]=\"product\" (click)=\"showForm(addProductForm)\">\n {{ product ? 'edit' : 'add' }}\n</mat-icon>\n\n<ng-template #addProductForm>\n <app-product-form\n [product]=\"product\"\n mat-dialog-content\n (saved)=\"onProductSaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-product-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: ProductFormComponent, selector: "app-product-form", inputs: ["product", "displayedFormFields", "displayedFormSections"], outputs: ["saved", "cancelled"] }], preserveWhitespaces: true });
|
|
1510
1501
|
}
|
|
1511
1502
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductFormButtonComponent, decorators: [{
|
|
1512
1503
|
type: Component,
|
|
@@ -1535,15 +1526,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1535
1526
|
|
|
1536
1527
|
class ProductBatchUpdateFormComponent extends TechlifyFormComponentInterface {
|
|
1537
1528
|
formBuilder;
|
|
1538
|
-
alertService;
|
|
1539
1529
|
batchService;
|
|
1540
1530
|
selection;
|
|
1541
1531
|
updated = new EventEmitter();
|
|
1542
1532
|
isSaving;
|
|
1543
|
-
constructor(formValidatorService, formBuilder,
|
|
1533
|
+
constructor(formValidatorService, formBuilder, batchService) {
|
|
1544
1534
|
super(formValidatorService);
|
|
1545
1535
|
this.formBuilder = formBuilder;
|
|
1546
|
-
this.alertService = alertService;
|
|
1547
1536
|
this.batchService = batchService;
|
|
1548
1537
|
this.form = this.formBuilder.group({
|
|
1549
1538
|
type_id: [''],
|
|
@@ -1568,13 +1557,13 @@ class ProductBatchUpdateFormComponent extends TechlifyFormComponentInterface {
|
|
|
1568
1557
|
}
|
|
1569
1558
|
});
|
|
1570
1559
|
}
|
|
1571
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductBatchUpdateFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token:
|
|
1572
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductBatchUpdateFormComponent, selector: "app-product-batch-update-form", inputs: { selection: "selection" }, outputs: { updated: "updated" }, usesInheritance: true, ngImport: i0, template: "<p class=\"text-primary fw-bold\">{{ selection.selected.length }} Product(s) Selected</p>\n<form [formGroup]=\"form\" class=\"d-flex flex-column justify-content-start\" (submit)=\"save()\">\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_id\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_id\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Reorder Point</mat-label>\n <input matInput placeholder=\"Reorder Point\" formControlName=\"reorder_point\" type=\"number\" />\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-3\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">Update</button>\n <button [disabled]=\"isSaving\" mat-flat-button type=\"button\" (click)=\"selection.clear()\">Cancel</button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type:
|
|
1560
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductBatchUpdateFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: ProductBatchService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1561
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductBatchUpdateFormComponent, selector: "app-product-batch-update-form", inputs: { selection: "selection" }, outputs: { updated: "updated" }, usesInheritance: true, ngImport: i0, template: "<p class=\"text-primary fw-bold\">{{ selection.selected.length }} Product(s) Selected</p>\n<form [formGroup]=\"form\" class=\"d-flex flex-column justify-content-start\" (submit)=\"save()\">\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_id\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_id\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Reorder Point</mat-label>\n <input matInput placeholder=\"Reorder Point\" formControlName=\"reorder_point\" type=\"number\" />\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-3\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">Update</button>\n <button [disabled]=\"isSaving\" mat-flat-button type=\"button\" (click)=\"selection.clear()\">Cancel</button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
|
|
1573
1562
|
}
|
|
1574
1563
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductBatchUpdateFormComponent, decorators: [{
|
|
1575
1564
|
type: Component,
|
|
1576
1565
|
args: [{ selector: 'app-product-batch-update-form', template: "<p class=\"text-primary fw-bold\">{{ selection.selected.length }} Product(s) Selected</p>\n<form [formGroup]=\"form\" class=\"d-flex flex-column justify-content-start\" (submit)=\"save()\">\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_id\"></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_id\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Reorder Point</mat-label>\n <input matInput placeholder=\"Reorder Point\" formControlName=\"reorder_point\" type=\"number\" />\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-3\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">Update</button>\n <button [disabled]=\"isSaving\" mat-flat-button type=\"button\" (click)=\"selection.clear()\">Cancel</button>\n </div>\n</form>\n" }]
|
|
1577
|
-
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type:
|
|
1566
|
+
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: ProductBatchService }], propDecorators: { selection: [{
|
|
1578
1567
|
type: Input
|
|
1579
1568
|
}], updated: [{
|
|
1580
1569
|
type: Output
|
|
@@ -1652,8 +1641,8 @@ let ProductListComponent = class ProductListComponent extends TechlifyListingCon
|
|
|
1652
1641
|
});
|
|
1653
1642
|
}
|
|
1654
1643
|
ngOnInit() {
|
|
1655
|
-
if (this.activatedRoute.snapshot.
|
|
1656
|
-
this.importId = parseInt(this.activatedRoute.snapshot.
|
|
1644
|
+
if (this.activatedRoute.snapshot.queryParams?.['import_id']) {
|
|
1645
|
+
this.importId = parseInt(this.activatedRoute.snapshot.queryParams?.['import_id']);
|
|
1657
1646
|
}
|
|
1658
1647
|
// update form with URL query params
|
|
1659
1648
|
this.requestHelperService.updateFormWithQueryParams(this.filterForm, {
|
|
@@ -1731,7 +1720,7 @@ let ProductListComponent = class ProductListComponent extends TechlifyListingCon
|
|
|
1731
1720
|
this.exportInProgress = hideColumns;
|
|
1732
1721
|
}
|
|
1733
1722
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductListComponent, deps: [{ token: i2$2.FormBuilder }, { token: i1$1.MatDialog }, { token: i2.ActivatedRoute }, { token: ProductService }, { token: ProductFormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1734
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductListComponent, selector: "app-product-list", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Products</h3>\n <app-product-form-button></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\"\n (onExportStart)=\"handleExport(true)\" (onExportEnd)=\"handleExport(false)\">\n </app-export-to-excel-button>\n <app-column-selector mode=\"icon\" class=\"d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector\n apiUrl=\"api/product-types\"\n formControlName=\"type_ids\"\n titleField=\"title\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<div class=\"d-flex justify-content-start gap-3\">\n <mat-card [style.width]=\"selection.isEmpty() ? '100%' : '85%'\">\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n matSortDisableClear=\"true\"\n aria-describedby=\"Products List\"\n id=\"productTable\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Name Column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"[element?.id, 'view']\">{{ element.name }}</a>\n <small class=\"text-secondary\" *ngIf=\"element.type && !exportInProgress\">\n {{ element.type?.title }}\n </small>\n </div>\n </td>\n </ng-container>\n\n <!-- Type Column -->\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div\n *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\"\n >\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.sku }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Initial Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element.initial_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.initial_quantity_date\">\n on {{ element?.initial_quantity_date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Receipts Column -->\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell mat-sort-header=\"stock_receipts_sum_quantity\" *matHeaderCellDef>Stock Receipts</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_receipts_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_receipt && !exportInProgress\">\n Latest on {{ element?.last_stock_receipt?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Last Stock Receipt Date Column -->\n <ng-container matColumnDef=\"last_stock_receipt_date\">\n <th mat-header-cell *matHeaderCellDef>Last Stock Receipt Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_receipt?.date | date }}\n </td>\n </ng-container>\n\n <!-- Stock Issuances Column -->\n <ng-container matColumnDef=\"stock_issuances\">\n <th mat-header-cell mat-sort-header=\"stock_issuances_sum_quantity\" *matHeaderCellDef>Stock Issuances</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_issuances_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_issuance && !exportInProgress\">\n Latest on {{ element?.last_stock_issuance?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Last Stock Issue Date Column -->\n <ng-container matColumnDef=\"last_stock_issue_date\">\n <th mat-header-cell *matHeaderCellDef>Last Stock Issue Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_issuance?.date | date }}\n </td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell mat-sort-header='stock_on_hand' *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Measure</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"reorder_point\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reorder_point }}\n </td>\n </ng-container>\n\n <!-- Selling Price Column -->\n <ng-container matColumnDef=\"sale_price\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Selling Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.sale_price | currency }}\n </td>\n </ng-container>\n\n <!-- Income Account Column -->\n <ng-container matColumnDef=\"income_account\">\n <th mat-header-cell *matHeaderCellDef>Income Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.income_account?.title }}\n </td>\n </ng-container>\n\n <!-- Expense Account Column -->\n <ng-container matColumnDef=\"expense_account\">\n <th mat-header-cell *matHeaderCellDef>Expense Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.expense_account?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-product-form-button [product]=\"element\"></app-product-form-button>\n <mat-icon\n class=\"cursor-pointer\"\n matTooltip=\"View\"\n [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"\n >\n remove_red_eye\n </mat-icon>\n\n <app-stock-receipt-form-button [product]=\"element\" (saved)=\"reload()\"></app-stock-receipt-form-button>\n\n <app-stock-issue-form-button [product]=\"element\" (saved)=\"reload()\"></app-stock-issue-form-button>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Select\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllRowsSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllRowsSelected()\"\n [aria-label]=\"checkboxLabel()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n [aria-label]=\"checkboxLabel(row)\">\n </mat-checkbox>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <mat-card\n *ngIf=\"!selection.isEmpty()\"\n style=\"width: calc(15% - 1rem)\"\n >\n <mat-card-content>\n <app-product-batch-update-form [selection]=\"selection\" (updated)=\"reload()\"></app-product-batch-update-form>\n </mat-card-content>\n </mat-card>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: StockReceiptFormButtonComponent, selector: "app-stock-receipt-form-button", inputs: ["product", "stockReceipt", "latestLocationId", "icon"], outputs: ["saved"] }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssueProduct", "stockIssue", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "component", type: i10$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatLabel, selector: "mat-label" }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i7.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: ExportToExcelButtonComponent, selector: "app-export-to-excel-button", inputs: ["tableId", "fileName"], outputs: ["onExportStart", "onExportEnd"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"], outputs: ["saved"] }, { kind: "component", type: ProductBatchUpdateFormComponent, selector: "app-product-batch-update-form", inputs: ["selection"], outputs: ["updated"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
|
|
1723
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductListComponent, selector: "app-product-list", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Products</h3>\n <app-product-form-button></app-product-form-button>\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n <app-export-to-excel-button tableId=\"productTable\" fileName=\"products\"\n (onExportStart)=\"handleExport(true)\" (onExportEnd)=\"handleExport(false)\">\n </app-export-to-excel-button>\n <app-column-selector mode=\"icon\" class=\"d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector\n apiUrl=\"api/product-types\"\n formControlName=\"type_ids\"\n titleField=\"title\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n </div>\n </form>\n </mat-card-content>\n</mat-card>\n\n<div class=\"d-flex justify-content-start gap-3\">\n <mat-card [style.width]=\"selection.isEmpty() ? '100%' : '85%'\">\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n matSortDisableClear=\"true\"\n aria-describedby=\"Products List\"\n id=\"productTable\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Name Column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"[element?.id, 'view']\">{{ element.name }}</a>\n <small class=\"text-secondary\" *ngIf=\"element.type && !exportInProgress\">\n {{ element.type?.title }}\n </small>\n </div>\n </td>\n </ng-container>\n\n <!-- Type Column -->\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <!-- Categories Column -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\" style=\"max-width: 200px\">\n <div\n *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\"\n >\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.sku }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.description }}</td>\n </ng-container>\n\n <!-- Initial Quantity Column -->\n <ng-container matColumnDef=\"initial_quantity\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Initial Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element.initial_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.initial_quantity_date\">\n on {{ element?.initial_quantity_date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Stock Receipts Column -->\n <ng-container matColumnDef=\"stock_receipts\">\n <th mat-header-cell mat-sort-header=\"stock_receipts_sum_quantity\" *matHeaderCellDef>Stock Receipts</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_receipts_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_receipt && !exportInProgress\">\n Latest on {{ element?.last_stock_receipt?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Last Stock Receipt Date Column -->\n <ng-container matColumnDef=\"last_stock_receipt_date\">\n <th mat-header-cell *matHeaderCellDef>Last Stock Receipt Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_receipt?.date | date }}\n </td>\n </ng-container>\n\n <!-- Stock Issuances Column -->\n <ng-container matColumnDef=\"stock_issuances\">\n <th mat-header-cell mat-sort-header=\"stock_issuances_sum_quantity\" *matHeaderCellDef>Stock Issuances</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.stock_issuances_sum_quantity }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.last_stock_issuance && !exportInProgress\">\n Latest on {{ element?.last_stock_issuance?.date | date }}\n </small>\n </td>\n </ng-container>\n\n <!-- Last Stock Issue Date Column -->\n <ng-container matColumnDef=\"last_stock_issue_date\">\n <th mat-header-cell *matHeaderCellDef>Last Stock Issue Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_issuance?.date | date }}\n </td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell mat-sort-header='stock_on_hand' *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Measure</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Reorder Point Column -->\n <ng-container matColumnDef=\"reorder_point\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Reorder Point</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reorder_point }}\n </td>\n </ng-container>\n\n <!-- Selling Price Column -->\n <ng-container matColumnDef=\"sale_price\">\n <th mat-header-cell mat-sort-header *matHeaderCellDef>Selling Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.sale_price | currency }}\n </td>\n </ng-container>\n\n <!-- Income Account Column -->\n <ng-container matColumnDef=\"income_account\">\n <th mat-header-cell *matHeaderCellDef>Income Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.income_account?.title }}\n </td>\n </ng-container>\n\n <!-- Expense Account Column -->\n <ng-container matColumnDef=\"expense_account\">\n <th mat-header-cell *matHeaderCellDef>Expense Account</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.expense_account?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex gap-1\">\n <app-product-form-button [product]=\"element\"></app-product-form-button>\n <mat-icon\n class=\"cursor-pointer\"\n matTooltip=\"View\"\n [routerLink]=\"[element.id, 'view']\"\n routerLinkActive=\"route-link-active\"\n >\n remove_red_eye\n </mat-icon>\n\n <app-stock-receipt-form-button [product]=\"element\" (saved)=\"reload()\"></app-stock-receipt-form-button>\n\n <app-stock-issue-form-button [product]=\"element\" (saved)=\"reload()\"></app-stock-issue-form-button>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Select\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllRowsSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllRowsSelected()\"\n [aria-label]=\"checkboxLabel()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n [aria-label]=\"checkboxLabel(row)\">\n </mat-checkbox>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <mat-card\n *ngIf=\"!selection.isEmpty()\"\n style=\"width: calc(15% - 1rem)\"\n >\n <mat-card-content>\n <app-product-batch-update-form [selection]=\"selection\" (updated)=\"reload()\"></app-product-batch-update-form>\n </mat-card-content>\n </mat-card>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: StockReceiptFormButtonComponent, selector: "app-stock-receipt-form-button", inputs: ["product", "stockReceipt", "latestLocationId", "icon"], outputs: ["saved"] }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssueProduct", "stockIssue", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "component", type: i10$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i7.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: ExportToExcelButtonComponent, selector: "app-export-to-excel-button", inputs: ["tableId", "fileName"], outputs: ["onExportStart", "onExportEnd"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"], outputs: ["saved"] }, { kind: "component", type: ProductBatchUpdateFormComponent, selector: "app-product-batch-update-form", inputs: ["selection"], outputs: ["updated"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
|
|
1735
1724
|
};
|
|
1736
1725
|
ProductListComponent = __decorate([
|
|
1737
1726
|
UntilDestroy()
|
|
@@ -1856,6 +1845,15 @@ let StockReceiptsListPageComponent = class StockReceiptsListPageComponent extend
|
|
|
1856
1845
|
this.router = router;
|
|
1857
1846
|
this.featureService = featureService;
|
|
1858
1847
|
this.lastPage = 0;
|
|
1848
|
+
this.filterFormConfiguration = {
|
|
1849
|
+
date_from: { date: true },
|
|
1850
|
+
date_to: { date: true },
|
|
1851
|
+
category_ids: { multiple: true },
|
|
1852
|
+
supplier_ids: { multiple: true },
|
|
1853
|
+
location_ids: { multiple: true },
|
|
1854
|
+
measure_ids: { multiple: true },
|
|
1855
|
+
product_ids: { multiple: true },
|
|
1856
|
+
};
|
|
1859
1857
|
this.filterForm = this.formBuilder.group({
|
|
1860
1858
|
category_ids: [''],
|
|
1861
1859
|
date_from: [''],
|
|
@@ -1883,9 +1881,8 @@ let StockReceiptsListPageComponent = class StockReceiptsListPageComponent extend
|
|
|
1883
1881
|
this.defaultSelectedColumns.splice(index, 1);
|
|
1884
1882
|
}
|
|
1885
1883
|
}
|
|
1886
|
-
this.
|
|
1887
|
-
this.
|
|
1888
|
-
this.subscribeToRouteChanges();
|
|
1884
|
+
this.patchFiltersFromRoute();
|
|
1885
|
+
this.listenFilterChanges();
|
|
1889
1886
|
}
|
|
1890
1887
|
loadData() {
|
|
1891
1888
|
const params = {
|
|
@@ -1917,13 +1914,6 @@ let StockReceiptsListPageComponent = class StockReceiptsListPageComponent extend
|
|
|
1917
1914
|
}
|
|
1918
1915
|
this.filterForm.get('sort_by').setValue(active + '|' + direction);
|
|
1919
1916
|
}
|
|
1920
|
-
onDurationChange(timelineValue) {
|
|
1921
|
-
let { date_to, date_from } = timelineValue;
|
|
1922
|
-
this.filterForm.patchValue({
|
|
1923
|
-
date_from: date_from ? moment$1(date_from).format("YYYY-MM-DD") : "",
|
|
1924
|
-
date_to: date_to ? moment$1(date_to).format("YYYY-MM-DD") : "",
|
|
1925
|
-
}, { emitEvent: false });
|
|
1926
|
-
}
|
|
1927
1917
|
updateFormWithQueryParams() {
|
|
1928
1918
|
this.requestHelperService.updateFormWithQueryParams(this.filterForm, {
|
|
1929
1919
|
product_ids: { multiple: true },
|
|
@@ -1961,14 +1951,14 @@ let StockReceiptsListPageComponent = class StockReceiptsListPageComponent extend
|
|
|
1961
1951
|
this.router.navigate(['/inventory/stock-receipts', model?.id, 'view']);
|
|
1962
1952
|
}
|
|
1963
1953
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptsListPageComponent, deps: [{ token: StockReceiptService }, { token: i2$2.FormBuilder }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i1.TechlifyFeatureService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1964
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockReceiptsListPageComponent, selector: "app-stock-receipts-list-page", inputs: { product: "product", supplierId: "supplierId" }, outputs: { listUpdated: "listUpdated" }, usesInheritance: true, ngImport: i0, template: "<mat-card *ngIf=\"!product\" class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Stock Receipts</h3>\n\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector mode=\"icon\" class=\"mt-1 d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <form [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\" [showClearButton]=\"true\" [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"product\" class=\"mb-0\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> output_circle </span>\n <h3 class=\"mb-0\">Stock Receipts</h3>\n <app-stock-receipt-form-button [latestLocationId]=\"models.length > 0 ? models[0].location_id : null\"\n [product]=\"product\" (saved)=\"redirectToView($event)\" icon=\"add\"></app-stock-receipt-form-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Receipts\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.stock_receipt_products[0]?.product?.id, 'view']\">\n {{ element?.stock_receipt_products[0]?.product?.name }}\n </a>\n <app-product-category-badges\n [product]=\"element?.stock_receipt_products[0]?.product\"></app-product-category-badges>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.product?.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date }}</td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.quantity }} {{\n element?.stock_receipt_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_receipt_products[0]?.location_id, 'view']\">\n {{ element?.stock_receipt_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Purchase Price Column -->\n <ng-container matColumnDef=\"purchase_price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Purchase Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_receipt_products[0]?.purchase_price | currency }}\n </td>\n </ng-container>\n\n <!-- Total Value Column -->\n <ng-container matColumnDef=\"amount\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Value</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_receipt_products[0]?.amount | currency }}\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.supplier?.company_name }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1\">\n <mat-icon [routerLink]=\"['/inventory', 'stock-receipts', element?.id, 'view']\" class=\"cursor-pointer\">\n visibility\n </mat-icon>\n <app-stock-receipt-form-button [product]=\"element.product\" [stockReceipt]=\"element\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-receipt-form-button>\n <app-stock-receipt-delete-button [stockReceipt]=\"element\"\n (deleted)=\"reload(); listUpdated.emit()\"></app-stock-receipt-delete-button>\n </div>\n\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef colspan=\"1\"><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalPurchasePrice | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalValue | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i7.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i7.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatLabel, selector: "mat-label" }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: StockReceiptFormButtonComponent, selector: "app-stock-receipt-form-button", inputs: ["product", "stockReceipt", "latestLocationId", "icon"], outputs: ["saved"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: StockReceiptDeleteButtonComponent, selector: "app-stock-receipt-delete-button", inputs: ["stockReceipt"], outputs: ["deleted"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
|
|
1954
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockReceiptsListPageComponent, selector: "app-stock-receipts-list-page", inputs: { product: "product", supplierId: "supplierId" }, outputs: { listUpdated: "listUpdated" }, usesInheritance: true, ngImport: i0, template: "<mat-card *ngIf=\"!product\" class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Stock Receipts</h3>\n\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector mode=\"icon\" class=\"mt-1 d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <form [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"product\" class=\"mb-0\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> output_circle </span>\n <h3 class=\"mb-0\">Stock Receipts</h3>\n <app-stock-receipt-form-button [latestLocationId]=\"models.length > 0 ? models[0].location_id : null\"\n [product]=\"product\" (saved)=\"redirectToView($event)\" icon=\"add\"></app-stock-receipt-form-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Receipts\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.stock_receipt_products[0]?.product?.id, 'view']\">\n {{ element?.stock_receipt_products[0]?.product?.name }}\n </a>\n <app-product-category-badges\n [product]=\"element?.stock_receipt_products[0]?.product\"></app-product-category-badges>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.product?.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date }}</td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.quantity }} {{\n element?.stock_receipt_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_receipt_products[0]?.location_id, 'view']\">\n {{ element?.stock_receipt_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Purchase Price Column -->\n <ng-container matColumnDef=\"purchase_price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Purchase Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_receipt_products[0]?.purchase_price | currency }}\n </td>\n </ng-container>\n\n <!-- Total Value Column -->\n <ng-container matColumnDef=\"amount\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Value</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_receipt_products[0]?.amount | currency }}\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.supplier?.company_name }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1\">\n <mat-icon [routerLink]=\"['/inventory', 'stock-receipts', element?.id, 'view']\" class=\"cursor-pointer\">\n visibility\n </mat-icon>\n <app-stock-receipt-form-button [product]=\"element.product\" [stockReceipt]=\"element\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-receipt-form-button>\n <app-stock-receipt-delete-button [stockReceipt]=\"element\"\n (deleted)=\"reload(); listUpdated.emit()\"></app-stock-receipt-delete-button>\n </div>\n\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef colspan=\"1\"><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalPurchasePrice | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalValue | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i7.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i7.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: StockReceiptFormButtonComponent, selector: "app-stock-receipt-form-button", inputs: ["product", "stockReceipt", "latestLocationId", "icon"], outputs: ["saved"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: StockReceiptDeleteButtonComponent, selector: "app-stock-receipt-delete-button", inputs: ["stockReceipt"], outputs: ["deleted"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
|
|
1965
1955
|
};
|
|
1966
1956
|
StockReceiptsListPageComponent = __decorate([
|
|
1967
1957
|
UntilDestroy()
|
|
1968
1958
|
], StockReceiptsListPageComponent);
|
|
1969
1959
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptsListPageComponent, decorators: [{
|
|
1970
1960
|
type: Component,
|
|
1971
|
-
args: [{ selector: 'app-stock-receipts-list-page', template: "<mat-card *ngIf=\"!product\" class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Stock Receipts</h3>\n\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector mode=\"icon\" class=\"mt-1 d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <form [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\" [showClearButton]=\"true\" [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"product\" class=\"mb-0\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> output_circle </span>\n <h3 class=\"mb-0\">Stock Receipts</h3>\n <app-stock-receipt-form-button [latestLocationId]=\"models.length > 0 ? models[0].location_id : null\"\n [product]=\"product\" (saved)=\"redirectToView($event)\" icon=\"add\"></app-stock-receipt-form-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Receipts\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.stock_receipt_products[0]?.product?.id, 'view']\">\n {{ element?.stock_receipt_products[0]?.product?.name }}\n </a>\n <app-product-category-badges\n [product]=\"element?.stock_receipt_products[0]?.product\"></app-product-category-badges>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.product?.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date }}</td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.quantity }} {{\n element?.stock_receipt_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_receipt_products[0]?.location_id, 'view']\">\n {{ element?.stock_receipt_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Purchase Price Column -->\n <ng-container matColumnDef=\"purchase_price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Purchase Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_receipt_products[0]?.purchase_price | currency }}\n </td>\n </ng-container>\n\n <!-- Total Value Column -->\n <ng-container matColumnDef=\"amount\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Value</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_receipt_products[0]?.amount | currency }}\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.supplier?.company_name }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1\">\n <mat-icon [routerLink]=\"['/inventory', 'stock-receipts', element?.id, 'view']\" class=\"cursor-pointer\">\n visibility\n </mat-icon>\n <app-stock-receipt-form-button [product]=\"element.product\" [stockReceipt]=\"element\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-receipt-form-button>\n <app-stock-receipt-delete-button [stockReceipt]=\"element\"\n (deleted)=\"reload(); listUpdated.emit()\"></app-stock-receipt-delete-button>\n </div>\n\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef colspan=\"1\"><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalPurchasePrice | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalValue | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"] }]
|
|
1961
|
+
args: [{ selector: 'app-stock-receipts-list-page', template: "<mat-card *ngIf=\"!product\" class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Stock Receipts</h3>\n\n <span matTooltip=\"Import\" routerLink=\"import\" class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector mode=\"icon\" class=\"mt-1 d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <form [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"product\" class=\"mb-0\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> output_circle </span>\n <h3 class=\"mb-0\">Stock Receipts</h3>\n <app-stock-receipt-form-button [latestLocationId]=\"models.length > 0 ? models[0].location_id : null\"\n [product]=\"product\" (saved)=\"redirectToView($event)\" icon=\"add\"></app-stock-receipt-form-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Receipts\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.stock_receipt_products[0]?.product?.id, 'view']\">\n {{ element?.stock_receipt_products[0]?.product?.name }}\n </a>\n <app-product-category-badges\n [product]=\"element?.stock_receipt_products[0]?.product\"></app-product-category-badges>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.product?.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date }}</td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.quantity }} {{\n element?.stock_receipt_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.batch?.batch_number\">{{ element?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.batch?.expires_on\">\n Expires {{ element?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_receipt_products[0]?.location_id, 'view']\">\n {{ element?.stock_receipt_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Purchase Price Column -->\n <ng-container matColumnDef=\"purchase_price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Purchase Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_receipt_products[0]?.purchase_price | currency }}\n </td>\n </ng-container>\n\n <!-- Total Value Column -->\n <ng-container matColumnDef=\"amount\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Value</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_receipt_products[0]?.amount | currency }}\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_receipt_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.supplier?.company_name }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1\">\n <mat-icon [routerLink]=\"['/inventory', 'stock-receipts', element?.id, 'view']\" class=\"cursor-pointer\">\n visibility\n </mat-icon>\n <app-stock-receipt-form-button [product]=\"element.product\" [stockReceipt]=\"element\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-receipt-form-button>\n <app-stock-receipt-delete-button [stockReceipt]=\"element\"\n (deleted)=\"reload(); listUpdated.emit()\"></app-stock-receipt-delete-button>\n </div>\n\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef colspan=\"1\"><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalPurchasePrice | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalValue | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"] }]
|
|
1972
1962
|
}], ctorParameters: () => [{ type: StockReceiptService }, { type: i2$2.FormBuilder }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: i1.TechlifyFeatureService }], propDecorators: { product: [{
|
|
1973
1963
|
type: Input
|
|
1974
1964
|
}], supplierId: [{
|
|
@@ -2057,6 +2047,14 @@ class StockIssueListComponent extends TechlifyListingControllerInterface {
|
|
|
2057
2047
|
this.activatedRoute = activatedRoute;
|
|
2058
2048
|
this.featureService = featureService;
|
|
2059
2049
|
this.lastPage = 0;
|
|
2050
|
+
this.filterFormConfiguration = {
|
|
2051
|
+
date_from: { date: true },
|
|
2052
|
+
date_to: { date: true },
|
|
2053
|
+
category_ids: { multiple: true },
|
|
2054
|
+
location_ids: { multiple: true },
|
|
2055
|
+
measure_ids: { multiple: true },
|
|
2056
|
+
product_ids: { multiple: true },
|
|
2057
|
+
};
|
|
2060
2058
|
this.filterForm = this.formBuilder.group({
|
|
2061
2059
|
category_ids: [''],
|
|
2062
2060
|
date_from: [''],
|
|
@@ -2076,9 +2074,8 @@ class StockIssueListComponent extends TechlifyListingControllerInterface {
|
|
|
2076
2074
|
this.filterForm.get('product_ids')?.setValue(this.product?.id);
|
|
2077
2075
|
this.defaultSelectedColumns = this.defaultSelectedColumns.filter(c => c !== 'product' && c !== 'sku');
|
|
2078
2076
|
}
|
|
2079
|
-
this.
|
|
2080
|
-
this.
|
|
2081
|
-
this.subscribeToRouteChanges();
|
|
2077
|
+
this.patchFiltersFromRoute();
|
|
2078
|
+
this.listenFilterChanges();
|
|
2082
2079
|
}
|
|
2083
2080
|
loadData() {
|
|
2084
2081
|
const params = {
|
|
@@ -2137,13 +2134,6 @@ class StockIssueListComponent extends TechlifyListingControllerInterface {
|
|
|
2137
2134
|
this.reload();
|
|
2138
2135
|
});
|
|
2139
2136
|
}
|
|
2140
|
-
onDurationChange(timelineValue) {
|
|
2141
|
-
let { date_to, date_from } = timelineValue;
|
|
2142
|
-
this.filterForm.patchValue({
|
|
2143
|
-
date_from: date_from ? moment(date_from).format("YYYY-MM-DD") : "",
|
|
2144
|
-
date_to: date_to ? moment(date_to).format("YYYY-MM-DD") : "",
|
|
2145
|
-
}, { emitEvent: false });
|
|
2146
|
-
}
|
|
2147
2137
|
loadFeatures() {
|
|
2148
2138
|
let isBatchEnabled = this.featureService.isFeatureExists('product-batch-numbers');
|
|
2149
2139
|
// now update displayedColumns accordingly
|
|
@@ -2155,11 +2145,11 @@ class StockIssueListComponent extends TechlifyListingControllerInterface {
|
|
|
2155
2145
|
}
|
|
2156
2146
|
}
|
|
2157
2147
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueListComponent, deps: [{ token: i2$2.FormBuilder }, { token: StockIssueService }, { token: i2.ActivatedRoute }, { token: i1.TechlifyFeatureService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2158
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueListComponent, selector: "app-stock-issue-list", inputs: { product: "product", issuableType: "issuableType", issuableId: "issuableId", label: "label", showActions: "showActions", showFilters: "showFilters" }, outputs: { listUpdated: "listUpdated" }, usesInheritance: true, ngImport: i0, template: "<mat-card *ngIf=\"!product\" class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">{{ label }}</h3>\n\n <app-stock-issue-form-button icon=\"add\" [issuableType]=\"issuableType\" [issuableId]=\"issuableId\"\n (saved)=\"reload()\"></app-stock-issue-form-button>\n\n <span *ngIf=\"showActions\" matTooltip=\"Import\" routerLink=\"import\"\n class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector *ngIf=\"showActions\" mode=\"icon\" class=\"mt-2 d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <form [formGroup]=\"filterForm\" *ngIf=\"showFilters\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\" [showClearButton]=\"true\" [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"product\" class=\"mb-0\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <h3 class=\"mb-0\">Stock Issues</h3>\n\n <app-stock-issue-form-button class=\"mt-2\" [product]=\"product\" icon=\"add\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-issue-form-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issuances\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.stock_issue_products[0]?.product?.id, 'view']\">\n {{ element?.stock_issue_products[0]?.product.name }}\n </a>\n <app-product-category-badges\n [product]=\"element?.stock_issue_products[0]?.product\"></app-product-category-badges>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_issue_products[0]?.location_id, 'view']\">\n {{ element?.stock_issue_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-dark\" *ngIf=\"element?.issuable\" [routerLink]=\"['/maintenances', element?.issuable_id, 'view']\">\n Maintenance for {{ element?.issuable?.fixed_asset?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.quantity }} {{\n element?.stock_issue_products[0]?.product.measure?.title }}</td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.stock_issue_products[0]?.batch?.batch_number\">{{\n element?.stock_issue_products[0]?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.stock_issue_products[0]?.batch?.expires_on\">\n Expires {{ element?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product.measure?.title }}</td>\n </ng-container>\n\n <!-- Purchase Price Column -->\n <ng-container matColumnDef=\"purchase_price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Purchase Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.purchase_price | currency }}\n </td>\n </ng-container>\n\n <!-- Total Value Column -->\n <ng-container matColumnDef=\"amount\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Value</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.amount | currency }}\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.supplier?.company_name }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', element?.id, 'view']\"></app-techlify-icon>\n <app-stock-issue-form-button [stockIssue]=\"element\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-issue-form-button>\n <app-stock-issuance-delete-button [stockIssuance]=\"element\"\n (deleted)=\"reload(); listUpdated.emit()\"></app-stock-issuance-delete-button>\n </div>\n\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i7.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i7.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssueProduct", "stockIssue", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: StockIssuanceDeleteButtonComponent, selector: "app-stock-issuance-delete-button", inputs: ["stockIssuance"], outputs: ["deleted"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
|
|
2148
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueListComponent, selector: "app-stock-issue-list", inputs: { product: "product", issuableType: "issuableType", issuableId: "issuableId", label: "label", showActions: "showActions", showFilters: "showFilters" }, outputs: { listUpdated: "listUpdated" }, usesInheritance: true, ngImport: i0, template: "<mat-card *ngIf=\"!product\" class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">{{ label }}</h3>\n\n <app-stock-issue-form-button icon=\"add\" [issuableType]=\"issuableType\" [issuableId]=\"issuableId\"\n (saved)=\"reload()\"></app-stock-issue-form-button>\n\n <span *ngIf=\"showActions\" matTooltip=\"Import\" routerLink=\"import\"\n class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector *ngIf=\"showActions\" mode=\"icon\" class=\"mt-2 d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <form [formGroup]=\"filterForm\" *ngIf=\"showFilters\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"product\" class=\"mb-0\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <h3 class=\"mb-0\">Stock Issues</h3>\n\n <app-stock-issue-form-button class=\"mt-2\" [product]=\"product\" icon=\"add\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-issue-form-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issuances\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.stock_issue_products[0]?.product?.id, 'view']\">\n {{ element?.stock_issue_products[0]?.product.name }}\n </a>\n <app-product-category-badges\n [product]=\"element?.stock_issue_products[0]?.product\"></app-product-category-badges>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_issue_products[0]?.location_id, 'view']\">\n {{ element?.stock_issue_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-dark\" *ngIf=\"element?.issuable\" [routerLink]=\"['/maintenances', element?.issuable_id, 'view']\">\n Maintenance for {{ element?.issuable?.fixed_asset?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.quantity }} {{\n element?.stock_issue_products[0]?.product.measure?.title }}</td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.stock_issue_products[0]?.batch?.batch_number\">{{\n element?.stock_issue_products[0]?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.stock_issue_products[0]?.batch?.expires_on\">\n Expires {{ element?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product.measure?.title }}</td>\n </ng-container>\n\n <!-- Purchase Price Column -->\n <ng-container matColumnDef=\"purchase_price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Purchase Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.purchase_price | currency }}\n </td>\n </ng-container>\n\n <!-- Total Value Column -->\n <ng-container matColumnDef=\"amount\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Value</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.amount | currency }}\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.supplier?.company_name }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', element?.id, 'view']\"></app-techlify-icon>\n <app-stock-issue-form-button [stockIssue]=\"element\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-issue-form-button>\n <app-stock-issuance-delete-button [stockIssuance]=\"element\"\n (deleted)=\"reload(); listUpdated.emit()\"></app-stock-issuance-delete-button>\n </div>\n\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i7.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i7.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssueProduct", "stockIssue", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: StockIssuanceDeleteButtonComponent, selector: "app-stock-issuance-delete-button", inputs: ["stockIssuance"], outputs: ["deleted"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "component", type: i1.ColumnSelectorComponent, selector: "app-column-selector", inputs: ["label", "mode", "columnConfigs", "selectedColumns", "isExportWorking"], outputs: ["selectedColumnsChange", "displayedColumnsChange"] }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }], preserveWhitespaces: true });
|
|
2159
2149
|
}
|
|
2160
2150
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueListComponent, decorators: [{
|
|
2161
2151
|
type: Component,
|
|
2162
|
-
args: [{ selector: 'app-stock-issue-list', template: "<mat-card *ngIf=\"!product\" class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">{{ label }}</h3>\n\n <app-stock-issue-form-button icon=\"add\" [issuableType]=\"issuableType\" [issuableId]=\"issuableId\"\n (saved)=\"reload()\"></app-stock-issue-form-button>\n\n <span *ngIf=\"showActions\" matTooltip=\"Import\" routerLink=\"import\"\n class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector *ngIf=\"showActions\" mode=\"icon\" class=\"mt-2 d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <form [formGroup]=\"filterForm\" *ngIf=\"showFilters\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\" [showClearButton]=\"true\" [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"product\" class=\"mb-0\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <h3 class=\"mb-0\">Stock Issues</h3>\n\n <app-stock-issue-form-button class=\"mt-2\" [product]=\"product\" icon=\"add\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-issue-form-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issuances\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.stock_issue_products[0]?.product?.id, 'view']\">\n {{ element?.stock_issue_products[0]?.product.name }}\n </a>\n <app-product-category-badges\n [product]=\"element?.stock_issue_products[0]?.product\"></app-product-category-badges>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_issue_products[0]?.location_id, 'view']\">\n {{ element?.stock_issue_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-dark\" *ngIf=\"element?.issuable\" [routerLink]=\"['/maintenances', element?.issuable_id, 'view']\">\n Maintenance for {{ element?.issuable?.fixed_asset?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.quantity }} {{\n element?.stock_issue_products[0]?.product.measure?.title }}</td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.stock_issue_products[0]?.batch?.batch_number\">{{\n element?.stock_issue_products[0]?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.stock_issue_products[0]?.batch?.expires_on\">\n Expires {{ element?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product.measure?.title }}</td>\n </ng-container>\n\n <!-- Purchase Price Column -->\n <ng-container matColumnDef=\"purchase_price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Purchase Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.purchase_price | currency }}\n </td>\n </ng-container>\n\n <!-- Total Value Column -->\n <ng-container matColumnDef=\"amount\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Value</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.amount | currency }}\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.supplier?.company_name }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', element?.id, 'view']\"></app-techlify-icon>\n <app-stock-issue-form-button [stockIssue]=\"element\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-issue-form-button>\n <app-stock-issuance-delete-button [stockIssuance]=\"element\"\n (deleted)=\"reload(); listUpdated.emit()\"></app-stock-issuance-delete-button>\n </div>\n\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"] }]
|
|
2152
|
+
args: [{ selector: 'app-stock-issue-list', template: "<mat-card *ngIf=\"!product\" class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">{{ label }}</h3>\n\n <app-stock-issue-form-button icon=\"add\" [issuableType]=\"issuableType\" [issuableId]=\"issuableId\"\n (saved)=\"reload()\"></app-stock-issue-form-button>\n\n <span *ngIf=\"showActions\" matTooltip=\"Import\" routerLink=\"import\"\n class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n\n <app-column-selector *ngIf=\"showActions\" mode=\"icon\" class=\"mt-2 d-print-none\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n </div>\n\n <form [formGroup]=\"filterForm\" *ngIf=\"showFilters\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"product\" class=\"mb-0\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <h3 class=\"mb-0\">Stock Issues</h3>\n\n <app-stock-issue-form-button class=\"mt-2\" [product]=\"product\" icon=\"add\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-issue-form-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issuances\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', element?.stock_issue_products[0]?.product?.id, 'view']\">\n {{ element?.stock_issue_products[0]?.product.name }}\n </a>\n <app-product-category-badges\n [product]=\"element?.stock_issue_products[0]?.product\"></app-product-category-badges>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.date | date }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', element?.stock_issue_products[0]?.location_id, 'view']\">\n {{ element?.stock_issue_products[0]?.location?.title }}\n </a>\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-dark\" *ngIf=\"element?.issuable\" [routerLink]=\"['/maintenances', element?.issuable_id, 'view']\">\n Maintenance for {{ element?.issuable?.fixed_asset?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.quantity }} {{\n element?.stock_issue_products[0]?.product.measure?.title }}</td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\" *ngIf=\"element?.stock_issue_products[0]?.batch?.batch_number\">{{\n element?.stock_issue_products[0]?.batch?.batch_number }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.stock_issue_products[0]?.batch?.expires_on\">\n Expires {{ element?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product.measure?.title }}</td>\n </ng-container>\n\n <!-- Purchase Price Column -->\n <ng-container matColumnDef=\"purchase_price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Purchase Price</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.purchase_price | currency }}\n </td>\n </ng-container>\n\n <!-- Total Value Column -->\n <ng-container matColumnDef=\"amount\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Value</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.amount | currency }}\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Supplier Column -->\n <ng-container matColumnDef=\"supplier\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.supplier?.company_name }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element.stock_transfer\" class=\"d-flex gap-1 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', element?.id, 'view']\"></app-techlify-icon>\n <app-stock-issue-form-button [stockIssue]=\"element\"\n (saved)=\"reload(); listUpdated.emit()\"></app-stock-issue-form-button>\n <app-stock-issuance-delete-button [stockIssuance]=\"element\"\n (deleted)=\"reload(); listUpdated.emit()\"></app-stock-issuance-delete-button>\n </div>\n\n <span *ngIf=\"element.stock_transfer\" class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-purchase_price\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-amount\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-supplier\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [":host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"] }]
|
|
2163
2153
|
}], ctorParameters: () => [{ type: i2$2.FormBuilder }, { type: StockIssueService }, { type: i2.ActivatedRoute }, { type: i1.TechlifyFeatureService }], propDecorators: { product: [{
|
|
2164
2154
|
type: Input
|
|
2165
2155
|
}], issuableType: [{
|
|
@@ -2192,17 +2182,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2192
2182
|
|
|
2193
2183
|
class StockTransferFormComponent extends TechlifyFormComponentInterface {
|
|
2194
2184
|
formBuilder;
|
|
2195
|
-
alertService;
|
|
2196
2185
|
service;
|
|
2197
2186
|
productId;
|
|
2198
2187
|
locationFrom;
|
|
2199
2188
|
saved = new EventEmitter();
|
|
2200
2189
|
cancelled = new EventEmitter();
|
|
2201
|
-
|
|
2202
|
-
constructor(formValidatorService, formBuilder, alertService, service) {
|
|
2190
|
+
constructor(formValidatorService, formBuilder, service) {
|
|
2203
2191
|
super(formValidatorService);
|
|
2204
2192
|
this.formBuilder = formBuilder;
|
|
2205
|
-
this.alertService = alertService;
|
|
2206
2193
|
this.service = service;
|
|
2207
2194
|
this.errorMessages = {
|
|
2208
2195
|
date: {
|
|
@@ -2260,7 +2247,7 @@ class StockTransferFormComponent extends TechlifyFormComponentInterface {
|
|
|
2260
2247
|
this.form.get('location_from_id')?.setValue(this.locationFrom.id);
|
|
2261
2248
|
}
|
|
2262
2249
|
}
|
|
2263
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockTransferFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token:
|
|
2250
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockTransferFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: StockTransferService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2264
2251
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockTransferFormComponent, isStandalone: true, selector: "app-stock-transfer-form", inputs: { productId: "productId", locationFrom: "locationFrom" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"d-flex flex-column justify-content-start gap-0\"\n (ngSubmit)=\"save()\"\n>\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input formControlName=\"date\" matInput [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">{{ getErrorMessage('date') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"!productId\">\n <mat-label>Product</mat-label>\n <app-searchable-selector\n formControlName=\"product_id\"\n titleField=\"name\"\n apiUrl=\"api/products\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('product_id')\">{{ getErrorMessage('product_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location From</mat-label>\n <app-searchable-selector\n formControlName=\"location_from_id\"\n apiUrl=\"api/inventory-locations\"\n [selectedValue]=\"locationFrom\"\n ></app-searchable-selector>\n <mat-hint>Where are we taking stock from?</mat-hint>\n <mat-error *ngIf=\"isFieldValid('location_from_id')\">{{ getErrorMessage('location_from_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location To</mat-label>\n <app-searchable-selector\n formControlName=\"location_to_id\"\n apiUrl=\"api/inventory-locations\"\n ></app-searchable-selector>\n <mat-hint>Where are we taking stock to?</mat-hint>\n <mat-error *ngIf=\"isFieldValid('location_to_id')\">{{ getErrorMessage('location_to_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput placeholder=\"Quantity\" formControlName=\"quantity\" type=\"number\">\n <mat-error *ngIf=\"isFieldValid('quantity')\">{{ getErrorMessage('quantity') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" type=\"submit\" mat-raised-button color=\"primary\">\n Save\n </button>\n <button [disabled]=\"isWorking\" type=\"button\" mat-flat-button (click)=\"cancelled.emit()\">\n Cancel\n </button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], preserveWhitespaces: true });
|
|
2265
2252
|
}
|
|
2266
2253
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockTransferFormComponent, decorators: [{
|
|
@@ -2280,7 +2267,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2280
2267
|
MatHint,
|
|
2281
2268
|
MatButton
|
|
2282
2269
|
], template: "<form\n [formGroup]=\"form\"\n class=\"d-flex flex-column justify-content-start gap-0\"\n (ngSubmit)=\"save()\"\n>\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input formControlName=\"date\" matInput [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">{{ getErrorMessage('date') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"!productId\">\n <mat-label>Product</mat-label>\n <app-searchable-selector\n formControlName=\"product_id\"\n titleField=\"name\"\n apiUrl=\"api/products\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('product_id')\">{{ getErrorMessage('product_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location From</mat-label>\n <app-searchable-selector\n formControlName=\"location_from_id\"\n apiUrl=\"api/inventory-locations\"\n [selectedValue]=\"locationFrom\"\n ></app-searchable-selector>\n <mat-hint>Where are we taking stock from?</mat-hint>\n <mat-error *ngIf=\"isFieldValid('location_from_id')\">{{ getErrorMessage('location_from_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location To</mat-label>\n <app-searchable-selector\n formControlName=\"location_to_id\"\n apiUrl=\"api/inventory-locations\"\n ></app-searchable-selector>\n <mat-hint>Where are we taking stock to?</mat-hint>\n <mat-error *ngIf=\"isFieldValid('location_to_id')\">{{ getErrorMessage('location_to_id') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput placeholder=\"Quantity\" formControlName=\"quantity\" type=\"number\">\n <mat-error *ngIf=\"isFieldValid('quantity')\">{{ getErrorMessage('quantity') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" type=\"submit\" mat-raised-button color=\"primary\">\n Save\n </button>\n <button [disabled]=\"isWorking\" type=\"button\" mat-flat-button (click)=\"cancelled.emit()\">\n Cancel\n </button>\n </div>\n</form>\n" }]
|
|
2283
|
-
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type:
|
|
2270
|
+
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: StockTransferService }], propDecorators: { productId: [{
|
|
2284
2271
|
type: Input
|
|
2285
2272
|
}], locationFrom: [{
|
|
2286
2273
|
type: Input
|
|
@@ -2484,7 +2471,7 @@ class StockTransferListComponent extends TechlifyListingControllerInterface {
|
|
|
2484
2471
|
this.filterForm.get('sort_by').setValue(active + '|' + direction);
|
|
2485
2472
|
}
|
|
2486
2473
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockTransferListComponent, deps: [{ token: StockTransferService }, { token: i2$2.FormBuilder }, { token: i1.ErrorHandlerService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
2487
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockTransferListComponent, isStandalone: true, selector: "app-stock-transfer-list", inputs: { productId: "productId" }, usesInheritance: true, ngImport: i0, template: "<mat-card *ngIf=\"!productId\" class=\"mb-2\">\n <mat-card-content class=\"mb-0 d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n\n <div class=\"d-flex flex-row gap-2 align-items-center\">\n <h3 class=\"mb-0\">Stock Transfers</h3>\n <app-stock-transfer-form-button [productId]=\"productId\" (saved)=\"reload()\"></app-stock-transfer-form-button>\n </div>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search Stock Transfers\" matInput formControlName=\"search\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector apiUrl=\"api/stock-transfer-statuses\" formControlName=\"status_ids\"\n [enableSearch]=\"false\" [multiple]=\"true\"></app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"productId\" class=\"mb-0 d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n\n <div class=\"d-flex flex-row gap-2 align-items-center\">\n <h3 class=\"mb-0\">Stock Transfers</h3>\n <app-stock-transfer-form-button [productId]=\"productId\" (saved)=\"reload()\"></app-stock-transfer-form-button>\n </div>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Transfers\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"date\">Date</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column\">\n <span>{{ element?.date | date }}</span>\n <span>{{ element?.particulars }}</span>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <a [routerLink]=\"['/inventory/products', element?.product?.id, 'view']\"\n class=\"text-decoration-none text-dark\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"quantity\">Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.quantity }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"location_from\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"location_from_id\">From</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.location_from?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"location_to\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"location_to_id\">To</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.location_to?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"status\">Status</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.status?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: StockTransferFormButtonComponent, selector: "app-stock-transfer-form-button", inputs: ["productId", "locationFrom"], outputs: ["saved"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }], preserveWhitespaces: true });
|
|
2474
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockTransferListComponent, isStandalone: true, selector: "app-stock-transfer-list", inputs: { productId: "productId" }, usesInheritance: true, ngImport: i0, template: "<mat-card *ngIf=\"!productId\" class=\"mb-2\">\n <mat-card-content class=\"mb-0 d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n\n <div class=\"d-flex flex-row gap-2 align-items-center\">\n <h3 class=\"mb-0\">Stock Transfers</h3>\n <app-stock-transfer-form-button [productId]=\"productId\" (saved)=\"reload()\"></app-stock-transfer-form-button>\n </div>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search Stock Transfers\" matInput formControlName=\"search\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector apiUrl=\"api/stock-transfer-statuses\" formControlName=\"status_ids\"\n [enableSearch]=\"false\" [multiple]=\"true\"></app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content *ngIf=\"productId\" class=\"mb-0 d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2 mb-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n\n <div class=\"d-flex flex-row gap-2 align-items-center\">\n <h3 class=\"mb-0\">Stock Transfers</h3>\n <app-stock-transfer-form-button [productId]=\"productId\" (saved)=\"reload()\"></app-stock-transfer-form-button>\n </div>\n </div>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Transfers\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"date\">Date</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column\">\n <span>{{ element?.date | date }}</span>\n <span>{{ element?.particulars }}</span>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <a [routerLink]=\"['/inventory/products', element?.product?.id, 'view']\"\n class=\"text-decoration-none text-dark\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"quantity\">Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.quantity }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"location_from\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"location_from_id\">From</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.location_from?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"location_to\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"location_to_id\">To</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.location_to?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"status\">Status</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.status?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: StockTransferFormButtonComponent, selector: "app-stock-transfer-form-button", inputs: ["productId", "locationFrom"], outputs: ["saved"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }], preserveWhitespaces: true });
|
|
2488
2475
|
}
|
|
2489
2476
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockTransferListComponent, decorators: [{
|
|
2490
2477
|
type: Component,
|
|
@@ -2560,7 +2547,7 @@ class ProductDeleteButtonComponent {
|
|
|
2560
2547
|
this.matDialog.open(templateRef, { width: '500px' });
|
|
2561
2548
|
}
|
|
2562
2549
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductDeleteButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: ProductService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2563
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductDeleteButtonComponent, selector: "app-product-delete-button", inputs: { product: "product" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer text-secondary\" (click)=\"showDeleteDialog(deleteProductDialog)\"> delete </mat-icon>\n\n<ng-template #deleteProductDialog>\n <h3 mat-dialog-title>Delete Product</h3>\n <div mat-dialog-content>\n Are you sure? You want to delete the\n <strong>{{ product?.name }}</strong> ?\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-1 mb-2\">\n <button [disabled]=\"isDeleting\" type=\"button\" mat-raised-button color=\"warn\" (click)=\"deleteProduct()\">\n Delete\n </button>\n <button [disabled]=\"isDeleting\" type=\"button\" mat-flat-button mat-dialog-close>Cancel</button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type:
|
|
2550
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductDeleteButtonComponent, selector: "app-product-delete-button", inputs: { product: "product" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer text-secondary\" (click)=\"showDeleteDialog(deleteProductDialog)\"> delete </mat-icon>\n\n<ng-template #deleteProductDialog>\n <h3 mat-dialog-title>Delete Product</h3>\n <div mat-dialog-content>\n Are you sure? You want to delete the\n <strong>{{ product?.name }}</strong> ?\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-1 mb-2\">\n <button [disabled]=\"isDeleting\" type=\"button\" mat-raised-button color=\"warn\" (click)=\"deleteProduct()\">\n Delete\n </button>\n <button [disabled]=\"isDeleting\" type=\"button\" mat-flat-button mat-dialog-close>Cancel</button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], preserveWhitespaces: true });
|
|
2564
2551
|
}
|
|
2565
2552
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductDeleteButtonComponent, decorators: [{
|
|
2566
2553
|
type: Component,
|
|
@@ -3102,7 +3089,7 @@ class TechlifyFilterComponent {
|
|
|
3102
3089
|
: '';
|
|
3103
3090
|
}
|
|
3104
3091
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TechlifyFilterComponent, deps: [{ token: i1.RequestHelperService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
3105
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: TechlifyFilterComponent, selector: "app-techlify-filter", inputs: { filterForm: "filterForm", filterConfig: "filterConfig" }, outputs: { filterUpdated: "filterUpdated" }, ngImport: i0, template: "<form [formGroup]=\"filterForm\" fxLayout fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\">\n <mat-form-field *ngIf=\"filterForm.get('search')\" [appearance]=\"getFilterConfig('appearance', 'search')\">\n <mat-label>Search</mat-label>\n <input formControlName=\"search\" matInput [placeholder]=\"getFilterConfig('placeholder', 'search')\" />\n <button *ngIf=\"filterForm.value?.search\" mat-icon-button matSuffix (click)=\"resetField('search')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <app-timeline-filter\n *ngIf=\"filterForm?.get('duration')\"\n appearance=\"fill\"\n [labelText]=\"getFilterConfig('label', 'duration')\"\n [appearance]=\"getFilterConfig('appearance', 'duration')\"\n formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\"\n [showClearButton]=\"true\"\n [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"\n ></app-timeline-filter>\n\n <mat-form-field *ngIf=\"filterForm.get('payment_method_ids')\">\n <mat-label>Payment Method</mat-label>\n <app-searchable-selector\n formControlName=\"payment_method_ids\"\n apiUrl=\"api/payment-methods\"\n [multiple]=\"true\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.payment_method_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('payment_method_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"filterForm.get('payment_account_ids')\">\n <mat-form-field *ngxPermissionsOnly=\"['accountingcommon_account.read']\">\n <mat-label>{{ getFilterConfig('label', 'payment_account_ids') || 'Payment Account' }}</mat-label>\n <app-searchable-selector\n formControlName=\"payment_account_ids\"\n [apiUrl]=\"getFilterConfig('apiUrl', 'payment_account_ids') || 'api/accounts'\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.payment_account_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('payment_account_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field *ngIf=\"filterForm.get('invoice_status_ids')\">\n <mat-label>Invoice Status</mat-label>\n <app-searchable-selector\n formControlName=\"invoice_status_ids\"\n apiUrl=\"api/invoice-statuses\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.invoice_status_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('invoice_status_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"filterForm.get('customer_ids')\">\n <mat-form-field *ngxPermissionsOnly=\"['customer_read']\">\n <mat-label>Customer</mat-label>\n <app-searchable-selector\n formControlName=\"customer_ids\"\n titleField=\"name\"\n apiUrl=\"api/customers\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.customer_ids\" mat-icon-button matSuffix (click)=\"resetField('customer_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <ng-container *ngIf=\"filterForm.get('project_ids') && getFilterConfig('disabled', 'project_ids') === false\">\n <mat-form-field *ngxPermissionsOnly=\"['project.read']\">\n <mat-label>Project</mat-label>\n <app-searchable-selector\n formControlName=\"project_ids\"\n apiUrl=\"api/projects\"\n titleField=\"project_name\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.project_ids\" mat-icon-button matSuffix (click)=\"resetField('project_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field *ngIf=\"filterForm.get('product_ids')\">\n <mat-label>Product</mat-label>\n <app-searchable-selector\n formControlName=\"product_ids\"\n apiUrl=\"api/products\"\n titleField=\"name\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.product_ids\" mat-icon-button matSuffix (click)=\"resetField('product_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('measure_ids')\">\n <mat-label>Measure</mat-label>\n <app-searchable-selector\n formControlName=\"measure_ids\"\n apiUrl=\"api/product-measures\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.measure_ids\" mat-icon-button matSuffix (click)=\"resetField('measure_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-form-field *ngIf=\"filterForm.get('supplier_ids')\" [appearance]=\"getFilterConfig('appearance', 'supplier_ids')\">\n <mat-label>Supplier</mat-label>\n <app-searchable-selector\n formControlName=\"supplier_ids\"\n titleField=\"company_name\"\n apiUrl=\"api/suppliers\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.supplier_ids\" mat-icon-button matSuffix (click)=\"resetField('supplier_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <app-timeline-filter\n appearance=\"fill\"\n [labelText]=\"getFilterConfig('label', 'expiry_duration')\"\n *ngIf=\"filterForm?.get('expiry_duration')\"\n formControlName=\"expiry_duration\"\n (selectionChange)=\"onExpiryDurationChange($event)\"\n [showClearButton]=\"true\"\n [dateFrom]=\"filterForm.value?.expiry_date_from\"\n [dateTo]=\"filterForm.value?.expiry_date_to\"\n ></app-timeline-filter>\n\n <mat-form-field *ngIf=\"filterForm.get('cost_category_ids')\" style=\"width: 150px\">\n <mat-label>Cost Category</mat-label>\n <app-searchable-selector\n formControlName=\"cost_category_ids\"\n apiUrl=\"api/cost-code-categories\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.cost_category_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('cost_category_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('milestone_ids')\" style=\"width: 150px\">\n <mat-label>Milestone</mat-label>\n <app-searchable-selector\n formControlName=\"milestone_ids\"\n apiUrl=\"api/milestones\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.milestone_ids\" mat-icon-button matSuffix (click)=\"resetField('milestone_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('team_member_ids')\">\n <mat-label>Assignee</mat-label>\n <app-searchable-selector apiUrl=\"api/persons\" formControlName=\"team_member_ids\" titleField=\"name\" [multiple]=\"true\">\n </app-searchable-selector>\n <button *ngIf=\"filterForm.value?.team_member_ids\" mat-icon-button matSuffix (click)=\"resetField('team_member_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('fixed_asset_type_ids')\">\n <mat-label>Type</mat-label>\n <app-searchable-selector\n formControlName=\"fixed_asset_type_ids\"\n apiUrl=\"api/accounting-plus/fixed-asset-types\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.fixed_asset_type_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('fixed_asset_type_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('fixed_asset_document_type_ids')\">\n <mat-label>Type</mat-label>\n <app-searchable-selector\n formControlName=\"fixed_asset_document_type_ids\"\n apiUrl=\"api/accounting-plus/fixed-asset-document-types\"\n [multiple]=\"true\"\n [enableSearch]=\"getFilterConfig('enableSearch', 'fixed_asset_document_type_ids')\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.fixed_asset_document_type_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('fixed_asset_document_type_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <div *ngIf=\"filterForm.get('fixed_asset_document_status')\">\n <small class=\"mr-2 text-secondary\" *ngIf=\"getFilterConfig('showLabel', 'fixed_asset_document_status')\">\n Status\n </small>\n <mat-button-toggle-group formControlName=\"fixed_asset_document_status\" [multiple]=\"false\">\n <mat-button-toggle value=\"all\">All</mat-button-toggle>\n <mat-button-toggle value=\"active\">Active</mat-button-toggle>\n <mat-button-toggle value=\"expired\">Expired</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n\n <mat-form-field *ngIf=\"filterForm.get('asset_account_ids')\">\n <mat-label>Asset Account</mat-label>\n <app-searchable-selector\n formControlName=\"asset_account_ids\"\n apiUrl=\"api/accounts\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.asset_account_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('asset_account_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('depreciation_expense_account_ids')\">\n <mat-label>Depreciation Expense Account</mat-label>\n <app-searchable-selector\n [multiple]=\"true\"\n apiUrl=\"api/accounts\"\n formControlName=\"depreciation_expense_account_ids\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.depreciation_expense_account_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('depreciation_expense_account_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('depreciation_method_ids')\">\n <mat-label>Depreciation Method</mat-label>\n <app-searchable-selector\n formControlName=\"depreciation_method_ids\"\n apiUrl=\"api/accounting-plus/depreciation-methods\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n (click)=\"resetField('depreciation_method_ids')\"\n *ngIf=\"filterForm.value?.depreciation_method_ids\"\n mat-icon-button\n matSuffix\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('task_status_ids')\" style=\"width: 150px\">\n <mat-label>Status</mat-label>\n <app-searchable-selector\n apiUrl=\"api/task-statuses\"\n formControlName=\"task_status_ids\"\n titleField=\"title\"\n [multiple]=\"true\"\n [enableSearch]=\"false\"\n >\n </app-searchable-selector>\n <button *ngIf=\"filterForm.value?.task_status_ids\" mat-icon-button matSuffix (click)=\"resetField('task_status_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('service_center_ids')\">\n <mat-label>Service Center</mat-label>\n <app-searchable-selector\n apiUrl=\"api/accounting-plus/service-centers\"\n formControlName=\"service_center_ids\"\n titleField=\"name\"\n [enableSearch]=\"false\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.service_center_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('service_center_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('fixed_asset_maintenance_status_ids')\">\n <mat-label>Status</mat-label>\n <app-searchable-selector\n apiUrl=\"api/accounting-plus/fixed-asset-maintenance-statuses\"\n formControlName=\"fixed_asset_maintenance_status_ids\"\n [multiple]=\"true\"\n [enableSearch]=\"false\"\n >\n </app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.fixed_asset_maintenance_status_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('fixed_asset_maintenance_status_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('group_by')\">\n <mat-label>Group By</mat-label>\n <mat-select formControlName=\"group_by\">\n <mat-option value=\"week\">Week</mat-option>\n <mat-option value=\"month\">Month</mat-option>\n <mat-option value=\"year\">Year</mat-option>\n </mat-select>\n </mat-form-field>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i12$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i12$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: i5$1.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }], preserveWhitespaces: true });
|
|
3092
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: TechlifyFilterComponent, selector: "app-techlify-filter", inputs: { filterForm: "filterForm", filterConfig: "filterConfig" }, outputs: { filterUpdated: "filterUpdated" }, ngImport: i0, template: "<form [formGroup]=\"filterForm\" fxLayout fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\">\n <mat-form-field *ngIf=\"filterForm.get('search')\" [appearance]=\"getFilterConfig('appearance', 'search')\">\n <mat-label>Search</mat-label>\n <input formControlName=\"search\" matInput [placeholder]=\"getFilterConfig('placeholder', 'search')\" />\n <button *ngIf=\"filterForm.value?.search\" mat-icon-button matSuffix (click)=\"resetField('search')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <app-timeline-filter\n *ngIf=\"filterForm?.get('duration')\"\n appearance=\"fill\"\n [labelText]=\"getFilterConfig('label', 'duration')\"\n [appearance]=\"getFilterConfig('appearance', 'duration')\"\n formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\"\n [showClearButton]=\"true\"\n [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"\n ></app-timeline-filter>\n\n <mat-form-field *ngIf=\"filterForm.get('payment_method_ids')\">\n <mat-label>Payment Method</mat-label>\n <app-searchable-selector\n formControlName=\"payment_method_ids\"\n apiUrl=\"api/payment-methods\"\n [multiple]=\"true\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.payment_method_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('payment_method_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"filterForm.get('payment_account_ids')\">\n <mat-form-field *ngxPermissionsOnly=\"['accountingcommon_account.read']\">\n <mat-label>{{ getFilterConfig('label', 'payment_account_ids') || 'Payment Account' }}</mat-label>\n <app-searchable-selector\n formControlName=\"payment_account_ids\"\n [apiUrl]=\"getFilterConfig('apiUrl', 'payment_account_ids') || 'api/accounts'\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.payment_account_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('payment_account_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field *ngIf=\"filterForm.get('invoice_status_ids')\">\n <mat-label>Invoice Status</mat-label>\n <app-searchable-selector\n formControlName=\"invoice_status_ids\"\n apiUrl=\"api/invoice-statuses\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.invoice_status_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('invoice_status_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"filterForm.get('customer_ids')\">\n <mat-form-field *ngxPermissionsOnly=\"['customer_read']\">\n <mat-label>Customer</mat-label>\n <app-searchable-selector\n formControlName=\"customer_ids\"\n titleField=\"name\"\n apiUrl=\"api/customers\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.customer_ids\" mat-icon-button matSuffix (click)=\"resetField('customer_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <ng-container *ngIf=\"filterForm.get('project_ids') && getFilterConfig('disabled', 'project_ids') === false\">\n <mat-form-field *ngxPermissionsOnly=\"['project.read']\">\n <mat-label>Project</mat-label>\n <app-searchable-selector\n formControlName=\"project_ids\"\n apiUrl=\"api/projects\"\n titleField=\"project_name\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.project_ids\" mat-icon-button matSuffix (click)=\"resetField('project_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field *ngIf=\"filterForm.get('product_ids')\">\n <mat-label>Product</mat-label>\n <app-searchable-selector\n formControlName=\"product_ids\"\n apiUrl=\"api/products\"\n titleField=\"name\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.product_ids\" mat-icon-button matSuffix (click)=\"resetField('product_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('measure_ids')\">\n <mat-label>Measure</mat-label>\n <app-searchable-selector\n formControlName=\"measure_ids\"\n apiUrl=\"api/product-measures\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.measure_ids\" mat-icon-button matSuffix (click)=\"resetField('measure_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-form-field *ngIf=\"filterForm.get('supplier_ids')\" [appearance]=\"getFilterConfig('appearance', 'supplier_ids')\">\n <mat-label>Supplier</mat-label>\n <app-searchable-selector\n formControlName=\"supplier_ids\"\n titleField=\"company_name\"\n apiUrl=\"api/suppliers\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.supplier_ids\" mat-icon-button matSuffix (click)=\"resetField('supplier_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n\n <app-timeline-filter\n appearance=\"fill\"\n [labelText]=\"getFilterConfig('label', 'expiry_duration')\"\n *ngIf=\"filterForm?.get('expiry_duration')\"\n formControlName=\"expiry_duration\"\n (selectionChange)=\"onExpiryDurationChange($event)\"\n [showClearButton]=\"true\"\n [dateFrom]=\"filterForm.value?.expiry_date_from\"\n [dateTo]=\"filterForm.value?.expiry_date_to\"\n ></app-timeline-filter>\n\n <mat-form-field *ngIf=\"filterForm.get('cost_category_ids')\" style=\"width: 150px\">\n <mat-label>Cost Category</mat-label>\n <app-searchable-selector\n formControlName=\"cost_category_ids\"\n apiUrl=\"api/cost-code-categories\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.cost_category_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('cost_category_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('milestone_ids')\" style=\"width: 150px\">\n <mat-label>Milestone</mat-label>\n <app-searchable-selector\n formControlName=\"milestone_ids\"\n apiUrl=\"api/milestones\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button *ngIf=\"filterForm.value?.milestone_ids\" mat-icon-button matSuffix (click)=\"resetField('milestone_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('team_member_ids')\">\n <mat-label>Assignee</mat-label>\n <app-searchable-selector apiUrl=\"api/persons\" formControlName=\"team_member_ids\" titleField=\"name\" [multiple]=\"true\">\n </app-searchable-selector>\n <button *ngIf=\"filterForm.value?.team_member_ids\" mat-icon-button matSuffix (click)=\"resetField('team_member_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('fixed_asset_type_ids')\">\n <mat-label>Type</mat-label>\n <app-searchable-selector\n formControlName=\"fixed_asset_type_ids\"\n apiUrl=\"api/accounting-plus/fixed-asset-types\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.fixed_asset_type_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('fixed_asset_type_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('fixed_asset_document_type_ids')\">\n <mat-label>Type</mat-label>\n <app-searchable-selector\n formControlName=\"fixed_asset_document_type_ids\"\n apiUrl=\"api/accounting-plus/fixed-asset-document-types\"\n [multiple]=\"true\"\n [enableSearch]=\"getFilterConfig('enableSearch', 'fixed_asset_document_type_ids')\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.fixed_asset_document_type_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('fixed_asset_document_type_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <div *ngIf=\"filterForm.get('fixed_asset_document_status')\">\n <small class=\"mr-2 text-secondary\" *ngIf=\"getFilterConfig('showLabel', 'fixed_asset_document_status')\">\n Status\n </small>\n <mat-button-toggle-group formControlName=\"fixed_asset_document_status\" [multiple]=\"false\">\n <mat-button-toggle value=\"all\">All</mat-button-toggle>\n <mat-button-toggle value=\"active\">Active</mat-button-toggle>\n <mat-button-toggle value=\"expired\">Expired</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n\n <mat-form-field *ngIf=\"filterForm.get('asset_account_ids')\">\n <mat-label>Asset Account</mat-label>\n <app-searchable-selector\n formControlName=\"asset_account_ids\"\n apiUrl=\"api/accounts\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.asset_account_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('asset_account_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('depreciation_expense_account_ids')\">\n <mat-label>Depreciation Expense Account</mat-label>\n <app-searchable-selector\n [multiple]=\"true\"\n apiUrl=\"api/accounts\"\n formControlName=\"depreciation_expense_account_ids\"\n ></app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.depreciation_expense_account_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('depreciation_expense_account_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('depreciation_method_ids')\">\n <mat-label>Depreciation Method</mat-label>\n <app-searchable-selector\n formControlName=\"depreciation_method_ids\"\n apiUrl=\"api/accounting-plus/depreciation-methods\"\n [multiple]=\"true\"\n ></app-searchable-selector>\n <button\n (click)=\"resetField('depreciation_method_ids')\"\n *ngIf=\"filterForm.value?.depreciation_method_ids\"\n mat-icon-button\n matSuffix\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('task_status_ids')\" style=\"width: 150px\">\n <mat-label>Status</mat-label>\n <app-searchable-selector\n apiUrl=\"api/task-statuses\"\n formControlName=\"task_status_ids\"\n titleField=\"title\"\n [multiple]=\"true\"\n [enableSearch]=\"false\"\n >\n </app-searchable-selector>\n <button *ngIf=\"filterForm.value?.task_status_ids\" mat-icon-button matSuffix (click)=\"resetField('task_status_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('service_center_ids')\">\n <mat-label>Service Center</mat-label>\n <app-searchable-selector\n apiUrl=\"api/accounting-plus/service-centers\"\n formControlName=\"service_center_ids\"\n titleField=\"name\"\n [enableSearch]=\"false\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.service_center_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('service_center_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('fixed_asset_maintenance_status_ids')\">\n <mat-label>Status</mat-label>\n <app-searchable-selector\n apiUrl=\"api/accounting-plus/fixed-asset-maintenance-statuses\"\n formControlName=\"fixed_asset_maintenance_status_ids\"\n [multiple]=\"true\"\n [enableSearch]=\"false\"\n >\n </app-searchable-selector>\n <button\n *ngIf=\"filterForm.value?.fixed_asset_maintenance_status_ids\"\n mat-icon-button\n matSuffix\n (click)=\"resetField('fixed_asset_maintenance_status_ids')\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"filterForm.get('group_by')\">\n <mat-label>Group By</mat-label>\n <mat-select formControlName=\"group_by\">\n <mat-option value=\"week\">Week</mat-option>\n <mat-option value=\"month\">Month</mat-option>\n <mat-option value=\"year\">Year</mat-option>\n </mat-select>\n </mat-form-field>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i12$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i12$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: i5$1.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }], preserveWhitespaces: true });
|
|
3106
3093
|
}
|
|
3107
3094
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TechlifyFilterComponent, decorators: [{
|
|
3108
3095
|
type: Component,
|
|
@@ -3291,173 +3278,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3291
3278
|
}]
|
|
3292
3279
|
}] });
|
|
3293
3280
|
|
|
3294
|
-
class ProductTaxService extends TechlifyServiceBaseClass {
|
|
3295
|
-
constructor(httpService) {
|
|
3296
|
-
super(httpService, 'product-taxes');
|
|
3297
|
-
}
|
|
3298
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxService, deps: [{ token: i1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3299
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxService, providedIn: 'root' });
|
|
3300
|
-
}
|
|
3301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxService, decorators: [{
|
|
3302
|
-
type: Injectable,
|
|
3303
|
-
args: [{
|
|
3304
|
-
providedIn: 'root',
|
|
3305
|
-
}]
|
|
3306
|
-
}], ctorParameters: () => [{ type: i1.HttpService }] });
|
|
3307
|
-
|
|
3308
|
-
class ProductTaxFormButtonComponent extends TechlifyFormComponentInterface {
|
|
3309
|
-
matDialog;
|
|
3310
|
-
productTaxService;
|
|
3311
|
-
formBuilder;
|
|
3312
|
-
alertService;
|
|
3313
|
-
product;
|
|
3314
|
-
saved = new EventEmitter();
|
|
3315
|
-
isSaving;
|
|
3316
|
-
constructor(matDialog, productTaxService, formValidatorService, formBuilder, alertService) {
|
|
3317
|
-
super(formValidatorService);
|
|
3318
|
-
this.matDialog = matDialog;
|
|
3319
|
-
this.productTaxService = productTaxService;
|
|
3320
|
-
this.formBuilder = formBuilder;
|
|
3321
|
-
this.alertService = alertService;
|
|
3322
|
-
this.errorMessages = {
|
|
3323
|
-
tax_id: {
|
|
3324
|
-
required: 'The tax field is required.',
|
|
3325
|
-
},
|
|
3326
|
-
};
|
|
3327
|
-
this.form = this.formBuilder.group({
|
|
3328
|
-
product_id: [''],
|
|
3329
|
-
tax_id: ['', Validators.required],
|
|
3330
|
-
});
|
|
3331
|
-
}
|
|
3332
|
-
ngOnInit() {
|
|
3333
|
-
if (this.product) {
|
|
3334
|
-
this.form.get('product_id')?.setValue(this.product?.id);
|
|
3335
|
-
}
|
|
3336
|
-
}
|
|
3337
|
-
showForm(templateRef) {
|
|
3338
|
-
this.matDialog.open(templateRef, { width: '400px' });
|
|
3339
|
-
}
|
|
3340
|
-
save() {
|
|
3341
|
-
this.form.markAllAsTouched();
|
|
3342
|
-
if (this.form.invalid) {
|
|
3343
|
-
this.alertService.addAlert('Please check the form for errors.', 'error');
|
|
3344
|
-
return;
|
|
3345
|
-
}
|
|
3346
|
-
const data = { ...this.form.value };
|
|
3347
|
-
const params = {
|
|
3348
|
-
with: 'tax.type',
|
|
3349
|
-
};
|
|
3350
|
-
this.isSaving = true;
|
|
3351
|
-
this.productTaxService.store(data, params).subscribe({
|
|
3352
|
-
next: (response) => {
|
|
3353
|
-
this.isSaving = false;
|
|
3354
|
-
this.matDialog.closeAll();
|
|
3355
|
-
this.alertService.addAlert('Product tax saved successfully!', 'success');
|
|
3356
|
-
this.saved.emit(response?.item);
|
|
3357
|
-
},
|
|
3358
|
-
error: () => (this.isSaving = false),
|
|
3359
|
-
});
|
|
3360
|
-
}
|
|
3361
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxFormButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: ProductTaxService }, { token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3362
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductTaxFormButtonComponent, selector: "app-product-tax-form-button", inputs: { product: "product" }, outputs: { saved: "saved" }, usesInheritance: true, ngImport: i0, template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" (click)=\"showForm(formTemplate)\"> add </mat-icon>\n\n<ng-template #formTemplate>\n <form [formGroup]=\"form\" (submit)=\"save()\" mat-dialog-content class=\"d-flex flex-column gap-2\">\n <h3 class=\"text-dark\">Add tax for {{ product?.name }}</h3>\n <mat-form-field>\n <mat-label>Tax</mat-label>\n <app-searchable-selector\n formControlName=\"tax_id\"\n required\n apiUrl=\"api/taxes\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('tax_id')\">\n {{ getErrorMessage('tax_id') }}\n </mat-error>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">Save</button>\n <button [disabled]=\"isSaving\" type=\"button\" mat-flat-button mat-dialog-close>Cancel</button>\n </div>\n </form>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }], preserveWhitespaces: true });
|
|
3363
|
-
}
|
|
3364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxFormButtonComponent, decorators: [{
|
|
3365
|
-
type: Component,
|
|
3366
|
-
args: [{ selector: 'app-product-tax-form-button', template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" (click)=\"showForm(formTemplate)\"> add </mat-icon>\n\n<ng-template #formTemplate>\n <form [formGroup]=\"form\" (submit)=\"save()\" mat-dialog-content class=\"d-flex flex-column gap-2\">\n <h3 class=\"text-dark\">Add tax for {{ product?.name }}</h3>\n <mat-form-field>\n <mat-label>Tax</mat-label>\n <app-searchable-selector\n formControlName=\"tax_id\"\n required\n apiUrl=\"api/taxes\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('tax_id')\">\n {{ getErrorMessage('tax_id') }}\n </mat-error>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">Save</button>\n <button [disabled]=\"isSaving\" type=\"button\" mat-flat-button mat-dialog-close>Cancel</button>\n </div>\n </form>\n</ng-template>\n" }]
|
|
3367
|
-
}], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: ProductTaxService }, { type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: i1.AlertService }], propDecorators: { product: [{
|
|
3368
|
-
type: Input
|
|
3369
|
-
}], saved: [{
|
|
3370
|
-
type: Output
|
|
3371
|
-
}] } });
|
|
3372
|
-
|
|
3373
|
-
class ProductTaxDeleteButtonComponent {
|
|
3374
|
-
matDialog;
|
|
3375
|
-
productTaxService;
|
|
3376
|
-
alertService;
|
|
3377
|
-
productTax;
|
|
3378
|
-
deleted = new EventEmitter();
|
|
3379
|
-
isDeleting;
|
|
3380
|
-
constructor(matDialog, productTaxService, alertService) {
|
|
3381
|
-
this.matDialog = matDialog;
|
|
3382
|
-
this.productTaxService = productTaxService;
|
|
3383
|
-
this.alertService = alertService;
|
|
3384
|
-
}
|
|
3385
|
-
/**
|
|
3386
|
-
* Delete the product.
|
|
3387
|
-
*/
|
|
3388
|
-
delete() {
|
|
3389
|
-
this.isDeleting = true;
|
|
3390
|
-
this.productTaxService.delete(this.productTax).subscribe({
|
|
3391
|
-
next: () => {
|
|
3392
|
-
this.matDialog?.closeAll();
|
|
3393
|
-
this.deleted.emit();
|
|
3394
|
-
this.isDeleting = false;
|
|
3395
|
-
this.alertService.addAlert('Product tax deleted successfully!', 'success');
|
|
3396
|
-
},
|
|
3397
|
-
error: () => (this.isDeleting = false),
|
|
3398
|
-
});
|
|
3399
|
-
}
|
|
3400
|
-
/**
|
|
3401
|
-
* Show delete product dialog.
|
|
3402
|
-
*
|
|
3403
|
-
* @param templateRef
|
|
3404
|
-
*/
|
|
3405
|
-
showDeleteDialog(templateRef) {
|
|
3406
|
-
this.matDialog.open(templateRef, { width: '500px' });
|
|
3407
|
-
}
|
|
3408
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxDeleteButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: ProductTaxService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3409
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductTaxDeleteButtonComponent, selector: "app-product-tax-delete-button", inputs: { productTax: "productTax" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer text-secondary\" (click)=\"showDeleteDialog(deleteConfirmDialog)\"> delete </mat-icon>\n\n<ng-template #deleteConfirmDialog>\n <h3 mat-dialog-title>Delete Product Tax</h3>\n <div mat-dialog-content>Are you sure? You want to delete the product tax?</div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-1 mb-2\">\n <button [disabled]=\"isDeleting\" type=\"button\" mat-raised-button color=\"warn\" (click)=\"delete()\">Delete</button>\n <button [disabled]=\"isDeleting\" type=\"button\" mat-flat-button mat-dialog-close>Cancel</button>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], preserveWhitespaces: true });
|
|
3410
|
-
}
|
|
3411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxDeleteButtonComponent, decorators: [{
|
|
3412
|
-
type: Component,
|
|
3413
|
-
args: [{ selector: 'app-product-tax-delete-button', template: "<mat-icon class=\"cursor-pointer text-secondary\" (click)=\"showDeleteDialog(deleteConfirmDialog)\"> delete </mat-icon>\n\n<ng-template #deleteConfirmDialog>\n <h3 mat-dialog-title>Delete Product Tax</h3>\n <div mat-dialog-content>Are you sure? You want to delete the product tax?</div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-1 mb-2\">\n <button [disabled]=\"isDeleting\" type=\"button\" mat-raised-button color=\"warn\" (click)=\"delete()\">Delete</button>\n <button [disabled]=\"isDeleting\" type=\"button\" mat-flat-button mat-dialog-close>Cancel</button>\n </div>\n</ng-template>\n" }]
|
|
3414
|
-
}], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: ProductTaxService }, { type: i1.AlertService }], propDecorators: { productTax: [{
|
|
3415
|
-
type: Input
|
|
3416
|
-
}], deleted: [{
|
|
3417
|
-
type: Output
|
|
3418
|
-
}] } });
|
|
3419
|
-
|
|
3420
|
-
class ProductTaxListComponent extends TechlifyListingControllerInterface {
|
|
3421
|
-
product;
|
|
3422
|
-
displayedColumns = ['#', 'Tax', 'Actions'];
|
|
3423
|
-
ngOnInit() {
|
|
3424
|
-
this.loadData();
|
|
3425
|
-
}
|
|
3426
|
-
loadData() {
|
|
3427
|
-
this.models = this.product?.taxes ?? [];
|
|
3428
|
-
}
|
|
3429
|
-
onCreated(productTax) {
|
|
3430
|
-
this.models.unshift(productTax);
|
|
3431
|
-
this.models = [...this.models];
|
|
3432
|
-
}
|
|
3433
|
-
onDeleted(index) {
|
|
3434
|
-
this.models.splice(index, 1);
|
|
3435
|
-
this.models = [...this.models];
|
|
3436
|
-
}
|
|
3437
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3438
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductTaxListComponent, selector: "app-product-tax-list", inputs: { product: "product" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"pb-3 d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start gap-2\">\n <span class=\"material-symbols-outlined\"> percent </span>\n <strong class=\"mb-0 text-dark\">Product Taxes</strong>\n </div>\n <app-product-tax-form-button [product]=\"product\" (saved)=\"onCreated($event)\"></app-product-tax-form-button>\n </mat-card-content>\n <mat-divider></mat-divider>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\">\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Tax\">\n <th mat-header-cell *matHeaderCellDef>Tax</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.tax?.title }} ({{ element?.tax?.code }})</p>\n <small class=\"text-secondary\">{{ element?.tax?.value }} - {{ element?.tax?.type?.title }}</small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n <app-product-tax-delete-button\n [productTax]=\"element\"\n (deleted)=\"onDeleted(i)\"\n ></app-product-tax-delete-button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: ProductTaxFormButtonComponent, selector: "app-product-tax-form-button", inputs: ["product"], outputs: ["saved"] }, { kind: "component", type: ProductTaxDeleteButtonComponent, selector: "app-product-tax-delete-button", inputs: ["productTax"], outputs: ["deleted"] }], preserveWhitespaces: true });
|
|
3439
|
-
}
|
|
3440
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxListComponent, decorators: [{
|
|
3441
|
-
type: Component,
|
|
3442
|
-
args: [{ selector: 'app-product-tax-list', template: "<mat-card>\n <mat-card-content class=\"pb-3 d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start gap-2\">\n <span class=\"material-symbols-outlined\"> percent </span>\n <strong class=\"mb-0 text-dark\">Product Taxes</strong>\n </div>\n <app-product-tax-form-button [product]=\"product\" (saved)=\"onCreated($event)\"></app-product-tax-form-button>\n </mat-card-content>\n <mat-divider></mat-divider>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\">\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Tax\">\n <th mat-header-cell *matHeaderCellDef>Tax</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.tax?.title }} ({{ element?.tax?.code }})</p>\n <small class=\"text-secondary\">{{ element?.tax?.value }} - {{ element?.tax?.type?.title }}</small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n <app-product-tax-delete-button\n [productTax]=\"element\"\n (deleted)=\"onDeleted(i)\"\n ></app-product-tax-delete-button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n </mat-card-content>\n</mat-card>\n" }]
|
|
3443
|
-
}], propDecorators: { product: [{
|
|
3444
|
-
type: Input
|
|
3445
|
-
}] } });
|
|
3446
|
-
|
|
3447
|
-
class ProductTaxModule {
|
|
3448
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3449
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxModule, declarations: [ProductTaxListComponent, ProductTaxFormButtonComponent, ProductTaxDeleteButtonComponent], imports: [CommonModule, MaterialModule$1, ReactiveFormsModule, SearchableSelectorModule], exports: [ProductTaxListComponent] });
|
|
3450
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxModule, imports: [CommonModule, MaterialModule$1, ReactiveFormsModule, SearchableSelectorModule] });
|
|
3451
|
-
}
|
|
3452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductTaxModule, decorators: [{
|
|
3453
|
-
type: NgModule,
|
|
3454
|
-
args: [{
|
|
3455
|
-
declarations: [ProductTaxListComponent, ProductTaxFormButtonComponent, ProductTaxDeleteButtonComponent],
|
|
3456
|
-
imports: [CommonModule, MaterialModule$1, ReactiveFormsModule, SearchableSelectorModule],
|
|
3457
|
-
exports: [ProductTaxListComponent],
|
|
3458
|
-
}]
|
|
3459
|
-
}] });
|
|
3460
|
-
|
|
3461
3281
|
class ProductModule {
|
|
3462
3282
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3463
3283
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: ProductModule, declarations: [ProductListComponent,
|
|
@@ -3479,7 +3299,6 @@ class ProductModule {
|
|
|
3479
3299
|
ImportCsvModule,
|
|
3480
3300
|
StockReceiptsModule,
|
|
3481
3301
|
StockIssueListModule,
|
|
3482
|
-
ProductTaxModule,
|
|
3483
3302
|
MaterialModule$1,
|
|
3484
3303
|
MatProgressBarModule,
|
|
3485
3304
|
InfiniteScrollModule,
|
|
@@ -3502,7 +3321,6 @@ class ProductModule {
|
|
|
3502
3321
|
ImportCsvModule,
|
|
3503
3322
|
StockReceiptsModule,
|
|
3504
3323
|
StockIssueListModule,
|
|
3505
|
-
ProductTaxModule,
|
|
3506
3324
|
MaterialModule$1,
|
|
3507
3325
|
MatProgressBarModule,
|
|
3508
3326
|
InfiniteScrollModule,
|
|
@@ -3540,7 +3358,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3540
3358
|
ImportCsvModule,
|
|
3541
3359
|
StockReceiptsModule,
|
|
3542
3360
|
StockIssueListModule,
|
|
3543
|
-
ProductTaxModule,
|
|
3544
3361
|
MaterialModule$1,
|
|
3545
3362
|
MatProgressBarModule,
|
|
3546
3363
|
InfiniteScrollModule,
|
|
@@ -3661,7 +3478,7 @@ class InventoryDashboardPageComponent {
|
|
|
3661
3478
|
});
|
|
3662
3479
|
}
|
|
3663
3480
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InventoryDashboardPageComponent, deps: [{ token: ProductSummaryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3664
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InventoryDashboardPageComponent, selector: "app-inventory-dashboard-page", ngImport: i0, template: "<div class=\"d-flex justify-content-start align-items-start gap-3 vh-100\">\n <div class=\"row\" style=\"width: calc(100% - 300px)\">\n <div class=\"col-lg-4 mb-3\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-center align-items-center gap-3\">\n <span class=\"material-symbols-outlined fs-1 fw-bold\" style=\"color: #f5222d !important\"> inventory_2 </span>\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Low Stock Products</small>\n <h1 class=\"mb-0 fw-bold\">{{ lowStockProductsCount | number }}</h1>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"col-lg-4 mb-3\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-center align-items-center gap-3\">\n <span class=\"material-symbols-outlined fs-1 fw-bold\"> arrow_circle_down </span>\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Products Received This Month</small>\n <h1 class=\"mb-0 fw-bold\">{{ stockReceiptsQtySum | number }}</h1>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"col-lg-4 mb-3\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-center align-items-center gap-3\">\n <span class=\"material-symbols-outlined fs-1 fw-bold\"> arrow_circle_up </span>\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Products Issued This Month</small>\n <h1 class=\"mb-0 fw-bold\">{{ stockIssuanceQtySum | number }}</h1>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"col-lg-6 mb-3\">\n <app-product-quick-search></app-product-quick-search>\n </div>\n <div class=\"col-lg-6 mb-3\">\n <app-low-stock-products-widget></app-low-stock-products-widget>\n </div>\n <div class=\"col-lg-6 mb-3\">\n <app-product-summary-chart title=\"Product By Category\"></app-product-summary-chart>\n </div>\n </div>\n <div style=\"width: 300px\" class=\"d-flex flex-column gap-3 h-100\">\n <mat-card class=\"h-100\">\n <mat-card-content>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-icon>flag</mat-icon>\n <h3 class=\"mb-0 fw-bold\">Reports</h3>\n </div>\n </mat-card-content>\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-start gap-3\">\n <a\n class=\"d-flex justify-content-start align-items-center gap-2 text-decoration-none text-dark\"\n routerLink=\"/inventory/reports/low-stock-report\"\n >\n <span class=\"material-symbols-outlined fs-3\"> description </span>\n <h3 class=\"mb-0\">Low Stock Report</h3>\n <span class=\"material-symbols-outlined\"> chevron_forward </span>\n </a>\n <a\n class=\"d-flex justify-content-start align-items-center gap-2 text-decoration-none text-dark cursor-pointer\"\n routerLink=\"/inventory/reports/inventory-value-report\"\n >\n <span class=\"material-symbols-outlined fs-3\"> description </span>\n <h3 class=\"mb-0\">Inventory Value Report</h3>\n <span class=\"material-symbols-outlined\"> chevron_forward </span>\n </a>\n </mat-card-content>\n </mat-card>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type:
|
|
3481
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InventoryDashboardPageComponent, selector: "app-inventory-dashboard-page", ngImport: i0, template: "<div class=\"d-flex justify-content-start align-items-start gap-3 vh-100\">\n <div class=\"row\" style=\"width: calc(100% - 300px)\">\n <div class=\"col-lg-4 mb-3\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-center align-items-center gap-3\">\n <span class=\"material-symbols-outlined fs-1 fw-bold\" style=\"color: #f5222d !important\"> inventory_2 </span>\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Low Stock Products</small>\n <h1 class=\"mb-0 fw-bold\">{{ lowStockProductsCount | number }}</h1>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"col-lg-4 mb-3\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-center align-items-center gap-3\">\n <span class=\"material-symbols-outlined fs-1 fw-bold\"> arrow_circle_down </span>\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Products Received This Month</small>\n <h1 class=\"mb-0 fw-bold\">{{ stockReceiptsQtySum | number }}</h1>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"col-lg-4 mb-3\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-center align-items-center gap-3\">\n <span class=\"material-symbols-outlined fs-1 fw-bold\"> arrow_circle_up </span>\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Products Issued This Month</small>\n <h1 class=\"mb-0 fw-bold\">{{ stockIssuanceQtySum | number }}</h1>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"col-lg-6 mb-3\">\n <app-product-quick-search></app-product-quick-search>\n </div>\n <div class=\"col-lg-6 mb-3\">\n <app-low-stock-products-widget></app-low-stock-products-widget>\n </div>\n <div class=\"col-lg-6 mb-3\">\n <app-product-summary-chart title=\"Product By Category\"></app-product-summary-chart>\n </div>\n </div>\n <div style=\"width: 300px\" class=\"d-flex flex-column gap-3 h-100\">\n <mat-card class=\"h-100\">\n <mat-card-content>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-icon>flag</mat-icon>\n <h3 class=\"mb-0 fw-bold\">Reports</h3>\n </div>\n </mat-card-content>\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-start gap-3\">\n <a\n class=\"d-flex justify-content-start align-items-center gap-2 text-decoration-none text-dark\"\n routerLink=\"/inventory/reports/low-stock-report\"\n >\n <span class=\"material-symbols-outlined fs-3\"> description </span>\n <h3 class=\"mb-0\">Low Stock Report</h3>\n <span class=\"material-symbols-outlined\"> chevron_forward </span>\n </a>\n <a\n class=\"d-flex justify-content-start align-items-center gap-2 text-decoration-none text-dark cursor-pointer\"\n routerLink=\"/inventory/reports/inventory-value-report\"\n >\n <span class=\"material-symbols-outlined fs-3\"> description </span>\n <h3 class=\"mb-0\">Inventory Value Report</h3>\n <span class=\"material-symbols-outlined\"> chevron_forward </span>\n </a>\n </mat-card-content>\n </mat-card>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: LowStockProductsWidgetComponent, selector: "app-low-stock-products-widget" }, { kind: "component", type: ProductSummaryChartComponent, selector: "app-product-summary-chart", inputs: ["height", "title"] }, { kind: "component", type: ProductQuickSearchComponent, selector: "app-product-quick-search" }, { kind: "pipe", type: i3.DecimalPipe, name: "number" }], preserveWhitespaces: true });
|
|
3665
3482
|
}
|
|
3666
3483
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InventoryDashboardPageComponent, decorators: [{
|
|
3667
3484
|
type: Component,
|
|
@@ -3956,7 +3773,7 @@ class InventoryValueReportComponent extends TechlifyListingControllerInterface {
|
|
|
3956
3773
|
this.loadData();
|
|
3957
3774
|
}
|
|
3958
3775
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InventoryValueReportComponent, deps: [{ token: InventoryValueReportService }, { token: i2.ActivatedRoute }, { token: i2$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
3959
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InventoryValueReportComponent, isStandalone: true, selector: "app-inventory-value-report", usesInheritance: true, ngImport: i0, template: "<div>\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Inventory Value Report</h3>\n <i class=\"fa-solid fa-file-excel cursor-pointer d-print-none\" (click)=\"export('excel')\"></i>\n <i class=\"fa-solid fa-file-pdf cursor-pointer d-print-none\" (click)=\"export('pdf')\"></i>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Min Stock On Hand</mat-label>\n <mat-select formControlName=\"min_stock_on_hand\">\n <mat-option *ngFor=\"let option of minStockOptions\" [value]=\"option\">\n {{ option }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"name\">Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n <app-product-category-badges [product]=\"element\"></app-product-category-badges>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <span>{{ element?.sku }}</span>\n <span class='text-secondary'> {{ element?.type?.title }} </span>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>Total</strong>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"stock_on_hand\">On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Average Price Column -->\n <ng-container matColumnDef=\"Average Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"average_purchase_price\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Avg. Price</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Average price of batches in stock\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.average_purchase_price | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Column -->\n <ng-container matColumnDef=\"Inventory Value\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"inventory_value\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\" matTooltip=\"Based on average price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>{{ totalInventoryValue | currency }}</strong>\n </td>\n </ng-container>\n\n <!-- Last Purchase Price Column -->\n <ng-container matColumnDef=\"Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"last_purchase_price\">\n Last Price\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_receipt?.purchase_price ?? 0 | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Based On Last Purchase Price Column -->\n <ng-container matColumnDef=\"Inventory Value Based On Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"inventory_value_based_on_last_price\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Based on last purchase price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value_based_on_last_price ?? 0 | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i11$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i7.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i7.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }], preserveWhitespaces: true });
|
|
3776
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InventoryValueReportComponent, isStandalone: true, selector: "app-inventory-value-report", usesInheritance: true, ngImport: i0, template: "<div>\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Inventory Value Report</h3>\n <i class=\"fa-solid fa-file-excel cursor-pointer d-print-none\" (click)=\"export('excel')\"></i>\n <i class=\"fa-solid fa-file-pdf cursor-pointer d-print-none\" (click)=\"export('pdf')\"></i>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Min Stock On Hand</mat-label>\n <mat-select formControlName=\"min_stock_on_hand\">\n <mat-option *ngFor=\"let option of minStockOptions\" [value]=\"option\">\n {{ option }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"name\">Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n <app-product-category-badges [product]=\"element\"></app-product-category-badges>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <span>{{ element?.sku }}</span>\n <span class='text-secondary'> {{ element?.type?.title }} </span>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>Total</strong>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"stock_on_hand\">On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Average Price Column -->\n <ng-container matColumnDef=\"Average Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"average_purchase_price\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Avg. Price</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Average price of batches in stock\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.average_purchase_price | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Column -->\n <ng-container matColumnDef=\"Inventory Value\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"inventory_value\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\" matTooltip=\"Based on average price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>{{ totalInventoryValue | currency }}</strong>\n </td>\n </ng-container>\n\n <!-- Last Purchase Price Column -->\n <ng-container matColumnDef=\"Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"last_purchase_price\">\n Last Price\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_receipt?.purchase_price ?? 0 | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Based On Last Purchase Price Column -->\n <ng-container matColumnDef=\"Inventory Value Based On Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"inventory_value_based_on_last_price\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Based on last purchase price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value_based_on_last_price ?? 0 | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i11$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i7.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i7.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ProductCategoryBadgesComponent, selector: "app-product-category-badges", inputs: ["product"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }], preserveWhitespaces: true });
|
|
3960
3777
|
}
|
|
3961
3778
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InventoryValueReportComponent, decorators: [{
|
|
3962
3779
|
type: Component,
|
|
@@ -3992,7 +3809,7 @@ const routes$6 = [
|
|
|
3992
3809
|
},
|
|
3993
3810
|
{
|
|
3994
3811
|
path: "measures",
|
|
3995
|
-
loadChildren: () => import('./techlify-inventory-common-measure.module-
|
|
3812
|
+
loadChildren: () => import('./techlify-inventory-common-measure.module-BhHMV-wL.mjs').then((mod) => mod.MeasureModule),
|
|
3996
3813
|
},
|
|
3997
3814
|
{
|
|
3998
3815
|
path: 'stock-issues',
|
|
@@ -4004,7 +3821,7 @@ const routes$6 = [
|
|
|
4004
3821
|
},
|
|
4005
3822
|
{
|
|
4006
3823
|
path: 'categories',
|
|
4007
|
-
loadChildren: () => import('./techlify-inventory-common-category.module-
|
|
3824
|
+
loadChildren: () => import('./techlify-inventory-common-category.module-S6Val92n.mjs').then((mod) => mod.CategoryModule),
|
|
4008
3825
|
},
|
|
4009
3826
|
{
|
|
4010
3827
|
path: 'products',
|
|
@@ -4212,7 +4029,7 @@ let ProductSearchComponent = class ProductSearchComponent {
|
|
|
4212
4029
|
});
|
|
4213
4030
|
}
|
|
4214
4031
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProductSearchComponent, deps: [{ token: i1$1.MatDialog }, { token: i2$2.FormBuilder }, { token: i1.FilterService }, { token: ProductService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
4215
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductSearchComponent, selector: "app-product-search", inputs: { with: "with" }, outputs: { selected: "selected" }, ngImport: i0, template: "<div id=\"tableContainer\" #tableContainer fxLayout=\"column\" class=\"table-container\">\n <div class=\"text-dark d-flex flex-row justify-content-start align-items-center gap-2\">\n <mat-icon class=\"material-symbol-outlined\"> campaign </mat-icon>\n <strong>Product Search</strong>\n </div>\n <small class=\"text-secondary mt-2\"> Quickly search for a product to be added as a line item. </small>\n <form [formGroup]=\"searchFormGroup\">\n <mat-form-field fxFlex=\"100%\">\n <mat-label>Search</mat-label>\n <input fxLayout matInput placeholder=\"Search product, SKU\" formControlName=\"search\" />\n </mat-form-field>\n </form>\n <div\n fxLayout=\"column\"\n fxLayoutGap=\"0.5rem\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [infiniteScrollContainer]=\"tableContainer\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"false\"\n >\n <mat-card class=\"p-2\" style=\"background: #d9d9d9\" *ngFor=\"let product of products\">\n <div>\n <div class=\"d-flex flex-row justify-content-between align-items-center\">\n <strong class=\"text-dark\">{{ product?.name }}</strong>\n <strong class=\"text-primary font-xs cursor-pointer\" (click)=\"addProduct(product)\"> Add </strong>\n </div>\n <div class=\"d-flex flex-row justify-content-between align-items-center\">\n <small class=\"text-secondary\">{{ product?.sku }}</small>\n <mat-icon\n (click)=\"viewProduct(product, viewProductTemplate)\"\n class=\"material-symbol-outlined font-md cursor-pointer\"\n >\n contact_support\n </mat-icon>\n </div>\n </div>\n </mat-card>\n </div>\n</div>\n\n<ng-template #viewProductTemplate let-data>\n <div mat-dialog-content>\n <app-product-basic-info [product]=\"data.product\" (saved)=\"reload()\" (deleted)=\"reload()\"></app-product-basic-info>\n\n <div class=\"d-flex justify-content-end mt-2\">\n <button mat-flat-button type=\"button\" mat-dialog-close>Close</button>\n </div>\n </div>\n</ng-template>\n", styles: [".table-container{max-height:600px;overflow-y:scroll}::-webkit-scrollbar{display:none}::-webkit-scrollbar-button{display:none}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type:
|
|
4032
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProductSearchComponent, selector: "app-product-search", inputs: { with: "with" }, outputs: { selected: "selected" }, ngImport: i0, template: "<div id=\"tableContainer\" #tableContainer fxLayout=\"column\" class=\"table-container\">\n <div class=\"text-dark d-flex flex-row justify-content-start align-items-center gap-2\">\n <mat-icon class=\"material-symbol-outlined\"> campaign </mat-icon>\n <strong>Product Search</strong>\n </div>\n <small class=\"text-secondary mt-2\"> Quickly search for a product to be added as a line item. </small>\n <form [formGroup]=\"searchFormGroup\">\n <mat-form-field fxFlex=\"100%\">\n <mat-label>Search</mat-label>\n <input fxLayout matInput placeholder=\"Search product, SKU\" formControlName=\"search\" />\n </mat-form-field>\n </form>\n <div\n fxLayout=\"column\"\n fxLayoutGap=\"0.5rem\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [infiniteScrollContainer]=\"tableContainer\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"false\"\n >\n <mat-card class=\"p-2\" style=\"background: #d9d9d9\" *ngFor=\"let product of products\">\n <div>\n <div class=\"d-flex flex-row justify-content-between align-items-center\">\n <strong class=\"text-dark\">{{ product?.name }}</strong>\n <strong class=\"text-primary font-xs cursor-pointer\" (click)=\"addProduct(product)\"> Add </strong>\n </div>\n <div class=\"d-flex flex-row justify-content-between align-items-center\">\n <small class=\"text-secondary\">{{ product?.sku }}</small>\n <mat-icon\n (click)=\"viewProduct(product, viewProductTemplate)\"\n class=\"material-symbol-outlined font-md cursor-pointer\"\n >\n contact_support\n </mat-icon>\n </div>\n </div>\n </mat-card>\n </div>\n</div>\n\n<ng-template #viewProductTemplate let-data>\n <div mat-dialog-content>\n <app-product-basic-info [product]=\"data.product\" (saved)=\"reload()\" (deleted)=\"reload()\"></app-product-basic-info>\n\n <div class=\"d-flex justify-content-end mt-2\">\n <button mat-flat-button type=\"button\" mat-dialog-close>Close</button>\n </div>\n </div>\n</ng-template>\n", styles: [".table-container{max-height:600px;overflow-y:scroll}::-webkit-scrollbar{display:none}::-webkit-scrollbar-button{display:none}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: ProductBasicInfoComponent, selector: "app-product-basic-info", inputs: ["product"], outputs: ["saved", "deleted"] }], preserveWhitespaces: true });
|
|
4216
4033
|
};
|
|
4217
4034
|
ProductSearchComponent = __decorate([
|
|
4218
4035
|
UntilDestroy()
|
|
@@ -4305,7 +4122,7 @@ const routes$5 = [
|
|
|
4305
4122
|
},
|
|
4306
4123
|
{
|
|
4307
4124
|
path: ':id/view',
|
|
4308
|
-
loadComponent: () => import('./techlify-inventory-common-stock-issue-view.component-
|
|
4125
|
+
loadComponent: () => import('./techlify-inventory-common-stock-issue-view.component-CltIudzA.mjs').then(m => m.StockIssueViewComponent),
|
|
4309
4126
|
canLoad: [AuthenticationGuard]
|
|
4310
4127
|
}
|
|
4311
4128
|
];
|
|
@@ -4395,18 +4212,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
4395
4212
|
|
|
4396
4213
|
class IncidentFormComponent extends TechlifyFormComponentInterface {
|
|
4397
4214
|
formBuilder;
|
|
4398
|
-
alertService;
|
|
4399
4215
|
incidentService;
|
|
4400
4216
|
incident;
|
|
4401
4217
|
incidentableType;
|
|
4402
4218
|
incidentableId;
|
|
4403
4219
|
saved = new EventEmitter();
|
|
4404
4220
|
cancelled = new EventEmitter();
|
|
4405
|
-
|
|
4406
|
-
constructor(formValidatorService, formBuilder, alertService, incidentService) {
|
|
4221
|
+
constructor(formValidatorService, formBuilder, incidentService) {
|
|
4407
4222
|
super(formValidatorService);
|
|
4408
4223
|
this.formBuilder = formBuilder;
|
|
4409
|
-
this.alertService = alertService;
|
|
4410
4224
|
this.incidentService = incidentService;
|
|
4411
4225
|
this.errorMessages = {
|
|
4412
4226
|
date: {
|
|
@@ -4467,7 +4281,7 @@ class IncidentFormComponent extends TechlifyFormComponentInterface {
|
|
|
4467
4281
|
error: () => (this.isWorking = false)
|
|
4468
4282
|
});
|
|
4469
4283
|
}
|
|
4470
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IncidentFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token:
|
|
4284
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IncidentFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: IncidentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4471
4285
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: IncidentFormComponent, isStandalone: true, selector: "app-incident-form", inputs: { incident: "incident", incidentableType: "incidentableType", incidentableId: "incidentableId" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput formControlName=\"date\" [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Classification</mat-label>\n <app-searchable-selector\n required\n formControlName=\"classification_id\"\n apiUrl=\"api/incident-classifications\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('classification_id')\">\n {{ getErrorMessage('classification_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Cost</mat-label>\n <input matInput type=\"number\" formControlName=\"cost\" placeholder=\"Cost\"/>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <textarea matInput formControlName=\"details\" rows=\"3\" placeholder=\"Details\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancelled.emit()\">Cancel</button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], preserveWhitespaces: true });
|
|
4472
4286
|
}
|
|
4473
4287
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IncidentFormComponent, decorators: [{
|
|
@@ -4484,7 +4298,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
4484
4298
|
MatError,
|
|
4485
4299
|
NgIf
|
|
4486
4300
|
], template: "<form [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput formControlName=\"date\" [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Classification</mat-label>\n <app-searchable-selector\n required\n formControlName=\"classification_id\"\n apiUrl=\"api/incident-classifications\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('classification_id')\">\n {{ getErrorMessage('classification_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Cost</mat-label>\n <input matInput type=\"number\" formControlName=\"cost\" placeholder=\"Cost\"/>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <textarea matInput formControlName=\"details\" rows=\"3\" placeholder=\"Details\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancelled.emit()\">Cancel</button>\n </div>\n</form>\n" }]
|
|
4487
|
-
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type:
|
|
4301
|
+
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: IncidentService }], propDecorators: { incident: [{
|
|
4488
4302
|
type: Input
|
|
4489
4303
|
}], incidentableType: [{
|
|
4490
4304
|
type: Input
|
|
@@ -4670,18 +4484,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
4670
4484
|
|
|
4671
4485
|
class RatingFormComponent extends TechlifyFormComponentInterface {
|
|
4672
4486
|
formBuilder;
|
|
4673
|
-
alertService;
|
|
4674
4487
|
ratingService;
|
|
4675
4488
|
rating;
|
|
4676
4489
|
rateableType;
|
|
4677
4490
|
rateableId;
|
|
4678
4491
|
saved = new EventEmitter();
|
|
4679
4492
|
cancelled = new EventEmitter();
|
|
4680
|
-
|
|
4681
|
-
constructor(formValidatorService, formBuilder, alertService, ratingService) {
|
|
4493
|
+
constructor(formValidatorService, formBuilder, ratingService) {
|
|
4682
4494
|
super(formValidatorService);
|
|
4683
4495
|
this.formBuilder = formBuilder;
|
|
4684
|
-
this.alertService = alertService;
|
|
4685
4496
|
this.ratingService = ratingService;
|
|
4686
4497
|
this.errorMessages = {
|
|
4687
4498
|
date: {
|
|
@@ -4741,7 +4552,7 @@ class RatingFormComponent extends TechlifyFormComponentInterface {
|
|
|
4741
4552
|
error: () => (this.isWorking = false)
|
|
4742
4553
|
});
|
|
4743
4554
|
}
|
|
4744
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RatingFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token:
|
|
4555
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RatingFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: RatingService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4745
4556
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: RatingFormComponent, isStandalone: true, selector: "app-rating-form", inputs: { rating: "rating", rateableType: "rateableType", rateableId: "rateableId" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput formControlName=\"date\" [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Grade</mat-label>\n <app-searchable-selector\n required\n formControlName=\"grade_id\"\n apiUrl=\"api/rating-grades\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('grade_id')\">\n {{ getErrorMessage('grade_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <textarea matInput formControlName=\"details\" rows=\"3\" placeholder=\"Details\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancelled.emit()\">Cancel</button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], preserveWhitespaces: true });
|
|
4746
4557
|
}
|
|
4747
4558
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RatingFormComponent, decorators: [{
|
|
@@ -4758,7 +4569,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
4758
4569
|
MatError,
|
|
4759
4570
|
NgIf
|
|
4760
4571
|
], template: "<form [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput formControlName=\"date\" [matDatepicker]=\"picker\" placeholder=\"Date\" (focus)=\"picker.open()\">\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">\n {{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Grade</mat-label>\n <app-searchable-selector\n required\n formControlName=\"grade_id\"\n apiUrl=\"api/rating-grades\"\n [enableSearch]=\"false\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('grade_id')\">\n {{ getErrorMessage('grade_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <textarea matInput formControlName=\"details\" rows=\"3\" placeholder=\"Details\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-3\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancelled.emit()\">Cancel</button>\n </div>\n</form>\n" }]
|
|
4761
|
-
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type:
|
|
4572
|
+
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: RatingService }], propDecorators: { rating: [{
|
|
4762
4573
|
type: Input
|
|
4763
4574
|
}], rateableType: [{
|
|
4764
4575
|
type: Input
|
|
@@ -4977,7 +4788,7 @@ class SupplierInformationComponent {
|
|
|
4977
4788
|
});
|
|
4978
4789
|
}
|
|
4979
4790
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierInformationComponent, deps: [{ token: i1$1.MatDialog }, { token: SupplierService }, { token: i1.AlertService }, { token: i2.Router }, { token: i1.ErrorHandlerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4980
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierInformationComponent, selector: "app-supplier-information", inputs: { supplier: "supplier" }, ngImport: i0, template: "<mat-card>\n <mat-card-content>\n <div class=\"d-flex justify-content-between align-items-center\">\n <h3 class=\"mb-0\">Personal Information</h3>\n <div class=\"d-flex justify-content-end align-items-center gap-1\">\n <app-audit-log-for-model [modelId]=\"supplier?.id\" modelType=\"Supplier\" logView=\"all\"></app-audit-log-for-model>\n <mat-icon class=\"material-icons cursor-pointer\" (click)=\"modifySupplier(supplier)\"> edit </mat-icon>\n <mat-icon class=\"material-icons cursor-pointer\" (click)=\"deleteSupplier(supplier)\"> delete </mat-icon>\n </div>\n </div>\n\n <mat-divider></mat-divider>\n\n <div class=\"mt-2\">\n <div class=\"d-flex justify-content-start gap-2\">\n <div>\n <h3 class=\"mb-0\">{{ supplier?.company_name }}</h3>\n <span *ngIf=\"supplier?.type\" class=\"status-pill-sm status-light-orange\"> {{ supplier?.type?.title }}</span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-3\">\n <div class=\"col-6\" *ngIf=\"supplier?.contact_name\">\n <p class=\"text-muted mb-0\">Contact Name</p>\n <p class=\"text-wrap\">{{ supplier?.contact_name }}</p>\n </div>\n <div class=\"col-6\" *ngIf=\"supplier?.email\">\n <p class=\"text-muted mb-0\">Email</p>\n <p class=\"text-wrap\">{{ supplier?.email }}</p>\n </div>\n <div class=\"col-6\" *ngIf=\"supplier?.phone\">\n <p class=\"text-muted mb-0\">Phone</p>\n <p class=\"text-wrap\">{{ supplier?.phone }}</p>\n </div>\n <div class=\"col-6\" *ngIf=\"supplier?.details\">\n <p class=\"text-muted mb-0\">Details</p>\n <p class=\"text-wrap\">{{ supplier?.details }}</p>\n </div>\n </div>\n\n <div class=\"row mt-2 h-100\">\n <div class=\"d-flex\" *ngIf=\"supplier?.address\">\n <mat-icon class=\"material-icons text-primary my-auto\">location_on</mat-icon>\n <p class=\"ms-2 my-auto\">{{ supplier?.address }}</p>\n </div>\n </div>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type:
|
|
4791
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierInformationComponent, selector: "app-supplier-information", inputs: { supplier: "supplier" }, ngImport: i0, template: "<mat-card>\n <mat-card-content>\n <div class=\"d-flex justify-content-between align-items-center\">\n <h3 class=\"mb-0\">Personal Information</h3>\n <div class=\"d-flex justify-content-end align-items-center gap-1\">\n <app-audit-log-for-model [modelId]=\"supplier?.id\" modelType=\"Supplier\" logView=\"all\"></app-audit-log-for-model>\n <mat-icon class=\"material-icons cursor-pointer\" (click)=\"modifySupplier(supplier)\"> edit </mat-icon>\n <mat-icon class=\"material-icons cursor-pointer\" (click)=\"deleteSupplier(supplier)\"> delete </mat-icon>\n </div>\n </div>\n\n <mat-divider></mat-divider>\n\n <div class=\"mt-2\">\n <div class=\"d-flex justify-content-start gap-2\">\n <div>\n <h3 class=\"mb-0\">{{ supplier?.company_name }}</h3>\n <span *ngIf=\"supplier?.type\" class=\"status-pill-sm status-light-orange\"> {{ supplier?.type?.title }}</span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-3\">\n <div class=\"col-6\" *ngIf=\"supplier?.contact_name\">\n <p class=\"text-muted mb-0\">Contact Name</p>\n <p class=\"text-wrap\">{{ supplier?.contact_name }}</p>\n </div>\n <div class=\"col-6\" *ngIf=\"supplier?.email\">\n <p class=\"text-muted mb-0\">Email</p>\n <p class=\"text-wrap\">{{ supplier?.email }}</p>\n </div>\n <div class=\"col-6\" *ngIf=\"supplier?.phone\">\n <p class=\"text-muted mb-0\">Phone</p>\n <p class=\"text-wrap\">{{ supplier?.phone }}</p>\n </div>\n <div class=\"col-6\" *ngIf=\"supplier?.details\">\n <p class=\"text-muted mb-0\">Details</p>\n <p class=\"text-wrap\">{{ supplier?.details }}</p>\n </div>\n </div>\n\n <div class=\"row mt-2 h-100\">\n <div class=\"d-flex\" *ngIf=\"supplier?.address\">\n <mat-icon class=\"material-icons text-primary my-auto\">location_on</mat-icon>\n <p class=\"ms-2 my-auto\">{{ supplier?.address }}</p>\n </div>\n </div>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1.AuditLogForModelComponent, selector: "app-audit-log-for-model", inputs: ["isIconView", "modelType", "modelId", "logView"] }], preserveWhitespaces: true });
|
|
4981
4792
|
}
|
|
4982
4793
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierInformationComponent, decorators: [{
|
|
4983
4794
|
type: Component,
|
|
@@ -4986,6 +4797,240 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
4986
4797
|
type: Input
|
|
4987
4798
|
}] } });
|
|
4988
4799
|
|
|
4800
|
+
class SupplierBranchService extends TechlifyServiceBaseClass {
|
|
4801
|
+
constructor(httpService) {
|
|
4802
|
+
super(httpService, 'supplier-branches');
|
|
4803
|
+
}
|
|
4804
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchService, deps: [{ token: i1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4805
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchService, providedIn: 'root' });
|
|
4806
|
+
}
|
|
4807
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchService, decorators: [{
|
|
4808
|
+
type: Injectable,
|
|
4809
|
+
args: [{
|
|
4810
|
+
providedIn: 'root',
|
|
4811
|
+
}]
|
|
4812
|
+
}], ctorParameters: () => [{ type: i1.HttpService }] });
|
|
4813
|
+
|
|
4814
|
+
class SupplierBranchFormComponent extends TechlifyFormComponentInterface {
|
|
4815
|
+
formBuilder;
|
|
4816
|
+
supplierBranchService;
|
|
4817
|
+
data;
|
|
4818
|
+
dialogRef;
|
|
4819
|
+
errorMessages = {
|
|
4820
|
+
title: {
|
|
4821
|
+
required: 'The title field is required.',
|
|
4822
|
+
},
|
|
4823
|
+
};
|
|
4824
|
+
constructor(formValidatorService, formBuilder, supplierBranchService, data, dialogRef) {
|
|
4825
|
+
super(formValidatorService);
|
|
4826
|
+
this.formBuilder = formBuilder;
|
|
4827
|
+
this.supplierBranchService = supplierBranchService;
|
|
4828
|
+
this.data = data;
|
|
4829
|
+
this.dialogRef = dialogRef;
|
|
4830
|
+
this.form = this.formBuilder.group({
|
|
4831
|
+
id: [''],
|
|
4832
|
+
supplier_id: ['', Validators.required],
|
|
4833
|
+
title: ['', Validators.required],
|
|
4834
|
+
description: [''],
|
|
4835
|
+
phone: [''],
|
|
4836
|
+
email: [''],
|
|
4837
|
+
address: [''],
|
|
4838
|
+
});
|
|
4839
|
+
}
|
|
4840
|
+
ngOnInit() {
|
|
4841
|
+
if (this.data?.supplierId) {
|
|
4842
|
+
this.form.patchValue({ supplier_id: this.data.supplierId });
|
|
4843
|
+
}
|
|
4844
|
+
if (this.data?.branch) {
|
|
4845
|
+
this.form.patchValue({ ...this.data.branch });
|
|
4846
|
+
}
|
|
4847
|
+
}
|
|
4848
|
+
save() {
|
|
4849
|
+
if (this.form.invalid) {
|
|
4850
|
+
this.alertService.addAlert('Please check the form for errors.', 'error');
|
|
4851
|
+
return;
|
|
4852
|
+
}
|
|
4853
|
+
const form = {
|
|
4854
|
+
...this.form.value,
|
|
4855
|
+
};
|
|
4856
|
+
this.isWorking = true;
|
|
4857
|
+
let promise = form.id
|
|
4858
|
+
? this.supplierBranchService.update(form)
|
|
4859
|
+
: this.supplierBranchService.store(form);
|
|
4860
|
+
promise.subscribe({
|
|
4861
|
+
next: () => {
|
|
4862
|
+
this.dialogRef.close(true);
|
|
4863
|
+
this.alertService.addAlert('Branch saved successfully!', 'success');
|
|
4864
|
+
},
|
|
4865
|
+
error: () => (this.isWorking = false),
|
|
4866
|
+
});
|
|
4867
|
+
}
|
|
4868
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: SupplierBranchService }, { token: MAT_DIALOG_DATA }, { token: i1$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4869
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierBranchFormComponent, selector: "app-supplier-branch-form", usesInheritance: true, ngImport: i0, template: "<mat-card-content>\n <h3 class=\"text-center mb-1\">Branch Form</h3>\n\n <form [formGroup]=\"form\" class=\"d-flex flex-row flex-wrap justify-content-start gap-2\" (submit)=\"save()\">\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Title</mat-label>\n <input formControlName=\"title\" type=\"text\" matInput placeholder=\"Title\" />\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Phone</mat-label>\n <input formControlName=\"phone\" type=\"text\" matInput placeholder=\"Phone\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Email</mat-label>\n <input formControlName=\"email\" type=\"email\" matInput placeholder=\"Email\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Address</mat-label>\n <input formControlName=\"address\" type=\"text\" matInput placeholder=\"Address\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\" style=\"width: calc(100%)\">\n <button [disabled]=\"isWorking\" type=\"button\" mat-flat-button mat-dialog-close>Cancel</button>\n <button [disabled]=\"isWorking\" type=\"submit\" mat-raised-button color=\"primary\">Save</button>\n </div>\n </form>\n</mat-card-content>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], preserveWhitespaces: true });
|
|
4870
|
+
}
|
|
4871
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchFormComponent, decorators: [{
|
|
4872
|
+
type: Component,
|
|
4873
|
+
args: [{ selector: 'app-supplier-branch-form', template: "<mat-card-content>\n <h3 class=\"text-center mb-1\">Branch Form</h3>\n\n <form [formGroup]=\"form\" class=\"d-flex flex-row flex-wrap justify-content-start gap-2\" (submit)=\"save()\">\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Title</mat-label>\n <input formControlName=\"title\" type=\"text\" matInput placeholder=\"Title\" />\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Phone</mat-label>\n <input formControlName=\"phone\" type=\"text\" matInput placeholder=\"Phone\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Email</mat-label>\n <input formControlName=\"email\" type=\"email\" matInput placeholder=\"Email\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Address</mat-label>\n <input formControlName=\"address\" type=\"text\" matInput placeholder=\"Address\" />\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\" style=\"width: calc(100%)\">\n <button [disabled]=\"isWorking\" type=\"button\" mat-flat-button mat-dialog-close>Cancel</button>\n <button [disabled]=\"isWorking\" type=\"submit\" mat-raised-button color=\"primary\">Save</button>\n </div>\n </form>\n</mat-card-content>" }]
|
|
4874
|
+
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: SupplierBranchService }, { type: undefined, decorators: [{
|
|
4875
|
+
type: Inject,
|
|
4876
|
+
args: [MAT_DIALOG_DATA]
|
|
4877
|
+
}] }, { type: i1$1.MatDialogRef }] });
|
|
4878
|
+
|
|
4879
|
+
class SupplierBranchFormButtonComponent {
|
|
4880
|
+
dialog;
|
|
4881
|
+
branch;
|
|
4882
|
+
supplierId = null;
|
|
4883
|
+
saved = new EventEmitter();
|
|
4884
|
+
constructor(dialog) {
|
|
4885
|
+
this.dialog = dialog;
|
|
4886
|
+
}
|
|
4887
|
+
open() {
|
|
4888
|
+
this.dialog.open(SupplierBranchFormComponent, {
|
|
4889
|
+
width: '500px',
|
|
4890
|
+
data: {
|
|
4891
|
+
branch: this.branch,
|
|
4892
|
+
supplierId: this.supplierId
|
|
4893
|
+
},
|
|
4894
|
+
}).afterClosed().subscribe((response) => {
|
|
4895
|
+
if (response) {
|
|
4896
|
+
this.saved.emit(response);
|
|
4897
|
+
}
|
|
4898
|
+
});
|
|
4899
|
+
}
|
|
4900
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
4901
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierBranchFormButtonComponent, isStandalone: true, selector: "app-supplier-branch-form-button", inputs: { branch: "branch", supplierId: "supplierId" }, outputs: { saved: "saved" }, ngImport: i0, template: "<app-techlify-icon role='button' (click)=\"open()\" [name]=\"branch?.id ? 'edit' : 'add'\"></app-techlify-icon>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "ngmodule", type: TechlifyIconModule }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }], preserveWhitespaces: true });
|
|
4902
|
+
}
|
|
4903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchFormButtonComponent, decorators: [{
|
|
4904
|
+
type: Component,
|
|
4905
|
+
args: [{ selector: 'app-supplier-branch-form-button', standalone: true, imports: [
|
|
4906
|
+
CommonModule,
|
|
4907
|
+
MaterialModule,
|
|
4908
|
+
TechlifyIconModule
|
|
4909
|
+
], template: "<app-techlify-icon role='button' (click)=\"open()\" [name]=\"branch?.id ? 'edit' : 'add'\"></app-techlify-icon>" }]
|
|
4910
|
+
}], ctorParameters: () => [{ type: i1$1.MatDialog }], propDecorators: { branch: [{
|
|
4911
|
+
type: Input
|
|
4912
|
+
}], supplierId: [{
|
|
4913
|
+
type: Input
|
|
4914
|
+
}], saved: [{
|
|
4915
|
+
type: Output
|
|
4916
|
+
}] } });
|
|
4917
|
+
|
|
4918
|
+
class SupplierBranchDeleteButtonComponent {
|
|
4919
|
+
dialog;
|
|
4920
|
+
alertService;
|
|
4921
|
+
errorHandler;
|
|
4922
|
+
supplierBranchService;
|
|
4923
|
+
branch;
|
|
4924
|
+
deleted = new EventEmitter();
|
|
4925
|
+
constructor(dialog, alertService, errorHandler, supplierBranchService) {
|
|
4926
|
+
this.dialog = dialog;
|
|
4927
|
+
this.alertService = alertService;
|
|
4928
|
+
this.errorHandler = errorHandler;
|
|
4929
|
+
this.supplierBranchService = supplierBranchService;
|
|
4930
|
+
}
|
|
4931
|
+
ngOnInit() {
|
|
4932
|
+
}
|
|
4933
|
+
openDialog() {
|
|
4934
|
+
this.dialog.open(ActionPopupComponent, {
|
|
4935
|
+
width: '400px',
|
|
4936
|
+
data: {
|
|
4937
|
+
title: 'Delete Supplier Branch',
|
|
4938
|
+
message: 'Are you sure you want to delete this Supplier Branch?',
|
|
4939
|
+
},
|
|
4940
|
+
autoFocus: false,
|
|
4941
|
+
}).afterClosed().subscribe(async (result) => {
|
|
4942
|
+
if (result) {
|
|
4943
|
+
this.supplierBranchService.delete(this.branch).subscribe({
|
|
4944
|
+
next: () => {
|
|
4945
|
+
this.alertService.addAlert('Successfully deleted the Supplier Branch', 'success');
|
|
4946
|
+
this.deleted.emit(this.branch);
|
|
4947
|
+
},
|
|
4948
|
+
error: (error) => {
|
|
4949
|
+
this.errorHandler.handleError(error);
|
|
4950
|
+
}
|
|
4951
|
+
});
|
|
4952
|
+
}
|
|
4953
|
+
});
|
|
4954
|
+
}
|
|
4955
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchDeleteButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.AlertService }, { token: i1.ErrorHandlerService }, { token: SupplierBranchService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4956
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierBranchDeleteButtonComponent, isStandalone: true, selector: "app-supplier-branch-delete-button", inputs: { branch: "branch" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<app-techlify-icon role=\"button\" name='delete' (click)=\"openDialog()\">\n</app-techlify-icon>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "ngmodule", type: TechlifyIconModule }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "ngmodule", type: NgxPermissionsModule }], preserveWhitespaces: true });
|
|
4957
|
+
}
|
|
4958
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchDeleteButtonComponent, decorators: [{
|
|
4959
|
+
type: Component,
|
|
4960
|
+
args: [{ selector: 'app-supplier-branch-delete-button', standalone: true, imports: [
|
|
4961
|
+
CommonModule,
|
|
4962
|
+
MaterialModule,
|
|
4963
|
+
TechlifyIconModule,
|
|
4964
|
+
NgxPermissionsModule
|
|
4965
|
+
], template: "<app-techlify-icon role=\"button\" name='delete' (click)=\"openDialog()\">\n</app-techlify-icon>" }]
|
|
4966
|
+
}], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i1.AlertService }, { type: i1.ErrorHandlerService }, { type: SupplierBranchService }], propDecorators: { branch: [{
|
|
4967
|
+
type: Input
|
|
4968
|
+
}], deleted: [{
|
|
4969
|
+
type: Output
|
|
4970
|
+
}] } });
|
|
4971
|
+
|
|
4972
|
+
class SupplierBranchesListComponent extends TechlifyListingControllerInterface {
|
|
4973
|
+
fb;
|
|
4974
|
+
errorHandlerService;
|
|
4975
|
+
service;
|
|
4976
|
+
supplierId = null;
|
|
4977
|
+
displayedColumns = [
|
|
4978
|
+
'#',
|
|
4979
|
+
'title',
|
|
4980
|
+
'address',
|
|
4981
|
+
'phone',
|
|
4982
|
+
'email',
|
|
4983
|
+
'description',
|
|
4984
|
+
'actions',
|
|
4985
|
+
];
|
|
4986
|
+
constructor(fb, errorHandlerService, service) {
|
|
4987
|
+
super();
|
|
4988
|
+
this.fb = fb;
|
|
4989
|
+
this.errorHandlerService = errorHandlerService;
|
|
4990
|
+
this.service = service;
|
|
4991
|
+
this.filterForm = this.fb.group({
|
|
4992
|
+
supplier_id: [''],
|
|
4993
|
+
search: [''],
|
|
4994
|
+
sort_by: ['created_at|desc'],
|
|
4995
|
+
});
|
|
4996
|
+
}
|
|
4997
|
+
ngOnInit() {
|
|
4998
|
+
this.listenFilterChanges();
|
|
4999
|
+
this.loadData();
|
|
5000
|
+
}
|
|
5001
|
+
async loadData() {
|
|
5002
|
+
let filters = this.requestHelperService.convertToFormData(this.filterForm.value);
|
|
5003
|
+
filters.page = this.page;
|
|
5004
|
+
filters.perPage = this.perPage;
|
|
5005
|
+
if (this.supplierId) {
|
|
5006
|
+
filters.supplier_id = this.supplierId;
|
|
5007
|
+
}
|
|
5008
|
+
this.isWorking = true;
|
|
5009
|
+
this.service.index(filters).subscribe({
|
|
5010
|
+
next: (response) => {
|
|
5011
|
+
this.models = this.models?.concat(response?.data);
|
|
5012
|
+
this.lastPage = response.last_page;
|
|
5013
|
+
this.isWorking = false;
|
|
5014
|
+
},
|
|
5015
|
+
error: (error) => {
|
|
5016
|
+
this.isWorking = false;
|
|
5017
|
+
this.errorHandlerService.handleError(error);
|
|
5018
|
+
},
|
|
5019
|
+
});
|
|
5020
|
+
}
|
|
5021
|
+
assignFilter(column, direction) {
|
|
5022
|
+
return this.filterForm.get('sort_by')?.setValue(column + '|' + direction);
|
|
5023
|
+
}
|
|
5024
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchesListComponent, deps: [{ token: i2$2.FormBuilder }, { token: i1.ErrorHandlerService }, { token: SupplierBranchService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5025
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierBranchesListComponent, selector: "app-supplier-branches-list", inputs: { supplierId: "supplierId" }, usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h3 class=\"mb-0 fw-bold\">Branches</h3>\n <app-supplier-branch-form-button [supplierId]=\"supplierId\"\n (saved)=\"reload()\"></app-supplier-branch-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search by Title, Address, Phone, Email\" formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Supplier Branches List\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Title</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-2\">\n <app-supplier-branch-form-button [branch]=\"element\" [supplierId]=\"supplierId\"\n (saved)=\"reload()\"></app-supplier-branch-form-button>\n <app-supplier-branch-delete-button [branch]=\"element\"\n (deleted)=\"reload()\"></app-supplier-branch-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: SupplierBranchFormButtonComponent, selector: "app-supplier-branch-form-button", inputs: ["branch", "supplierId"], outputs: ["saved"] }, { kind: "component", type: SupplierBranchDeleteButtonComponent, selector: "app-supplier-branch-delete-button", inputs: ["branch"], outputs: ["deleted"] }], preserveWhitespaces: true });
|
|
5026
|
+
}
|
|
5027
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierBranchesListComponent, decorators: [{
|
|
5028
|
+
type: Component,
|
|
5029
|
+
args: [{ selector: 'app-supplier-branches-list', template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h3 class=\"mb-0 fw-bold\">Branches</h3>\n <app-supplier-branch-form-button [supplierId]=\"supplierId\"\n (saved)=\"reload()\"></app-supplier-branch-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search by Title, Address, Phone, Email\" formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Supplier Branches List\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Title</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-2\">\n <app-supplier-branch-form-button [branch]=\"element\" [supplierId]=\"supplierId\"\n (saved)=\"reload()\"></app-supplier-branch-form-button>\n <app-supplier-branch-delete-button [branch]=\"element\"\n (deleted)=\"reload()\"></app-supplier-branch-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>" }]
|
|
5030
|
+
}], ctorParameters: () => [{ type: i2$2.FormBuilder }, { type: i1.ErrorHandlerService }, { type: SupplierBranchService }], propDecorators: { supplierId: [{
|
|
5031
|
+
type: Input
|
|
5032
|
+
}] } });
|
|
5033
|
+
|
|
4989
5034
|
class SupplierViewComponent {
|
|
4990
5035
|
supplierService;
|
|
4991
5036
|
route;
|
|
@@ -5034,11 +5079,11 @@ class SupplierViewComponent {
|
|
|
5034
5079
|
this.supplier = result.item;
|
|
5035
5080
|
}
|
|
5036
5081
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierViewComponent, deps: [{ token: SupplierService }, { token: i2.ActivatedRoute }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
5037
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierViewComponent, selector: "app-supplier-view", ngImport: i0, template: "<mat-progress-bar *ngIf=\"isLoading\" mode=\"indeterminate\"></mat-progress-bar>\n\n<div *ngIf=\"supplier\" class=\"d-flex flex-row gap-3 justify-content-between\">\n <div style=\"width: 300px\">\n <app-supplier-information [supplier]=\"supplier\"></app-supplier-information>\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <app-note-list modelType=\"Supplier\" [relatedModelId]=\"supplier?.id\" viewMode=\"timeline\"\n labelText=\"Notes\"></app-note-list>\n </mat-card-content>\n </mat-card>\n </div>\n\n <mat-card class='w-100'>\n <mat-card-content>\n <mat-tab-group [mat-stretch-tabs]=\"false\">\n <mat-tab label=\"Incidents\">\n <app-incident-list [supplierId]=\"supplier?.id\" incidentableType=\"Supplier\" [incidentableId]=\"supplier?.id\">\n </app-incident-list>\n </mat-tab>\n <mat-tab label=\"Ratings\">\n <app-rating-list [supplierId]=\"supplier?.id\" [rateableId]=\"supplier?.id\"
|
|
5082
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierViewComponent, selector: "app-supplier-view", ngImport: i0, template: "<mat-progress-bar *ngIf=\"isLoading\" mode=\"indeterminate\"></mat-progress-bar>\n\n<div *ngIf=\"supplier\" class=\"d-flex flex-row gap-3 justify-content-between\">\n <div style=\"width: 300px\">\n <app-supplier-information [supplier]=\"supplier\"></app-supplier-information>\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <app-note-list modelType=\"Supplier\" [relatedModelId]=\"supplier?.id\" viewMode=\"timeline\"\n labelText=\"Notes\"></app-note-list>\n </mat-card-content>\n </mat-card>\n </div>\n\n <mat-card class='w-100'>\n <mat-card-content>\n <mat-tab-group [mat-stretch-tabs]=\"false\">\n <mat-tab label=\"Branches\">\n <app-supplier-branches-list [supplierId]=\"supplier?.id\"></app-supplier-branches-list>\n </mat-tab>\n <mat-tab label=\"Incidents\">\n <app-incident-list [supplierId]=\"supplier?.id\" incidentableType=\"Supplier\" [incidentableId]=\"supplier?.id\">\n </app-incident-list>\n </mat-tab>\n <mat-tab label=\"Ratings\">\n <app-rating-list [supplierId]=\"supplier?.id\" [rateableId]=\"supplier?.id\"\n rateableType=\"Supplier\"></app-rating-list>\n </mat-tab>\n <mat-tab label=\"Stock Receipts\">\n <app-stock-receipts-list-page [supplierId]=\"supplier?.id\"></app-stock-receipts-list-page>\n </mat-tab>\n </mat-tab-group>\n </mat-card-content>\n </mat-card>\n</div>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i6.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i6.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: i1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "component", type: StockReceiptsListPageComponent, selector: "app-stock-receipts-list-page", inputs: ["product", "supplierId"], outputs: ["listUpdated"] }, { kind: "component", type: IncidentListComponent, selector: "app-incident-list", inputs: ["supplierId", "incidentableType", "incidentableId"] }, { kind: "component", type: RatingListComponent, selector: "app-rating-list", inputs: ["supplierId", "rateableType", "rateableId"] }, { kind: "component", type: SupplierInformationComponent, selector: "app-supplier-information", inputs: ["supplier"] }, { kind: "component", type: SupplierBranchesListComponent, selector: "app-supplier-branches-list", inputs: ["supplierId"] }], preserveWhitespaces: true });
|
|
5038
5083
|
}
|
|
5039
5084
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierViewComponent, decorators: [{
|
|
5040
5085
|
type: Component,
|
|
5041
|
-
args: [{ selector: 'app-supplier-view', template: "<mat-progress-bar *ngIf=\"isLoading\" mode=\"indeterminate\"></mat-progress-bar>\n\n<div *ngIf=\"supplier\" class=\"d-flex flex-row gap-3 justify-content-between\">\n <div style=\"width: 300px\">\n <app-supplier-information [supplier]=\"supplier\"></app-supplier-information>\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <app-note-list modelType=\"Supplier\" [relatedModelId]=\"supplier?.id\" viewMode=\"timeline\"\n labelText=\"Notes\"></app-note-list>\n </mat-card-content>\n </mat-card>\n </div>\n\n <mat-card class='w-100'>\n <mat-card-content>\n <mat-tab-group [mat-stretch-tabs]=\"false\">\n <mat-tab label=\"Incidents\">\n <app-incident-list [supplierId]=\"supplier?.id\" incidentableType=\"Supplier\" [incidentableId]=\"supplier?.id\">\n </app-incident-list>\n </mat-tab>\n <mat-tab label=\"Ratings\">\n <app-rating-list [supplierId]=\"supplier?.id\" [rateableId]=\"supplier?.id\"
|
|
5086
|
+
args: [{ selector: 'app-supplier-view', template: "<mat-progress-bar *ngIf=\"isLoading\" mode=\"indeterminate\"></mat-progress-bar>\n\n<div *ngIf=\"supplier\" class=\"d-flex flex-row gap-3 justify-content-between\">\n <div style=\"width: 300px\">\n <app-supplier-information [supplier]=\"supplier\"></app-supplier-information>\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <app-note-list modelType=\"Supplier\" [relatedModelId]=\"supplier?.id\" viewMode=\"timeline\"\n labelText=\"Notes\"></app-note-list>\n </mat-card-content>\n </mat-card>\n </div>\n\n <mat-card class='w-100'>\n <mat-card-content>\n <mat-tab-group [mat-stretch-tabs]=\"false\">\n <mat-tab label=\"Branches\">\n <app-supplier-branches-list [supplierId]=\"supplier?.id\"></app-supplier-branches-list>\n </mat-tab>\n <mat-tab label=\"Incidents\">\n <app-incident-list [supplierId]=\"supplier?.id\" incidentableType=\"Supplier\" [incidentableId]=\"supplier?.id\">\n </app-incident-list>\n </mat-tab>\n <mat-tab label=\"Ratings\">\n <app-rating-list [supplierId]=\"supplier?.id\" [rateableId]=\"supplier?.id\"\n rateableType=\"Supplier\"></app-rating-list>\n </mat-tab>\n <mat-tab label=\"Stock Receipts\">\n <app-stock-receipts-list-page [supplierId]=\"supplier?.id\"></app-stock-receipts-list-page>\n </mat-tab>\n </mat-tab-group>\n </mat-card-content>\n </mat-card>\n</div>" }]
|
|
5042
5087
|
}], ctorParameters: () => [{ type: SupplierService }, { type: i2.ActivatedRoute }, { type: i2.Router }] });
|
|
5043
5088
|
|
|
5044
5089
|
class SupplierFormService extends TechlifyFormService {
|
|
@@ -5092,7 +5137,7 @@ class SupplierFormButtonComponent {
|
|
|
5092
5137
|
});
|
|
5093
5138
|
}
|
|
5094
5139
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
5095
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierFormButtonComponent, isStandalone: true, selector: "app-supplier-form-button", inputs: { supplier: "supplier" }, outputs: { onSaved: "onSaved" }, ngImport: i0, template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" [class.text-secondary]=\"supplier\" (click)=\"openDialog()\">\n {{ supplier ? \"edit\" : \"add\" }}\n</mat-icon>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type:
|
|
5140
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierFormButtonComponent, isStandalone: true, selector: "app-supplier-form-button", inputs: { supplier: "supplier" }, outputs: { onSaved: "onSaved" }, ngImport: i0, template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" [class.text-secondary]=\"supplier\" (click)=\"openDialog()\">\n {{ supplier ? \"edit\" : \"add\" }}\n</mat-icon>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], preserveWhitespaces: true });
|
|
5096
5141
|
}
|
|
5097
5142
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierFormButtonComponent, decorators: [{
|
|
5098
5143
|
type: Component,
|
|
@@ -5143,7 +5188,7 @@ class SupplierDeleteButtonComponent {
|
|
|
5143
5188
|
});
|
|
5144
5189
|
}
|
|
5145
5190
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierDeleteButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.AlertService }, { token: i1.ErrorHandlerService }, { token: SupplierService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5146
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierDeleteButtonComponent, isStandalone: true, selector: "app-supplier-delete-button", inputs: { supplier: "supplier" }, outputs: { onDelete: "onDelete" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer\" *ngxPermissionsOnly=\"['supplier.delete']\" (click)=\"openDialog()\">\n delete\n</mat-icon>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type:
|
|
5191
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierDeleteButtonComponent, isStandalone: true, selector: "app-supplier-delete-button", inputs: { supplier: "supplier" }, outputs: { onDelete: "onDelete" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer\" *ngxPermissionsOnly=\"['supplier.delete']\" (click)=\"openDialog()\">\n delete\n</mat-icon>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: NgxPermissionsModule }, { kind: "directive", type: i5$1.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }], preserveWhitespaces: true });
|
|
5147
5192
|
}
|
|
5148
5193
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierDeleteButtonComponent, decorators: [{
|
|
5149
5194
|
type: Component,
|
|
@@ -5165,8 +5210,6 @@ let SuppliersListComponent = class SuppliersListComponent extends TechlifyListin
|
|
|
5165
5210
|
errorHandler;
|
|
5166
5211
|
filterService;
|
|
5167
5212
|
activatedRoute;
|
|
5168
|
-
alertService;
|
|
5169
|
-
dialog;
|
|
5170
5213
|
supplierFormService;
|
|
5171
5214
|
displayedColumns = [
|
|
5172
5215
|
'#',
|
|
@@ -5179,7 +5222,7 @@ let SuppliersListComponent = class SuppliersListComponent extends TechlifyListin
|
|
|
5179
5222
|
'details',
|
|
5180
5223
|
'actions',
|
|
5181
5224
|
];
|
|
5182
|
-
constructor(spinner, fb, supplierService, errorHandler, filterService, activatedRoute,
|
|
5225
|
+
constructor(spinner, fb, supplierService, errorHandler, filterService, activatedRoute, supplierFormService) {
|
|
5183
5226
|
super();
|
|
5184
5227
|
this.spinner = spinner;
|
|
5185
5228
|
this.fb = fb;
|
|
@@ -5187,8 +5230,6 @@ let SuppliersListComponent = class SuppliersListComponent extends TechlifyListin
|
|
|
5187
5230
|
this.errorHandler = errorHandler;
|
|
5188
5231
|
this.filterService = filterService;
|
|
5189
5232
|
this.activatedRoute = activatedRoute;
|
|
5190
|
-
this.alertService = alertService;
|
|
5191
|
-
this.dialog = dialog;
|
|
5192
5233
|
this.supplierFormService = supplierFormService;
|
|
5193
5234
|
this.page = 1;
|
|
5194
5235
|
this.perPage = 25;
|
|
@@ -5259,8 +5300,8 @@ let SuppliersListComponent = class SuppliersListComponent extends TechlifyListin
|
|
|
5259
5300
|
this.reload();
|
|
5260
5301
|
});
|
|
5261
5302
|
}
|
|
5262
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuppliersListComponent, deps: [{ token: i4$1.NgxSpinnerService }, { token: i2$2.FormBuilder }, { token: SupplierService }, { token: i1.ErrorHandlerService }, { token: i1.FilterService }, { token: i2.ActivatedRoute }, { token:
|
|
5263
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SuppliersListComponent, selector: "app-suppliers-list", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h3 class=\"mb-0 fw-bold\">Suppliers</h3>\n <app-supplier-form-button (onSaved)=\"reload()\"></app-supplier-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Suppliers List\">\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.company_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef>Contact</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-1\">\n\n <a class=\"text-decoration-none text-secondary\" [routerLink]=\"['/inventory/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\" *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </a>\n <app-supplier-form-button *ngxPermissionsOnly=\"['supplier.update']\" [supplier]=\"element\"\n (onSaved)=\"reload()\"></app-supplier-form-button>\n <app-supplier-delete-button [supplier]=\"element\" (onDelete)=\"reload()\"></app-supplier-delete-button>\n <app-audit-log-for-model [modelId]=\"element?.id\" modelType=\"Supplier\"\n logView=\"all\"></app-audit-log-for-model>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.AuditLogForModelComponent, selector: "app-audit-log-for-model", inputs: ["isIconView", "modelType", "modelId", "logView"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i5$1.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }, { kind: "component", type: SupplierFormButtonComponent, selector: "app-supplier-form-button", inputs: ["supplier"], outputs: ["onSaved"] }, { kind: "component", type: SupplierDeleteButtonComponent, selector: "app-supplier-delete-button", inputs: ["supplier"], outputs: ["onDelete"] }], preserveWhitespaces: true });
|
|
5303
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuppliersListComponent, deps: [{ token: i4$1.NgxSpinnerService }, { token: i2$2.FormBuilder }, { token: SupplierService }, { token: i1.ErrorHandlerService }, { token: i1.FilterService }, { token: i2.ActivatedRoute }, { token: SupplierFormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5304
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SuppliersListComponent, selector: "app-suppliers-list", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h3 class=\"mb-0 fw-bold\">Suppliers</h3>\n <app-supplier-form-button (onSaved)=\"reload()\"></app-supplier-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Suppliers List\">\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.company_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef>Contact</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-1\">\n\n <a class=\"text-decoration-none text-secondary\" [routerLink]=\"['/inventory/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\" *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </a>\n <app-supplier-form-button *ngxPermissionsOnly=\"['supplier.update']\" [supplier]=\"element\"\n (onSaved)=\"reload()\"></app-supplier-form-button>\n <app-supplier-delete-button [supplier]=\"element\" (onDelete)=\"reload()\"></app-supplier-delete-button>\n <app-audit-log-for-model [modelId]=\"element?.id\" modelType=\"Supplier\"\n logView=\"all\"></app-audit-log-for-model>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.AuditLogForModelComponent, selector: "app-audit-log-for-model", inputs: ["isIconView", "modelType", "modelId", "logView"] }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i11.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i5$1.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }, { kind: "component", type: SupplierFormButtonComponent, selector: "app-supplier-form-button", inputs: ["supplier"], outputs: ["onSaved"] }, { kind: "component", type: SupplierDeleteButtonComponent, selector: "app-supplier-delete-button", inputs: ["supplier"], outputs: ["onDelete"] }], preserveWhitespaces: true });
|
|
5264
5305
|
};
|
|
5265
5306
|
SuppliersListComponent = __decorate([
|
|
5266
5307
|
UntilDestroy()
|
|
@@ -5268,7 +5309,7 @@ SuppliersListComponent = __decorate([
|
|
|
5268
5309
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuppliersListComponent, decorators: [{
|
|
5269
5310
|
type: Component,
|
|
5270
5311
|
args: [{ selector: 'app-suppliers-list', template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h3 class=\"mb-0 fw-bold\">Suppliers</h3>\n <app-supplier-form-button (onSaved)=\"reload()\"></app-supplier-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Suppliers List\">\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.company_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef>Contact</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-1\">\n\n <a class=\"text-decoration-none text-secondary\" [routerLink]=\"['/inventory/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\" *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </a>\n <app-supplier-form-button *ngxPermissionsOnly=\"['supplier.update']\" [supplier]=\"element\"\n (onSaved)=\"reload()\"></app-supplier-form-button>\n <app-supplier-delete-button [supplier]=\"element\" (onDelete)=\"reload()\"></app-supplier-delete-button>\n <app-audit-log-for-model [modelId]=\"element?.id\" modelType=\"Supplier\"\n logView=\"all\"></app-audit-log-for-model>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n" }]
|
|
5271
|
-
}], ctorParameters: () => [{ type: i4$1.NgxSpinnerService }, { type: i2$2.FormBuilder }, { type: SupplierService }, { type: i1.ErrorHandlerService }, { type: i1.FilterService }, { type: i2.ActivatedRoute }, { type:
|
|
5312
|
+
}], ctorParameters: () => [{ type: i4$1.NgxSpinnerService }, { type: i2$2.FormBuilder }, { type: SupplierService }, { type: i1.ErrorHandlerService }, { type: i1.FilterService }, { type: i2.ActivatedRoute }, { type: SupplierFormService }] });
|
|
5272
5313
|
|
|
5273
5314
|
const routes$4 = [
|
|
5274
5315
|
{
|
|
@@ -5302,7 +5343,9 @@ class SupplierModule {
|
|
|
5302
5343
|
SupplierViewComponent,
|
|
5303
5344
|
SuppliersListComponent,
|
|
5304
5345
|
SupplierFormComponent,
|
|
5305
|
-
SupplierInformationComponent
|
|
5346
|
+
SupplierInformationComponent,
|
|
5347
|
+
SupplierBranchesListComponent,
|
|
5348
|
+
SupplierBranchFormComponent], imports: [CommonModule,
|
|
5306
5349
|
SupplierRoutingModule,
|
|
5307
5350
|
MaterialModule,
|
|
5308
5351
|
SearchableSelectorModule,
|
|
@@ -5310,13 +5353,15 @@ class SupplierModule {
|
|
|
5310
5353
|
NoteModule,
|
|
5311
5354
|
FlexModule,
|
|
5312
5355
|
ReactiveFormsModule,
|
|
5313
|
-
|
|
5356
|
+
InfiniteScrollDirective,
|
|
5314
5357
|
NgxPermissionsModule,
|
|
5315
5358
|
SupplierFormButtonComponent,
|
|
5316
5359
|
SupplierDeleteButtonComponent,
|
|
5317
5360
|
StockReceiptsModule,
|
|
5318
5361
|
IncidentListComponent,
|
|
5319
|
-
RatingListComponent
|
|
5362
|
+
RatingListComponent,
|
|
5363
|
+
SupplierBranchFormButtonComponent,
|
|
5364
|
+
SupplierBranchDeleteButtonComponent] });
|
|
5320
5365
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierModule, imports: [CommonModule,
|
|
5321
5366
|
SupplierRoutingModule,
|
|
5322
5367
|
MaterialModule,
|
|
@@ -5325,13 +5370,14 @@ class SupplierModule {
|
|
|
5325
5370
|
NoteModule,
|
|
5326
5371
|
FlexModule,
|
|
5327
5372
|
ReactiveFormsModule,
|
|
5328
|
-
InfiniteScrollModule,
|
|
5329
5373
|
NgxPermissionsModule,
|
|
5330
5374
|
SupplierFormButtonComponent,
|
|
5331
5375
|
SupplierDeleteButtonComponent,
|
|
5332
5376
|
StockReceiptsModule,
|
|
5333
5377
|
IncidentListComponent,
|
|
5334
|
-
RatingListComponent
|
|
5378
|
+
RatingListComponent,
|
|
5379
|
+
SupplierBranchFormButtonComponent,
|
|
5380
|
+
SupplierBranchDeleteButtonComponent] });
|
|
5335
5381
|
}
|
|
5336
5382
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierModule, decorators: [{
|
|
5337
5383
|
type: NgModule,
|
|
@@ -5342,6 +5388,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
5342
5388
|
SuppliersListComponent,
|
|
5343
5389
|
SupplierFormComponent,
|
|
5344
5390
|
SupplierInformationComponent,
|
|
5391
|
+
SupplierBranchesListComponent,
|
|
5392
|
+
SupplierBranchFormComponent,
|
|
5345
5393
|
],
|
|
5346
5394
|
imports: [
|
|
5347
5395
|
CommonModule,
|
|
@@ -5352,13 +5400,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
5352
5400
|
NoteModule,
|
|
5353
5401
|
FlexModule,
|
|
5354
5402
|
ReactiveFormsModule,
|
|
5355
|
-
|
|
5403
|
+
InfiniteScrollDirective,
|
|
5356
5404
|
NgxPermissionsModule,
|
|
5357
5405
|
SupplierFormButtonComponent,
|
|
5358
5406
|
SupplierDeleteButtonComponent,
|
|
5359
5407
|
StockReceiptsModule,
|
|
5360
5408
|
IncidentListComponent,
|
|
5361
|
-
RatingListComponent
|
|
5409
|
+
RatingListComponent,
|
|
5410
|
+
SupplierBranchFormButtonComponent,
|
|
5411
|
+
SupplierBranchDeleteButtonComponent
|
|
5362
5412
|
],
|
|
5363
5413
|
}]
|
|
5364
5414
|
}] });
|
|
@@ -5465,16 +5515,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
5465
5515
|
|
|
5466
5516
|
class LocationFormComponent extends TechlifyFormComponentInterface {
|
|
5467
5517
|
formBuilder;
|
|
5468
|
-
alertService;
|
|
5469
5518
|
service;
|
|
5470
5519
|
model;
|
|
5471
5520
|
saved = new EventEmitter();
|
|
5472
5521
|
cancelled = new EventEmitter();
|
|
5473
5522
|
isSaving;
|
|
5474
|
-
constructor(formValidatorService, formBuilder,
|
|
5523
|
+
constructor(formValidatorService, formBuilder, service) {
|
|
5475
5524
|
super(formValidatorService);
|
|
5476
5525
|
this.formBuilder = formBuilder;
|
|
5477
|
-
this.alertService = alertService;
|
|
5478
5526
|
this.service = service;
|
|
5479
5527
|
this.errorMessages = {
|
|
5480
5528
|
title: {
|
|
@@ -5514,7 +5562,7 @@ class LocationFormComponent extends TechlifyFormComponentInterface {
|
|
|
5514
5562
|
error: () => (this.isSaving = false)
|
|
5515
5563
|
});
|
|
5516
5564
|
}
|
|
5517
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token:
|
|
5565
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: LocationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5518
5566
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LocationFormComponent, isStandalone: true, selector: "app-location-form", inputs: { model: "model" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column gap-1\"\n>\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Title\">\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Address</mat-label>\n <input type=\"text\" matInput formControlName=\"address\" placeholder=\"Address\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">\n Save\n </button>\n <button (click)=\"cancelled.emit()\" [disabled]=\"isSaving\" type=\"button\" mat-flat-button>\n Cancel\n </button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }], preserveWhitespaces: true });
|
|
5519
5567
|
}
|
|
5520
5568
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationFormComponent, decorators: [{
|
|
@@ -5530,7 +5578,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
5530
5578
|
ReactiveFormsModule,
|
|
5531
5579
|
SearchableSelectorModule
|
|
5532
5580
|
], template: "<form\n [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column gap-1\"\n>\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Title\">\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Address</mat-label>\n <input type=\"text\" matInput formControlName=\"address\" placeholder=\"Address\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">\n Save\n </button>\n <button (click)=\"cancelled.emit()\" [disabled]=\"isSaving\" type=\"button\" mat-flat-button>\n Cancel\n </button>\n </div>\n</form>\n" }]
|
|
5533
|
-
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type:
|
|
5581
|
+
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: LocationService }], propDecorators: { model: [{
|
|
5534
5582
|
type: Input
|
|
5535
5583
|
}], saved: [{
|
|
5536
5584
|
type: Output
|
|
@@ -5631,15 +5679,13 @@ class LocationStatusChangerComponent extends TechlifyFormComponentInterface {
|
|
|
5631
5679
|
formValidatorService;
|
|
5632
5680
|
service;
|
|
5633
5681
|
fb;
|
|
5634
|
-
alertService;
|
|
5635
5682
|
errorHandler;
|
|
5636
5683
|
location;
|
|
5637
|
-
constructor(formValidatorService, service, fb,
|
|
5684
|
+
constructor(formValidatorService, service, fb, errorHandler) {
|
|
5638
5685
|
super(formValidatorService);
|
|
5639
5686
|
this.formValidatorService = formValidatorService;
|
|
5640
5687
|
this.service = service;
|
|
5641
5688
|
this.fb = fb;
|
|
5642
|
-
this.alertService = alertService;
|
|
5643
5689
|
this.errorHandler = errorHandler;
|
|
5644
5690
|
this.form = this.fb.group({
|
|
5645
5691
|
id: [''],
|
|
@@ -5668,8 +5714,8 @@ class LocationStatusChangerComponent extends TechlifyFormComponentInterface {
|
|
|
5668
5714
|
}
|
|
5669
5715
|
});
|
|
5670
5716
|
}
|
|
5671
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationStatusChangerComponent, deps: [{ token: i1.FormValidatorService }, { token: LocationService }, { token: i2$2.FormBuilder }, { token: i1.
|
|
5672
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LocationStatusChangerComponent, isStandalone: true, selector: "app-location-status-changer", inputs: { location: "location" }, usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-location-statuses\"\n formControlName=\"status_id\" [cache]=\"true\"></app-searchable-selector>\n </mat-form-field>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type:
|
|
5717
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationStatusChangerComponent, deps: [{ token: i1.FormValidatorService }, { token: LocationService }, { token: i2$2.FormBuilder }, { token: i1.ErrorHandlerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5718
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LocationStatusChangerComponent, isStandalone: true, selector: "app-location-status-changer", inputs: { location: "location" }, usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-location-statuses\"\n formControlName=\"status_id\" [cache]=\"true\"></app-searchable-selector>\n </mat-form-field>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }], preserveWhitespaces: true });
|
|
5673
5719
|
}
|
|
5674
5720
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationStatusChangerComponent, decorators: [{
|
|
5675
5721
|
type: Component,
|
|
@@ -5679,7 +5725,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
5679
5725
|
ReactiveFormsModule,
|
|
5680
5726
|
SearchableSelectorModule
|
|
5681
5727
|
], template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-location-statuses\"\n formControlName=\"status_id\" [cache]=\"true\"></app-searchable-selector>\n </mat-form-field>\n</form>" }]
|
|
5682
|
-
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: LocationService }, { type: i2$2.FormBuilder }, { type: i1.
|
|
5728
|
+
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: LocationService }, { type: i2$2.FormBuilder }, { type: i1.ErrorHandlerService }], propDecorators: { location: [{
|
|
5683
5729
|
type: Input
|
|
5684
5730
|
}] } });
|
|
5685
5731
|
|
|
@@ -6035,16 +6081,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
6035
6081
|
|
|
6036
6082
|
class ShelfFormComponent extends TechlifyFormComponentInterface {
|
|
6037
6083
|
formBuilder;
|
|
6038
|
-
alertService;
|
|
6039
6084
|
service;
|
|
6040
6085
|
model;
|
|
6041
6086
|
saved = new EventEmitter();
|
|
6042
6087
|
cancelled = new EventEmitter();
|
|
6043
6088
|
isSaving;
|
|
6044
|
-
constructor(formValidatorService, formBuilder,
|
|
6089
|
+
constructor(formValidatorService, formBuilder, service) {
|
|
6045
6090
|
super(formValidatorService);
|
|
6046
6091
|
this.formBuilder = formBuilder;
|
|
6047
|
-
this.alertService = alertService;
|
|
6048
6092
|
this.service = service;
|
|
6049
6093
|
this.errorMessages = {
|
|
6050
6094
|
name: {
|
|
@@ -6086,7 +6130,7 @@ class ShelfFormComponent extends TechlifyFormComponentInterface {
|
|
|
6086
6130
|
error: () => (this.isSaving = false)
|
|
6087
6131
|
});
|
|
6088
6132
|
}
|
|
6089
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ShelfFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token:
|
|
6133
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ShelfFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$2.FormBuilder }, { token: ShelfService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6090
6134
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ShelfFormComponent, isStandalone: true, selector: "app-shelf-form", inputs: { model: "model" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column gap-1\"\n>\n <mat-form-field>\n <mat-label>Name</mat-label>\n <input type=\"text\" matInput formControlName=\"name\" placeholder=\"Name\">\n <mat-error *ngIf=\"isFieldValid('name')\">\n {{ getErrorMessage('name') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector formControlName=\"type_id\" apiUrl=\"api/shelf-types\" [enableSearch]=\"false\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">\n Save\n </button>\n <button (click)=\"cancelled.emit()\" [disabled]=\"isSaving\" type=\"button\" mat-flat-button>\n Cancel\n </button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }], preserveWhitespaces: true });
|
|
6091
6135
|
}
|
|
6092
6136
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ShelfFormComponent, decorators: [{
|
|
@@ -6102,7 +6146,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
6102
6146
|
ReactiveFormsModule,
|
|
6103
6147
|
SearchableSelectorModule
|
|
6104
6148
|
], template: "<form\n [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column gap-1\"\n>\n <mat-form-field>\n <mat-label>Name</mat-label>\n <input type=\"text\" matInput formControlName=\"name\" placeholder=\"Name\">\n <mat-error *ngIf=\"isFieldValid('name')\">\n {{ getErrorMessage('name') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector formControlName=\"type_id\" apiUrl=\"api/shelf-types\" [enableSearch]=\"false\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_id\" apiUrl=\"api/inventory-locations\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isSaving\" type=\"submit\" mat-raised-button color=\"primary\">\n Save\n </button>\n <button (click)=\"cancelled.emit()\" [disabled]=\"isSaving\" type=\"button\" mat-flat-button>\n Cancel\n </button>\n </div>\n</form>\n" }]
|
|
6105
|
-
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type:
|
|
6149
|
+
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$2.FormBuilder }, { type: ShelfService }], propDecorators: { model: [{
|
|
6106
6150
|
type: Input
|
|
6107
6151
|
}], saved: [{
|
|
6108
6152
|
type: Output
|
|
@@ -6258,7 +6302,7 @@ class ShelfListComponent extends TechlifyListingControllerInterface {
|
|
|
6258
6302
|
this.filterForm.get('sort_by')?.setValue(active + '|' + direction);
|
|
6259
6303
|
}
|
|
6260
6304
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ShelfListComponent, deps: [{ token: ShelfService }, { token: i2$2.FormBuilder }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
6261
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ShelfListComponent, isStandalone: true, selector: "app-shelf-list", usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <strong>Shelves</strong>\n <app-shelf-form-button (saved)=\"modelCreated($event)\"></app-shelf-form-button>\n </div>\n <form class=\"d-flex justify-content-end align-items-center gap-2\" [formGroup]=\"filterForm\" (submit)=\"reload()\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search shelves\" matInput formControlName=\"search\">\n </mat-form-field>\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_ids\" [multiple]=\"true\" apiUrl=\"api/inventory-locations\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table #table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"onSortChange($event)\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Name\">\n <th mat-header-cell mat-sort-header=\"name\" *matHeaderCellDef> Name </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.name }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Location\">\n <th mat-header-cell mat-sort-header=\"location\" *matHeaderCellDef> Location </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.location?.title }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Type\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"type\"> Type </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Description\">\n <th mat-header-cell *matHeaderCellDef> Description </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Creator\">\n <th mat-header-cell *matHeaderCellDef> Creator </th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-shelf-form-button [model]=\"element\" (saved)=\"modelUpdated($event, i)\"></app-shelf-form-button>\n <app-shelf-delete-button [model]=\"element\" (deleted)=\"modelDeleted(i)\"></app-shelf-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MaterialModule$1 }, { kind: "component", type:
|
|
6305
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ShelfListComponent, isStandalone: true, selector: "app-shelf-list", usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <strong>Shelves</strong>\n <app-shelf-form-button (saved)=\"modelCreated($event)\"></app-shelf-form-button>\n </div>\n <form class=\"d-flex justify-content-end align-items-center gap-2\" [formGroup]=\"filterForm\" (submit)=\"reload()\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" placeholder=\"Search shelves\" matInput formControlName=\"search\">\n </mat-form-field>\n <mat-form-field>\n <mat-label>Location</mat-label>\n <app-searchable-selector formControlName=\"location_ids\" [multiple]=\"true\" apiUrl=\"api/inventory-locations\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table #table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"onSortChange($event)\">\n\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Name\">\n <th mat-header-cell mat-sort-header=\"name\" *matHeaderCellDef> Name </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.name }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Location\">\n <th mat-header-cell mat-sort-header=\"location\" *matHeaderCellDef> Location </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.location?.title }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Type\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"type\"> Type </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Description\">\n <th mat-header-cell *matHeaderCellDef> Description </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"Creator\">\n <th mat-header-cell *matHeaderCellDef> Creator </th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-shelf-form-button [model]=\"element\" (saved)=\"modelUpdated($event, i)\"></app-shelf-form-button>\n <app-shelf-delete-button [model]=\"element\" (deleted)=\"modelDeleted(i)\"></app-shelf-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MaterialModule$1 }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ShelfFormButtonComponent, selector: "app-shelf-form-button", inputs: ["model"], outputs: ["saved"] }, { kind: "component", type: ShelfDeleteButtonComponent, selector: "app-shelf-delete-button", inputs: ["model"], outputs: ["deleted"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "pipe", type: DatePipe, name: "date" }], preserveWhitespaces: true });
|
|
6262
6306
|
}
|
|
6263
6307
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ShelfListComponent, decorators: [{
|
|
6264
6308
|
type: Component,
|
|
@@ -6325,4 +6369,4 @@ var shelf_module = /*#__PURE__*/Object.freeze({
|
|
|
6325
6369
|
*/
|
|
6326
6370
|
|
|
6327
6371
|
export { RatingFormComponent as $, StockReceiptFormModule as A, StockReceiptFormButtonComponent as B, StockReceiptViewComponent as C, StockTransferListComponent as D, StockTransferFormComponent as E, StockTransferFormButtonComponent as F, StockTransferService as G, SupplierModule as H, InventoryCommonRoutingModule as I, SupplierFormButtonComponent as J, SupplierFormComponent as K, SuppliersListComponent as L, MeasureService as M, SupplierTypeService as N, PayeeSelectorModule as O, ProductModule as P, PayeeSelectorComponent as Q, IncidentModule as R, StockIssueService as S, TechlifyFilterComponent as T, IncidentService as U, IncidentListComponent as V, IncidentFormComponent as W, IncidentFormButtonComponent as X, RatingModule as Y, RatingService as Z, RatingListComponent as _, TechlifyFilterModule as a, RatingFormButtonComponent as a0, ExportToExcelButtonComponent as a1, LocationModule as a2, LocationService as a3, LocationListComponent as a4, LocationFormComponent as a5, LocationFormButtonComponent as a6, LocationDeleteButtonComponent as a7, ShelfModule as a8, ShelfService as a9, ShelfListComponent as aa, ShelfFormComponent as ab, ShelfFormButtonComponent as ac, ShelfDeleteButtonComponent as ad, MaterialModule as b, StockIssueFormModule as c, StockIssueFormButtonComponent as d, StockIssuanceDeleteButtonModule as e, StockIssuanceDeleteButtonComponent as f, InventoryCommonModule as g, StockSummaryService as h, ProductFormComponent as i, ProductBasicInfoComponent as j, ProductFormButtonComponent as k, ProductQuickSearchComponent as l, ProductSearchModule as m, ProductSearchComponent as n, ProductListComponent as o, ProductService as p, ProductFormService as q, ProductBatchUpdateFormComponent as r, ProductImportPageComponent as s, ProductViewPageComponent as t, StockIssueModule as u, StockIssueListComponent as v, StockIssueListModule as w, StockReceiptsModule as x, StockReceiptDeleteButtonComponent as y, StockReceiptsListPageComponent as z };
|
|
6328
|
-
//# sourceMappingURL=techlify-inventory-common-techlify-inventory-common-
|
|
6372
|
+
//# sourceMappingURL=techlify-inventory-common-techlify-inventory-common-f9URc8HX.mjs.map
|