techlify-inventory-common 18.29.0 → 18.30.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/location/location-form-button/location-form-button.component.mjs +7 -4
- package/esm2022/lib/inventory-common/location/location-information/location-information.component.mjs +17 -15
- package/esm2022/lib/inventory-common/location/location-list/location-list.component.mjs +7 -7
- package/esm2022/lib/inventory-common/location/location-selector/location-selector.component.mjs +6 -5
- package/esm2022/lib/inventory-common/location/location-view/location-view.component.mjs +8 -9
- package/esm2022/lib/inventory-common/location/shelf/shelf-form-button/shelf-form-button.component.mjs +10 -6
- package/esm2022/lib/inventory-common/location/shelf/shelf-list/shelf-list.component.mjs +17 -16
- package/esm2022/lib/inventory-common/product/product-form-button/product-form-button.component.mjs +3 -3
- package/esm2022/lib/inventory-common/stock-issuances/stock-issue-batch-form/stock-issue-batch-form.component.mjs +120 -0
- package/esm2022/lib/inventory-common/stock-issuances/stock-issue-list/stock-issue-list.component.mjs +3 -3
- package/esm2022/lib/inventory-common/stock-issuances/stock-issue-routing.module.mjs +6 -1
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-batch-form/stock-receipt-batch-form.component.mjs +152 -0
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.mjs +1 -1
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-view/stock-receipt-view.component.mjs +1 -1
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.mjs +19 -72
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-routing.module.mjs +7 -1
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipts.module.mjs +31 -30
- package/esm2022/public-api.mjs +1 -3
- package/fesm2022/{techlify-inventory-common-category.module-BT3uLLqI.mjs → techlify-inventory-common-category.module--x7n_KLq.mjs} +9 -9
- package/fesm2022/{techlify-inventory-common-category.module-BT3uLLqI.mjs.map → techlify-inventory-common-category.module--x7n_KLq.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-measure.module-s9xhNWZM.mjs → techlify-inventory-common-measure.module-D2jxHH_D.mjs} +4 -4
- package/fesm2022/{techlify-inventory-common-measure.module-s9xhNWZM.mjs.map → techlify-inventory-common-measure.module-D2jxHH_D.mjs.map} +1 -1
- package/fesm2022/techlify-inventory-common-stock-issue-batch-form.component-DWWhMwul.mjs +119 -0
- package/fesm2022/techlify-inventory-common-stock-issue-batch-form.component-DWWhMwul.mjs.map +1 -0
- package/fesm2022/{techlify-inventory-common-stock-issue-view.component-CNrY99hf.mjs → techlify-inventory-common-stock-issue-view.component-CVmdJazX.mjs} +2 -2
- package/fesm2022/{techlify-inventory-common-stock-issue-view.component-CNrY99hf.mjs.map → techlify-inventory-common-stock-issue-view.component-CVmdJazX.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-techlify-inventory-common-DRw7na0D.mjs → techlify-inventory-common-techlify-inventory-common-DZ-tDtUV.mjs} +252 -269
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-DZ-tDtUV.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common.mjs +1 -1
- package/lib/inventory-common/location/location-information/location-information.component.d.ts +3 -1
- package/lib/inventory-common/location/location-selector/location-selector.component.d.ts +3 -1
- package/lib/inventory-common/stock-issuances/stock-issue-batch-form/stock-issue-batch-form.component.d.ts +31 -0
- package/lib/inventory-common/stock-receipts/stock-receipt-batch-form/stock-receipt-batch-form.component.d.ts +39 -0
- package/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.d.ts +3 -10
- package/lib/inventory-common/stock-receipts/stock-receipts.module.d.ts +10 -12
- package/package.json +1 -1
- package/public-api.d.ts +0 -2
- package/esm2022/lib/inventory-common/location/location-delete-button/location-delete-button.component.mjs +0 -68
- package/esm2022/lib/inventory-common/location/shelf/shelf-delete-button/shelf-delete-button.component.mjs +0 -60
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-DRw7na0D.mjs.map +0 -1
- package/lib/inventory-common/location/location-delete-button/location-delete-button.component.d.ts +0 -28
- package/lib/inventory-common/location/shelf/shelf-delete-button/shelf-delete-button.component.d.ts +0 -20
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a3 as ExportToExcelButtonComponent, Z as IncidentFormButtonComponent, Y as IncidentFormComponent, X as IncidentListComponent, V as IncidentModule, W as IncidentService, h as InventoryCommonModule, I as InventoryCommonRoutingModule, a7 as LocationFormButtonComponent, a6 as LocationFormComponent, a5 as LocationListComponent, a4 as LocationModule, L as LocationService, M as MeasureService, U as PayeeSelectorComponent, R as PayeeSelectorModule, k as ProductBasicInfoComponent, s as ProductBatchUpdateFormComponent, l as ProductFormButtonComponent, j as ProductFormComponent, r as ProductFormService, t as ProductImportPageComponent, p as ProductListComponent, P as ProductModule, m as ProductQuickSearchComponent, o as ProductSearchComponent, n as ProductSearchModule, q as ProductService, u as ProductViewPageComponent, a2 as RatingFormButtonComponent, a1 as RatingFormComponent, a0 as RatingListComponent, _ as RatingModule, $ as RatingService, ac as ShelfFormButtonComponent, ab as ShelfFormComponent, aa as ShelfListComponent, a8 as ShelfModule, a9 as ShelfService, e as StockIssueFormButtonComponent, d as StockIssueFormModule, w as StockIssueListComponent, x as StockIssueListModule, v as StockIssueModule, z as StockReceiptDeleteButtonComponent, C as StockReceiptFormButtonComponent, B as StockReceiptFormModule, D as StockReceiptViewComponent, A as StockReceiptsListPageComponent, y as StockReceiptsModule, i as StockSummaryService, G as StockTransferFormButtonComponent, F as StockTransferFormComponent, E as StockTransferListComponent, H as StockTransferService, K as SupplierFormButtonComponent, N as SupplierFormComponent, J as SupplierModule, Q as SupplierTypeService, O as SuppliersListComponent, T as TechlifyFilterComponent, a as TechlifyFilterModule } from './techlify-inventory-common-techlify-inventory-common-DZ-tDtUV.mjs';
|
|
2
2
|
//# sourceMappingURL=techlify-inventory-common.mjs.map
|
package/lib/inventory-common/location/location-information/location-information.component.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Location } from '@angular/common';
|
|
2
|
+
import { LocationService } from '../location.service';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class LocationInformationComponent {
|
|
4
5
|
private location;
|
|
6
|
+
service: LocationService;
|
|
5
7
|
model: any;
|
|
6
|
-
constructor(location: Location);
|
|
8
|
+
constructor(location: Location, service: LocationService);
|
|
7
9
|
redirectBack(): void;
|
|
8
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<LocationInformationComponent, never>;
|
|
9
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<LocationInformationComponent, "app-location-information", never, { "model": { "alias": "model"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -2,6 +2,7 @@ import { OnInit } from '@angular/core';
|
|
|
2
2
|
import { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
3
3
|
import { LocationService } from '../location.service';
|
|
4
4
|
import { TechlifyFeatureService } from 'ngx-techlify-core';
|
|
5
|
+
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
interface HierarchicalLocation {
|
|
7
8
|
id: number;
|
|
@@ -12,6 +13,7 @@ interface HierarchicalLocation {
|
|
|
12
13
|
export declare class LocationSelectorComponent implements ControlValueAccessor, OnInit {
|
|
13
14
|
private locationService;
|
|
14
15
|
private featureService;
|
|
16
|
+
appearance: import("@angular/core").InputSignal<MatFormFieldAppearance>;
|
|
15
17
|
label: import("@angular/core").InputSignal<string>;
|
|
16
18
|
placeholder: import("@angular/core").InputSignal<string>;
|
|
17
19
|
includeNone: import("@angular/core").InputSignal<boolean>;
|
|
@@ -38,6 +40,6 @@ export declare class LocationSelectorComponent implements ControlValueAccessor,
|
|
|
38
40
|
registerOnTouched(fn: () => void): void;
|
|
39
41
|
setDisabledState(isDisabled: boolean): void;
|
|
40
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<LocationSelectorComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LocationSelectorComponent, "app-location-selector", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "includeNone": { "alias": "includeNone"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LocationSelectorComponent, "app-location-selector", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "includeNone": { "alias": "includeNone"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
42
44
|
}
|
|
43
45
|
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { FormArray, FormBuilder } from '@angular/forms';
|
|
3
|
+
import { FormValidatorService, TechlifyFormComponentInterface } from "ngx-techlify-core";
|
|
4
|
+
import { StockIssueService } from '../stock-issue.service';
|
|
5
|
+
import { Router } from '@angular/router';
|
|
6
|
+
import { LocationService } from '../../location/location.service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class StockIssueBatchFormComponent extends TechlifyFormComponentInterface implements OnInit {
|
|
9
|
+
protected formValidatorService: FormValidatorService;
|
|
10
|
+
private fb;
|
|
11
|
+
private stockIssueService;
|
|
12
|
+
private router;
|
|
13
|
+
private locationService;
|
|
14
|
+
locationCount: import("@angular/core").WritableSignal<number>;
|
|
15
|
+
constructor(formValidatorService: FormValidatorService, fb: FormBuilder, stockIssueService: StockIssueService, router: Router, locationService: LocationService);
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
get stockIssueProducts(): FormArray;
|
|
18
|
+
createStockIssueProduct(): import("@angular/forms").FormGroup<{
|
|
19
|
+
product_id: import("@angular/forms").FormControl<string | null>;
|
|
20
|
+
location_id: import("@angular/forms").FormControl<string | null>;
|
|
21
|
+
quantity: import("@angular/forms").FormControl<number | null>;
|
|
22
|
+
particulars: import("@angular/forms").FormControl<string | null>;
|
|
23
|
+
}>;
|
|
24
|
+
addStockIssueProduct(): void;
|
|
25
|
+
removeStockIssueProduct(index: number): void;
|
|
26
|
+
clearProducts(): void;
|
|
27
|
+
save(): void;
|
|
28
|
+
cancel(): void;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StockIssueBatchFormComponent, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StockIssueBatchFormComponent, "app-stock-issue-batch-form", never, {}, {}, never, never, true, never>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { FormArray, FormBuilder } from '@angular/forms';
|
|
3
|
+
import { FormValidatorService, TechlifyFormComponentInterface } from "ngx-techlify-core";
|
|
4
|
+
import { StockReceiptService } from '../stock-receipt.service';
|
|
5
|
+
import { Router } from '@angular/router';
|
|
6
|
+
import { LocationService } from '../../location/location.service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class StockReceiptBatchFormComponent extends TechlifyFormComponentInterface implements OnInit {
|
|
9
|
+
protected formValidatorService: FormValidatorService;
|
|
10
|
+
private fb;
|
|
11
|
+
private stockReceiptService;
|
|
12
|
+
private router;
|
|
13
|
+
private locationService;
|
|
14
|
+
locationCount: import("@angular/core").WritableSignal<number>;
|
|
15
|
+
constructor(formValidatorService: FormValidatorService, fb: FormBuilder, stockReceiptService: StockReceiptService, router: Router, locationService: LocationService);
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
get stockReceiptProducts(): FormArray;
|
|
18
|
+
createStockReceiptProduct(): import("@angular/forms").FormGroup<{
|
|
19
|
+
product_id: import("@angular/forms").FormControl<string | null>;
|
|
20
|
+
location_id: import("@angular/forms").FormControl<string | null>;
|
|
21
|
+
quantity: import("@angular/forms").FormControl<number | null>;
|
|
22
|
+
purchase_price: import("@angular/forms").FormControl<number | null>;
|
|
23
|
+
total_amount: import("@angular/forms").FormControl<number | null>;
|
|
24
|
+
particulars: import("@angular/forms").FormControl<string | null>;
|
|
25
|
+
}>;
|
|
26
|
+
addStockReceiptProduct(): void;
|
|
27
|
+
removeStockReceiptProduct(index: number): void;
|
|
28
|
+
clearProducts(): void;
|
|
29
|
+
getRowTotal(index: number): number;
|
|
30
|
+
updateRowTotal(index: number): void;
|
|
31
|
+
/**
|
|
32
|
+
* We're doing a little more than a normal submit so we won't use the
|
|
33
|
+
* techlify-form's submit method
|
|
34
|
+
*/
|
|
35
|
+
save(): void;
|
|
36
|
+
cancel(): void;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StockReceiptBatchFormComponent, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StockReceiptBatchFormComponent, "app-stock-receipt-batch-form", never, {}, {}, never, never, true, never>;
|
|
39
|
+
}
|
|
@@ -2,13 +2,11 @@ import { EventEmitter, OnInit } from "@angular/core";
|
|
|
2
2
|
import { ColumnConfig, TechlifyFeatureService, TechlifyListingControllerInterface } from 'ngx-techlify-core';
|
|
3
3
|
import { StockReceiptService } from "../stock-receipt.service";
|
|
4
4
|
import { FormBuilder } from "@angular/forms";
|
|
5
|
-
import {
|
|
6
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
5
|
+
import { Router } from '@angular/router';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
7
|
export declare class StockReceiptsListPageComponent extends TechlifyListingControllerInterface implements OnInit {
|
|
9
|
-
|
|
8
|
+
protected service: StockReceiptService;
|
|
10
9
|
private formBuilder;
|
|
11
|
-
private activatedRoute;
|
|
12
10
|
private router;
|
|
13
11
|
private featureService;
|
|
14
12
|
product: any;
|
|
@@ -21,13 +19,8 @@ export declare class StockReceiptsListPageComponent extends TechlifyListingContr
|
|
|
21
19
|
get totalPurchasePrice(): number;
|
|
22
20
|
get totalValue(): number;
|
|
23
21
|
get footerColumns(): string[];
|
|
24
|
-
constructor(
|
|
22
|
+
constructor(service: StockReceiptService, formBuilder: FormBuilder, router: Router, featureService: TechlifyFeatureService);
|
|
25
23
|
ngOnInit(): void;
|
|
26
|
-
loadData(): void;
|
|
27
|
-
onSortChange(sort: Sort): void;
|
|
28
|
-
private updateFormWithQueryParams;
|
|
29
|
-
private subscribeToFormChanges;
|
|
30
|
-
private subscribeToRouteChanges;
|
|
31
24
|
private loadFeatures;
|
|
32
25
|
redirectToView(model: any): void;
|
|
33
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<StockReceiptsListPageComponent, never>;
|
|
@@ -3,20 +3,18 @@ import * as i1 from "./stock-receipts-list-page/stock-receipts-list-page.compone
|
|
|
3
3
|
import * as i2 from "./stock-receipt-delete-button/stock-receipt-delete-button.component";
|
|
4
4
|
import * as i3 from "./stock-receipt-view/stock-receipt-view.component";
|
|
5
5
|
import * as i4 from "@angular/common";
|
|
6
|
-
import * as i5 from "
|
|
7
|
-
import * as i6 from "
|
|
6
|
+
import * as i5 from "../material.module";
|
|
7
|
+
import * as i6 from "./stock-receipts-routing.module";
|
|
8
8
|
import * as i7 from "../techlify-filter/techlify-filter.module";
|
|
9
|
-
import * as i8 from "
|
|
10
|
-
import * as i9 from "@angular/
|
|
11
|
-
import * as i10 from "
|
|
12
|
-
import * as i11 from "
|
|
13
|
-
import * as i12 from "
|
|
14
|
-
import * as i13 from "
|
|
15
|
-
import * as i14 from "
|
|
16
|
-
import * as i15 from "./stock-receipt-form/stock-receipt-form.module";
|
|
17
|
-
import * as i16 from "../product/widgets/product-category-badges/product-category-badges.component";
|
|
9
|
+
import * as i8 from "ngx-techlify-core";
|
|
10
|
+
import * as i9 from "@angular/forms";
|
|
11
|
+
import * as i10 from "../supplier/payee-selector/payee-selector.module";
|
|
12
|
+
import * as i11 from "ngx-infinite-scroll";
|
|
13
|
+
import * as i12 from "./stock-receipt-form/stock-receipt-form.module";
|
|
14
|
+
import * as i13 from "../product/widgets/product-category-badges/product-category-badges.component";
|
|
15
|
+
import * as i14 from "@angular/router";
|
|
18
16
|
export declare class StockReceiptsModule {
|
|
19
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<StockReceiptsModule, never>;
|
|
20
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<StockReceiptsModule, [typeof i1.StockReceiptsListPageComponent, typeof i2.StockReceiptDeleteButtonComponent, typeof i3.StockReceiptViewComponent], [typeof i4.CommonModule, typeof i5.
|
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StockReceiptsModule, [typeof i1.StockReceiptsListPageComponent, typeof i2.StockReceiptDeleteButtonComponent, typeof i3.StockReceiptViewComponent], [typeof i4.CommonModule, typeof i5.MaterialModule, typeof i6.StockReceiptsRoutingModule, typeof i7.TechlifyFilterModule, typeof i8.SearchableSelectorModule, typeof i8.TimelineFilterModule, typeof i9.ReactiveFormsModule, typeof i10.PayeeSelectorModule, typeof i11.InfiniteScrollDirective, typeof i12.StockReceiptFormModule, typeof i13.ProductCategoryBadgesComponent, typeof i8.ColumnSelectorModule, typeof i8.EntityFilesViewAllModule, typeof i8.TechlifyFeatureModule, typeof i8.NoteModule, typeof i8.TechlifyIconModule, typeof i14.RouterModule], [typeof i2.StockReceiptDeleteButtonComponent, typeof i1.StockReceiptsListPageComponent]>;
|
|
21
19
|
static ɵinj: i0.ɵɵInjectorDeclaration<StockReceiptsModule>;
|
|
22
20
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -55,10 +55,8 @@ export * from './lib/inventory-common/location/location.service';
|
|
|
55
55
|
export * from './lib/inventory-common/location/location-list/location-list.component';
|
|
56
56
|
export * from './lib/inventory-common/location/location-form/location-form.component';
|
|
57
57
|
export * from './lib/inventory-common/location/location-form-button/location-form-button.component';
|
|
58
|
-
export * from './lib/inventory-common/location/location-delete-button/location-delete-button.component';
|
|
59
58
|
export * from './lib/inventory-common/location/shelf/shelf.module';
|
|
60
59
|
export * from './lib/inventory-common/location/shelf/shelf.service';
|
|
61
60
|
export * from './lib/inventory-common/location/shelf/shelf-list/shelf-list.component';
|
|
62
61
|
export * from './lib/inventory-common/location/shelf/shelf-form/shelf-form.component';
|
|
63
62
|
export * from './lib/inventory-common/location/shelf/shelf-form-button/shelf-form-button.component';
|
|
64
|
-
export * from './lib/inventory-common/location/shelf/shelf-delete-button/shelf-delete-button.component';
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import { MatDialogActions, MatDialogClose, MatDialogContent, MatDialogTitle } from '@angular/material/dialog';
|
|
3
|
-
import { MatButton } from '@angular/material/button';
|
|
4
|
-
import { MatIcon } from '@angular/material/icon';
|
|
5
|
-
import { NgIf } from '@angular/common';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "@angular/material/dialog";
|
|
8
|
-
import * as i2 from "../location.service";
|
|
9
|
-
import * as i3 from "ngx-techlify-core";
|
|
10
|
-
export class LocationDeleteButtonComponent {
|
|
11
|
-
matDialog;
|
|
12
|
-
service;
|
|
13
|
-
alertService;
|
|
14
|
-
credentialsService;
|
|
15
|
-
model;
|
|
16
|
-
deleted = new EventEmitter();
|
|
17
|
-
isDeleting;
|
|
18
|
-
user;
|
|
19
|
-
constructor(matDialog, service, alertService, credentialsService) {
|
|
20
|
-
this.matDialog = matDialog;
|
|
21
|
-
this.service = service;
|
|
22
|
-
this.alertService = alertService;
|
|
23
|
-
this.credentialsService = credentialsService;
|
|
24
|
-
this.user = this.credentialsService.credentials?.user;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Delete the product.
|
|
28
|
-
*/
|
|
29
|
-
delete() {
|
|
30
|
-
this.isDeleting = true;
|
|
31
|
-
this.service.delete(this.model).subscribe({
|
|
32
|
-
next: () => {
|
|
33
|
-
this.deleted.emit();
|
|
34
|
-
this.isDeleting = false;
|
|
35
|
-
this.matDialog.closeAll();
|
|
36
|
-
this.alertService.addAlert('Location deleted successfully!', 'success');
|
|
37
|
-
},
|
|
38
|
-
error: () => (this.isDeleting = false)
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Show delete product dialog.
|
|
43
|
-
*
|
|
44
|
-
* @param templateRef
|
|
45
|
-
*/
|
|
46
|
-
showDeleteDialog(templateRef) {
|
|
47
|
-
this.matDialog.open(templateRef, { width: '500px' });
|
|
48
|
-
}
|
|
49
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationDeleteButtonComponent, deps: [{ token: i1.MatDialog }, { token: i2.LocationService }, { token: i3.AlertService }, { token: i3.CredentialsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
50
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LocationDeleteButtonComponent, isStandalone: true, selector: "app-location-delete-button", inputs: { model: "model" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<mat-icon\n *ngIf=\"model?.client_id === user?.client_id\"\n class=\"cursor-pointer text-dark\"\n (click)=\"showDeleteDialog(deleteConfirmDialog)\"\n>\n delete\n</mat-icon>\n\n<ng-template #deleteConfirmDialog>\n <h3 mat-dialog-title>Delete Location</h3>\n <div mat-dialog-content>\n Are you sure? You want to delete the location\n <strong>{{ model?.title }}</strong> ?\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-1 mb-2\">\n <button\n [disabled]=\"isDeleting\"\n type=\"button\"\n mat-raised-button\n color=\"warn\"\n (click)=\"delete()\"\n >\n Delete\n </button>\n <button\n [disabled]=\"isDeleting\"\n type=\"button\"\n mat-flat-button\n mat-dialog-close\n >\n Cancel\n </button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], preserveWhitespaces: true });
|
|
51
|
-
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocationDeleteButtonComponent, decorators: [{
|
|
53
|
-
type: Component,
|
|
54
|
-
args: [{ selector: 'app-location-delete-button', standalone: true, imports: [
|
|
55
|
-
MatButton,
|
|
56
|
-
MatDialogActions,
|
|
57
|
-
MatDialogClose,
|
|
58
|
-
MatDialogContent,
|
|
59
|
-
MatDialogTitle,
|
|
60
|
-
MatIcon,
|
|
61
|
-
NgIf
|
|
62
|
-
], template: "<mat-icon\n *ngIf=\"model?.client_id === user?.client_id\"\n class=\"cursor-pointer text-dark\"\n (click)=\"showDeleteDialog(deleteConfirmDialog)\"\n>\n delete\n</mat-icon>\n\n<ng-template #deleteConfirmDialog>\n <h3 mat-dialog-title>Delete Location</h3>\n <div mat-dialog-content>\n Are you sure? You want to delete the location\n <strong>{{ model?.title }}</strong> ?\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-1 mb-2\">\n <button\n [disabled]=\"isDeleting\"\n type=\"button\"\n mat-raised-button\n color=\"warn\"\n (click)=\"delete()\"\n >\n Delete\n </button>\n <button\n [disabled]=\"isDeleting\"\n type=\"button\"\n mat-flat-button\n mat-dialog-close\n >\n Cancel\n </button>\n </div>\n</ng-template>\n" }]
|
|
63
|
-
}], ctorParameters: () => [{ type: i1.MatDialog }, { type: i2.LocationService }, { type: i3.AlertService }, { type: i3.CredentialsService }], propDecorators: { model: [{
|
|
64
|
-
type: Input
|
|
65
|
-
}], deleted: [{
|
|
66
|
-
type: Output
|
|
67
|
-
}] } });
|
|
68
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYXRpb24tZGVsZXRlLWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9pbnZlbnRvcnktY29tbW9uL3NyYy9saWIvaW52ZW50b3J5LWNvbW1vbi9sb2NhdGlvbi9sb2NhdGlvbi1kZWxldGUtYnV0dG9uL2xvY2F0aW9uLWRlbGV0ZS1idXR0b24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvaW52ZW50b3J5LWNvbW1vbi9zcmMvbGliL2ludmVudG9yeS1jb21tb24vbG9jYXRpb24vbG9jYXRpb24tZGVsZXRlLWJ1dHRvbi9sb2NhdGlvbi1kZWxldGUtYnV0dG9uLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQWMsTUFBTSxlQUFlLENBQUM7QUFDbEYsT0FBTyxFQUFZLGdCQUFnQixFQUFFLGNBQWMsRUFBRSxnQkFBZ0IsRUFBRSxjQUFjLEVBQUMsTUFBTSwwQkFBMEIsQ0FBQztBQUV2SCxPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sMEJBQTBCLENBQUM7QUFDbkQsT0FBTyxFQUFDLE9BQU8sRUFBQyxNQUFNLHdCQUF3QixDQUF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
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import { MatDialogActions, MatDialogClose, MatDialogContent, MatDialogTitle } from '@angular/material/dialog';
|
|
3
|
-
import { MatButton } from '@angular/material/button';
|
|
4
|
-
import { MatIcon } from '@angular/material/icon';
|
|
5
|
-
import { NgIf } from '@angular/common';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "@angular/material/dialog";
|
|
8
|
-
import * as i2 from "../shelf.service";
|
|
9
|
-
import * as i3 from "ngx-techlify-core";
|
|
10
|
-
export class ShelfDeleteButtonComponent {
|
|
11
|
-
matDialog;
|
|
12
|
-
service;
|
|
13
|
-
alertService;
|
|
14
|
-
credentialsService;
|
|
15
|
-
model;
|
|
16
|
-
deleted = new EventEmitter();
|
|
17
|
-
isDeleting;
|
|
18
|
-
user;
|
|
19
|
-
constructor(matDialog, service, alertService, credentialsService) {
|
|
20
|
-
this.matDialog = matDialog;
|
|
21
|
-
this.service = service;
|
|
22
|
-
this.alertService = alertService;
|
|
23
|
-
this.credentialsService = credentialsService;
|
|
24
|
-
this.user = this.credentialsService.credentials?.user;
|
|
25
|
-
}
|
|
26
|
-
delete() {
|
|
27
|
-
this.isDeleting = true;
|
|
28
|
-
this.service.delete(this.model).subscribe({
|
|
29
|
-
next: () => {
|
|
30
|
-
this.deleted.emit();
|
|
31
|
-
this.isDeleting = false;
|
|
32
|
-
this.matDialog.closeAll();
|
|
33
|
-
this.alertService.addAlert('Shelf deleted successfully!', 'success');
|
|
34
|
-
},
|
|
35
|
-
error: () => (this.isDeleting = false)
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
showDeleteDialog(templateRef) {
|
|
39
|
-
this.matDialog.open(templateRef, { width: '500px' });
|
|
40
|
-
}
|
|
41
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ShelfDeleteButtonComponent, deps: [{ token: i1.MatDialog }, { token: i2.ShelfService }, { token: i3.AlertService }, { token: i3.CredentialsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
42
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ShelfDeleteButtonComponent, isStandalone: true, selector: "app-shelf-delete-button", inputs: { model: "model" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<mat-icon\n *ngIf=\"model?.client_id === user?.client_id\"\n class=\"cursor-pointer\"\n (click)=\"showDeleteDialog(deleteConfirmDialog)\"\n>\n delete\n</mat-icon>\n\n<ng-template #deleteConfirmDialog>\n <h3 mat-dialog-title>Delete Shelf</h3>\n <div mat-dialog-content>\n Are you sure? You want to delete the shelf\n <strong>{{ model?.title }}</strong> ?\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-1 mb-2\">\n <button [disabled]=\"isDeleting\" type=\"button\" mat-raised-button color=\"warn\" (click)=\"delete()\">\n Delete\n </button>\n <button [disabled]=\"isDeleting\" type=\"button\" mat-flat-button mat-dialog-close>\n Cancel\n </button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], preserveWhitespaces: true });
|
|
43
|
-
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ShelfDeleteButtonComponent, decorators: [{
|
|
45
|
-
type: Component,
|
|
46
|
-
args: [{ selector: 'app-shelf-delete-button', standalone: true, imports: [
|
|
47
|
-
MatButton,
|
|
48
|
-
MatDialogActions,
|
|
49
|
-
MatDialogClose,
|
|
50
|
-
MatDialogContent,
|
|
51
|
-
MatDialogTitle,
|
|
52
|
-
MatIcon,
|
|
53
|
-
NgIf
|
|
54
|
-
], template: "<mat-icon\n *ngIf=\"model?.client_id === user?.client_id\"\n class=\"cursor-pointer\"\n (click)=\"showDeleteDialog(deleteConfirmDialog)\"\n>\n delete\n</mat-icon>\n\n<ng-template #deleteConfirmDialog>\n <h3 mat-dialog-title>Delete Shelf</h3>\n <div mat-dialog-content>\n Are you sure? You want to delete the shelf\n <strong>{{ model?.title }}</strong> ?\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end gap-1 mb-2\">\n <button [disabled]=\"isDeleting\" type=\"button\" mat-raised-button color=\"warn\" (click)=\"delete()\">\n Delete\n </button>\n <button [disabled]=\"isDeleting\" type=\"button\" mat-flat-button mat-dialog-close>\n Cancel\n </button>\n </div>\n</ng-template>\n" }]
|
|
55
|
-
}], ctorParameters: () => [{ type: i1.MatDialog }, { type: i2.ShelfService }, { type: i3.AlertService }, { type: i3.CredentialsService }], propDecorators: { model: [{
|
|
56
|
-
type: Input
|
|
57
|
-
}], deleted: [{
|
|
58
|
-
type: Output
|
|
59
|
-
}] } });
|
|
60
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hlbGYtZGVsZXRlLWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9p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