techlify-inventory-common 18.12.0 → 18.15.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/measure/measures-list/measures-list.component.mjs +3 -3
- package/esm2022/lib/inventory-common/product/product-basic-info/product-basic-info.component.mjs +3 -3
- package/esm2022/lib/inventory-common/product/product-quick-search/product-quick-search.component.mjs +3 -3
- package/esm2022/lib/inventory-common/product/product-search/product-search.component.mjs +148 -0
- package/esm2022/lib/inventory-common/product/product-search/product-search.module.mjs +23 -0
- package/esm2022/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.mjs +3 -3
- package/esm2022/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.mjs +4 -4
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.mjs +4 -4
- package/esm2022/public-api.mjs +4 -1
- package/fesm2022/{techlify-inventory-common-category.module-2eW2Y0ov.mjs → techlify-inventory-common-category.module-4xS_L5x1.mjs} +2 -2
- package/fesm2022/{techlify-inventory-common-category.module-2eW2Y0ov.mjs.map → techlify-inventory-common-category.module-4xS_L5x1.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-location.module-tmlsW04e.mjs → techlify-inventory-common-location.module-CaJs-nK2.mjs} +2 -2
- package/fesm2022/{techlify-inventory-common-location.module-tmlsW04e.mjs.map → techlify-inventory-common-location.module-CaJs-nK2.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-measure.module-DsmjdAMA.mjs → techlify-inventory-common-measure.module-CIDW4Fmj.mjs} +4 -4
- package/fesm2022/techlify-inventory-common-measure.module-CIDW4Fmj.mjs.map +1 -0
- package/fesm2022/{techlify-inventory-common-techlify-inventory-common-COVkqAUO.mjs → techlify-inventory-common-techlify-inventory-common-MwoKn906.mjs} +158 -17
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-MwoKn906.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common.mjs +1 -1
- package/lib/inventory-common/product/product-search/product-search.component.d.ts +47 -0
- package/lib/inventory-common/product/product-search/product-search.module.d.ts +13 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
- package/fesm2022/techlify-inventory-common-measure.module-DsmjdAMA.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-COVkqAUO.mjs.map +0 -1
|
@@ -728,7 +728,7 @@ class StockReceiptFormComponent extends TechlifyFormComponentInterface {
|
|
|
728
728
|
this.form = this.formBuilder.group({
|
|
729
729
|
id: [''],
|
|
730
730
|
supplier_id: [''],
|
|
731
|
-
location_id: [''
|
|
731
|
+
location_id: [''],
|
|
732
732
|
date: [new Date(), Validators.required],
|
|
733
733
|
quantity: [1, Validators.required],
|
|
734
734
|
purchase_price: [0, Validators.required],
|
|
@@ -802,11 +802,11 @@ class StockReceiptFormComponent extends TechlifyFormComponentInterface {
|
|
|
802
802
|
this.form.get('amount')?.setValue(amount);
|
|
803
803
|
}
|
|
804
804
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockReceiptFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$1.FormBuilder }, { token: StockReceiptService }, { token: i1.AlertService }, { token: i1.DateUtils }, { token: LocationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
805
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StockReceiptFormComponent, selector: "app-stock-receipt-form", inputs: { product: "product", stockReceipt: "stockReceipt", 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
|
|
805
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StockReceiptFormComponent, selector: "app-stock-receipt-form", inputs: { product: "product", stockReceipt: "stockReceipt", 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 <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: i5.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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: 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.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"] }], preserveWhitespaces: true });
|
|
806
806
|
}
|
|
807
807
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockReceiptFormComponent, decorators: [{
|
|
808
808
|
type: Component,
|
|
809
|
-
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
|
|
809
|
+
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 <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>" }]
|
|
810
810
|
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$1.FormBuilder }, { type: StockReceiptService }, { type: i1.AlertService }, { type: i1.DateUtils }, { type: LocationService }], propDecorators: { product: [{
|
|
811
811
|
type: Input
|
|
812
812
|
}], stockReceipt: [{
|
|
@@ -901,7 +901,7 @@ class StockIssueFormComponent extends TechlifyFormComponentInterface {
|
|
|
901
901
|
this.form = this.formBuilder.group({
|
|
902
902
|
id: [''],
|
|
903
903
|
product_id: [''],
|
|
904
|
-
location_id: [''
|
|
904
|
+
location_id: [''],
|
|
905
905
|
date: [new Date(), Validators.required],
|
|
906
906
|
quantity: [1, Validators.required],
|
|
907
907
|
particulars: [''],
|
|
@@ -969,11 +969,11 @@ class StockIssueFormComponent extends TechlifyFormComponentInterface {
|
|
|
969
969
|
this.product = product;
|
|
970
970
|
}
|
|
971
971
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockIssueFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2$1.FormBuilder }, { token: StockIssuanceService }, { token: i1.AlertService }, { token: i1.DateUtils }, { token: LocationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
972
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StockIssueFormComponent, selector: "app-stock-issue-form", inputs: { product: "product", stockIssuance: "stockIssuance", issuableType: "issuableType", issuableId: "issuableId" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<h3 class=\"text-center\">{{ stockIssuance?.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
|
|
972
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StockIssueFormComponent, selector: "app-stock-issue-form", inputs: { product: "product", stockIssuance: "stockIssuance", issuableType: "issuableType", issuableId: "issuableId" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<h3 class=\"text-center\">{{ stockIssuance?.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\"></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>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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: 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.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"] }], preserveWhitespaces: true });
|
|
973
973
|
}
|
|
974
974
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StockIssueFormComponent, decorators: [{
|
|
975
975
|
type: Component,
|
|
976
|
-
args: [{ selector: 'app-stock-issue-form', template: "<h3 class=\"text-center\">{{ stockIssuance?.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
|
|
976
|
+
args: [{ selector: 'app-stock-issue-form', template: "<h3 class=\"text-center\">{{ stockIssuance?.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\"></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>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>" }]
|
|
977
977
|
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2$1.FormBuilder }, { type: StockIssuanceService }, { type: i1.AlertService }, { type: i1.DateUtils }, { type: LocationService }], propDecorators: { product: [{
|
|
978
978
|
type: Input
|
|
979
979
|
}], stockIssuance: [{
|
|
@@ -2407,11 +2407,11 @@ class ProductBasicInfoComponent {
|
|
|
2407
2407
|
});
|
|
2408
2408
|
}
|
|
2409
2409
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductBasicInfoComponent, deps: [{ token: StockSummaryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2410
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ProductBasicInfoComponent, selector: "app-product-basic-info", inputs: { product: "product" }, outputs: { saved: "saved", deleted: "deleted" }, ngImport: i0, template: "<mat-card *ngIf=\"product\" class=\"w-100\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center mb-1 mb-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> campaign </span>\n <strong class=\"mb-0 text-dark\">{{ product?.name }}</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-product-form-button [product]=\"product\" (saved)=\"onProductSaved($event)\"></app-product-form-button>\n <app-product-delete-button [product]=\"product\" (deleted)=\"deleted.emit()\"></app-product-delete-button>\n </div>\n </mat-card-content>\n <mat-divider></mat-divider>\n\n\n <mat-card-content class='d-flex flex-column gap-2'>\n <div class=\"d-flex flex-wrap gap-1 my-3\">\n <span class=\"badge text-bg-secondary\" *ngFor=\"let category of product?.categories\">\n {{ category?.title }}\n </span>\n </div>\n\n <div class=\"d-flex justify-content-between align-items-start\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">SKU</small>\n <p class=\"mb-0\">{{ product?.sku }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Initial Quantity</small>\n <p class=\"mb-0\">{{ product?.initial_quantity }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Type</small>\n <p class=\"mb-0\">{{ product?.type?.title }}</p>\n </div>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Measure</small>\n <p class=\"mb-0\">{{ product?.measure?.title }}</p>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Reorder Point</small>\n <p class=\"mb-0\">{{ product?.reorder_point }}</p>\n </div>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-start align-items-start gap-1\">\n <div *ngIf=\"product?.description\" class=\"mb-2 d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Description</small>\n <p class=\"mb-0\">{{ product?.description }}</p>\n </div>\n\n <div
|
|
2410
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ProductBasicInfoComponent, selector: "app-product-basic-info", inputs: { product: "product" }, outputs: { saved: "saved", deleted: "deleted" }, ngImport: i0, template: "<mat-card *ngIf=\"product\" class=\"w-100\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center mb-1 mb-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> campaign </span>\n <strong class=\"mb-0 text-dark\">{{ product?.name }}</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-product-form-button [product]=\"product\" (saved)=\"onProductSaved($event)\"></app-product-form-button>\n <app-product-delete-button [product]=\"product\" (deleted)=\"deleted.emit()\"></app-product-delete-button>\n </div>\n </mat-card-content>\n <mat-divider></mat-divider>\n\n\n <mat-card-content class='d-flex flex-column gap-2'>\n <div class=\"d-flex flex-wrap gap-1 my-3\">\n <span class=\"badge text-bg-secondary\" *ngFor=\"let category of product?.categories\">\n {{ category?.title }}\n </span>\n </div>\n\n <div class=\"d-flex justify-content-between align-items-start\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">SKU</small>\n <p class=\"mb-0\">{{ product?.sku }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Initial Quantity</small>\n <p class=\"mb-0\">{{ product?.initial_quantity }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Type</small>\n <p class=\"mb-0\">{{ product?.type?.title }}</p>\n </div>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Measure</small>\n <p class=\"mb-0\">{{ product?.measure?.title }}</p>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Reorder Point</small>\n <p class=\"mb-0\">{{ product?.reorder_point }}</p>\n </div>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-start align-items-start gap-1\">\n <div *ngIf=\"product?.description\" class=\"mb-2 d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Description</small>\n <p class=\"mb-0\">{{ product?.description }}</p>\n </div>\n\n <div class=\"mt-2 d-flex flex-row justify-content-between align-items-center w-100\">\n\n <!-- Stock Receipts -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Stock Receipts</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> arrow_downward </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ stockSummary?.stock_receipts_quantity_sum }}\n </p>\n </div>\n <small *ngIf=\"product?.last_stock_receipt\" class=\"text-secondary w-75\">\n Latest On {{ product?.last_stock_receipt?.date | date }}\n </small>\n </div>\n\n <!-- Stock Issues -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Stock Issues</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ stockSummary?.stock_issuances_quantity_sum }}\n </p>\n </div>\n <small *ngIf=\"product?.last_stock_issuance\" class=\"text-secondary w-75\">\n Latest On {{ product?.last_stock_issuance?.date | date }}\n </small>\n </div>\n\n\n <!-- On Hand -->\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">On Hand</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> inventory_2 </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ product?.stock_on_hand }}\n </p>\n </div>\n </div>\n </div>\n\n </mat-card-content>\n</mat-card>", styles: [""], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: ProductFormButtonComponent, selector: "app-product-form-button", inputs: ["product"], outputs: ["saved"] }, { kind: "component", type: ProductDeleteButtonComponent, selector: "app-product-delete-button", inputs: ["product"], outputs: ["deleted"] }, { kind: "pipe", type: i5.DatePipe, name: "date" }], preserveWhitespaces: true });
|
|
2411
2411
|
}
|
|
2412
2412
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductBasicInfoComponent, decorators: [{
|
|
2413
2413
|
type: Component,
|
|
2414
|
-
args: [{ selector: 'app-product-basic-info', template: "<mat-card *ngIf=\"product\" class=\"w-100\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center mb-1 mb-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> campaign </span>\n <strong class=\"mb-0 text-dark\">{{ product?.name }}</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-product-form-button [product]=\"product\" (saved)=\"onProductSaved($event)\"></app-product-form-button>\n <app-product-delete-button [product]=\"product\" (deleted)=\"deleted.emit()\"></app-product-delete-button>\n </div>\n </mat-card-content>\n <mat-divider></mat-divider>\n\n\n <mat-card-content class='d-flex flex-column gap-2'>\n <div class=\"d-flex flex-wrap gap-1 my-3\">\n <span class=\"badge text-bg-secondary\" *ngFor=\"let category of product?.categories\">\n {{ category?.title }}\n </span>\n </div>\n\n <div class=\"d-flex justify-content-between align-items-start\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">SKU</small>\n <p class=\"mb-0\">{{ product?.sku }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Initial Quantity</small>\n <p class=\"mb-0\">{{ product?.initial_quantity }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Type</small>\n <p class=\"mb-0\">{{ product?.type?.title }}</p>\n </div>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Measure</small>\n <p class=\"mb-0\">{{ product?.measure?.title }}</p>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Reorder Point</small>\n <p class=\"mb-0\">{{ product?.reorder_point }}</p>\n </div>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-start align-items-start gap-1\">\n <div *ngIf=\"product?.description\" class=\"mb-2 d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Description</small>\n <p class=\"mb-0\">{{ product?.description }}</p>\n </div>\n\n <div
|
|
2414
|
+
args: [{ selector: 'app-product-basic-info', template: "<mat-card *ngIf=\"product\" class=\"w-100\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center mb-1 mb-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> campaign </span>\n <strong class=\"mb-0 text-dark\">{{ product?.name }}</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-product-form-button [product]=\"product\" (saved)=\"onProductSaved($event)\"></app-product-form-button>\n <app-product-delete-button [product]=\"product\" (deleted)=\"deleted.emit()\"></app-product-delete-button>\n </div>\n </mat-card-content>\n <mat-divider></mat-divider>\n\n\n <mat-card-content class='d-flex flex-column gap-2'>\n <div class=\"d-flex flex-wrap gap-1 my-3\">\n <span class=\"badge text-bg-secondary\" *ngFor=\"let category of product?.categories\">\n {{ category?.title }}\n </span>\n </div>\n\n <div class=\"d-flex justify-content-between align-items-start\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">SKU</small>\n <p class=\"mb-0\">{{ product?.sku }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Initial Quantity</small>\n <p class=\"mb-0\">{{ product?.initial_quantity }}</p>\n </div>\n\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Type</small>\n <p class=\"mb-0\">{{ product?.type?.title }}</p>\n </div>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Measure</small>\n <p class=\"mb-0\">{{ product?.measure?.title }}</p>\n </div>\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Reorder Point</small>\n <p class=\"mb-0\">{{ product?.reorder_point }}</p>\n </div>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-start align-items-start gap-1\">\n <div *ngIf=\"product?.description\" class=\"mb-2 d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Description</small>\n <p class=\"mb-0\">{{ product?.description }}</p>\n </div>\n\n <div class=\"mt-2 d-flex flex-row justify-content-between align-items-center w-100\">\n\n <!-- Stock Receipts -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Stock Receipts</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> arrow_downward </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ stockSummary?.stock_receipts_quantity_sum }}\n </p>\n </div>\n <small *ngIf=\"product?.last_stock_receipt\" class=\"text-secondary w-75\">\n Latest On {{ product?.last_stock_receipt?.date | date }}\n </small>\n </div>\n\n <!-- Stock Issues -->\n <div *ngIf=\"stockSummary\" class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">Stock Issues</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ stockSummary?.stock_issuances_quantity_sum }}\n </p>\n </div>\n <small *ngIf=\"product?.last_stock_issuance\" class=\"text-secondary w-75\">\n Latest On {{ product?.last_stock_issuance?.date | date }}\n </small>\n </div>\n\n\n <!-- On Hand -->\n <div class=\"d-flex flex-column justify-content-start align-items-start gap-1\">\n <small class=\"text-secondary\">On Hand</small>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> inventory_2 </span>\n <p class=\"mb-0\" style=\"font-size: 24px\">\n {{ product?.stock_on_hand }}\n </p>\n </div>\n </div>\n </div>\n\n </mat-card-content>\n</mat-card>" }]
|
|
2415
2415
|
}], ctorParameters: () => [{ type: StockSummaryService }], propDecorators: { product: [{
|
|
2416
2416
|
type: Input
|
|
2417
2417
|
}], saved: [{
|
|
@@ -3332,7 +3332,7 @@ class ProductQuickSearchComponent extends TechlifyListingControllerInterface {
|
|
|
3332
3332
|
});
|
|
3333
3333
|
}
|
|
3334
3334
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductQuickSearchComponent, deps: [{ token: ProductService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3335
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ProductQuickSearchComponent, isStandalone: true, selector: "app-product-quick-search", usesInheritance: true, ngImport: i0, template: "<mat-card style=\"max-height: 460px; overflow: auto\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <h3>Products Quick Search</h3>\n\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" matInput placeholder=\"Search products\" [formControl]=\"searchControl\" />\n </mat-form-field>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"Product\">\n <th mat-header-cell *matHeaderCellDef>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n \n <div *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\">\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"SKU\">\n <th mat-header-cell *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.sku }}</td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"On Hand\">\n <th mat-header-cell *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.
|
|
3335
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ProductQuickSearchComponent, isStandalone: true, selector: "app-product-quick-search", usesInheritance: true, ngImport: i0, template: "<mat-card style=\"max-height: 460px; overflow: auto\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <h3>Products Quick Search</h3>\n\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" matInput placeholder=\"Search products\" [formControl]=\"searchControl\" />\n </mat-form-field>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"Product\">\n <th mat-header-cell *matHeaderCellDef>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n \n <div *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\">\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"SKU\">\n <th mat-header-cell *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.sku }}</td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"On Hand\">\n <th mat-header-cell *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\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 <mat-icon class=\"cursor-pointer\" matTooltip=\"View\"\n [routerLink]=\"['/inventory/products', element.id, 'view']\" routerLinkActive=\"route-link-active\">\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 <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", styles: [""], dependencies: [{ kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "component", type: MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "component", type: MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ProductModule }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "ngmodule", type: StockReceiptFormModule }, { kind: "component", type: StockReceiptFormButtonComponent, selector: "app-stock-receipt-form-button", inputs: ["product", "stockReceipt", "latestLocationId", "icon"], outputs: ["saved"] }, { kind: "ngmodule", type: StockIssueFormModule }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssuance", "icon", "issuableType", "issuableId"], outputs: ["saved"] }], preserveWhitespaces: true });
|
|
3336
3336
|
}
|
|
3337
3337
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductQuickSearchComponent, decorators: [{
|
|
3338
3338
|
type: Component,
|
|
@@ -3365,7 +3365,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3365
3365
|
RouterLinkActive,
|
|
3366
3366
|
StockReceiptFormModule,
|
|
3367
3367
|
StockIssueFormModule,
|
|
3368
|
-
], template: "<mat-card style=\"max-height: 460px; overflow: auto\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <h3>Products Quick Search</h3>\n\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" matInput placeholder=\"Search products\" [formControl]=\"searchControl\" />\n </mat-form-field>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"Product\">\n <th mat-header-cell *matHeaderCellDef>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n \n <div *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\">\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"SKU\">\n <th mat-header-cell *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.sku }}</td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"On Hand\">\n <th mat-header-cell *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.
|
|
3368
|
+
], template: "<mat-card style=\"max-height: 460px; overflow: auto\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <h3>Products Quick Search</h3>\n\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input type=\"text\" matInput placeholder=\"Search products\" [formControl]=\"searchControl\" />\n </mat-form-field>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\">\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"Product\">\n <th mat-header-cell *matHeaderCellDef>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n \n <div *ngIf=\"element?.categories?.length > 0\"\n class=\"d-flex justify-content-start align-items-center gap-1 flex-wrap\">\n <span class=\"badge bg-secondary\" *ngFor=\"let category of element?.categories\">\n {{ category?.title }}\n </span>\n </div>\n </div>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"SKU\">\n <th mat-header-cell *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.sku }}</td>\n </ng-container>\n\n <!-- On Hand Column -->\n <ng-container matColumnDef=\"On Hand\">\n <th mat-header-cell *matHeaderCellDef>On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\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 <mat-icon class=\"cursor-pointer\" matTooltip=\"View\"\n [routerLink]=\"['/inventory/products', element.id, 'view']\" routerLinkActive=\"route-link-active\">\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 <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>" }]
|
|
3369
3369
|
}], ctorParameters: () => [{ type: ProductService }] });
|
|
3370
3370
|
|
|
3371
3371
|
class InventoryDashboardPageComponent {
|
|
@@ -3691,7 +3691,7 @@ class InventoryValueReportComponent extends TechlifyListingControllerInterface {
|
|
|
3691
3691
|
this.loadData();
|
|
3692
3692
|
}
|
|
3693
3693
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InventoryValueReportComponent, deps: [{ token: InventoryValueReportService }, { token: i4$1.ActivatedRoute }, { token: i1.RequestHelperService }, { token: i2$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
3694
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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>Min Stock On Hand</mat-label>\n <mat-select formControlName=\"min_stock_on_hand\">\n <mat-option *ngFor=\"let option of minStockOptions\" [value]=\"option\">\n {{ option }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"name\">Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n <app-product-category-badges [product]=\"element\"></app-product-category-badges>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <span>{{ element?.sku }}</span>\n <span class='text-secondary'> {{ element?.type?.title }} </span>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>Total</strong>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"stock_on_hand\">On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Average Price Column -->\n <ng-container matColumnDef=\"Average Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"average_purchase_price\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Avg. Price</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Average price of batches in stock\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.average_purchase_price | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Column -->\n <ng-container matColumnDef=\"Inventory Value\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"inventory_value\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\" matTooltip=\"Based on average price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>{{ totalInventoryValue | currency }}</strong>\n </td>\n </ng-container>\n\n <!-- Last Purchase Price Column -->\n <ng-container matColumnDef=\"Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"last_stock_receipt.purchase_price\">\n Last Price\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.last_stock_receipt?.purchase_price ?? 0 | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Based On Last Purchase Price Column -->\n <ng-container matColumnDef=\"Inventory Value Based On Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"last_stock_receipt.amount\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Based on last purchase price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value_based_on_last_price ?? 0 | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.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.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i11$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i15.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i15.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i15.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i2$2.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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }], preserveWhitespaces: true });
|
|
3694
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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>Min Stock On Hand</mat-label>\n <mat-select formControlName=\"min_stock_on_hand\">\n <mat-option *ngFor=\"let option of minStockOptions\" [value]=\"option\">\n {{ option }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"name\">Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n <app-product-category-badges [product]=\"element\"></app-product-category-badges>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <span>{{ element?.sku }}</span>\n <span class='text-secondary'> {{ element?.type?.title }} </span>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>Total</strong>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"stock_on_hand\">On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Average Price Column -->\n <ng-container matColumnDef=\"Average Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"average_purchase_price\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Avg. Price</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Average price of batches in stock\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.average_purchase_price | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Column -->\n <ng-container matColumnDef=\"Inventory Value\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"inventory_value\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\" matTooltip=\"Based on average price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>{{ totalInventoryValue | currency }}</strong>\n </td>\n </ng-container>\n\n <!-- Last Purchase Price Column -->\n <ng-container matColumnDef=\"Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"last_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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.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.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i11$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i15.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i15.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i15.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i15.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i15.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i15.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i15.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i15.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i15.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i15.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i15.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i15.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i15.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i15.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i2$2.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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }], preserveWhitespaces: true });
|
|
3695
3695
|
}
|
|
3696
3696
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InventoryValueReportComponent, decorators: [{
|
|
3697
3697
|
type: Component,
|
|
@@ -3705,7 +3705,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3705
3705
|
ReactiveFormsModule,
|
|
3706
3706
|
SearchableSelectorModule,
|
|
3707
3707
|
InfiniteScrollDirective,
|
|
3708
|
-
], template: "<div>\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Inventory Value Report</h3>\n <i class=\"fa-solid fa-file-excel cursor-pointer d-print-none\" (click)=\"export('excel')\"></i>\n <i class=\"fa-solid fa-file-pdf cursor-pointer d-print-none\" (click)=\"export('pdf')\"></i>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Min Stock On Hand</mat-label>\n <mat-select formControlName=\"min_stock_on_hand\">\n <mat-option *ngFor=\"let option of minStockOptions\" [value]=\"option\">\n {{ option }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"name\">Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n <app-product-category-badges [product]=\"element\"></app-product-category-badges>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <span>{{ element?.sku }}</span>\n <span class='text-secondary'> {{ element?.type?.title }} </span>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>Total</strong>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"stock_on_hand\">On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Average Price Column -->\n <ng-container matColumnDef=\"Average Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"average_purchase_price\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Avg. Price</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Average price of batches in stock\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.average_purchase_price | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Column -->\n <ng-container matColumnDef=\"Inventory Value\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"inventory_value\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\" matTooltip=\"Based on average price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>{{ totalInventoryValue | currency }}</strong>\n </td>\n </ng-container>\n\n <!-- Last Purchase Price Column -->\n <ng-container matColumnDef=\"Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"
|
|
3708
|
+
], template: "<div>\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Inventory Value Report</h3>\n <i class=\"fa-solid fa-file-excel cursor-pointer d-print-none\" (click)=\"export('excel')\"></i>\n <i class=\"fa-solid fa-file-pdf cursor-pointer d-print-none\" (click)=\"export('pdf')\"></i>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/product-types\" formControlName=\"type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Min Stock On Hand</mat-label>\n <mat-select formControlName=\"min_stock_on_hand\">\n <mat-option *ngFor=\"let option of minStockOptions\" [value]=\"option\">\n {{ option }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"name\">Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <a [routerLink]=\"['/inventory/products', element?.id, 'view']\" class=\"text-dark\">\n {{ element?.name }}\n </a>\n <app-product-category-badges [product]=\"element\"></app-product-category-badges>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef>SKU</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <span>{{ element?.sku }}</span>\n <span class='text-secondary'> {{ element?.type?.title }} </span>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>Total</strong>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"on_hand\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"stock_on_hand\">On Hand</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_on_hand }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Average Price Column -->\n <ng-container matColumnDef=\"Average Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"average_purchase_price\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Avg. Price</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\"\n matTooltip=\"Average price of batches in stock\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.average_purchase_price | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <!-- Inventory Value Column -->\n <ng-container matColumnDef=\"Inventory Value\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"inventory_value\">\n <div class=\"d-flex flex-row gap-1 align-items-center\">\n <span>Inventory Value</span>\n <i class=\"fa-solid fa-circle-info d-print-none text-secondary\" matTooltip=\"Based on average price\"></i>\n </div>\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.inventory_value | currency }}\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <strong>{{ totalInventoryValue | currency }}</strong>\n </td>\n </ng-container>\n\n <!-- Last Purchase Price Column -->\n <ng-container matColumnDef=\"Last Purchase Price\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"last_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>" }]
|
|
3709
3709
|
}], ctorParameters: () => [{ type: InventoryValueReportService }, { type: i4$1.ActivatedRoute }, { type: i1.RequestHelperService }, { type: i2$1.FormBuilder }] });
|
|
3710
3710
|
|
|
3711
3711
|
const routes$4 = [
|
|
@@ -3723,11 +3723,11 @@ const routes$4 = [
|
|
|
3723
3723
|
},
|
|
3724
3724
|
{
|
|
3725
3725
|
path: 'locations',
|
|
3726
|
-
loadChildren: () => import('./techlify-inventory-common-location.module-
|
|
3726
|
+
loadChildren: () => import('./techlify-inventory-common-location.module-CaJs-nK2.mjs').then((mod) => mod.LocationModule),
|
|
3727
3727
|
},
|
|
3728
3728
|
{
|
|
3729
3729
|
path: "measures",
|
|
3730
|
-
loadChildren: () => import('./techlify-inventory-common-measure.module-
|
|
3730
|
+
loadChildren: () => import('./techlify-inventory-common-measure.module-CIDW4Fmj.mjs').then((mod) => mod.MeasureModule),
|
|
3731
3731
|
},
|
|
3732
3732
|
{
|
|
3733
3733
|
path: 'stock-issues',
|
|
@@ -3739,7 +3739,7 @@ const routes$4 = [
|
|
|
3739
3739
|
},
|
|
3740
3740
|
{
|
|
3741
3741
|
path: 'categories',
|
|
3742
|
-
loadChildren: () => import('./techlify-inventory-common-category.module-
|
|
3742
|
+
loadChildren: () => import('./techlify-inventory-common-category.module-4xS_L5x1.mjs').then((mod) => mod.CategoryModule),
|
|
3743
3743
|
},
|
|
3744
3744
|
{
|
|
3745
3745
|
path: 'products',
|
|
@@ -3827,6 +3827,147 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3827
3827
|
}]
|
|
3828
3828
|
}] });
|
|
3829
3829
|
|
|
3830
|
+
let ProductSearchComponent = class ProductSearchComponent {
|
|
3831
|
+
dialog;
|
|
3832
|
+
fb;
|
|
3833
|
+
filterService;
|
|
3834
|
+
productService;
|
|
3835
|
+
activatedRoute;
|
|
3836
|
+
searchFormGroup;
|
|
3837
|
+
lastPage;
|
|
3838
|
+
page = 1;
|
|
3839
|
+
perPage = 7;
|
|
3840
|
+
totalItems = 0;
|
|
3841
|
+
currentPage = 1;
|
|
3842
|
+
num_items = 7;
|
|
3843
|
+
routeFilters;
|
|
3844
|
+
products = [];
|
|
3845
|
+
columnDefinitions = [
|
|
3846
|
+
{ def: 'Product Title', isShow: true },
|
|
3847
|
+
{ def: 'Product Sku', isShow: true },
|
|
3848
|
+
{ def: 'Actions', isShow: true },
|
|
3849
|
+
];
|
|
3850
|
+
displayedColumns = ['Product Title', 'Product Sku', 'Actions'];
|
|
3851
|
+
dataSource = new MatTableDataSource();
|
|
3852
|
+
selected = new EventEmitter();
|
|
3853
|
+
constructor(dialog, fb, filterService, productService, activatedRoute) {
|
|
3854
|
+
this.dialog = dialog;
|
|
3855
|
+
this.fb = fb;
|
|
3856
|
+
this.filterService = filterService;
|
|
3857
|
+
this.productService = productService;
|
|
3858
|
+
this.activatedRoute = activatedRoute;
|
|
3859
|
+
this.searchFormGroup = this.fb.group({
|
|
3860
|
+
num_items: [this.num_items + '|' + this.currentPage],
|
|
3861
|
+
search: [''],
|
|
3862
|
+
sort_by: [''],
|
|
3863
|
+
});
|
|
3864
|
+
}
|
|
3865
|
+
ngOnInit() {
|
|
3866
|
+
this.listenForChanges();
|
|
3867
|
+
this.loadData();
|
|
3868
|
+
}
|
|
3869
|
+
listenForChanges() {
|
|
3870
|
+
this.searchFormGroup.valueChanges.pipe(debounceTime(500), untilDestroyed(this)).subscribe((changes) => {
|
|
3871
|
+
this.filterService.applyFilterToRoute(this.activatedRoute, this.searchFormGroup.value);
|
|
3872
|
+
this.reload();
|
|
3873
|
+
});
|
|
3874
|
+
}
|
|
3875
|
+
async loadData() {
|
|
3876
|
+
var filters = this.searchFormGroup.value;
|
|
3877
|
+
filters.page = this.page;
|
|
3878
|
+
filters.per_page = this.perPage;
|
|
3879
|
+
filters.num_items = this.num_items + '|' + this.currentPage;
|
|
3880
|
+
filters.with = 'taxes.tax.type';
|
|
3881
|
+
var res = await this.productService.index(filters).toPromise();
|
|
3882
|
+
if (this.products.length < 1) {
|
|
3883
|
+
this.products = res.data;
|
|
3884
|
+
}
|
|
3885
|
+
else {
|
|
3886
|
+
res.data.forEach((item) => this.products.push(item));
|
|
3887
|
+
}
|
|
3888
|
+
this.dataSource = new MatTableDataSource(this.products);
|
|
3889
|
+
this.totalItems = res.total;
|
|
3890
|
+
this.lastPage = res.last_page || this.page;
|
|
3891
|
+
this.barCodeAutoAdd();
|
|
3892
|
+
}
|
|
3893
|
+
reload() {
|
|
3894
|
+
this.products = [];
|
|
3895
|
+
this.currentPage = 1;
|
|
3896
|
+
this.loadData();
|
|
3897
|
+
}
|
|
3898
|
+
addProduct(product) {
|
|
3899
|
+
this.selected.emit(product);
|
|
3900
|
+
}
|
|
3901
|
+
assignFilter(column, direction) {
|
|
3902
|
+
if (column) {
|
|
3903
|
+
return this.searchFormGroup.get('sort_by')?.setValue(column + '|' + direction);
|
|
3904
|
+
}
|
|
3905
|
+
}
|
|
3906
|
+
/**
|
|
3907
|
+
* Checks search filter for an exact match in a product and adds product to form
|
|
3908
|
+
*/
|
|
3909
|
+
barCodeAutoAdd() {
|
|
3910
|
+
var filters = this.searchFormGroup.value;
|
|
3911
|
+
if (filters.search) {
|
|
3912
|
+
let result = this.products.find((obj) => {
|
|
3913
|
+
return obj.sku === filters.search;
|
|
3914
|
+
});
|
|
3915
|
+
if (result) {
|
|
3916
|
+
this.addProduct(result);
|
|
3917
|
+
this.searchFormGroup.get('search')?.patchValue('');
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
}
|
|
3921
|
+
sortColumn(event) {
|
|
3922
|
+
var direction = event.direction.toString().toUpperCase();
|
|
3923
|
+
this.assignFilter(event.active, direction);
|
|
3924
|
+
}
|
|
3925
|
+
onScroll() {
|
|
3926
|
+
if (this.totalItems > this.products.length) {
|
|
3927
|
+
this.currentPage += 1;
|
|
3928
|
+
this.loadData();
|
|
3929
|
+
}
|
|
3930
|
+
}
|
|
3931
|
+
viewProduct(product, viewProductTemplate) {
|
|
3932
|
+
const dialogRef = this.dialog.open(viewProductTemplate, {
|
|
3933
|
+
width: '800px',
|
|
3934
|
+
data: {
|
|
3935
|
+
product,
|
|
3936
|
+
},
|
|
3937
|
+
});
|
|
3938
|
+
dialogRef.afterClosed().subscribe((result) => {
|
|
3939
|
+
if (result) {
|
|
3940
|
+
this.reload();
|
|
3941
|
+
}
|
|
3942
|
+
});
|
|
3943
|
+
}
|
|
3944
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductSearchComponent, deps: [{ token: i1$1.MatDialog }, { token: i2$1.FormBuilder }, { token: i1.FilterService }, { token: ProductService }, { token: i4$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
3945
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ProductSearchComponent, selector: "app-product-search", 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: i5.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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "component", type: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "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 });
|
|
3946
|
+
};
|
|
3947
|
+
ProductSearchComponent = __decorate([
|
|
3948
|
+
UntilDestroy()
|
|
3949
|
+
], ProductSearchComponent);
|
|
3950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductSearchComponent, decorators: [{
|
|
3951
|
+
type: Component,
|
|
3952
|
+
args: [{ selector: 'app-product-search', 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"] }]
|
|
3953
|
+
}], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.FormBuilder }, { type: i1.FilterService }, { type: ProductService }, { type: i4$1.ActivatedRoute }], propDecorators: { selected: [{
|
|
3954
|
+
type: Output
|
|
3955
|
+
}] } });
|
|
3956
|
+
|
|
3957
|
+
class ProductSearchModule {
|
|
3958
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductSearchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3959
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ProductSearchModule, declarations: [ProductSearchComponent], imports: [CommonModule, InfiniteScrollModule, FlexLayoutModule, ReactiveFormsModule, MaterialModule$1, ProductModule], exports: [ProductSearchComponent] });
|
|
3960
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductSearchModule, imports: [CommonModule, InfiniteScrollModule, FlexLayoutModule, ReactiveFormsModule, MaterialModule$1, ProductModule] });
|
|
3961
|
+
}
|
|
3962
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductSearchModule, decorators: [{
|
|
3963
|
+
type: NgModule,
|
|
3964
|
+
args: [{
|
|
3965
|
+
declarations: [ProductSearchComponent],
|
|
3966
|
+
imports: [CommonModule, InfiniteScrollModule, FlexLayoutModule, ReactiveFormsModule, MaterialModule$1, ProductModule],
|
|
3967
|
+
exports: [ProductSearchComponent],
|
|
3968
|
+
}]
|
|
3969
|
+
}] });
|
|
3970
|
+
|
|
3830
3971
|
class StockIssueImportPageComponent {
|
|
3831
3972
|
importConfig = {
|
|
3832
3973
|
apiUrl: 'api/stock-issues-import',
|
|
@@ -5060,5 +5201,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
5060
5201
|
* Generated bundle index. Do not edit.
|
|
5061
5202
|
*/
|
|
5062
5203
|
|
|
5063
|
-
export {
|
|
5064
|
-
//# sourceMappingURL=techlify-inventory-common-techlify-inventory-common-
|
|
5204
|
+
export { RatingService as A, RatingListComponent as B, RatingFormComponent as C, RatingFormButtonComponent as D, InventoryCommonRoutingModule as I, LocationService as L, MaterialModule as M, ProductModule as P, RatingModule as R, StockTransferFormButtonComponent as S, TechlifyFilterComponent as T, ProductCategoryBadgesComponent as a, MeasureService as b, TechlifyFilterModule as c, InventoryCommonModule as d, StockSummaryService as e, ProductFormComponent as f, ProductBasicInfoComponent as g, ProductFormButtonComponent as h, ProductQuickSearchComponent as i, ProductSearchModule as j, ProductSearchComponent as k, StockIssuancesModule as l, StockIssuancesListComponent as m, StockIssuancesListModule as n, SupplierModule as o, SupplierFormButtonComponent as p, SupplierFormComponent as q, SuppliersListComponent as r, SupplierTypeService as s, PayeeSelectorModule as t, PayeeSelectorComponent as u, IncidentModule as v, IncidentService as w, IncidentListComponent as x, IncidentFormComponent as y, IncidentFormButtonComponent as z };
|
|
5205
|
+
//# sourceMappingURL=techlify-inventory-common-techlify-inventory-common-MwoKn906.mjs.map
|