techlify-inventory-common 18.46.0 → 18.48.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.
Files changed (62) hide show
  1. package/esm2022/lib/inventory-common/inventory-common-routing.module.mjs +5 -1
  2. package/esm2022/lib/inventory-common/location/location-selector/location-selector.component.mjs +5 -4
  3. package/esm2022/lib/inventory-common/recipient/recipient-form/recipient-form.component.mjs +59 -0
  4. package/esm2022/lib/inventory-common/recipient/recipient-list/recipient-list.component.mjs +49 -0
  5. package/esm2022/lib/inventory-common/recipient/recipient-routing.module.mjs +24 -0
  6. package/esm2022/lib/inventory-common/recipient/recipient.module.mjs +18 -0
  7. package/esm2022/lib/inventory-common/recipient/recipient.service.mjs +18 -0
  8. package/esm2022/lib/inventory-common/reports/stock-issue-summary-report/stock-issue-summary-report.component.mjs +31 -32
  9. package/esm2022/lib/inventory-common/shared.module.mjs +9 -2
  10. package/esm2022/lib/inventory-common/stock-allocation/stock-allocation-list/stock-allocation-list.component.mjs +81 -0
  11. package/esm2022/lib/inventory-common/stock-allocation/stock-allocation.service.mjs +16 -0
  12. package/esm2022/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.mjs +29 -19
  13. package/esm2022/lib/inventory-common/stock-issue/stock-issue-list/stock-issue-list.component.mjs +6 -7
  14. package/esm2022/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.component.mjs +3 -3
  15. package/esm2022/lib/inventory-common/stock-issue/stock-issue-product-form/stock-issue-product-form.component.mjs +6 -6
  16. package/esm2022/lib/inventory-common/stock-issue/stock-issue-product-view/stock-issue-product-view.component.mjs +59 -0
  17. package/esm2022/lib/inventory-common/stock-issue/stock-issue-products-list/stock-issue-products-list.component.mjs +7 -7
  18. package/esm2022/lib/inventory-common/stock-issue/stock-issue-routing.module.mjs +6 -1
  19. package/esm2022/lib/inventory-common/stock-issue/stock-issue-single-product-form/stock-issue-single-product-form.component.mjs +38 -17
  20. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.component.mjs +2 -2
  21. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-list/stock-receipt-list.component.mjs +5 -5
  22. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-list/stock-receipt-product-list.component.mjs +7 -7
  23. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-view/stock-receipt-product-view.component.mjs +59 -0
  24. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-single-product-form/stock-receipt-simple-form/stock-receipt-single-product-form.component.mjs +2 -2
  25. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-routing.module.mjs +6 -1
  26. package/fesm2022/{techlify-inventory-common-category.module-9eluHVhx.mjs → techlify-inventory-common-category.module-VjAS4ehQ.mjs} +16 -16
  27. package/fesm2022/{techlify-inventory-common-category.module-9eluHVhx.mjs.map → techlify-inventory-common-category.module-VjAS4ehQ.mjs.map} +1 -1
  28. package/fesm2022/{techlify-inventory-common-purchase-order-view.component-B1Ur9tgz.mjs → techlify-inventory-common-purchase-order-view.component-D5GrUK-m.mjs} +13 -13
  29. package/fesm2022/{techlify-inventory-common-purchase-order-view.component-B1Ur9tgz.mjs.map → techlify-inventory-common-purchase-order-view.component-D5GrUK-m.mjs.map} +1 -1
  30. package/fesm2022/techlify-inventory-common-recipient.module-BnRAWk8N.mjs +147 -0
  31. package/fesm2022/techlify-inventory-common-recipient.module-BnRAWk8N.mjs.map +1 -0
  32. package/fesm2022/techlify-inventory-common-stock-issue-form.component-B-aNyhLA.mjs +194 -0
  33. package/fesm2022/techlify-inventory-common-stock-issue-form.component-B-aNyhLA.mjs.map +1 -0
  34. package/fesm2022/techlify-inventory-common-stock-issue-product-view.component-BP2yFaQn.mjs +60 -0
  35. package/fesm2022/techlify-inventory-common-stock-issue-product-view.component-BP2yFaQn.mjs.map +1 -0
  36. package/fesm2022/{techlify-inventory-common-stock-issue-view.component-BNF8oAum.mjs → techlify-inventory-common-stock-issue-view.component-DHdnoIR8.mjs} +9 -9
  37. package/fesm2022/{techlify-inventory-common-stock-issue-view.component-BNF8oAum.mjs.map → techlify-inventory-common-stock-issue-view.component-DHdnoIR8.mjs.map} +1 -1
  38. package/fesm2022/{techlify-inventory-common-techlify-inventory-common-D78OQ65o.mjs → techlify-inventory-common-techlify-inventory-common-DuAN6iqX.mjs} +444 -279
  39. package/fesm2022/techlify-inventory-common-techlify-inventory-common-DuAN6iqX.mjs.map +1 -0
  40. package/fesm2022/techlify-inventory-common.mjs +1 -1
  41. package/lib/inventory-common/location/location-selector/location-selector.component.d.ts +2 -1
  42. package/lib/inventory-common/recipient/recipient-form/recipient-form.component.d.ts +21 -0
  43. package/lib/inventory-common/recipient/recipient-list/recipient-list.component.d.ts +16 -0
  44. package/lib/inventory-common/recipient/recipient-routing.module.d.ts +7 -0
  45. package/lib/inventory-common/recipient/recipient.module.d.ts +9 -0
  46. package/lib/inventory-common/recipient/recipient.service.d.ts +7 -0
  47. package/lib/inventory-common/reports/stock-issue-summary-report/stock-issue-summary-report.component.d.ts +4 -10
  48. package/lib/inventory-common/shared.module.d.ts +4 -3
  49. package/lib/inventory-common/stock-allocation/stock-allocation-list/stock-allocation-list.component.d.ts +19 -0
  50. package/lib/inventory-common/stock-allocation/stock-allocation.service.d.ts +7 -0
  51. package/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.d.ts +5 -3
  52. package/lib/inventory-common/stock-issue/stock-issue-list/stock-issue-list.component.d.ts +2 -2
  53. package/lib/inventory-common/stock-issue/stock-issue-product-view/stock-issue-product-view.component.d.ts +19 -0
  54. package/lib/inventory-common/stock-issue/stock-issue-products-list/stock-issue-products-list.component.d.ts +2 -2
  55. package/lib/inventory-common/stock-issue/stock-issue-single-product-form/stock-issue-single-product-form.component.d.ts +5 -3
  56. package/lib/inventory-common/stock-receipts/stock-receipt-list/stock-receipt-list.component.d.ts +2 -2
  57. package/lib/inventory-common/stock-receipts/stock-receipt-product-list/stock-receipt-product-list.component.d.ts +2 -2
  58. package/lib/inventory-common/stock-receipts/stock-receipt-product-view/stock-receipt-product-view.component.d.ts +19 -0
  59. package/package.json +1 -1
  60. package/fesm2022/techlify-inventory-common-stock-issue-form.component-CaLMvUGF.mjs +0 -183
  61. package/fesm2022/techlify-inventory-common-stock-issue-form.component-CaLMvUGF.mjs.map +0 -1
  62. package/fesm2022/techlify-inventory-common-techlify-inventory-common-D78OQ65o.mjs.map +0 -1
@@ -1,2 +1,2 @@
1
- export { a8 as ExportToExcelButtonComponent, a2 as IncidentFormButtonComponent, a1 as IncidentFormComponent, a0 as IncidentListComponent, _ as IncidentModule, $ as IncidentService, c as InventoryCommonModule, I as InventoryCommonRoutingModule, ac as LocationFormButtonComponent, ab as LocationFormComponent, aa as LocationListComponent, a9 as LocationModule, L as LocationService, O as MeasureModule, Q as MeasureService, Z as PayeeSelectorComponent, Y as PayeeSelectorModule, g as ProductBasicInfoComponent, o as ProductBatchUpdateFormComponent, h as ProductFormButtonComponent, f as ProductFormComponent, n as ProductFormService, p as ProductImportPageComponent, l as ProductListComponent, e as ProductModule, i as ProductQuickSearchComponent, k as ProductSearchComponent, j as ProductSearchModule, m as ProductService, q as ProductViewPageComponent, a7 as RatingFormButtonComponent, a6 as RatingFormComponent, a5 as RatingListComponent, a3 as RatingModule, a4 as RatingService, ah as ShelfFormButtonComponent, ag as ShelfFormComponent, af as ShelfListComponent, ad as ShelfModule, ae as ShelfService, v as StockIssueListComponent, r as StockIssueModule, s as StockIssuePageComponent, t as StockIssuePageModule, z as StockIssueProductFormButtonComponent, y as StockIssueProductFormComponent, w as StockIssueProductListComponent, x as StockIssueProductService, u as StockIssueSingleProductFormComponent, C as StockReceiptListComponent, B as StockReceiptPageComponent, H as StockReceiptProductFormButtonComponent, G as StockReceiptProductFormComponent, D as StockReceiptProductsListComponent, E as StockReceiptSingleProductFormComponent, F as StockReceiptViewComponent, A as StockReceiptsModule, d as StockSummaryService, K as StockTransferFormComponent, J as StockTransferListComponent, N as StockTransferService, U as SupplierFormButtonComponent, V as SupplierFormComponent, R as SupplierModule, X as SupplierTypeService, W as SuppliersListComponent, T as TechlifyFilterComponent, a as TechlifyFilterModule } from './techlify-inventory-common-techlify-inventory-common-D78OQ65o.mjs';
1
+ export { aa as ExportToExcelButtonComponent, a4 as IncidentFormButtonComponent, a3 as IncidentFormComponent, a2 as IncidentListComponent, a0 as IncidentModule, a1 as IncidentService, f as InventoryCommonModule, I as InventoryCommonRoutingModule, ae as LocationFormButtonComponent, ad as LocationFormComponent, ac as LocationListComponent, ab as LocationModule, L as LocationService, R as MeasureModule, U as MeasureService, $ as PayeeSelectorComponent, _ as PayeeSelectorModule, j as ProductBasicInfoComponent, r as ProductBatchUpdateFormComponent, k as ProductFormButtonComponent, i as ProductFormComponent, q as ProductFormService, s as ProductImportPageComponent, o as ProductListComponent, h as ProductModule, l as ProductQuickSearchComponent, n as ProductSearchComponent, m as ProductSearchModule, p as ProductService, t as ProductViewPageComponent, a9 as RatingFormButtonComponent, a8 as RatingFormComponent, a7 as RatingListComponent, a5 as RatingModule, a6 as RatingService, aj as ShelfFormButtonComponent, ai as ShelfFormComponent, ah as ShelfListComponent, af as ShelfModule, ag as ShelfService, y as StockIssueListComponent, u as StockIssueModule, v as StockIssuePageComponent, w as StockIssuePageModule, B as StockIssueProductFormButtonComponent, A as StockIssueProductFormComponent, z as StockIssueProductListComponent, d as StockIssueProductService, x as StockIssueSingleProductFormComponent, E as StockReceiptListComponent, D as StockReceiptPageComponent, K as StockReceiptProductFormButtonComponent, J as StockReceiptProductFormComponent, F as StockReceiptProductsListComponent, G as StockReceiptSingleProductFormComponent, H as StockReceiptViewComponent, C as StockReceiptsModule, g as StockSummaryService, O as StockTransferFormComponent, N as StockTransferListComponent, Q as StockTransferService, W as SupplierFormButtonComponent, X as SupplierFormComponent, V as SupplierModule, Z as SupplierTypeService, Y as SuppliersListComponent, T as TechlifyFilterComponent, a as TechlifyFilterModule } from './techlify-inventory-common-techlify-inventory-common-DuAN6iqX.mjs';
2
2
  //# sourceMappingURL=techlify-inventory-common.mjs.map
@@ -16,6 +16,7 @@ export declare class LocationSelectorComponent implements ControlValueAccessor,
16
16
  appearance: import("@angular/core").InputSignal<MatFormFieldAppearance>;
17
17
  label: import("@angular/core").InputSignal<string>;
18
18
  placeholder: import("@angular/core").InputSignal<string>;
19
+ hint: import("@angular/core").InputSignal<string | undefined>;
19
20
  includeNone: import("@angular/core").InputSignal<boolean>;
20
21
  isSubLocationEnabled: import("@angular/core").WritableSignal<boolean>;
21
22
  locations: HierarchicalLocation[];
@@ -40,6 +41,6 @@ export declare class LocationSelectorComponent implements ControlValueAccessor,
40
41
  registerOnTouched(fn: () => void): void;
41
42
  setDisabledState(isDisabled: boolean): void;
42
43
  static ɵfac: i0.ɵɵFactoryDeclaration<LocationSelectorComponent, 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>;
44
+ 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; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "includeNone": { "alias": "includeNone"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
44
45
  }
45
46
  export {};
@@ -0,0 +1,21 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormBuilder } from '@angular/forms';
3
+ import { MatDialogRef } from '@angular/material/dialog';
4
+ import { FormValidatorService, TechlifyFormComponent } from 'ngx-techlify-core';
5
+ import { RecipientService } from '../recipient.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class RecipientFormComponent extends TechlifyFormComponent implements OnInit {
8
+ protected formValidatorService: FormValidatorService;
9
+ private formBuilder;
10
+ protected service: RecipientService;
11
+ dialogRef: MatDialogRef<RecipientFormComponent>;
12
+ data: {
13
+ model?: any;
14
+ };
15
+ constructor(formValidatorService: FormValidatorService, formBuilder: FormBuilder, service: RecipientService, dialogRef: MatDialogRef<RecipientFormComponent>, data: {
16
+ model?: any;
17
+ });
18
+ ngOnInit(): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<RecipientFormComponent, [null, null, null, null, { optional: true; }]>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<RecipientFormComponent, "app-recipient-form", never, {}, {}, never, never, true, never>;
21
+ }
@@ -0,0 +1,16 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormBuilder } from '@angular/forms';
3
+ import { TechlifyListComponent } from 'ngx-techlify-core';
4
+ import { RecipientService } from '../recipient.service';
5
+ import { RecipientFormComponent } from '../recipient-form/recipient-form.component';
6
+ import * as i0 from "@angular/core";
7
+ export declare class RecipientListComponent extends TechlifyListComponent implements OnInit {
8
+ private fb;
9
+ protected service: RecipientService;
10
+ recipientForm: import("@angular/core").WritableSignal<typeof RecipientFormComponent>;
11
+ displayedColumns: string[];
12
+ constructor(fb: FormBuilder, service: RecipientService);
13
+ ngOnInit(): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<RecipientListComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<RecipientListComponent, "app-recipient-list", never, {}, {}, never, never, false, never>;
16
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@angular/router";
3
+ export declare class RecipientRoutingModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<RecipientRoutingModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RecipientRoutingModule, never, [typeof i1.RouterModule], [typeof i1.RouterModule]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<RecipientRoutingModule>;
7
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./recipient-list/recipient-list.component";
3
+ import * as i2 from "./recipient-routing.module";
4
+ import * as i3 from "../shared.module";
5
+ export declare class RecipientModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<RecipientModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RecipientModule, [typeof i1.RecipientListComponent], [typeof i2.RecipientRoutingModule, typeof i3.SharedModule], never>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<RecipientModule>;
9
+ }
@@ -0,0 +1,7 @@
1
+ import { HttpService, TechlifyService } from 'ngx-techlify-core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RecipientService extends TechlifyService {
4
+ constructor(httpService: HttpService);
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<RecipientService, never>;
6
+ static ɵprov: i0.ɵɵInjectableDeclaration<RecipientService>;
7
+ }
@@ -3,8 +3,9 @@ import { TechlifyListComponent } from 'ngx-techlify-core';
3
3
  import { StockIssueProductDataService } from './stock-issue-product-data.service';
4
4
  import { FormBuilder } from '@angular/forms';
5
5
  import * as i0 from "@angular/core";
6
- interface LocationGroup {
7
- location: any;
6
+ interface PrimaryGroup {
7
+ id: number | null;
8
+ label: string;
8
9
  models: any[];
9
10
  grand_total_quantity: number;
10
11
  grand_total_avco: number;
@@ -14,16 +15,9 @@ export declare class StockIssueSummaryReportComponent extends TechlifyListCompon
14
15
  protected service: StockIssueProductDataService;
15
16
  private fb;
16
17
  displayedColumns: string[];
17
- locationGroups: import("@angular/core").WritableSignal<LocationGroup[]>;
18
- selectedLocations: any[];
18
+ primaryGroups: import("@angular/core").WritableSignal<PrimaryGroup[]>;
19
19
  constructor(service: StockIssueProductDataService, fb: FormBuilder);
20
20
  ngOnInit(): void;
21
- onLocationsChange(locations: any[]): void;
22
- /**
23
- * For each selected location we hit the API once, so every location gets its
24
- * own aggregated result set (and its own table). Data is only loaded once at
25
- * least one location is selected.
26
- */
27
21
  loadData(): void;
28
22
  static ɵfac: i0.ɵɵFactoryDeclaration<StockIssueSummaryReportComponent, never>;
29
23
  static ɵcmp: i0.ɵɵComponentDeclaration<StockIssueSummaryReportComponent, "app-stock-issue-summary-report", never, {}, {}, never, never, true, never>;
@@ -3,10 +3,11 @@ import * as i1 from "ngx-techlify-core";
3
3
  import * as i2 from "ngx-infinite-scroll";
4
4
  import * as i3 from "@angular/common";
5
5
  import * as i4 from "./material.module";
6
- import * as i5 from "@angular/forms";
7
- import * as i6 from "@angular/router";
6
+ import * as i5 from "ngx-permissions";
7
+ import * as i6 from "@angular/forms";
8
+ import * as i7 from "@angular/router";
8
9
  export declare class SharedModule {
9
10
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, never, [typeof i1.TechlifyDeleteButtonComponent, typeof i1.TechlifyFormButtonComponent, typeof i2.InfiniteScrollDirective], [typeof i3.CommonModule, typeof i2.InfiniteScrollDirective, typeof i4.MaterialModule, typeof i5.ReactiveFormsModule, typeof i6.RouterModule, typeof i1.SearchableSelectorModule, typeof i1.TechlifyDeleteButtonComponent, typeof i1.TechlifyFormButtonComponent, typeof i1.TechlifyIconModule, typeof i1.TimelineFilterModule]>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, never, [typeof i1.TechlifyDeleteButtonComponent, typeof i1.TechlifyFormButtonComponent, typeof i2.InfiniteScrollDirective], [typeof i3.CommonModule, typeof i1.FormConfigurationForFormModule, typeof i2.InfiniteScrollDirective, typeof i4.MaterialModule, typeof i5.NgxPermissionsModule, typeof i6.ReactiveFormsModule, typeof i7.RouterModule, typeof i1.SearchableSelectorModule, typeof i1.TechlifyDeleteButtonComponent, typeof i1.TechlifyFormButtonComponent, typeof i1.TechlifyIconModule, typeof i1.TimelineFilterModule]>;
11
12
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedModule>;
12
13
  }
@@ -0,0 +1,19 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormBuilder } from '@angular/forms';
3
+ import { ColumnConfig, TechlifyListComponent } from 'ngx-techlify-core';
4
+ import { StockAllocationService } from '../stock-allocation.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class StockAllocationListComponent extends TechlifyListComponent implements OnInit {
7
+ protected service: StockAllocationService;
8
+ private formBuilder;
9
+ stockIssueProductId: import("@angular/core").InputSignal<number | null>;
10
+ stockReceiptProductId: import("@angular/core").InputSignal<number | null>;
11
+ selectedColumns: import("@angular/core").ModelSignal<ColumnConfig[]>;
12
+ columnConfig: ColumnConfig[];
13
+ get displayedColumns(): string[];
14
+ constructor(service: StockAllocationService, formBuilder: FormBuilder);
15
+ ngOnInit(): void;
16
+ loadData(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<StockAllocationListComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<StockAllocationListComponent, "app-stock-allocation-list", never, { "stockIssueProductId": { "alias": "stockIssueProductId"; "required": false; "isSignal": true; }; "stockReceiptProductId": { "alias": "stockReceiptProductId"; "required": false; "isSignal": true; }; "selectedColumns": { "alias": "selectedColumns"; "required": false; "isSignal": true; }; }, { "selectedColumns": "selectedColumnsChange"; }, never, never, true, never>;
19
+ }
@@ -0,0 +1,7 @@
1
+ import { HttpService, TechlifyService } from 'ngx-techlify-core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class StockAllocationService extends TechlifyService {
4
+ constructor(httpService: HttpService);
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<StockAllocationService, never>;
6
+ static ɵprov: i0.ɵɵInjectableDeclaration<StockAllocationService>;
7
+ }
@@ -1,6 +1,6 @@
1
1
  import { OnInit } from "@angular/core";
2
2
  import { FormArray, FormBuilder } from '@angular/forms';
3
- import { FormValidatorService, TechlifyFormComponent } from "ngx-techlify-core";
3
+ import { FormConfigurationFormService, FormConfigurationUtilityService, FormValidatorService, TechlifyFormComponent } from "ngx-techlify-core";
4
4
  import { Location } from '@angular/common';
5
5
  import { StockIssueService } from '../stock-issue.service';
6
6
  import { ActivatedRoute } from '@angular/router';
@@ -13,20 +13,22 @@ export declare class StockIssueFormComponent extends TechlifyFormComponent imple
13
13
  private route;
14
14
  private locationService;
15
15
  private location;
16
+ private formConfigService;
16
17
  locationCount: import("@angular/core").WritableSignal<number>;
17
18
  stockIssue: import("@angular/core").WritableSignal<any>;
18
19
  issuableData: import("@angular/core").WritableSignal<{
19
20
  issuable_type: String;
20
21
  issuable_id: number;
21
22
  } | null>;
22
- constructor(formValidatorService: FormValidatorService, fb: FormBuilder, stockIssueService: StockIssueService, route: ActivatedRoute, locationService: LocationService, location: Location);
23
+ formConfigurationUtilityService: FormConfigurationUtilityService;
24
+ constructor(formValidatorService: FormValidatorService, fb: FormBuilder, stockIssueService: StockIssueService, route: ActivatedRoute, locationService: LocationService, location: Location, formConfigService: FormConfigurationFormService);
23
25
  ngOnInit(): void;
24
26
  private loadStockIssue;
25
27
  get stockIssueProducts(): FormArray;
26
28
  createStockIssueProduct(): import("@angular/forms").FormGroup<{
27
29
  id: import("@angular/forms").FormControl<string | null>;
28
30
  product_id: import("@angular/forms").FormControl<string | null>;
29
- location_id: import("@angular/forms").FormControl<string | null>;
31
+ location_from_id: import("@angular/forms").FormControl<string | null>;
30
32
  quantity: import("@angular/forms").FormControl<number | null>;
31
33
  particulars: import("@angular/forms").FormControl<string | null>;
32
34
  issuable_id: import("@angular/forms").FormControl<string | number | null>;
@@ -9,7 +9,7 @@ export declare class StockIssueListComponent extends TechlifyListComponent imple
9
9
  private formBuilder;
10
10
  private router;
11
11
  private featureService;
12
- filters: import("@angular/core").InputSignal<any>;
12
+ filtersInput: import("@angular/core").InputSignal<any>;
13
13
  selectedColumns: import("@angular/core").InputSignal<ColumnConfig[]>;
14
14
  exportInProgress: import("@angular/core").InputSignal<boolean>;
15
15
  listUpdated: import("@angular/core").OutputEmitterRef<any>;
@@ -29,5 +29,5 @@ export declare class StockIssueListComponent extends TechlifyListComponent imple
29
29
  private loadFeatures;
30
30
  redirectToView(model: any): void;
31
31
  static ɵfac: i0.ɵɵFactoryDeclaration<StockIssueListComponent, never>;
32
- static ɵcmp: i0.ɵɵComponentDeclaration<StockIssueListComponent, "app-stock-issue-list", never, { "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "selectedColumns": { "alias": "selectedColumns"; "required": false; "isSignal": true; }; "exportInProgress": { "alias": "exportInProgress"; "required": false; "isSignal": true; }; "issuableData": { "alias": "issuableData"; "required": false; "isSignal": true; }; }, { "listUpdated": "listUpdated"; "columnConfigReady": "columnConfigReady"; }, never, never, false, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<StockIssueListComponent, "app-stock-issue-list", never, { "filtersInput": { "alias": "filters"; "required": false; "isSignal": true; }; "selectedColumns": { "alias": "selectedColumns"; "required": false; "isSignal": true; }; "exportInProgress": { "alias": "exportInProgress"; "required": false; "isSignal": true; }; "issuableData": { "alias": "issuableData"; "required": false; "isSignal": true; }; }, { "listUpdated": "listUpdated"; "columnConfigReady": "columnConfigReady"; }, never, never, false, never>;
33
33
  }
@@ -0,0 +1,19 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { Location } from '@angular/common';
3
+ import { ActivatedRoute } from '@angular/router';
4
+ import { StockIssueProductService } from '../stock-issue-product.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class StockIssueProductViewComponent implements OnInit {
7
+ private activatedRoute;
8
+ protected service: StockIssueProductService;
9
+ private location;
10
+ id: number;
11
+ isLoading: boolean;
12
+ model: any;
13
+ constructor(activatedRoute: ActivatedRoute, service: StockIssueProductService, location: Location);
14
+ ngOnInit(): void;
15
+ loadData(): void;
16
+ redirectBack(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<StockIssueProductViewComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<StockIssueProductViewComponent, "app-stock-issue-product-view", never, {}, {}, never, never, true, never>;
19
+ }
@@ -11,7 +11,7 @@ export declare class StockIssueProductListComponent extends TechlifyListComponen
11
11
  private formBuilder;
12
12
  private featureService;
13
13
  private datePipe;
14
- filters: import("@angular/core").InputSignal<any>;
14
+ filtersInput: import("@angular/core").InputSignal<any>;
15
15
  isProductView: import("@angular/core").InputSignal<boolean>;
16
16
  product: import("@angular/core").InputSignal<any>;
17
17
  stockIssueSingleProductForm: import("@angular/core").WritableSignal<typeof StockIssueSingleProductFormComponent>;
@@ -36,5 +36,5 @@ export declare class StockIssueProductListComponent extends TechlifyListComponen
36
36
  loadData(): void;
37
37
  private loadFeatures;
38
38
  static ɵfac: i0.ɵɵFactoryDeclaration<StockIssueProductListComponent, never>;
39
- static ɵcmp: i0.ɵɵComponentDeclaration<StockIssueProductListComponent, "app-stock-issue-products-list", never, { "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "isProductView": { "alias": "isProductView"; "required": false; "isSignal": true; }; "product": { "alias": "product"; "required": false; "isSignal": true; }; "selectedColumns": { "alias": "selectedColumns"; "required": false; "isSignal": true; }; "exportInProgress": { "alias": "exportInProgress"; "required": false; "isSignal": true; }; "issuableData": { "alias": "issuableData"; "required": false; "isSignal": true; }; }, { "selectedColumns": "selectedColumnsChange"; "listUpdated": "listUpdated"; "columnConfigReady": "columnConfigReady"; }, never, never, false, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<StockIssueProductListComponent, "app-stock-issue-products-list", never, { "filtersInput": { "alias": "filters"; "required": false; "isSignal": true; }; "isProductView": { "alias": "isProductView"; "required": false; "isSignal": true; }; "product": { "alias": "product"; "required": false; "isSignal": true; }; "selectedColumns": { "alias": "selectedColumns"; "required": false; "isSignal": true; }; "exportInProgress": { "alias": "exportInProgress"; "required": false; "isSignal": true; }; "issuableData": { "alias": "issuableData"; "required": false; "isSignal": true; }; }, { "selectedColumns": "selectedColumnsChange"; "listUpdated": "listUpdated"; "columnConfigReady": "columnConfigReady"; }, never, never, false, never>;
40
40
  }
@@ -1,5 +1,5 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { DateUtils, FormValidatorService, SearchableSelectorComponent, TechlifyFormComponent } from 'ngx-techlify-core';
2
+ import { DateUtils, FormConfigurationFormService, FormConfigurationUtilityService, FormValidatorService, SearchableSelectorComponent, TechlifyFormComponent } from 'ngx-techlify-core';
3
3
  import { FormBuilder } from '@angular/forms';
4
4
  import { MatDialogRef } from '@angular/material/dialog';
5
5
  import { StockIssueService } from '../stock-issue.service';
@@ -11,6 +11,7 @@ export declare class StockIssueSingleProductFormComponent extends TechlifyFormCo
11
11
  private formBuilder;
12
12
  private dateUtils;
13
13
  private locationService;
14
+ private formConfigService;
14
15
  dialogRef: MatDialogRef<StockIssueSingleProductFormComponent>;
15
16
  data: {
16
17
  model?: any;
@@ -22,7 +23,8 @@ export declare class StockIssueSingleProductFormComponent extends TechlifyFormCo
22
23
  private locationsCountValue;
23
24
  batchesApiUrl: string;
24
25
  isBatchPatched: boolean;
25
- constructor(formValidatorService: FormValidatorService, service: StockIssueService, formBuilder: FormBuilder, dateUtils: DateUtils, locationService: LocationService, dialogRef: MatDialogRef<StockIssueSingleProductFormComponent>, data: {
26
+ formConfigurationUtilityService: FormConfigurationUtilityService;
27
+ constructor(formValidatorService: FormValidatorService, service: StockIssueService, formBuilder: FormBuilder, dateUtils: DateUtils, locationService: LocationService, formConfigService: FormConfigurationFormService, dialogRef: MatDialogRef<StockIssueSingleProductFormComponent>, data: {
26
28
  model?: any;
27
29
  product?: any;
28
30
  });
@@ -35,6 +37,6 @@ export declare class StockIssueSingleProductFormComponent extends TechlifyFormCo
35
37
  onProductChange(product: any): void;
36
38
  onBatchItemsChange(): void;
37
39
  private resetBatchSelector;
38
- static ɵfac: i0.ɵɵFactoryDeclaration<StockIssueSingleProductFormComponent, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<StockIssueSingleProductFormComponent, [null, null, null, null, null, null, { optional: true; }, { optional: true; }]>;
39
41
  static ɵcmp: i0.ɵɵComponentDeclaration<StockIssueSingleProductFormComponent, "app-stock-issue-single-product-form", never, {}, {}, never, never, true, never>;
40
42
  }
@@ -9,7 +9,7 @@ export declare class StockReceiptListComponent extends TechlifyListComponent imp
9
9
  private formBuilder;
10
10
  private router;
11
11
  private featureService;
12
- filters: import("@angular/core").InputSignal<any>;
12
+ filtersInput: import("@angular/core").InputSignal<any>;
13
13
  selectedColumns: import("@angular/core").InputSignal<ColumnConfig[]>;
14
14
  exportInProgress: import("@angular/core").InputSignal<boolean>;
15
15
  listUpdated: import("@angular/core").OutputEmitterRef<any>;
@@ -26,5 +26,5 @@ export declare class StockReceiptListComponent extends TechlifyListComponent imp
26
26
  redirectToView(model: any): void;
27
27
  getStockReceiptDeleteTitle(model: any): string;
28
28
  static ɵfac: i0.ɵɵFactoryDeclaration<StockReceiptListComponent, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<StockReceiptListComponent, "app-stock-receipt-list", never, { "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "selectedColumns": { "alias": "selectedColumns"; "required": false; "isSignal": true; }; "exportInProgress": { "alias": "exportInProgress"; "required": false; "isSignal": true; }; }, { "listUpdated": "listUpdated"; "columnConfigReady": "columnConfigReady"; }, never, never, false, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<StockReceiptListComponent, "app-stock-receipt-list", never, { "filtersInput": { "alias": "filters"; "required": false; "isSignal": true; }; "selectedColumns": { "alias": "selectedColumns"; "required": false; "isSignal": true; }; "exportInProgress": { "alias": "exportInProgress"; "required": false; "isSignal": true; }; }, { "listUpdated": "listUpdated"; "columnConfigReady": "columnConfigReady"; }, never, never, false, never>;
30
30
  }
@@ -8,7 +8,7 @@ export declare class StockReceiptProductsListComponent extends TechlifyListCompo
8
8
  protected service: StockReceiptProductService;
9
9
  private formBuilder;
10
10
  private featureService;
11
- filters: import("@angular/core").InputSignal<any>;
11
+ filtersInput: import("@angular/core").InputSignal<any>;
12
12
  isProductView: import("@angular/core").InputSignal<boolean>;
13
13
  selectedColumns: import("@angular/core").InputSignal<ColumnConfig[]>;
14
14
  exportInProgress: import("@angular/core").InputSignal<boolean>;
@@ -27,5 +27,5 @@ export declare class StockReceiptProductsListComponent extends TechlifyListCompo
27
27
  ngOnInit(): void;
28
28
  private loadFeatures;
29
29
  static ɵfac: i0.ɵɵFactoryDeclaration<StockReceiptProductsListComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<StockReceiptProductsListComponent, "app-stock-receipt-product-list", never, { "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "isProductView": { "alias": "isProductView"; "required": false; "isSignal": true; }; "selectedColumns": { "alias": "selectedColumns"; "required": false; "isSignal": true; }; "exportInProgress": { "alias": "exportInProgress"; "required": false; "isSignal": true; }; "product": { "alias": "product"; "required": false; "isSignal": true; }; }, { "listUpdated": "listUpdated"; "columnConfigReady": "columnConfigReady"; }, never, never, false, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<StockReceiptProductsListComponent, "app-stock-receipt-product-list", never, { "filtersInput": { "alias": "filters"; "required": false; "isSignal": true; }; "isProductView": { "alias": "isProductView"; "required": false; "isSignal": true; }; "selectedColumns": { "alias": "selectedColumns"; "required": false; "isSignal": true; }; "exportInProgress": { "alias": "exportInProgress"; "required": false; "isSignal": true; }; "product": { "alias": "product"; "required": false; "isSignal": true; }; }, { "listUpdated": "listUpdated"; "columnConfigReady": "columnConfigReady"; }, never, never, false, never>;
31
31
  }
@@ -0,0 +1,19 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { Location } from '@angular/common';
3
+ import { ActivatedRoute } from '@angular/router';
4
+ import { StockReceiptProductService } from '../stock-receipt-product.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class StockReceiptProductViewComponent implements OnInit {
7
+ private activatedRoute;
8
+ protected service: StockReceiptProductService;
9
+ private location;
10
+ id: number;
11
+ isLoading: boolean;
12
+ model: any;
13
+ constructor(activatedRoute: ActivatedRoute, service: StockReceiptProductService, location: Location);
14
+ ngOnInit(): void;
15
+ loadData(): void;
16
+ redirectBack(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<StockReceiptProductViewComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<StockReceiptProductViewComponent, "app-stock-receipt-product-view", never, {}, {}, never, never, true, never>;
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "techlify-inventory-common",
3
- "version": "18.46.0",
3
+ "version": "18.48.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.2.13",
6
6
  "@angular/core": "^18.2.13"
@@ -1,183 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { signal, Component } from '@angular/core';
3
- import * as i2 from '@angular/forms';
4
- import { Validators, ReactiveFormsModule } from '@angular/forms';
5
- import * as i1 from 'ngx-techlify-core';
6
- import { TechlifyFormComponent, SearchableSelectorModule, TechlifyIconModule } from 'ngx-techlify-core';
7
- import { S as StockIssueService, L as LocationService, M as MaterialModule, b as LocationSelectorComponent } from './techlify-inventory-common-techlify-inventory-common-D78OQ65o.mjs';
8
- import * as i3 from '@angular/common';
9
- import { CommonModule } from '@angular/common';
10
- import moment from 'moment';
11
- import * as i4 from '@angular/router';
12
- import * as i7 from '@angular/material/button';
13
- import * as i4$1 from '@angular/material/card';
14
- import * as i9 from '@angular/material/datepicker';
15
- import * as i6 from '@angular/material/form-field';
16
- import * as i11 from '@angular/material/icon';
17
- import * as i8 from '@angular/material/input';
18
- import * as i9$1 from '@angular/material/tooltip';
19
-
20
- class StockIssueFormComponent extends TechlifyFormComponent {
21
- formValidatorService;
22
- fb;
23
- stockIssueService;
24
- route;
25
- locationService;
26
- location;
27
- locationCount = signal(0);
28
- stockIssue = signal(null);
29
- issuableData = signal(null);
30
- constructor(formValidatorService, fb, stockIssueService, route, locationService, location) {
31
- super(formValidatorService);
32
- this.formValidatorService = formValidatorService;
33
- this.fb = fb;
34
- this.stockIssueService = stockIssueService;
35
- this.route = route;
36
- this.locationService = locationService;
37
- this.location = location;
38
- this.errorMessages = {
39
- date: {
40
- required: 'The date field is required.',
41
- },
42
- };
43
- this.form = this.fb.group({
44
- date: [new Date(), Validators.compose([Validators.required])],
45
- particulars: [''],
46
- stock_issue_products: this.fb.array([])
47
- });
48
- }
49
- ngOnInit() {
50
- this.locationService.count().subscribe((count) => {
51
- this.locationCount.set(count);
52
- });
53
- const id = this.route.snapshot.paramMap.get('id');
54
- if (id) {
55
- this.loadStockIssue(+id);
56
- }
57
- else {
58
- this.addStockIssueProduct();
59
- }
60
- this.route.queryParams.subscribe({
61
- next: (params) => {
62
- this.issuableData.set({
63
- issuable_type: params['issuable_type'],
64
- issuable_id: params['issuable_id']
65
- });
66
- }
67
- });
68
- }
69
- loadStockIssue(id) {
70
- this.isWorking = true;
71
- this.stockIssueService.show(id, { with: 'stockIssueProducts.product' }).subscribe({
72
- next: (response) => {
73
- this.isWorking = false;
74
- this.stockIssue.set(response.item);
75
- },
76
- error: () => {
77
- this.isWorking = false;
78
- },
79
- complete: () => {
80
- const issue = this.stockIssue();
81
- this.form.patchValue({
82
- date: issue.date ? new Date(issue.date) : new Date(),
83
- particulars: issue.details,
84
- });
85
- this.stockIssueProducts.clear();
86
- issue.stock_issue_products?.forEach((sip) => {
87
- const group = this.createStockIssueProduct();
88
- group.patchValue({
89
- id: sip.id,
90
- product_id: sip.product_id,
91
- location_id: sip.location_id,
92
- quantity: sip.quantity,
93
- particulars: sip.particulars,
94
- });
95
- this.stockIssueProducts.push(group);
96
- });
97
- }
98
- });
99
- }
100
- get stockIssueProducts() {
101
- return this.form.get('stock_issue_products');
102
- }
103
- createStockIssueProduct() {
104
- return this.fb.group({
105
- id: [''],
106
- product_id: ['', Validators.required],
107
- location_id: ['', this.locationCount() > 0 ? Validators.required : null],
108
- quantity: [0, [Validators.required, Validators.min(0)]],
109
- particulars: [''],
110
- issuable_id: [this.issuableData()?.issuable_id ?? ''],
111
- issuable_type: [this.issuableData()?.issuable_type ?? '']
112
- });
113
- }
114
- addStockIssueProduct() {
115
- this.stockIssueProducts.push(this.createStockIssueProduct());
116
- }
117
- removeStockIssueProduct(index) {
118
- this.stockIssueProducts.removeAt(index);
119
- }
120
- clearProducts() {
121
- this.stockIssueProducts.clear();
122
- }
123
- save() {
124
- if (this.form.invalid) {
125
- this.form.markAllAsTouched();
126
- this.form.markAsDirty();
127
- this.alertService.addAlert('Please check the form for errors.', 'error');
128
- return;
129
- }
130
- if (this.stockIssueProducts.length === 0) {
131
- this.alertService.addAlert('Please add at least one product.', 'error');
132
- return;
133
- }
134
- const formData = this.form.getRawValue();
135
- const data = {
136
- id: this.stockIssue()?.id ?? null,
137
- date: moment(formData.date).format('YYYY-MM-DD'),
138
- details: formData.particulars,
139
- products: formData.stock_issue_products.map((row) => ({
140
- id: row.product_id,
141
- product_id: row.product_id,
142
- quantity: row.quantity,
143
- location_id: row.location_id,
144
- particulars: row.particulars,
145
- issuable_id: row.issuable_id,
146
- issuable_type: row.issuable_type
147
- }))
148
- };
149
- this.isWorking = true;
150
- const request$ = this.stockIssue()?.id
151
- ? this.stockIssueService.update(data)
152
- : this.stockIssueService.store(data);
153
- request$.subscribe({
154
- next: () => {
155
- this.isWorking = false;
156
- this.alertService.addAlert('Stock issues saved successfully!', 'success');
157
- this.location.back();
158
- },
159
- error: () => {
160
- this.isWorking = false;
161
- }
162
- });
163
- }
164
- cancel() {
165
- this.location.back();
166
- }
167
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.FormBuilder }, { token: StockIssueService }, { token: i4.ActivatedRoute }, { token: LocationService }, { token: i3.Location }], target: i0.ɵɵFactoryTarget.Component });
168
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueFormComponent, isStandalone: true, selector: "app-stock-issue-form", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"d-flex flex-column gap-2 container\">\n <mat-card-content>\n\n <div class=\"d-flex flex-column gap-1\">\n <h5>\n <span class=\"material-symbols-outlined align-middle\">upload</span>\n Issue Stock\n </h5>\n </div>\n\n <form class=\"d-flex flex-column gap-2\" [formGroup]=\"form\" (submit)=\"save()\">\n\n <div class=\"d-flex flex-column\">\n <div class=\"d-flex flex-row gap-2 justify-content-between\">\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Start Date</mat-label>\n <input matInput [matDatepicker]=\"picker\" placeholder=\"Date\" formControlName=\"date\" required>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">{{ getErrorMessage('date') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></textarea>\n </mat-form-field>\n </div>\n </div>\n\n <table class=\"table mt-3\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Product</th>\n <th *ngIf=\"locationCount() > 0\" scope=\"col\">Location</th>\n <th scope=\"col\">Quantity</th>\n <th scope=\"col\">Particulars</th>\n <th scope=\"col\" class=\"text-center\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody formArrayName=\"stock_issue_products\">\n <tr *ngFor=\"let row of stockIssueProducts.controls; let i = index\" [formGroupName]=\"i\">\n <th scope=\"row\">{{ i + 1 }}</th>\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector apiUrl='api/products' formControlName=\"product_id\"\n titleField='name' [cache]=\"true\" required></app-searchable-selector>\n </mat-form-field>\n </td>\n <td *ngIf=\"locationCount() > 0\">\n <app-location-selector appearance='outline'\n formControlName=\"location_id\"></app-location-selector>\n </td>\n <td>\n <mat-form-field appearance='outline' class='fl-sm'>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\">\n </mat-form-field>\n </td>\n <td>\n <mat-form-field appearance='outline'>\n <mat-label>Particulars</mat-label>\n <input matInput formControlName=\"particulars\">\n </mat-form-field>\n </td>\n <td class=\"text-center align-middle\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center text-secondary\">\n <app-techlify-icon role='button' name='delete' (click)=\"removeStockIssueProduct(i)\"\n matTooltip=\"Remove row\"></app-techlify-icon>\n </div>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <td colspan=\"6\" class=\"text-end\">\n <div class=\"d-flex flex-row gap-2 justify-content-end\">\n <button mat-button color=\"primary\" type=\"button\" (click)=\"clearProducts()\"\n [disabled]=\"stockIssueProducts.length === 0\">\n <mat-icon>block</mat-icon> CLEAR ALL\n </button>\n <button mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"addStockIssueProduct()\">\n <mat-icon>add</mat-icon> ADD\n </button>\n </div>\n </td>\n </tr>\n </tfoot>\n </table>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-2\">\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancel()\">Cancel</button>\n <button [disabled]=\"isWorking || stockIssueProducts.length === 0\" mat-raised-button color=\"primary\"\n type=\"submit\">Save</button>\n </div>\n\n </form>\n\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i11.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "isEmitInitialEvent", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: LocationSelectorComponent, selector: "app-location-selector", inputs: ["appearance", "label", "placeholder", "includeNone"] }, { kind: "ngmodule", type: TechlifyIconModule }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }], preserveWhitespaces: true });
169
- }
170
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormComponent, decorators: [{
171
- type: Component,
172
- args: [{ selector: 'app-stock-issue-form', standalone: true, imports: [
173
- CommonModule,
174
- ReactiveFormsModule,
175
- MaterialModule,
176
- SearchableSelectorModule,
177
- LocationSelectorComponent,
178
- TechlifyIconModule
179
- ], template: "<mat-card class=\"d-flex flex-column gap-2 container\">\n <mat-card-content>\n\n <div class=\"d-flex flex-column gap-1\">\n <h5>\n <span class=\"material-symbols-outlined align-middle\">upload</span>\n Issue Stock\n </h5>\n </div>\n\n <form class=\"d-flex flex-column gap-2\" [formGroup]=\"form\" (submit)=\"save()\">\n\n <div class=\"d-flex flex-column\">\n <div class=\"d-flex flex-row gap-2 justify-content-between\">\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Start Date</mat-label>\n <input matInput [matDatepicker]=\"picker\" placeholder=\"Date\" formControlName=\"date\" required>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">{{ getErrorMessage('date') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></textarea>\n </mat-form-field>\n </div>\n </div>\n\n <table class=\"table mt-3\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Product</th>\n <th *ngIf=\"locationCount() > 0\" scope=\"col\">Location</th>\n <th scope=\"col\">Quantity</th>\n <th scope=\"col\">Particulars</th>\n <th scope=\"col\" class=\"text-center\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody formArrayName=\"stock_issue_products\">\n <tr *ngFor=\"let row of stockIssueProducts.controls; let i = index\" [formGroupName]=\"i\">\n <th scope=\"row\">{{ i + 1 }}</th>\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector apiUrl='api/products' formControlName=\"product_id\"\n titleField='name' [cache]=\"true\" required></app-searchable-selector>\n </mat-form-field>\n </td>\n <td *ngIf=\"locationCount() > 0\">\n <app-location-selector appearance='outline'\n formControlName=\"location_id\"></app-location-selector>\n </td>\n <td>\n <mat-form-field appearance='outline' class='fl-sm'>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\">\n </mat-form-field>\n </td>\n <td>\n <mat-form-field appearance='outline'>\n <mat-label>Particulars</mat-label>\n <input matInput formControlName=\"particulars\">\n </mat-form-field>\n </td>\n <td class=\"text-center align-middle\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center text-secondary\">\n <app-techlify-icon role='button' name='delete' (click)=\"removeStockIssueProduct(i)\"\n matTooltip=\"Remove row\"></app-techlify-icon>\n </div>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <td colspan=\"6\" class=\"text-end\">\n <div class=\"d-flex flex-row gap-2 justify-content-end\">\n <button mat-button color=\"primary\" type=\"button\" (click)=\"clearProducts()\"\n [disabled]=\"stockIssueProducts.length === 0\">\n <mat-icon>block</mat-icon> CLEAR ALL\n </button>\n <button mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"addStockIssueProduct()\">\n <mat-icon>add</mat-icon> ADD\n </button>\n </div>\n </td>\n </tr>\n </tfoot>\n </table>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-2\">\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancel()\">Cancel</button>\n <button [disabled]=\"isWorking || stockIssueProducts.length === 0\" mat-raised-button color=\"primary\"\n type=\"submit\">Save</button>\n </div>\n\n </form>\n\n </mat-card-content>\n</mat-card>\n" }]
180
- }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.FormBuilder }, { type: StockIssueService }, { type: i4.ActivatedRoute }, { type: LocationService }, { type: i3.Location }] });
181
-
182
- export { StockIssueFormComponent };
183
- //# sourceMappingURL=techlify-inventory-common-stock-issue-form.component-CaLMvUGF.mjs.map