techlify-inventory-common 18.0.1 → 18.2.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/inventory-common-routing.module.mjs +11 -1
- package/esm2022/lib/inventory-common/inventory-common.module.mjs +8 -4
- package/esm2022/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.mjs +10 -8
- package/esm2022/lib/inventory-common/inventory-value-report.service.mjs +21 -0
- package/esm2022/lib/inventory-common/low-stock-report.service.mjs +23 -0
- package/esm2022/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.mjs +9 -7
- package/esm2022/lib/inventory-common/product/product-list/product-list.component.mjs +30 -40
- package/esm2022/lib/inventory-common/product/product-quick-search/product-quick-search.component.mjs +92 -0
- package/esm2022/lib/inventory-common/product/product.module.mjs +7 -4
- package/esm2022/lib/inventory-common/product/widgets/product-category-badges/product-category-badges.component.mjs +18 -0
- package/esm2022/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.mjs +170 -0
- package/esm2022/lib/inventory-common/reports/low-stock-report/low-stock-report.component.mjs +165 -0
- package/esm2022/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.mjs +64 -0
- package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form-button/supplier-form-button.component.mjs +43 -0
- package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form.component.mjs +9 -10
- package/esm2022/lib/inventory-common/supplier/supplier.module.mjs +15 -3
- package/esm2022/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.mjs +65 -165
- package/fesm2022/{techlify-inventory-common-category.module-Stn6e73V.mjs → techlify-inventory-common-category.module-BKEBFEeZ.mjs} +9 -9
- package/fesm2022/{techlify-inventory-common-category.module-Stn6e73V.mjs.map → techlify-inventory-common-category.module-BKEBFEeZ.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-measure.module-CirswKXn.mjs → techlify-inventory-common-measure.module-CZHhYoQd.mjs} +9 -9
- package/fesm2022/{techlify-inventory-common-measure.module-CirswKXn.mjs.map → techlify-inventory-common-measure.module-CZHhYoQd.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-stock-issuances.module-Dm9i2kcf.mjs → techlify-inventory-common-stock-issuances.module-BjPbzqUW.mjs} +2 -4
- package/fesm2022/{techlify-inventory-common-stock-issuances.module-Dm9i2kcf.mjs.map → techlify-inventory-common-stock-issuances.module-BjPbzqUW.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-supplier.module-gzHesNtQ.mjs → techlify-inventory-common-supplier.module-CFDwJ-TS.mjs} +268 -292
- package/fesm2022/techlify-inventory-common-supplier.module-CFDwJ-TS.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-CYiCJfk9.mjs +3143 -0
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-CYiCJfk9.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common.mjs +1 -1
- package/lib/inventory-common/inventory-common.module.d.ts +2 -1
- package/lib/inventory-common/inventory-value-report.service.d.ts +9 -0
- package/lib/inventory-common/low-stock-report.service.d.ts +10 -0
- package/lib/inventory-common/product/product-list/product-list.component.d.ts +5 -7
- package/lib/inventory-common/product/product-quick-search/product-quick-search.component.d.ts +15 -0
- package/lib/inventory-common/product/product.module.d.ts +1 -1
- package/lib/inventory-common/product/widgets/product-category-badges/product-category-badges.component.d.ts +6 -0
- package/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.d.ts +26 -0
- package/lib/inventory-common/reports/low-stock-report/low-stock-report.component.d.ts +26 -0
- package/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.d.ts +18 -0
- package/lib/inventory-common/supplier/supplier-form/supplier-form-button/supplier-form-button.component.d.ts +13 -0
- package/lib/inventory-common/supplier/supplier.module.d.ts +4 -1
- package/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.d.ts +14 -32
- package/package.json +1 -1
- package/esm2022/lib/inventory-common/supplier/supplier-type.service.mjs +0 -25
- package/fesm2022/techlify-inventory-common-product.module-qdeafFV5.mjs +0 -1172
- package/fesm2022/techlify-inventory-common-product.module-qdeafFV5.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-stock-issuances-list.module-CyFDxARk.mjs +0 -436
- package/fesm2022/techlify-inventory-common-stock-issuances-list.module-CyFDxARk.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-stock-receipt-form.module-BZDrN7la.mjs +0 -302
- package/fesm2022/techlify-inventory-common-stock-receipt-form.module-BZDrN7la.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-stock-receipts.module-CUPdWteR.mjs +0 -253
- package/fesm2022/techlify-inventory-common-stock-receipts.module-CUPdWteR.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-supplier-form.component-CHmMG7O8.mjs +0 -178
- package/fesm2022/techlify-inventory-common-supplier-form.component-CHmMG7O8.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-supplier.module-gzHesNtQ.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-techlify-form-service-CiVfwYTS.mjs +0 -14
- package/fesm2022/techlify-inventory-common-techlify-form-service-CiVfwYTS.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-Czyc0jLI.mjs +0 -495
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-Czyc0jLI.mjs.map +0 -1
- package/lib/inventory-common/supplier/supplier-type.service.d.ts +0 -13
|
@@ -1,52 +1,49 @@
|
|
|
1
1
|
import * as i1$1 from 'ngx-techlify-core';
|
|
2
2
|
import { ActionPopupComponent, TechlifyListingControllerInterface, SearchableSelectorModule, AuditLogForModelModule, NoteModule } from 'ngx-techlify-core';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Input, Component, Injectable, NgModule } from '@angular/core';
|
|
5
|
-
import * as i4 from '@angular/common';
|
|
4
|
+
import { Input, Component, Injectable, NgModule, EventEmitter, Output } from '@angular/core';
|
|
5
|
+
import * as i4$1 from '@angular/common';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
|
-
import { lastValueFrom, debounceTime } from 'rxjs';
|
|
8
|
-
import { S as SupplierFormComponent, a as SupplierService } from './techlify-inventory-common-
|
|
7
|
+
import { lastValueFrom, debounceTime, distinctUntilChanged } from 'rxjs';
|
|
8
|
+
import { S as SupplierFormComponent, a as SupplierService, T as TechlifyFormService } from './techlify-inventory-common-techlify-inventory-common-CYiCJfk9.mjs';
|
|
9
9
|
import * as i2 from '@angular/router';
|
|
10
10
|
import { RouterModule } from '@angular/router';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i4 from '@angular/material/card';
|
|
12
12
|
import { MatCardModule } from '@angular/material/card';
|
|
13
13
|
import * as i7 from '@angular/material/progress-bar';
|
|
14
14
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
15
|
-
import * as i6
|
|
15
|
+
import * as i6 from '@angular/material/tabs';
|
|
16
16
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
17
17
|
import * as i1 from '@angular/material/dialog';
|
|
18
18
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
19
|
-
import * as
|
|
19
|
+
import * as i3 from '@angular/material/divider';
|
|
20
20
|
import { MatDividerModule } from '@angular/material/divider';
|
|
21
21
|
import * as i3$1 from '@angular/material/icon';
|
|
22
22
|
import { MatIconModule } from '@angular/material/icon';
|
|
23
|
-
import { T as TechlifyFormService } from './techlify-inventory-common-techlify-form-service-CiVfwYTS.mjs';
|
|
24
23
|
import { __decorate } from 'tslib';
|
|
25
|
-
import * as i6$3 from '@angular/material/table';
|
|
26
|
-
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
27
24
|
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
|
28
|
-
import * as
|
|
25
|
+
import * as i4$2 from 'ngx-spinner';
|
|
29
26
|
import * as i2$1 from '@angular/forms';
|
|
30
27
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
31
|
-
import * as i7$1 from '@angular/material/
|
|
32
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
33
|
-
import * as i12 from '@angular/material/button-toggle';
|
|
34
|
-
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
35
|
-
import * as i6$2 from '@angular/material/form-field';
|
|
28
|
+
import * as i7$1 from '@angular/material/form-field';
|
|
36
29
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
37
|
-
import * as
|
|
30
|
+
import * as i9 from '@angular/material/input';
|
|
38
31
|
import { MatInputModule } from '@angular/material/input';
|
|
39
|
-
import * as
|
|
32
|
+
import * as i13 from '@angular/material/sort';
|
|
40
33
|
import { MatSortModule } from '@angular/material/sort';
|
|
34
|
+
import * as i14 from '@angular/material/table';
|
|
35
|
+
import { MatTableModule } from '@angular/material/table';
|
|
41
36
|
import * as i2$2 from '@angular/material/tooltip';
|
|
42
37
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
43
|
-
import * as i10 from '
|
|
44
|
-
import { FlexModule } from '@angular/flex-layout';
|
|
45
|
-
import * as i10$1 from 'ngx-infinite-scroll';
|
|
38
|
+
import * as i10 from 'ngx-infinite-scroll';
|
|
46
39
|
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
|
|
40
|
+
import * as i5 from 'ngx-permissions';
|
|
41
|
+
import { NgxPermissionsModule } from 'ngx-permissions';
|
|
47
42
|
import { MatCommonModule, MatLineModule, MatNativeDateModule, MatOptionModule, MatPseudoCheckboxModule, MatRippleModule } from '@angular/material/core';
|
|
48
43
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
49
44
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
45
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
46
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
50
47
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
51
48
|
import { MatChipsModule } from '@angular/material/chips';
|
|
52
49
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
@@ -65,6 +62,7 @@ import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
|
65
62
|
import { MatStepperModule } from '@angular/material/stepper';
|
|
66
63
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
67
64
|
import { MatTreeModule } from '@angular/material/tree';
|
|
65
|
+
import { FlexModule } from '@angular/flex-layout';
|
|
68
66
|
|
|
69
67
|
class SupplierInformationComponent {
|
|
70
68
|
dialog;
|
|
@@ -118,7 +116,7 @@ class SupplierInformationComponent {
|
|
|
118
116
|
});
|
|
119
117
|
}
|
|
120
118
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierInformationComponent, deps: [{ token: i1.MatDialog }, { token: SupplierService }, { token: i1$1.AlertService }, { token: i2.Router }, { token: i1$1.ErrorHandlerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
121
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SupplierInformationComponent, selector: "app-supplier-information", inputs: { supplier: "supplier" }, ngImport: i0, template: "<mat-card>\n <mat-card-content>\n <div class=\"d-flex justify-content-between align-items-center\">\n <h3 class=\"mb-0\">Personal Information</h3>\n <div class=\"d-flex justify-content-end align-items-center gap-1\">\n <app-audit-log-for-model\n [modelId]=\"supplier?.id\"\n modelType=\"Supplier\"\n logView=\"all\"\n ></app-audit-log-for-model>\n <mat-icon\n class=\"material-icons cursor-pointer\"\n (click)=\"modifySupplier(supplier)\"\n >\n edit\n </mat-icon>\n <mat-icon\n class=\"material-icons cursor-pointer\"\n (click)=\"deleteSupplier(supplier)\"\n >\n delete\n </mat-icon>\n </div>\n </div>\n\n <mat-divider></mat-divider>\n\n <div class=\"mt-2\">\n <div class=\"d-flex justify-content-start gap-2\">\n <div>\n <h3 class=\"mb-0\">{{ supplier?.company_name }}</h3>\n <span class=\"status-pill-sm status-light-orange\">{{\n supplier?.type?.title\n }}</span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-3\">\n <div class=\"col-6\">\n <p class=\"text-muted mb-0\">Contact Name</p>\n <p class=\"text-wrap\">{{ supplier?.contact_name }}</p>\n </div>\n <div class=\"col-6\">\n <p class=\"text-muted mb-0\">Email</p>\n <p class=\"text-wrap\">{{ supplier?.email }}</p>\n </div>\n <div class=\"col-6\">\n <p class=\"text-muted mb-0\">Phone</p>\n <p class=\"text-wrap\">{{ supplier?.phone }}</p>\n </div>\n <div class=\"col-6\">\n <p class=\"text-muted mb-0\">Details</p>\n <p class=\"text-wrap\">{{ supplier?.details }}</p>\n </div>\n </div>\n\n <div class=\"row mt-2 h-100\">\n <div class=\"d-flex\">\n <mat-icon class=\"material-icons text-primary my-auto\"\n >location_on</mat-icon\n >\n <p class=\"ms-2 my-auto\">{{ supplier?.address }}</p>\n </div>\n </div>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "component", type:
|
|
119
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SupplierInformationComponent, selector: "app-supplier-information", inputs: { supplier: "supplier" }, ngImport: i0, template: "<mat-card>\n <mat-card-content>\n <div class=\"d-flex justify-content-between align-items-center\">\n <h3 class=\"mb-0\">Personal Information</h3>\n <div class=\"d-flex justify-content-end align-items-center gap-1\">\n <app-audit-log-for-model\n [modelId]=\"supplier?.id\"\n modelType=\"Supplier\"\n logView=\"all\"\n ></app-audit-log-for-model>\n <mat-icon\n class=\"material-icons cursor-pointer\"\n (click)=\"modifySupplier(supplier)\"\n >\n edit\n </mat-icon>\n <mat-icon\n class=\"material-icons cursor-pointer\"\n (click)=\"deleteSupplier(supplier)\"\n >\n delete\n </mat-icon>\n </div>\n </div>\n\n <mat-divider></mat-divider>\n\n <div class=\"mt-2\">\n <div class=\"d-flex justify-content-start gap-2\">\n <div>\n <h3 class=\"mb-0\">{{ supplier?.company_name }}</h3>\n <span class=\"status-pill-sm status-light-orange\">{{\n supplier?.type?.title\n }}</span>\n </div>\n </div>\n </div>\n\n <div class=\"row mt-3\">\n <div class=\"col-6\">\n <p class=\"text-muted mb-0\">Contact Name</p>\n <p class=\"text-wrap\">{{ supplier?.contact_name }}</p>\n </div>\n <div class=\"col-6\">\n <p class=\"text-muted mb-0\">Email</p>\n <p class=\"text-wrap\">{{ supplier?.email }}</p>\n </div>\n <div class=\"col-6\">\n <p class=\"text-muted mb-0\">Phone</p>\n <p class=\"text-wrap\">{{ supplier?.phone }}</p>\n </div>\n <div class=\"col-6\">\n <p class=\"text-muted mb-0\">Details</p>\n <p class=\"text-wrap\">{{ supplier?.details }}</p>\n </div>\n </div>\n\n <div class=\"row mt-2 h-100\">\n <div class=\"d-flex\">\n <mat-icon class=\"material-icons text-primary my-auto\"\n >location_on</mat-icon\n >\n <p class=\"ms-2 my-auto\">{{ supplier?.address }}</p>\n </div>\n </div>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1$1.AuditLogForModelComponent, selector: "app-audit-log-for-model", inputs: ["modelType", "modelId", "logView"] }], preserveWhitespaces: true });
|
|
122
120
|
}
|
|
123
121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierInformationComponent, decorators: [{
|
|
124
122
|
type: Component,
|
|
@@ -175,7 +173,7 @@ class SupplierViewComponent {
|
|
|
175
173
|
this.supplier = result.item;
|
|
176
174
|
}
|
|
177
175
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierViewComponent, deps: [{ token: SupplierService }, { token: i2.ActivatedRoute }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
178
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SupplierViewComponent, selector: "app-supplier-view", ngImport: i0, template: "<mat-progress-bar *ngIf=\"isLoading\" mode=\"indeterminate\"></mat-progress-bar>\n\n<div *ngIf=\"supplier\" class=\"d-flex justify-content-start gap-3\">\n <div style=\"width: 300px\">\n <app-supplier-information [supplier]=\"supplier\"></app-supplier-information>\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <app-note-list\n modelType=\"Supplier\"\n [relatedModelId]=\"supplier?.id\"\n ></app-note-list>\n </mat-card-content>\n </mat-card>\n </div>\n\n <div style=\"width: calc(100% - 300px - 1rem)\">\n <mat-card style=\"width: fit-content\">\n <mat-card-content class=\"p-0\">\n <mat-tab-group\n mat-stretch-tabs=\"false\"\n mat-align-tabs=\"start\"\n [selectedIndex]=\"selectedTabIndex\"\n (selectedTabChange)=\"onTabChange($event)\"\n >\n <mat-tab>\n <ng-template mat-tab-label>\n <div\n class=\"d-flex justify-content-start align-items-center gap-1\"\n >\n <span class=\"material-symbols-outlined\">unknown_document</span>\n <span class=\"pl-2\">Incidents</span>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab>\n <ng-template mat-tab-label>\n <div\n class=\"d-flex justify-content-start align-items-center gap-1\"\n >\n <span class=\"material-symbols-outlined\">star</span>\n <span class=\"pl-2\">Ratings</span>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab>\n <ng-template mat-tab-label>\n <div\n class=\"d-flex justify-content-start align-items-center gap-1\"\n >\n <span class=\"material-symbols-outlined\">price_change</span>\n <span class=\"pl-2\">Estimates</span>\n </div>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </mat-card-content>\n </mat-card>\n <router-outlet></router-outlet>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type:
|
|
176
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SupplierViewComponent, selector: "app-supplier-view", ngImport: i0, template: "<mat-progress-bar *ngIf=\"isLoading\" mode=\"indeterminate\"></mat-progress-bar>\n\n<div *ngIf=\"supplier\" class=\"d-flex justify-content-start gap-3\">\n <div style=\"width: 300px\">\n <app-supplier-information [supplier]=\"supplier\"></app-supplier-information>\n <mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <app-note-list\n modelType=\"Supplier\"\n [relatedModelId]=\"supplier?.id\"\n ></app-note-list>\n </mat-card-content>\n </mat-card>\n </div>\n\n <div style=\"width: calc(100% - 300px - 1rem)\">\n <mat-card style=\"width: fit-content\">\n <mat-card-content class=\"p-0\">\n <mat-tab-group\n mat-stretch-tabs=\"false\"\n mat-align-tabs=\"start\"\n [selectedIndex]=\"selectedTabIndex\"\n (selectedTabChange)=\"onTabChange($event)\"\n >\n <mat-tab>\n <ng-template mat-tab-label>\n <div\n class=\"d-flex justify-content-start align-items-center gap-1\"\n >\n <span class=\"material-symbols-outlined\">unknown_document</span>\n <span class=\"pl-2\">Incidents</span>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab>\n <ng-template mat-tab-label>\n <div\n class=\"d-flex justify-content-start align-items-center gap-1\"\n >\n <span class=\"material-symbols-outlined\">star</span>\n <span class=\"pl-2\">Ratings</span>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab>\n <ng-template mat-tab-label>\n <div\n class=\"d-flex justify-content-start align-items-center gap-1\"\n >\n <span class=\"material-symbols-outlined\">price_change</span>\n <span class=\"pl-2\">Estimates</span>\n </div>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </mat-card-content>\n </mat-card>\n <router-outlet></router-outlet>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i7.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i6.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i6.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i6.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: i1$1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "component", type: SupplierInformationComponent, selector: "app-supplier-information", inputs: ["supplier"] }], preserveWhitespaces: true });
|
|
179
177
|
}
|
|
180
178
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierViewComponent, decorators: [{
|
|
181
179
|
type: Component,
|
|
@@ -211,272 +209,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
211
209
|
args: [{ selector: "app-supplier", template: "<div>\n <router-outlet></router-outlet>\n</div>\n" }]
|
|
212
210
|
}], ctorParameters: () => [{ type: i1.MatDialog }, { type: SupplierFormService }] });
|
|
213
211
|
|
|
214
|
-
class SupplierTypeService {
|
|
215
|
-
httpService;
|
|
216
|
-
constructor(httpService) {
|
|
217
|
-
this.httpService = httpService;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* get all suppliers from API
|
|
221
|
-
*
|
|
222
|
-
*/
|
|
223
|
-
index() {
|
|
224
|
-
return this.httpService.get(`api/supplier-types`);
|
|
225
|
-
}
|
|
226
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierTypeService, deps: [{ token: i1$1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
227
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierTypeService, providedIn: "root" });
|
|
228
|
-
}
|
|
229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierTypeService, decorators: [{
|
|
230
|
-
type: Injectable,
|
|
231
|
-
args: [{
|
|
232
|
-
providedIn: "root",
|
|
233
|
-
}]
|
|
234
|
-
}], ctorParameters: () => [{ type: i1$1.HttpService }] });
|
|
235
|
-
|
|
236
|
-
let SuppliersListComponent = class SuppliersListComponent extends TechlifyListingControllerInterface {
|
|
237
|
-
spinner;
|
|
238
|
-
fb;
|
|
239
|
-
supplierService;
|
|
240
|
-
supplierTypeService;
|
|
241
|
-
errorHandler;
|
|
242
|
-
filterService;
|
|
243
|
-
activatedRoute;
|
|
244
|
-
alertService;
|
|
245
|
-
dialog;
|
|
246
|
-
supplierFormService;
|
|
247
|
-
displayedColumns = [
|
|
248
|
-
"#",
|
|
249
|
-
"company_name",
|
|
250
|
-
"contact_name",
|
|
251
|
-
"phone",
|
|
252
|
-
"address",
|
|
253
|
-
"email",
|
|
254
|
-
"details",
|
|
255
|
-
"actions",
|
|
256
|
-
];
|
|
257
|
-
filterFormGroup;
|
|
258
|
-
dataSource = new MatTableDataSource();
|
|
259
|
-
totalItems = 0;
|
|
260
|
-
currentPage = 1;
|
|
261
|
-
routeFilters;
|
|
262
|
-
supplierTypes;
|
|
263
|
-
isLoading = false;
|
|
264
|
-
constructor(spinner, fb, supplierService, supplierTypeService, errorHandler, filterService, activatedRoute, alertService, dialog, supplierFormService) {
|
|
265
|
-
super();
|
|
266
|
-
this.spinner = spinner;
|
|
267
|
-
this.fb = fb;
|
|
268
|
-
this.supplierService = supplierService;
|
|
269
|
-
this.supplierTypeService = supplierTypeService;
|
|
270
|
-
this.errorHandler = errorHandler;
|
|
271
|
-
this.filterService = filterService;
|
|
272
|
-
this.activatedRoute = activatedRoute;
|
|
273
|
-
this.alertService = alertService;
|
|
274
|
-
this.dialog = dialog;
|
|
275
|
-
this.supplierFormService = supplierFormService;
|
|
276
|
-
this.page = 1;
|
|
277
|
-
this.perPage = 25;
|
|
278
|
-
this.models = [];
|
|
279
|
-
this.filterFormGroup = this.fb.group({
|
|
280
|
-
search: [""],
|
|
281
|
-
supplier_type_ids: ["1,2"],
|
|
282
|
-
num_items: [this.perPage + "|" + this.currentPage],
|
|
283
|
-
sort_by: [""],
|
|
284
|
-
});
|
|
285
|
-
this.supplierTypes = [];
|
|
286
|
-
}
|
|
287
|
-
ngOnInit() {
|
|
288
|
-
this.patchFiltersFromRoute();
|
|
289
|
-
this.listenForChanges();
|
|
290
|
-
this.getSupplierTypes();
|
|
291
|
-
this.loadData();
|
|
292
|
-
}
|
|
293
|
-
listenForChanges() {
|
|
294
|
-
// listen for supplier added event to update the list.
|
|
295
|
-
this.supplierFormService.isListUpdated().subscribe((val) => {
|
|
296
|
-
if (val && !this.isLoading)
|
|
297
|
-
this.reload();
|
|
298
|
-
});
|
|
299
|
-
// listen for form group changes.
|
|
300
|
-
this.filterFormGroup.valueChanges
|
|
301
|
-
.pipe(debounceTime(500), untilDestroyed(this))
|
|
302
|
-
.subscribe((changes) => {
|
|
303
|
-
this.filterService.applyFilterToRoute(this.activatedRoute, this.filterFormGroup.value);
|
|
304
|
-
this.reload();
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
patchFiltersFromRoute() {
|
|
308
|
-
this.routeFilters = this.filterService.getFiltersFromRoute(this.activatedRoute, this.filterFormGroup.value);
|
|
309
|
-
this.filterFormGroup.setValue(this.routeFilters);
|
|
310
|
-
if (this.routeFilters.supplier_type_ids) {
|
|
311
|
-
this.filterFormGroup
|
|
312
|
-
.get("supplier_type_ids")
|
|
313
|
-
.setValue(this.routeFilters.supplier_type_ids.split(",").map(Number));
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
sortColumn(event) {
|
|
317
|
-
var direction = event.direction.toString().toUpperCase();
|
|
318
|
-
this.assignFilter(event.active, direction);
|
|
319
|
-
}
|
|
320
|
-
assignFilter(column, direction) {
|
|
321
|
-
return this.filterFormGroup
|
|
322
|
-
.get("sort_by")
|
|
323
|
-
?.setValue(column + "|" + direction);
|
|
324
|
-
}
|
|
325
|
-
async getSupplierTypes() {
|
|
326
|
-
try {
|
|
327
|
-
let res = await lastValueFrom(this.supplierTypeService.index());
|
|
328
|
-
this.supplierTypes = res.data;
|
|
329
|
-
console.log(this.supplierTypes);
|
|
330
|
-
}
|
|
331
|
-
catch (error) {
|
|
332
|
-
this.errorHandler.handleError(error);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
async loadData() {
|
|
336
|
-
let filters = this.filterFormGroup.value;
|
|
337
|
-
filters.page = this.page = 1;
|
|
338
|
-
filters.per_page = this.perPage;
|
|
339
|
-
filters.supplier_type_ids = filters?.supplier_type_ids?.toString();
|
|
340
|
-
filters.num_items = this.perPage + "|" + this.currentPage;
|
|
341
|
-
try {
|
|
342
|
-
this.isLoading = true;
|
|
343
|
-
let res = await lastValueFrom(this.supplierService.index(filters));
|
|
344
|
-
if (this.models.length < 1) {
|
|
345
|
-
this.models = res.data;
|
|
346
|
-
}
|
|
347
|
-
else {
|
|
348
|
-
res.data.forEach((item) => this.models.push(item));
|
|
349
|
-
}
|
|
350
|
-
this.dataSource = new MatTableDataSource(this.models);
|
|
351
|
-
this.totalItems = res.total;
|
|
352
|
-
this.lastPage = res.last_page || this.page;
|
|
353
|
-
// list is updated do not listen form isListUpdated
|
|
354
|
-
this.supplierFormService.listUpdated(false);
|
|
355
|
-
}
|
|
356
|
-
catch (error) {
|
|
357
|
-
this.errorHandler.handleError(error);
|
|
358
|
-
}
|
|
359
|
-
finally {
|
|
360
|
-
this.isLoading = false;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
reload() {
|
|
364
|
-
if (this.isLoading)
|
|
365
|
-
return;
|
|
366
|
-
this.models = [];
|
|
367
|
-
this.currentPage = 1;
|
|
368
|
-
this.loadData();
|
|
369
|
-
}
|
|
370
|
-
onScroll() {
|
|
371
|
-
if (this.totalItems > this.models.length && !this.isLoading) {
|
|
372
|
-
this.currentPage += 1;
|
|
373
|
-
this.loadData();
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
editForm(model) {
|
|
377
|
-
const dialogRef = this.dialog.open(SupplierFormComponent, {
|
|
378
|
-
width: "400px",
|
|
379
|
-
autoFocus: false,
|
|
380
|
-
data: {
|
|
381
|
-
details: model,
|
|
382
|
-
},
|
|
383
|
-
});
|
|
384
|
-
dialogRef.afterClosed().subscribe((result) => {
|
|
385
|
-
if (result) {
|
|
386
|
-
this.reload();
|
|
387
|
-
}
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
deleteForm(supplier) {
|
|
391
|
-
const dialogRef = this.dialog.open(ActionPopupComponent, {
|
|
392
|
-
width: "400px",
|
|
393
|
-
data: {
|
|
394
|
-
title: "Delete Supplier",
|
|
395
|
-
message: "Are you sure you want to delete the Supplier?",
|
|
396
|
-
},
|
|
397
|
-
autoFocus: false,
|
|
398
|
-
});
|
|
399
|
-
dialogRef.afterClosed().subscribe(async (result) => {
|
|
400
|
-
if (result) {
|
|
401
|
-
this.spinner.show();
|
|
402
|
-
try {
|
|
403
|
-
const result = await lastValueFrom(this.supplierService.destroy(supplier.id));
|
|
404
|
-
this.alertService.addAlert("Successfully deleted the Supplier", "success");
|
|
405
|
-
this.reload();
|
|
406
|
-
}
|
|
407
|
-
catch (error) {
|
|
408
|
-
this.errorHandler.handleError(error);
|
|
409
|
-
}
|
|
410
|
-
finally {
|
|
411
|
-
this.spinner.hide();
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* Show the supplier create form.
|
|
418
|
-
*
|
|
419
|
-
* @param model
|
|
420
|
-
*/
|
|
421
|
-
showAddSupplierDialog(model) {
|
|
422
|
-
const dialogRef = this.dialog.open(SupplierFormComponent, {
|
|
423
|
-
width: "400px",
|
|
424
|
-
autoFocus: false,
|
|
425
|
-
data: {
|
|
426
|
-
model,
|
|
427
|
-
},
|
|
428
|
-
});
|
|
429
|
-
dialogRef.afterClosed().subscribe((result) => {
|
|
430
|
-
if (result) {
|
|
431
|
-
// record added successfully, inform the list component.
|
|
432
|
-
this.supplierFormService.listUpdated(true);
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuppliersListComponent, deps: [{ token: i3$2.NgxSpinnerService }, { token: i2$1.FormBuilder }, { token: SupplierService }, { token: SupplierTypeService }, { token: i1$1.ErrorHandlerService }, { token: i1$1.FilterService }, { token: i2.ActivatedRoute }, { token: i1$1.AlertService }, { token: i1.MatDialog }, { token: SupplierFormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
437
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SuppliersListComponent, selector: "app-suppliers-list", usesInheritance: true, ngImport: i0, template: "<div class=\"d-flex justify-content-center align-items-center gap-3 mb-3\">\n <h2 class=\"mb-0\">Suppliers</h2>\n <mat-icon\n color=\"primary\"\n class=\"cursor-pointer\"\n (click)=\"showAddSupplierDialog()\"\n >\n add\n </mat-icon>\n</div>\n<mat-card class=\"mb-3\">\n <mat-card-content>\n <form\n [formGroup]=\"filterFormGroup\"\n fxLayout\n fxLayoutGap=\"1rem\"\n fxLayoutAlign=\"start center\"\n >\n <mat-form-field fxFlex=\"24\">\n <input\n matInput\n placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\"\n />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-label class=\"ml-4\">Type</mat-label>\n <mat-button-toggle-group formControlName=\"supplier_type_ids\" multiple>\n <mat-button-toggle\n *ngFor=\"let item of supplierTypes\"\n [value]=\"item.id\"\n >{{ item.title }}</mat-button-toggle\n >\n </mat-button-toggle-group>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n #table\n [dataSource]=\"dataSource\"\n class=\"w-100 table-hover\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n aria-describedby=\"Suppliers List\"\n >\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Company</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <strong>{{ element?.company_name }}</strong>\n <span class=\"status-pill status-pill-sm status-ongoing\">\n {{ element?.type?.title }}\n </span>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Contact Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary\" fxLayoutGap=\"1rem\">\n <app-audit-log-for-model\n [modelId]=\"element?.id\"\n modelType=\"Supplier\"\n logView=\"all\"\n ></app-audit-log-for-model>\n <button\n mat-icon-button\n [routerLink]=\"['/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\"\n *ngxPermissionsOnly=\"['supplier.read']\"\n >\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </button>\n <button\n *ngxPermissionsOnly=\"['supplier.update']\"\n mat-icon-button\n (click)=\"editForm(element)\"\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button\n *ngxPermissionsOnly=\"['supplier.delete']\"\n type=\"button\"\n mat-icon-button\n (click)=\"deleteForm(element)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i12.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i12.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i6$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$2.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: i7.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i5.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i6$3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6$3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i1$1.AuditLogForModelComponent, selector: "app-audit-log-for-model", inputs: ["modelType", "modelId", "logView"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i10$1.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }], preserveWhitespaces: true });
|
|
438
|
-
};
|
|
439
|
-
SuppliersListComponent = __decorate([
|
|
440
|
-
UntilDestroy()
|
|
441
|
-
], SuppliersListComponent);
|
|
442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuppliersListComponent, decorators: [{
|
|
443
|
-
type: Component,
|
|
444
|
-
args: [{ selector: "app-suppliers-list", template: "<div class=\"d-flex justify-content-center align-items-center gap-3 mb-3\">\n <h2 class=\"mb-0\">Suppliers</h2>\n <mat-icon\n color=\"primary\"\n class=\"cursor-pointer\"\n (click)=\"showAddSupplierDialog()\"\n >\n add\n </mat-icon>\n</div>\n<mat-card class=\"mb-3\">\n <mat-card-content>\n <form\n [formGroup]=\"filterFormGroup\"\n fxLayout\n fxLayoutGap=\"1rem\"\n fxLayoutAlign=\"start center\"\n >\n <mat-form-field fxFlex=\"24\">\n <input\n matInput\n placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\"\n />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-label class=\"ml-4\">Type</mat-label>\n <mat-button-toggle-group formControlName=\"supplier_type_ids\" multiple>\n <mat-button-toggle\n *ngFor=\"let item of supplierTypes\"\n [value]=\"item.id\"\n >{{ item.title }}</mat-button-toggle\n >\n </mat-button-toggle-group>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table\n mat-table\n #table\n [dataSource]=\"dataSource\"\n class=\"w-100 table-hover\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n matSort\n (matSortChange)=\"sortColumn($event)\"\n aria-describedby=\"Suppliers List\"\n >\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Company</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex flex-column gap-1\">\n <strong>{{ element?.company_name }}</strong>\n <span class=\"status-pill status-pill-sm status-ongoing\">\n {{ element?.type?.title }}\n </span>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Contact Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary\" fxLayoutGap=\"1rem\">\n <app-audit-log-for-model\n [modelId]=\"element?.id\"\n modelType=\"Supplier\"\n logView=\"all\"\n ></app-audit-log-for-model>\n <button\n mat-icon-button\n [routerLink]=\"['/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\"\n *ngxPermissionsOnly=\"['supplier.read']\"\n >\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </button>\n <button\n *ngxPermissionsOnly=\"['supplier.update']\"\n mat-icon-button\n (click)=\"editForm(element)\"\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button\n *ngxPermissionsOnly=\"['supplier.delete']\"\n type=\"button\"\n mat-icon-button\n (click)=\"deleteForm(element)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n" }]
|
|
445
|
-
}], ctorParameters: () => [{ type: i3$2.NgxSpinnerService }, { type: i2$1.FormBuilder }, { type: SupplierService }, { type: SupplierTypeService }, { type: i1$1.ErrorHandlerService }, { type: i1$1.FilterService }, { type: i2.ActivatedRoute }, { type: i1$1.AlertService }, { type: i1.MatDialog }, { type: SupplierFormService }] });
|
|
446
|
-
|
|
447
|
-
const routes = [
|
|
448
|
-
{
|
|
449
|
-
path: "",
|
|
450
|
-
component: SupplierComponent,
|
|
451
|
-
children: [
|
|
452
|
-
{ path: "", component: SuppliersListComponent },
|
|
453
|
-
{
|
|
454
|
-
path: ":id/view",
|
|
455
|
-
component: SupplierViewComponent,
|
|
456
|
-
children: [
|
|
457
|
-
{
|
|
458
|
-
path: "",
|
|
459
|
-
redirectTo: "incidents",
|
|
460
|
-
pathMatch: "full",
|
|
461
|
-
},
|
|
462
|
-
],
|
|
463
|
-
},
|
|
464
|
-
],
|
|
465
|
-
},
|
|
466
|
-
];
|
|
467
|
-
class SupplierRoutingModule {
|
|
468
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
469
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SupplierRoutingModule, imports: [i2.RouterModule], exports: [RouterModule] });
|
|
470
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
|
|
471
|
-
}
|
|
472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierRoutingModule, decorators: [{
|
|
473
|
-
type: NgModule,
|
|
474
|
-
args: [{
|
|
475
|
-
imports: [RouterModule.forChild(routes)],
|
|
476
|
-
exports: [RouterModule],
|
|
477
|
-
}]
|
|
478
|
-
}] });
|
|
479
|
-
|
|
480
212
|
/*
|
|
481
213
|
* This module imports and re-exports all Angular Material modules for convenience,
|
|
482
214
|
* so only 1 module import is needed in your feature modules.
|
|
@@ -612,6 +344,241 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
612
344
|
}]
|
|
613
345
|
}] });
|
|
614
346
|
|
|
347
|
+
class SupplierFormButtonComponent {
|
|
348
|
+
matDialog;
|
|
349
|
+
supplier;
|
|
350
|
+
onSaved = new EventEmitter();
|
|
351
|
+
constructor(matDialog) {
|
|
352
|
+
this.matDialog = matDialog;
|
|
353
|
+
}
|
|
354
|
+
ngOnInit() {
|
|
355
|
+
}
|
|
356
|
+
openDialog() {
|
|
357
|
+
this.matDialog.open(SupplierFormComponent, {
|
|
358
|
+
width: '600px',
|
|
359
|
+
data: {
|
|
360
|
+
details: this.supplier
|
|
361
|
+
},
|
|
362
|
+
}).afterClosed().subscribe((result) => {
|
|
363
|
+
if (result) {
|
|
364
|
+
this.onSaved.emit(result);
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierFormButtonComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
369
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SupplierFormButtonComponent, isStandalone: true, selector: "app-supplier-form-button", inputs: { supplier: "supplier" }, outputs: { onSaved: "onSaved" }, ngImport: i0, template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" [class.text-secondary]=\"supplier\" (click)=\"openDialog()\">\n {{ supplier ? \"edit\" : \"add\" }}\n</mat-icon>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], preserveWhitespaces: true });
|
|
370
|
+
}
|
|
371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierFormButtonComponent, decorators: [{
|
|
372
|
+
type: Component,
|
|
373
|
+
args: [{ selector: 'app-supplier-form-button', standalone: true, imports: [
|
|
374
|
+
CommonModule,
|
|
375
|
+
MaterialModule
|
|
376
|
+
], template: "<mat-icon color=\"primary\" class=\"cursor-pointer\" [class.text-secondary]=\"supplier\" (click)=\"openDialog()\">\n {{ supplier ? \"edit\" : \"add\" }}\n</mat-icon>" }]
|
|
377
|
+
}], ctorParameters: () => [{ type: i1.MatDialog }], propDecorators: { supplier: [{
|
|
378
|
+
type: Input
|
|
379
|
+
}], onSaved: [{
|
|
380
|
+
type: Output
|
|
381
|
+
}] } });
|
|
382
|
+
|
|
383
|
+
class SupplierDeleteButtonComponent {
|
|
384
|
+
dialog;
|
|
385
|
+
alertService;
|
|
386
|
+
errorHandler;
|
|
387
|
+
supplierService;
|
|
388
|
+
supplier;
|
|
389
|
+
onDelete = new EventEmitter();
|
|
390
|
+
constructor(dialog, alertService, errorHandler, supplierService) {
|
|
391
|
+
this.dialog = dialog;
|
|
392
|
+
this.alertService = alertService;
|
|
393
|
+
this.errorHandler = errorHandler;
|
|
394
|
+
this.supplierService = supplierService;
|
|
395
|
+
}
|
|
396
|
+
ngOnInit() {
|
|
397
|
+
}
|
|
398
|
+
openDialog() {
|
|
399
|
+
this.dialog.open(ActionPopupComponent, {
|
|
400
|
+
width: '400px',
|
|
401
|
+
data: {
|
|
402
|
+
title: 'Delete Supplier',
|
|
403
|
+
message: 'Are you sure you want to delete the Supplier?',
|
|
404
|
+
},
|
|
405
|
+
autoFocus: false,
|
|
406
|
+
}).afterClosed().subscribe(async (result) => {
|
|
407
|
+
if (result) {
|
|
408
|
+
try {
|
|
409
|
+
await lastValueFrom(this.supplierService.destroy(this.supplier.id));
|
|
410
|
+
this.alertService.addAlert('Successfully deleted the Supplier', 'success');
|
|
411
|
+
this.onDelete.emit(this.supplier);
|
|
412
|
+
}
|
|
413
|
+
catch (error) {
|
|
414
|
+
this.errorHandler.handleError(error);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierDeleteButtonComponent, deps: [{ token: i1.MatDialog }, { token: i1$1.AlertService }, { token: i1$1.ErrorHandlerService }, { token: SupplierService }], target: i0.ɵɵFactoryTarget.Component });
|
|
420
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SupplierDeleteButtonComponent, isStandalone: true, selector: "app-supplier-delete-button", inputs: { supplier: "supplier" }, outputs: { onDelete: "onDelete" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer\" *ngxPermissionsOnly=\"['supplier.delete']\" (click)=\"openDialog()\">\n delete\n</mat-icon>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: NgxPermissionsModule }, { kind: "directive", type: i5.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }], preserveWhitespaces: true });
|
|
421
|
+
}
|
|
422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierDeleteButtonComponent, decorators: [{
|
|
423
|
+
type: Component,
|
|
424
|
+
args: [{ selector: 'app-supplier-delete-button', standalone: true, imports: [
|
|
425
|
+
CommonModule,
|
|
426
|
+
MaterialModule,
|
|
427
|
+
NgxPermissionsModule
|
|
428
|
+
], template: "<mat-icon class=\"cursor-pointer\" *ngxPermissionsOnly=\"['supplier.delete']\" (click)=\"openDialog()\">\n delete\n</mat-icon>" }]
|
|
429
|
+
}], ctorParameters: () => [{ type: i1.MatDialog }, { type: i1$1.AlertService }, { type: i1$1.ErrorHandlerService }, { type: SupplierService }], propDecorators: { supplier: [{
|
|
430
|
+
type: Input
|
|
431
|
+
}], onDelete: [{
|
|
432
|
+
type: Output
|
|
433
|
+
}] } });
|
|
434
|
+
|
|
435
|
+
let SuppliersListComponent = class SuppliersListComponent extends TechlifyListingControllerInterface {
|
|
436
|
+
spinner;
|
|
437
|
+
fb;
|
|
438
|
+
supplierService;
|
|
439
|
+
errorHandler;
|
|
440
|
+
filterService;
|
|
441
|
+
activatedRoute;
|
|
442
|
+
alertService;
|
|
443
|
+
dialog;
|
|
444
|
+
supplierFormService;
|
|
445
|
+
requestHelperService;
|
|
446
|
+
displayedColumns = [
|
|
447
|
+
'#',
|
|
448
|
+
'company_name',
|
|
449
|
+
'type',
|
|
450
|
+
'contact_name',
|
|
451
|
+
'phone',
|
|
452
|
+
'address',
|
|
453
|
+
'email',
|
|
454
|
+
'details',
|
|
455
|
+
'actions',
|
|
456
|
+
];
|
|
457
|
+
constructor(spinner, fb, supplierService, errorHandler, filterService, activatedRoute, alertService, dialog, supplierFormService, requestHelperService) {
|
|
458
|
+
super();
|
|
459
|
+
this.spinner = spinner;
|
|
460
|
+
this.fb = fb;
|
|
461
|
+
this.supplierService = supplierService;
|
|
462
|
+
this.errorHandler = errorHandler;
|
|
463
|
+
this.filterService = filterService;
|
|
464
|
+
this.activatedRoute = activatedRoute;
|
|
465
|
+
this.alertService = alertService;
|
|
466
|
+
this.dialog = dialog;
|
|
467
|
+
this.supplierFormService = supplierFormService;
|
|
468
|
+
this.requestHelperService = requestHelperService;
|
|
469
|
+
this.page = 1;
|
|
470
|
+
this.perPage = 25;
|
|
471
|
+
this.models = [];
|
|
472
|
+
this.filterForm = this.fb.group({
|
|
473
|
+
search: [''],
|
|
474
|
+
supplier_type_ids: [''],
|
|
475
|
+
sort_by: ['created_at|desc'],
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
ngOnInit() {
|
|
479
|
+
this.updateFormWithQueryParams();
|
|
480
|
+
this.subscribeToFormChanges();
|
|
481
|
+
this.subscribeToRouteChanges();
|
|
482
|
+
}
|
|
483
|
+
listenForChanges() {
|
|
484
|
+
// listen for supplier added event to update the list.
|
|
485
|
+
this.supplierFormService.isListUpdated().subscribe((val) => {
|
|
486
|
+
if (val && !this.isWorking)
|
|
487
|
+
this.reload();
|
|
488
|
+
});
|
|
489
|
+
// listen for form group changes.
|
|
490
|
+
this.filterForm.valueChanges.pipe(debounceTime(500), untilDestroyed(this)).subscribe(() => {
|
|
491
|
+
this.filterService.applyFilterToRoute(this.activatedRoute, this.filterForm.value);
|
|
492
|
+
this.reload();
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
sortColumn(event) {
|
|
496
|
+
var direction = event.direction.toString().toUpperCase();
|
|
497
|
+
this.assignFilter(event.active, direction);
|
|
498
|
+
}
|
|
499
|
+
assignFilter(column, direction) {
|
|
500
|
+
return this.filterForm.get('sort_by')?.setValue(column + '|' + direction);
|
|
501
|
+
}
|
|
502
|
+
async loadData() {
|
|
503
|
+
let filters = { ...this.requestHelperService.convertToFormData(this.filterForm.value) };
|
|
504
|
+
filters.page = this.page = 1;
|
|
505
|
+
filters.perPage = this.perPage;
|
|
506
|
+
try {
|
|
507
|
+
this.isWorking = true;
|
|
508
|
+
let res = await lastValueFrom(this.supplierService.index(filters));
|
|
509
|
+
this.models = this.models?.concat(res?.data);
|
|
510
|
+
this.lastPage = res.last_page;
|
|
511
|
+
// list is updated do not listen form isListUpdated
|
|
512
|
+
this.supplierFormService.listUpdated(false);
|
|
513
|
+
}
|
|
514
|
+
catch (error) {
|
|
515
|
+
this.errorHandler.handleError(error);
|
|
516
|
+
}
|
|
517
|
+
finally {
|
|
518
|
+
this.isWorking = false;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
updateFormWithQueryParams() {
|
|
522
|
+
this.requestHelperService.updateFormWithQueryParams(this.filterForm, {
|
|
523
|
+
supplier_type_ids: { multiple: true },
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
subscribeToFormChanges() {
|
|
527
|
+
this.filterForm.valueChanges.pipe(debounceTime(800)).subscribe({
|
|
528
|
+
next: () => {
|
|
529
|
+
this.requestHelperService.updateQueryParams(this.requestHelperService.convertToFormData(this.filterForm.value));
|
|
530
|
+
},
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
subscribeToRouteChanges() {
|
|
534
|
+
this.activatedRoute.queryParams.pipe(debounceTime(500), distinctUntilChanged()).subscribe(() => {
|
|
535
|
+
this.reload();
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuppliersListComponent, deps: [{ token: i4$2.NgxSpinnerService }, { token: i2$1.FormBuilder }, { token: SupplierService }, { token: i1$1.ErrorHandlerService }, { token: i1$1.FilterService }, { token: i2.ActivatedRoute }, { token: i1$1.AlertService }, { token: i1.MatDialog }, { token: SupplierFormService }, { token: i1$1.RequestHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
539
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SuppliersListComponent, selector: "app-suppliers-list", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h3 class=\"mb-0\">Suppliers</h3>\n <app-supplier-form-button (onSaved)=\"reload()\"></app-supplier-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Suppliers List\">\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.company_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef>Contact</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-1\">\n\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"['/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\" *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </a>\n <app-supplier-form-button *ngxPermissionsOnly=\"['supplier.update']\" [supplier]=\"element\"\n (onSaved)=\"reload()\"></app-supplier-form-button>\n <app-supplier-delete-button [supplier]=\"element\" (onDelete)=\"reload()\"></app-supplier-delete-button>\n <app-audit-log-for-model [modelId]=\"element?.id\" modelType=\"Supplier\"\n logView=\"all\"></app-audit-log-for-model>\n\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", dependencies: [{ kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i7$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.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: i7.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i14.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i14.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i14.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i14.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i14.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i14.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i14.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i14.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i14.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i14.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i1$1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1$1.AuditLogForModelComponent, selector: "app-audit-log-for-model", inputs: ["modelType", "modelId", "logView"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i10.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i5.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }, { kind: "component", type: SupplierFormButtonComponent, selector: "app-supplier-form-button", inputs: ["supplier"], outputs: ["onSaved"] }, { kind: "component", type: SupplierDeleteButtonComponent, selector: "app-supplier-delete-button", inputs: ["supplier"], outputs: ["onDelete"] }], preserveWhitespaces: true });
|
|
540
|
+
};
|
|
541
|
+
SuppliersListComponent = __decorate([
|
|
542
|
+
UntilDestroy()
|
|
543
|
+
], SuppliersListComponent);
|
|
544
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuppliersListComponent, decorators: [{
|
|
545
|
+
type: Component,
|
|
546
|
+
args: [{ selector: 'app-suppliers-list', template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-3\">\n <h3 class=\"mb-0\">Suppliers</h3>\n <app-supplier-form-button (onSaved)=\"reload()\"></app-supplier-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Suppliers List\">\n <ng-container matColumnDef=\"#\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.company_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef>Contact</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-1\">\n\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"['/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\" *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </a>\n <app-supplier-form-button *ngxPermissionsOnly=\"['supplier.update']\" [supplier]=\"element\"\n (onSaved)=\"reload()\"></app-supplier-form-button>\n <app-supplier-delete-button [supplier]=\"element\" (onDelete)=\"reload()\"></app-supplier-delete-button>\n <app-audit-log-for-model [modelId]=\"element?.id\" modelType=\"Supplier\"\n logView=\"all\"></app-audit-log-for-model>\n\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>" }]
|
|
547
|
+
}], ctorParameters: () => [{ type: i4$2.NgxSpinnerService }, { type: i2$1.FormBuilder }, { type: SupplierService }, { type: i1$1.ErrorHandlerService }, { type: i1$1.FilterService }, { type: i2.ActivatedRoute }, { type: i1$1.AlertService }, { type: i1.MatDialog }, { type: SupplierFormService }, { type: i1$1.RequestHelperService }] });
|
|
548
|
+
|
|
549
|
+
const routes = [
|
|
550
|
+
{
|
|
551
|
+
path: "",
|
|
552
|
+
component: SupplierComponent,
|
|
553
|
+
children: [
|
|
554
|
+
{ path: "", component: SuppliersListComponent },
|
|
555
|
+
{
|
|
556
|
+
path: ":id/view",
|
|
557
|
+
component: SupplierViewComponent,
|
|
558
|
+
children: [
|
|
559
|
+
{
|
|
560
|
+
path: "",
|
|
561
|
+
redirectTo: "incidents",
|
|
562
|
+
pathMatch: "full",
|
|
563
|
+
},
|
|
564
|
+
],
|
|
565
|
+
},
|
|
566
|
+
],
|
|
567
|
+
},
|
|
568
|
+
];
|
|
569
|
+
class SupplierRoutingModule {
|
|
570
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
571
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SupplierRoutingModule, imports: [i2.RouterModule], exports: [RouterModule] });
|
|
572
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
|
|
573
|
+
}
|
|
574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierRoutingModule, decorators: [{
|
|
575
|
+
type: NgModule,
|
|
576
|
+
args: [{
|
|
577
|
+
imports: [RouterModule.forChild(routes)],
|
|
578
|
+
exports: [RouterModule],
|
|
579
|
+
}]
|
|
580
|
+
}] });
|
|
581
|
+
|
|
615
582
|
class SupplierModule {
|
|
616
583
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
617
584
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SupplierModule, declarations: [SupplierComponent,
|
|
@@ -626,7 +593,10 @@ class SupplierModule {
|
|
|
626
593
|
NoteModule,
|
|
627
594
|
FlexModule,
|
|
628
595
|
ReactiveFormsModule,
|
|
629
|
-
InfiniteScrollModule
|
|
596
|
+
InfiniteScrollModule,
|
|
597
|
+
NgxPermissionsModule,
|
|
598
|
+
SupplierFormButtonComponent,
|
|
599
|
+
SupplierDeleteButtonComponent] });
|
|
630
600
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierModule, imports: [CommonModule,
|
|
631
601
|
SupplierRoutingModule,
|
|
632
602
|
MaterialModule,
|
|
@@ -635,7 +605,10 @@ class SupplierModule {
|
|
|
635
605
|
NoteModule,
|
|
636
606
|
FlexModule,
|
|
637
607
|
ReactiveFormsModule,
|
|
638
|
-
InfiniteScrollModule
|
|
608
|
+
InfiniteScrollModule,
|
|
609
|
+
NgxPermissionsModule,
|
|
610
|
+
SupplierFormButtonComponent,
|
|
611
|
+
SupplierDeleteButtonComponent] });
|
|
639
612
|
}
|
|
640
613
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SupplierModule, decorators: [{
|
|
641
614
|
type: NgModule,
|
|
@@ -657,9 +630,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
657
630
|
FlexModule,
|
|
658
631
|
ReactiveFormsModule,
|
|
659
632
|
InfiniteScrollModule,
|
|
633
|
+
NgxPermissionsModule,
|
|
634
|
+
SupplierFormButtonComponent,
|
|
635
|
+
SupplierDeleteButtonComponent
|
|
660
636
|
],
|
|
661
637
|
}]
|
|
662
638
|
}] });
|
|
663
639
|
|
|
664
640
|
export { SupplierModule };
|
|
665
|
-
//# sourceMappingURL=techlify-inventory-common-supplier.module-
|
|
641
|
+
//# sourceMappingURL=techlify-inventory-common-supplier.module-CFDwJ-TS.mjs.map
|