techlify-inventory-common 18.36.1 → 18.37.1

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 (103) hide show
  1. package/esm2022/lib/inventory-common/inventory-common-routing.module.mjs +2 -2
  2. package/esm2022/lib/inventory-common/product/product-quick-search/product-quick-search.component.mjs +17 -36
  3. package/esm2022/lib/inventory-common/product/product-view-page/product-view-page.component.mjs +4 -4
  4. package/esm2022/lib/inventory-common/product/product.module.mjs +7 -7
  5. package/esm2022/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.mjs +165 -0
  6. package/esm2022/lib/inventory-common/stock-issue/stock-issue-import-page/stock-issue-import-page.component.mjs +59 -0
  7. package/esm2022/lib/inventory-common/stock-issue/stock-issue-list/stock-issue-list.component.mjs +140 -0
  8. package/esm2022/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.component.mjs +96 -0
  9. package/esm2022/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-page/stock-issue-page.module.mjs +2 -6
  10. package/esm2022/lib/inventory-common/stock-issue/stock-issue-product-form/stock-issue-product-form-button/stock-issue-product-form-button.component.mjs +35 -0
  11. package/esm2022/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-product-form/stock-issue-product-form.component.mjs +1 -1
  12. package/esm2022/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-product.service.mjs +1 -1
  13. package/esm2022/lib/inventory-common/stock-issue/stock-issue-products-list/stock-issue-products-list.component.mjs +138 -0
  14. package/esm2022/lib/inventory-common/stock-issue/stock-issue-routing.module.mjs +46 -0
  15. package/esm2022/lib/inventory-common/stock-issue/stock-issue-simple-form/stock-issue-form-button/stock-issue-form-button.component.mjs +48 -0
  16. package/esm2022/lib/inventory-common/stock-issue/stock-issue-simple-form/stock-issue-form.module.mjs +43 -0
  17. package/esm2022/lib/inventory-common/stock-issue/stock-issue-simple-form/stock-issue-simple-form/stock-issue-simple-form.component.mjs +201 -0
  18. package/esm2022/lib/inventory-common/stock-issue/stock-issue-view/stock-issue-view.component.mjs +66 -0
  19. package/esm2022/lib/inventory-common/stock-issue/stock-issue.module.mjs +51 -0
  20. package/esm2022/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue.service.mjs +1 -1
  21. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.component.mjs +221 -0
  22. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-list/stock-receipt-list.component.mjs +4 -4
  23. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-list/stock-receipt-product-list.component.mjs +3 -3
  24. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-simple-form/stock-receipt-form-button/stock-receipt-form-button.component.mjs +42 -0
  25. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-simple-form/stock-receipt-simple-form/stock-receipt-simple-form.component.mjs +180 -0
  26. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-simple-form/stock-receipt-simple-form.module.mjs +51 -0
  27. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-view/stock-receipt-view.component.mjs +4 -5
  28. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-page/stock-receipts-page.component.mjs +3 -3
  29. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-routing.module.mjs +6 -6
  30. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts.module.mjs +6 -11
  31. package/esm2022/lib/inventory-common/supplier/supplier.module.mjs +8 -9
  32. package/esm2022/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.mjs +3 -4
  33. package/esm2022/public-api.mjs +13 -14
  34. package/fesm2022/{techlify-inventory-common-category.module-qyYKbe_g.mjs → techlify-inventory-common-category.module-CJbYoRGj.mjs} +4 -4
  35. package/fesm2022/{techlify-inventory-common-category.module-qyYKbe_g.mjs.map → techlify-inventory-common-category.module-CJbYoRGj.mjs.map} +1 -1
  36. package/fesm2022/{techlify-inventory-common-measure.module-Azgdcpqu.mjs → techlify-inventory-common-measure.module-D8oqfZTV.mjs} +4 -4
  37. package/fesm2022/{techlify-inventory-common-measure.module-Azgdcpqu.mjs.map → techlify-inventory-common-measure.module-D8oqfZTV.mjs.map} +1 -1
  38. package/fesm2022/{techlify-inventory-common-purchase-order-view.component-tSf0_Lj_.mjs → techlify-inventory-common-purchase-order-view.component-BDuk0Xek.mjs} +4 -4
  39. package/fesm2022/{techlify-inventory-common-purchase-order-view.component-tSf0_Lj_.mjs.map → techlify-inventory-common-purchase-order-view.component-BDuk0Xek.mjs.map} +1 -1
  40. package/fesm2022/techlify-inventory-common-stock-issue-form.component-B0-TBlZL.mjs +164 -0
  41. package/fesm2022/techlify-inventory-common-stock-issue-form.component-B0-TBlZL.mjs.map +1 -0
  42. package/fesm2022/techlify-inventory-common-stock-issue-view.component-DJIQ6dVF.mjs +66 -0
  43. package/fesm2022/techlify-inventory-common-stock-issue-view.component-DJIQ6dVF.mjs.map +1 -0
  44. package/fesm2022/{techlify-inventory-common-techlify-inventory-common-CqakmnCI.mjs → techlify-inventory-common-techlify-inventory-common-CQSzjNhk.mjs} +141 -300
  45. package/fesm2022/techlify-inventory-common-techlify-inventory-common-CQSzjNhk.mjs.map +1 -0
  46. package/fesm2022/techlify-inventory-common.mjs +1 -1
  47. package/lib/inventory-common/product/product-view-page/product-view-page.component.d.ts +1 -1
  48. package/lib/inventory-common/product/product.module.d.ts +4 -4
  49. package/lib/inventory-common/{stock-issuances/stock-issue-batch-form/stock-issue-batch-form.component.d.ts → stock-issue/stock-issue-form/stock-issue-form.component.d.ts} +6 -4
  50. package/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-page/stock-issue-page.module.d.ts +8 -9
  51. package/lib/inventory-common/{stock-issuances/stock-issue-form → stock-issue/stock-issue-simple-form}/stock-issue-form.module.d.ts +2 -2
  52. package/lib/inventory-common/{stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.d.ts → stock-issue/stock-issue-simple-form/stock-issue-simple-form/stock-issue-simple-form.component.d.ts} +3 -3
  53. package/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-view/stock-issue-view.component.d.ts +1 -1
  54. package/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue.module.d.ts +3 -3
  55. package/lib/inventory-common/stock-receipts/{stock-receipt-batch-form/stock-receipt-batch-form.component.d.ts → stock-receipt-form/stock-receipt-form.component.d.ts} +6 -4
  56. package/lib/inventory-common/stock-receipts/{stock-receipt-form/stock-receipt-form/stock-receipt-form.component.d.ts → stock-receipt-simple-form/stock-receipt-simple-form/stock-receipt-simple-form.component.d.ts} +1 -1
  57. package/lib/inventory-common/stock-receipts/stock-receipt-simple-form/stock-receipt-simple-form.module.d.ts +15 -0
  58. package/lib/inventory-common/stock-receipts/stock-receipt-view/stock-receipt-view.component.d.ts +2 -2
  59. package/lib/inventory-common/stock-receipts/stock-receipts.module.d.ts +17 -18
  60. package/lib/inventory-common/supplier/supplier.module.d.ts +6 -7
  61. package/package.json +5 -2
  62. package/public-api.d.ts +12 -13
  63. package/esm2022/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.mjs +0 -47
  64. package/esm2022/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.module.mjs +0 -19
  65. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-batch-form/stock-issue-batch-form.component.mjs +0 -163
  66. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.mjs +0 -201
  67. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form-button/stock-issue-form-button.component.mjs +0 -48
  68. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form.module.mjs +0 -43
  69. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-import-page/stock-issue-import-page.component.mjs +0 -59
  70. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-list/stock-issue-list.component.mjs +0 -141
  71. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-page/stock-issue-page.component.mjs +0 -96
  72. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-product-form/stock-issue-product-form-button/stock-issue-product-form-button.component.mjs +0 -35
  73. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-products-list/stock-issue-products-list.component.mjs +0 -138
  74. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-routing.module.mjs +0 -46
  75. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-view/stock-issue-view.component.mjs +0 -68
  76. package/esm2022/lib/inventory-common/stock-issuances/stock-issue.module.mjs +0 -51
  77. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-batch-form/stock-receipt-batch-form.component.mjs +0 -208
  78. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.mjs +0 -47
  79. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.mjs +0 -180
  80. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form-button/stock-receipt-form-button.component.mjs +0 -42
  81. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.module.mjs +0 -51
  82. package/esm2022/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.mjs +0 -64
  83. package/fesm2022/techlify-inventory-common-stock-issue-batch-form.component-8u8sZ4gb.mjs +0 -162
  84. package/fesm2022/techlify-inventory-common-stock-issue-batch-form.component-8u8sZ4gb.mjs.map +0 -1
  85. package/fesm2022/techlify-inventory-common-stock-issue-view.component-C-SHFxmY.mjs +0 -66
  86. package/fesm2022/techlify-inventory-common-stock-issue-view.component-C-SHFxmY.mjs.map +0 -1
  87. package/fesm2022/techlify-inventory-common-techlify-inventory-common-CqakmnCI.mjs.map +0 -1
  88. package/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.d.ts +0 -18
  89. package/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.module.d.ts +0 -9
  90. package/lib/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.d.ts +0 -18
  91. package/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.module.d.ts +0 -15
  92. package/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.d.ts +0 -18
  93. /package/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-import-page/stock-issue-import-page.component.d.ts +0 -0
  94. /package/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-list/stock-issue-list.component.d.ts +0 -0
  95. /package/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-page/stock-issue-page.component.d.ts +0 -0
  96. /package/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-product-form/stock-issue-product-form-button/stock-issue-product-form-button.component.d.ts +0 -0
  97. /package/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-product-form/stock-issue-product-form.component.d.ts +0 -0
  98. /package/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-product.service.d.ts +0 -0
  99. /package/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-products-list/stock-issue-products-list.component.d.ts +0 -0
  100. /package/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue-routing.module.d.ts +0 -0
  101. /package/lib/inventory-common/{stock-issuances/stock-issue-form → stock-issue/stock-issue-simple-form}/stock-issue-form-button/stock-issue-form-button.component.d.ts +0 -0
  102. /package/lib/inventory-common/{stock-issuances → stock-issue}/stock-issue.service.d.ts +0 -0
  103. /package/lib/inventory-common/stock-receipts/{stock-receipt-form → stock-receipt-simple-form}/stock-receipt-form-button/stock-receipt-form-button.component.d.ts +0 -0
@@ -1,42 +0,0 @@
1
- import { Component, EventEmitter, Input, Output } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@angular/material/dialog";
4
- import * as i2 from "ngx-techlify-core";
5
- import * as i3 from "@angular/router";
6
- import * as i4 from "../stock-receipt-form/stock-receipt-form.component";
7
- export class StockReceiptFormButtonComponent {
8
- matDialog;
9
- product;
10
- stockReceipt;
11
- latestLocationId;
12
- icon;
13
- saved = new EventEmitter();
14
- matDialogRef;
15
- constructor(matDialog) {
16
- this.matDialog = matDialog;
17
- }
18
- showStockReceiptForm(templateRef) {
19
- this.matDialogRef = this.matDialog.open(templateRef, { width: '500px' });
20
- }
21
- onStockReceiptSaved(item) {
22
- this.matDialogRef.close();
23
- this.saved.emit(item);
24
- }
25
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormButtonComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
26
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockReceiptFormButtonComponent, selector: "app-stock-receipt-form-button", inputs: { product: "product", stockReceipt: "stockReceipt", latestLocationId: "latestLocationId", icon: "icon" }, outputs: { saved: "saved" }, ngImport: i0, template: "<app-techlify-icon role='button' name='edit'\n [routerLink]=\"['/inventory/stock-receipts/batch-form', stockReceipt?.id]\"></app-techlify-icon>\n\n<ng-template #stockReceiptFormTemplate>\n <app-stock-receipt-form mat-dialog-content [latestLocationId]=\"latestLocationId\" [product]=\"product\"\n [stockReceipt]=\"stockReceipt\" (cancelled)=\"matDialogRef.close()\"\n (saved)=\"onStockReceiptSaved($event)\"></app-stock-receipt-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i2.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i4.StockReceiptFormComponent, selector: "app-stock-receipt-form", inputs: ["product", "stockReceipt", "stockReceiptProduct", "latestLocationId"], outputs: ["saved", "cancelled"] }], preserveWhitespaces: true });
27
- }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormButtonComponent, decorators: [{
29
- type: Component,
30
- args: [{ selector: 'app-stock-receipt-form-button', template: "<app-techlify-icon role='button' name='edit'\n [routerLink]=\"['/inventory/stock-receipts/batch-form', stockReceipt?.id]\"></app-techlify-icon>\n\n<ng-template #stockReceiptFormTemplate>\n <app-stock-receipt-form mat-dialog-content [latestLocationId]=\"latestLocationId\" [product]=\"product\"\n [stockReceipt]=\"stockReceipt\" (cancelled)=\"matDialogRef.close()\"\n (saved)=\"onStockReceiptSaved($event)\"></app-stock-receipt-form>\n</ng-template>\n" }]
31
- }], ctorParameters: () => [{ type: i1.MatDialog }], propDecorators: { product: [{
32
- type: Input
33
- }], stockReceipt: [{
34
- type: Input
35
- }], latestLocationId: [{
36
- type: Input
37
- }], icon: [{
38
- type: Input
39
- }], saved: [{
40
- type: Output
41
- }] } });
42
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvY2stcmVjZWlwdC1mb3JtLWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9pbnZlbnRvcnktY29tbW9uL3NyYy9saWIvaW52ZW50b3J5LWNvbW1vbi9zdG9jay1yZWNlaXB0cy9zdG9jay1yZWNlaXB0LWZvcm0vc3RvY2stcmVjZWlwdC1mb3JtLWJ1dHRvbi9zdG9jay1yZWNlaXB0LWZvcm0tYnV0dG9uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2ludmVudG9yeS1jb21tb24vc3JjL2xpYi9pbnZlbnRvcnktY29tbW9uL3N0b2NrLXJlY2VpcHRzL3N0b2NrLXJlY2VpcHQtZm9ybS9zdG9jay1yZWNlaXB0LWZvc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RoaXMubWF0RGlhbG9nLm9wZW4odGVtcGxhdGVSZWYsIHsgd2lkdGg6ICc1MDBweCcgfSk7XG4gIH1cblxuICBvblN0b2NrUmVjZWlwdFNhdmVkKGl0ZW06IGFueSkge1xuICAgIHRoaXMubWF0RGlhbG9nUmVmLmNsb3NlKCk7XG4gICAgdGhpcy5zYXZlZC5lbWl0KGl0ZW0pO1xuICB9XG59XG4iLCI8YXBwLXRlY2hsaWZ5LWljb24gcm9sZT0nYnV0dG9uJyBuYW1lPSdlZGl0J1xuICBbcm91dGVyTGlua109XCJbJy9pbnZlbnRvcnkvc3RvY2stcmVjZWlwdHMvYmF0Y2gtZm9ybScsIHN0b2NrUmVjZWlwdD8uaWRdXCI+PC9hcHAtdGVjaGxpZnktaWNvbj5cblxuPG5nLXRlbXBsYXRlICNzdG9ja1JlY2VpcHRGb3JtVGVtcGxhdGU+XG4gIDxhcHAtc3RvY2stcmVjZWlwdC1mb3JtIG1hdC1kaWFsb2ctY29udGVudCBbbGF0ZXN0TG9jYXRpb25JZF09XCJsYXRlc3RMb2NhdGlvbklkXCIgW3Byb2R1Y3RdPVwicHJvZHVjdFwiXG4gICAgW3N0b2NrUmVjZWlwdF09XCJzdG9ja1JlY2VpcHRcIiAoY2FuY2VsbGVkKT1cIm1hdERpYWxvZ1JlZi5jbG9zZSgpXCJcbiAgICAoc2F2ZWQpPVwib25TdG9ja1JlY2VpcHRTYXZlZCgkZXZlbnQpXCI+PC9hcHAtc3RvY2stcmVjZWlwdC1mb3JtPlxuPC9uZy10ZW1wbGF0ZT5cbiJdfQ==
@@ -1,51 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { StockReceiptFormComponent } from './stock-receipt-form/stock-receipt-form.component';
4
- import { StockReceiptFormButtonComponent } from './stock-receipt-form-button/stock-receipt-form-button.component';
5
- import { ReactiveFormsModule } from '@angular/forms';
6
- import { PayeeSelectorModule } from '../../supplier/payee-selector/payee-selector.module';
7
- import { SearchableSelectorModule, TechlifyFeatureModule, TechlifyIconModule } from 'ngx-techlify-core';
8
- import { MaterialModule } from '../../material.module';
9
- import { LocationSelectorComponent } from '../../location/location-selector/location-selector.component';
10
- import { RouterModule } from '@angular/router';
11
- import * as i0 from "@angular/core";
12
- export class StockReceiptFormModule {
13
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
14
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormModule, declarations: [StockReceiptFormComponent, StockReceiptFormButtonComponent], imports: [CommonModule,
15
- PayeeSelectorModule,
16
- ReactiveFormsModule,
17
- MaterialModule,
18
- SearchableSelectorModule,
19
- TechlifyFeatureModule,
20
- LocationSelectorComponent,
21
- TechlifyIconModule,
22
- RouterModule], exports: [StockReceiptFormButtonComponent] });
23
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormModule, imports: [CommonModule,
24
- PayeeSelectorModule,
25
- ReactiveFormsModule,
26
- MaterialModule,
27
- SearchableSelectorModule,
28
- TechlifyFeatureModule,
29
- LocationSelectorComponent,
30
- TechlifyIconModule,
31
- RouterModule] });
32
- }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockReceiptFormModule, decorators: [{
34
- type: NgModule,
35
- args: [{
36
- declarations: [StockReceiptFormComponent, StockReceiptFormButtonComponent],
37
- exports: [StockReceiptFormButtonComponent],
38
- imports: [
39
- CommonModule,
40
- PayeeSelectorModule,
41
- ReactiveFormsModule,
42
- MaterialModule,
43
- SearchableSelectorModule,
44
- TechlifyFeatureModule,
45
- LocationSelectorComponent,
46
- TechlifyIconModule,
47
- RouterModule
48
- ],
49
- }]
50
- }] });
51
- //# sourceMappingURL=data:application/json;base64,eyJ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bGVjdG9yTW9kdWxlLFxuICAgIFRlY2hsaWZ5RmVhdHVyZU1vZHVsZSxcbiAgICBMb2NhdGlvblNlbGVjdG9yQ29tcG9uZW50LFxuICAgIFRlY2hsaWZ5SWNvbk1vZHVsZSxcbiAgICBSb3V0ZXJNb2R1bGVcbl0sXG59KVxuZXhwb3J0IGNsYXNzIFN0b2NrUmVjZWlwdEZvcm1Nb2R1bGUge31cbiJdfQ==
@@ -1,64 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, EventEmitter, Input, Output } from '@angular/core';
3
- import { MaterialModule } from '../../material.module';
4
- import { ActionPopupComponent } from 'ngx-techlify-core';
5
- import { lastValueFrom } from 'rxjs';
6
- import { NgxPermissionsModule } from 'ngx-permissions';
7
- import * as i0 from "@angular/core";
8
- import * as i1 from "@angular/material/dialog";
9
- import * as i2 from "ngx-techlify-core";
10
- import * as i3 from "../supplier.service";
11
- import * as i4 from "@angular/material/icon";
12
- import * as i5 from "ngx-permissions";
13
- export class SupplierDeleteButtonComponent {
14
- dialog;
15
- alertService;
16
- errorHandler;
17
- supplierService;
18
- supplier;
19
- onDelete = new EventEmitter();
20
- constructor(dialog, alertService, errorHandler, supplierService) {
21
- this.dialog = dialog;
22
- this.alertService = alertService;
23
- this.errorHandler = errorHandler;
24
- this.supplierService = supplierService;
25
- }
26
- ngOnInit() {
27
- }
28
- openDialog() {
29
- this.dialog.open(ActionPopupComponent, {
30
- width: '400px',
31
- data: {
32
- title: 'Delete Supplier',
33
- message: 'Are you sure you want to delete the Supplier?',
34
- },
35
- autoFocus: false,
36
- }).afterClosed().subscribe(async (result) => {
37
- if (result) {
38
- try {
39
- await lastValueFrom(this.supplierService.delete(this.supplier.id));
40
- this.alertService.addAlert('Successfully deleted the Supplier', 'success');
41
- this.onDelete.emit(this.supplier);
42
- }
43
- catch (error) {
44
- this.errorHandler.handleError(error);
45
- }
46
- }
47
- });
48
- }
49
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierDeleteButtonComponent, deps: [{ token: i1.MatDialog }, { token: i2.AlertService }, { token: i2.ErrorHandlerService }, { token: i3.SupplierService }], target: i0.ɵɵFactoryTarget.Component });
50
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupplierDeleteButtonComponent, isStandalone: true, selector: "app-supplier-delete-button", inputs: { supplier: "supplier" }, outputs: { onDelete: "onDelete" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer\" *ngxPermissionsOnly=\"['supplier.delete']\" (click)=\"openDialog()\">\n delete\n</mat-icon>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i4.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 });
51
- }
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupplierDeleteButtonComponent, decorators: [{
53
- type: Component,
54
- args: [{ selector: 'app-supplier-delete-button', standalone: true, imports: [
55
- CommonModule,
56
- MaterialModule,
57
- NgxPermissionsModule
58
- ], template: "<mat-icon class=\"cursor-pointer\" *ngxPermissionsOnly=\"['supplier.delete']\" (click)=\"openDialog()\">\n delete\n</mat-icon>" }]
59
- }], ctorParameters: () => [{ type: i1.MatDialog }, { type: i2.AlertService }, { type: i2.ErrorHandlerService }, { type: i3.SupplierService }], propDecorators: { supplier: [{
60
- type: Input
61
- }], onDelete: [{
62
- type: Output
63
- }] } });
64
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VwcGxpZXItZGVsZXRlLWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9pbnZlbnRvcnktY29tbW9uL3NyYy9saWIvaW52ZW50b3J5LWNvbW1vbi9zdXBwbGllci9zdXBwbGllci1kZWxldGUtYnV0dG9uL3N1cHBsaWVyLWRlbGV0ZS1idXR0b24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvaW52ZW50b3J5LWNvbW1vbi9zcmMvbGliL2ludmVudG9yeS1jb21tb24vc3VwcGxpZXIvc3VwcGxpZXItZGVsZXRlLWJ1dHRvbi9zdXBwbGllci1kZWxldGUtYnV0dG9uLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQVUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQy9FLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUN2RCxPQUFPLEVBQWUsb0JBQW9CLEVBQXFDLE1BQU0sbUJBQW1CLENBQUM7QUFFekcsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUVyQyxPQ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- 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 { TechlifyFormComponentInterface, SearchableSelectorModule, TechlifyIconModule } from 'ngx-techlify-core';
7
- import { S as StockIssueService, L as LocationService, b as MaterialModule, c as LocationSelectorComponent } from './techlify-inventory-common-techlify-inventory-common-CqakmnCI.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 i6 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$1 from '@angular/material/form-field';
16
- import * as i11 from '@angular/material/icon';
17
- import * as i8 from '@angular/material/input';
18
- import * as i13 from '@angular/material/tooltip';
19
-
20
- class StockIssueBatchFormComponent extends TechlifyFormComponentInterface {
21
- formValidatorService;
22
- fb;
23
- stockIssueService;
24
- router;
25
- route;
26
- locationService;
27
- locationCount = signal(0);
28
- stockIssue = signal(null);
29
- constructor(formValidatorService, fb, stockIssueService, router, route, locationService) {
30
- super(formValidatorService);
31
- this.formValidatorService = formValidatorService;
32
- this.fb = fb;
33
- this.stockIssueService = stockIssueService;
34
- this.router = router;
35
- this.route = route;
36
- this.locationService = locationService;
37
- this.form = this.fb.group({
38
- date: [new Date(), Validators.compose([Validators.required])],
39
- particulars: ['', Validators.compose([Validators.required])],
40
- stock_issue_products: this.fb.array([])
41
- });
42
- }
43
- ngOnInit() {
44
- this.locationService.count().subscribe((count) => {
45
- this.locationCount.set(count);
46
- });
47
- const id = this.route.snapshot.paramMap.get('id');
48
- if (id) {
49
- this.loadStockIssue(+id);
50
- }
51
- }
52
- loadStockIssue(id) {
53
- this.isWorking = true;
54
- this.stockIssueService.show(id, { with: 'stockIssueProducts.product' }).subscribe({
55
- next: (response) => {
56
- this.isWorking = false;
57
- this.stockIssue.set(response.item);
58
- },
59
- error: () => {
60
- this.isWorking = false;
61
- },
62
- complete: () => {
63
- const issue = this.stockIssue();
64
- this.form.patchValue({
65
- date: issue.date ? new Date(issue.date) : new Date(),
66
- particulars: issue.details,
67
- });
68
- this.stockIssueProducts.clear();
69
- issue.stock_issue_products?.forEach((sip) => {
70
- const group = this.createStockIssueProduct();
71
- group.patchValue({
72
- id: sip.id,
73
- product_id: sip.product_id,
74
- location_id: sip.location_id,
75
- quantity: sip.quantity,
76
- particulars: sip.particulars,
77
- });
78
- this.stockIssueProducts.push(group);
79
- });
80
- }
81
- });
82
- }
83
- get stockIssueProducts() {
84
- return this.form.get('stock_issue_products');
85
- }
86
- createStockIssueProduct() {
87
- return this.fb.group({
88
- id: [''],
89
- product_id: ['', Validators.required],
90
- location_id: ['', this.locationCount() > 0 ? Validators.required : null],
91
- quantity: [1, [Validators.required, Validators.min(1)]],
92
- particulars: ['']
93
- });
94
- }
95
- addStockIssueProduct() {
96
- this.stockIssueProducts.push(this.createStockIssueProduct());
97
- }
98
- removeStockIssueProduct(index) {
99
- this.stockIssueProducts.removeAt(index);
100
- }
101
- clearProducts() {
102
- this.stockIssueProducts.clear();
103
- }
104
- save() {
105
- if (this.form.invalid) {
106
- this.form.markAllAsTouched();
107
- this.form.markAsDirty();
108
- this.alertService.addAlert('Please check the form for errors.', 'error');
109
- return;
110
- }
111
- if (this.stockIssueProducts.length === 0) {
112
- this.alertService.addAlert('Please add at least one product.', 'error');
113
- return;
114
- }
115
- const formData = this.form.getRawValue();
116
- const data = {
117
- id: this.stockIssue()?.id ?? null,
118
- date: moment(formData.date).format('YYYY-MM-DD'),
119
- details: formData.particulars,
120
- products: formData.stock_issue_products.map((row) => ({
121
- id: row.product_id,
122
- product_id: row.product_id,
123
- quantity: row.quantity,
124
- location_id: row.location_id,
125
- particulars: row.particulars,
126
- }))
127
- };
128
- this.isWorking = true;
129
- const request$ = this.stockIssue()?.id
130
- ? this.stockIssueService.update(data)
131
- : this.stockIssueService.store(data);
132
- request$.subscribe({
133
- next: () => {
134
- this.isWorking = false;
135
- this.alertService.addAlert('Stock issues saved successfully!', 'success');
136
- this.router.navigate(['/inventory/stock-issues']);
137
- },
138
- error: () => {
139
- this.isWorking = false;
140
- }
141
- });
142
- }
143
- cancel() {
144
- this.router.navigate(['/inventory/stock-issues']);
145
- }
146
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueBatchFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.FormBuilder }, { token: StockIssueService }, { token: i4.Router }, { token: i4.ActivatedRoute }, { token: LocationService }], target: i0.ɵɵFactoryTarget.Component });
147
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueBatchFormComponent, isStandalone: true, selector: "app-stock-issue-batch-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-error *ngIf=\"isFieldValid('particulars')\">{{ getErrorMessage('particulars') }}</mat-error>\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=\"1\">\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: i6.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$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i6$1.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: i13.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", "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 });
148
- }
149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueBatchFormComponent, decorators: [{
150
- type: Component,
151
- args: [{ selector: 'app-stock-issue-batch-form', standalone: true, imports: [
152
- CommonModule,
153
- ReactiveFormsModule,
154
- MaterialModule,
155
- SearchableSelectorModule,
156
- LocationSelectorComponent,
157
- TechlifyIconModule
158
- ], 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-error *ngIf=\"isFieldValid('particulars')\">{{ getErrorMessage('particulars') }}</mat-error>\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=\"1\">\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" }]
159
- }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.FormBuilder }, { type: StockIssueService }, { type: i4.Router }, { type: i4.ActivatedRoute }, { type: LocationService }] });
160
-
161
- export { StockIssueBatchFormComponent };
162
- //# sourceMappingURL=techlify-inventory-common-stock-issue-batch-form.component-8u8sZ4gb.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"techlify-inventory-common-stock-issue-batch-form.component-8u8sZ4gb.mjs","sources":["../../../projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-batch-form/stock-issue-batch-form.component.ts","../../../projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-batch-form/stock-issue-batch-form.component.html"],"sourcesContent":["import { Component, OnInit, signal } from \"@angular/core\";\nimport { FormArray, FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { FormValidatorService, TechlifyFormComponentInterface, TechlifyIconModule } from \"ngx-techlify-core\";\nimport { MaterialModule } from '../../material.module';\nimport { CommonModule } from '@angular/common';\nimport { SearchableSelectorModule } from 'ngx-techlify-core';\nimport { LocationSelectorComponent } from '../../location/location-selector/location-selector.component';\nimport { StockIssueService } from '../stock-issue.service';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport moment from 'moment';\nimport { LocationService } from '../../location/location.service';\n\n@Component({\n selector: 'app-stock-issue-batch-form',\n templateUrl: './stock-issue-batch-form.component.html',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MaterialModule,\n SearchableSelectorModule,\n LocationSelectorComponent,\n TechlifyIconModule\n ]\n})\n\nexport class StockIssueBatchFormComponent extends TechlifyFormComponentInterface implements OnInit {\n\n locationCount = signal<number>(0);\n stockIssue = signal<any>(null);\n\n constructor(protected override formValidatorService: FormValidatorService,\n private fb: FormBuilder,\n private stockIssueService: StockIssueService,\n private router: Router,\n private route: ActivatedRoute,\n private locationService: LocationService\n ) {\n super(formValidatorService);\n\n this.form = this.fb.group({\n date: [new Date(), Validators.compose([Validators.required])],\n particulars: ['', Validators.compose([Validators.required])],\n stock_issue_products: this.fb.array([])\n });\n }\n\n ngOnInit(): void {\n this.locationService.count().subscribe((count: number) => {\n this.locationCount.set(count);\n });\n\n const id = this.route.snapshot.paramMap.get('id');\n if (id) {\n this.loadStockIssue(+id);\n }\n }\n\n private loadStockIssue(id: number): void {\n this.isWorking = true;\n this.stockIssueService.show(id, { with: 'stockIssueProducts.product' }).subscribe({\n next: (response: any) => {\n this.isWorking = false;\n this.stockIssue.set(response.item);\n },\n error: () => {\n this.isWorking = false;\n },\n complete: () => {\n const issue = this.stockIssue();\n this.form.patchValue({\n date: issue.date ? new Date(issue.date) : new Date(),\n particulars: issue.details,\n });\n\n this.stockIssueProducts.clear();\n issue.stock_issue_products?.forEach((sip: any) => {\n const group = this.createStockIssueProduct();\n group.patchValue({\n id: sip.id,\n product_id: sip.product_id,\n location_id: sip.location_id,\n quantity: sip.quantity,\n particulars: sip.particulars,\n });\n this.stockIssueProducts.push(group);\n });\n }\n });\n }\n\n get stockIssueProducts(): FormArray {\n return this.form.get('stock_issue_products') as FormArray;\n }\n\n createStockIssueProduct() {\n return this.fb.group({\n id: [''],\n product_id: ['', Validators.required],\n location_id: ['', this.locationCount() > 0 ? Validators.required : null],\n quantity: [1, [Validators.required, Validators.min(1)]],\n particulars: ['']\n });\n }\n\n addStockIssueProduct() {\n this.stockIssueProducts.push(this.createStockIssueProduct());\n }\n\n removeStockIssueProduct(index: number) {\n this.stockIssueProducts.removeAt(index);\n }\n\n clearProducts() {\n this.stockIssueProducts.clear();\n }\n\n save() {\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n this.form.markAsDirty();\n this.alertService.addAlert('Please check the form for errors.', 'error');\n return;\n }\n\n if (this.stockIssueProducts.length === 0) {\n this.alertService.addAlert('Please add at least one product.', 'error');\n return;\n }\n\n const formData = this.form.getRawValue();\n const data: any = {\n id: this.stockIssue()?.id ?? null,\n date: moment(formData.date).format('YYYY-MM-DD'),\n details: formData.particulars,\n products: formData.stock_issue_products.map((row: any) => ({\n id: row.product_id,\n product_id: row.product_id,\n quantity: row.quantity,\n location_id: row.location_id,\n particulars: row.particulars,\n }))\n };\n\n this.isWorking = true;\n const request$ = this.stockIssue()?.id\n ? this.stockIssueService.update(data)\n : this.stockIssueService.store(data);\n\n request$.subscribe({\n next: () => {\n this.isWorking = false;\n this.alertService.addAlert('Stock issues saved successfully!', 'success');\n this.router.navigate(['/inventory/stock-issues']);\n },\n error: () => {\n this.isWorking = false;\n }\n });\n }\n\n cancel() {\n this.router.navigate(['/inventory/stock-issues']);\n }\n}\n","<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-error *ngIf=\"isFieldValid('particulars')\">{{ getErrorMessage('particulars') }}</mat-error>\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=\"1\">\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"],"names":["i3.StockIssueService","i5.LocationService","i6","i7","i8","i10","i12"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BM,MAAO,4BAA6B,SAAQ,8BAA8B,CAAA;AAK7C,IAAA,oBAAA,CAAA;AACnB,IAAA,EAAA,CAAA;AACA,IAAA,iBAAA,CAAA;AACA,IAAA,MAAA,CAAA;AACA,IAAA,KAAA,CAAA;AACA,IAAA,eAAA,CAAA;AARZ,IAAA,aAAa,GAAG,MAAM,CAAS,CAAC,CAAC,CAAC;AAClC,IAAA,UAAU,GAAG,MAAM,CAAM,IAAI,CAAC,CAAC;IAE/B,WAA+B,CAAA,oBAA0C,EAC7D,EAAe,EACf,iBAAoC,EACpC,MAAc,EACd,KAAqB,EACrB,eAAgC,EAAA;QAExC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAPD,IAAoB,CAAA,oBAAA,GAApB,oBAAoB,CAAsB;QAC7D,IAAE,CAAA,EAAA,GAAF,EAAE,CAAa;QACf,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAmB;QACpC,IAAM,CAAA,MAAA,GAAN,MAAM,CAA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CAAA,2BAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,YAAA,EAAA,eAAA,EAAA,QAAA,EAAA,UAAA,EAAA,eAAA,EAAA,cAAA,EAAA,KAAA,EAAA,WAAA,EAAA,MAAA,EAAA,YAAA,EAAA,MAAA,EAAA,QAAA,EAAA,aAAA,EAAA,eAAA,EAAA,OAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,SAAA,EAAA,cAAA,EAAA,YAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,qBAAA,EAAA,iBAAA,EAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,yBAAyB,gIACzB,kBAAkB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,qBAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;4FAIb,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAdxC,SAAS;+BACI,4BAA4B,EAAA,UAAA,EAE1B,IAAI,EACP,OAAA,EAAA;wBACL,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBACd,wBAAwB;wBACxB,yBAAyB;wBACzB,kBAAkB;AACrB,qBAAA,EAAA,QAAA,EAAA,4gLAAA,EAAA,CAAA;;;;;"}
@@ -1,66 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component } from '@angular/core';
3
- import * as i3 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i4 from '@angular/router';
6
- import { RouterLink } from '@angular/router';
7
- import { S as StockIssueService, b as MaterialModule, d as StockIssueFormModule, e as StockIssueFormButtonComponent, f as StockIssuanceDeleteButtonModule, g as StockIssuanceDeleteButtonComponent } from './techlify-inventory-common-techlify-inventory-common-CqakmnCI.mjs';
8
- import * as i1 from 'ngx-techlify-core';
9
- import { NoteModule, EntityFilesViewAllModule, TechlifyFeatureModule } from 'ngx-techlify-core';
10
- import * as i4$1 from '@angular/material/card';
11
- import * as i9 from '@angular/material/progress-bar';
12
-
13
- class StockIssueViewComponent {
14
- activatedRoute;
15
- service;
16
- location;
17
- id;
18
- isLoading;
19
- stockIssue;
20
- constructor(activatedRoute, service, location) {
21
- this.activatedRoute = activatedRoute;
22
- this.service = service;
23
- this.location = location;
24
- }
25
- ngOnInit() {
26
- this.activatedRoute.params.subscribe(params => {
27
- this.id = parseInt(params['id']);
28
- if (this.id) {
29
- this.loadData();
30
- }
31
- });
32
- }
33
- loadData() {
34
- this.isLoading = true;
35
- this.service.show(this.id).subscribe({
36
- next: (response) => {
37
- this.stockIssue = response?.item;
38
- this.isLoading = false;
39
- },
40
- error: () => {
41
- this.isLoading = false;
42
- }
43
- });
44
- }
45
- redirectBack() {
46
- this.location.back();
47
- }
48
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueViewComponent, deps: [{ token: i4.ActivatedRoute }, { token: StockIssueService }, { token: i3.Location }], target: i0.ɵɵFactoryTarget.Component });
49
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueViewComponent, isStandalone: true, selector: "app-stock-issue-view", ngImport: i0, template: "<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n\n<div *ngIf=\"stockIssue\" class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-card>\n <mat-card-content>\n <h3 class=\"mb-0\">Stock Issue for {{ stockIssue?.stock_issue_products[0]?.product?.name }}</h3>\n </mat-card-content>\n </mat-card>\n <div class=\"d-flex justify-content-start align-items-start gap-2\">\n <div class=\"d-flex flex-column gap-2\" style=\"width: 350px\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <strong class=\"mb-0 text-dark\">Information</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-stock-issue-form-button [stockIssue]=\"stockIssue\" (saved)=\"loadData()\">\n </app-stock-issue-form-button>\n <app-stock-issuance-delete-button [stockIssuance]=\"stockIssue\" (deleted)=\"redirectBack()\">\n </app-stock-issuance-delete-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"d-flex flex-column justify-content-start gap-2 mt-3\">\n <!-- Product & SKU / Date -->\n <div class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex flex-column gap-0\">\n <a class=\"text-decoration-none text-black\"\n [routerLink]=\"['/inventory/products', stockIssue?.stock_issue_products[0]?.product?.id, 'view']\">\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.product?.name }}</p>\n </a>\n <small *ngIf=\"stockIssue?.stock_issue_products[0]?.product?.sku\">{{\n stockIssue?.stock_issue_products[0]?.product?.sku }}</small>\n </div>\n <div class=\"d-flex flex-column justify-content-end gap-0\">\n <small *ngIf=\"stockIssue?.date\">{{ stockIssue?.date | date }}</small>\n <ng-container *ngIf=\"stockIssue?.stock_issue_products[0]?.batch?.expires_on\">\n <small techlifyFeatureEnabled=\"product-batch-numbers\">\n Expires on {{ stockIssue?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </ng-container>\n </div>\n </div>\n\n <!-- Quantity & Location -->\n <div class=\"row\">\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.quantity\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Quantity</small>\n <div class=\"d-flex gap-1\">\n <h3 class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.quantity }}</h3>\n <small class=\"text-secondary\">{{\n stockIssue?.stock_issue_products[0]?.product?.measure?.title\n }}</small>\n </div>\n </div>\n </div>\n\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.location\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Location</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.location?.title }}</p>\n </div>\n </div>\n </div>\n\n <!-- Batch & Expires On (if feature enabled) -->\n <ng-container *ngIf=\"stockIssue?.stock_issue_products[0]?.batch\">\n <div class=\"row\" techlifyFeatureEnabled=\"product-batch-numbers\">\n <div class=\"col-6\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Batch</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.batch?.batch_number }}</p>\n </div>\n </div>\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.batch?.expires_on\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Expires On</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.batch?.expires_on | date }}\n </p>\n </div>\n </div>\n </div>\n </ng-container>\n\n <!-- Particulars -->\n <div class=\"row\" *ngIf=\"stockIssue?.stock_issue_products[0]?.particulars\">\n <div class=\"col-12\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Particulars</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.particulars }}</p>\n </div>\n </div>\n </div>\n\n <!-- Creator -->\n <div class=\"row\" *ngIf=\"stockIssue?.creator\">\n <div class=\"col-12\">\n <small class=\"mb-0\">\n <span class=\"text-secondary\">Created By</span> {{ stockIssue?.creator?.name }}\n <span class=\"text-secondary\">On</span> {{ stockIssue?.created_at | date }}\n </small>\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n\n <app-note-list labelText=\"Notes\" viewMode=\"timeline\" modelType=\"StockIssue\"\n [relatedModelId]=\"stockIssue?.id\"></app-note-list>\n </div>\n\n <div style=\"width: calc(100% - 350px - 0.5rem)\">\n <app-entity-files-view-all title=\"Document\" [entityId]=\"stockIssue?.id\" entityType=\"StockIssue\"\n viewMode=\"timeline\">\n </app-entity-files-view-all>\n </div>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: StockIssueFormModule }, { kind: "component", type: StockIssueFormButtonComponent, selector: "app-stock-issue-form-button", inputs: ["product", "stockIssueProduct", "stockIssue", "icon", "issuableType", "issuableId"], outputs: ["saved"] }, { kind: "ngmodule", type: StockIssuanceDeleteButtonModule }, { kind: "component", type: StockIssuanceDeleteButtonComponent, selector: "app-stock-issuance-delete-button", inputs: ["stockIssuance"], outputs: ["deleted"] }, { kind: "ngmodule", type: NoteModule }, { kind: "component", type: i1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "ngmodule", type: EntityFilesViewAllModule }, { kind: "component", type: i1.EntityFilesViewAllComponent, selector: "app-entity-files-view-all", inputs: ["entityId", "entityType", "viewOnly", "removeSearch", "hideTitleAndDetails", "displayMode", "allowMultipleFiles", "allowBulkUpdate", "viewMode", "fileDropperHeight", "isShowDragDropSection", "useTechlifyTags", "techlifyTagCategories", "techlifyTagConfig", "title", "permission"] }, { kind: "ngmodule", type: TechlifyFeatureModule }, { kind: "directive", type: i1.TechlifyFeatureEnabledDirective, selector: "[techlifyFeatureEnabled]", inputs: ["techlifyFeatureEnabled"] }], preserveWhitespaces: true });
50
- }
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueViewComponent, decorators: [{
52
- type: Component,
53
- args: [{ selector: 'app-stock-issue-view', standalone: true, imports: [
54
- CommonModule,
55
- MaterialModule,
56
- RouterLink,
57
- StockIssueFormModule,
58
- StockIssuanceDeleteButtonModule,
59
- NoteModule,
60
- EntityFilesViewAllModule,
61
- TechlifyFeatureModule,
62
- ], template: "<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n\n<div *ngIf=\"stockIssue\" class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-card>\n <mat-card-content>\n <h3 class=\"mb-0\">Stock Issue for {{ stockIssue?.stock_issue_products[0]?.product?.name }}</h3>\n </mat-card-content>\n </mat-card>\n <div class=\"d-flex justify-content-start align-items-start gap-2\">\n <div class=\"d-flex flex-column gap-2\" style=\"width: 350px\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <strong class=\"mb-0 text-dark\">Information</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-stock-issue-form-button [stockIssue]=\"stockIssue\" (saved)=\"loadData()\">\n </app-stock-issue-form-button>\n <app-stock-issuance-delete-button [stockIssuance]=\"stockIssue\" (deleted)=\"redirectBack()\">\n </app-stock-issuance-delete-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"d-flex flex-column justify-content-start gap-2 mt-3\">\n <!-- Product & SKU / Date -->\n <div class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex flex-column gap-0\">\n <a class=\"text-decoration-none text-black\"\n [routerLink]=\"['/inventory/products', stockIssue?.stock_issue_products[0]?.product?.id, 'view']\">\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.product?.name }}</p>\n </a>\n <small *ngIf=\"stockIssue?.stock_issue_products[0]?.product?.sku\">{{\n stockIssue?.stock_issue_products[0]?.product?.sku }}</small>\n </div>\n <div class=\"d-flex flex-column justify-content-end gap-0\">\n <small *ngIf=\"stockIssue?.date\">{{ stockIssue?.date | date }}</small>\n <ng-container *ngIf=\"stockIssue?.stock_issue_products[0]?.batch?.expires_on\">\n <small techlifyFeatureEnabled=\"product-batch-numbers\">\n Expires on {{ stockIssue?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </ng-container>\n </div>\n </div>\n\n <!-- Quantity & Location -->\n <div class=\"row\">\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.quantity\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Quantity</small>\n <div class=\"d-flex gap-1\">\n <h3 class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.quantity }}</h3>\n <small class=\"text-secondary\">{{\n stockIssue?.stock_issue_products[0]?.product?.measure?.title\n }}</small>\n </div>\n </div>\n </div>\n\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.location\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Location</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.location?.title }}</p>\n </div>\n </div>\n </div>\n\n <!-- Batch & Expires On (if feature enabled) -->\n <ng-container *ngIf=\"stockIssue?.stock_issue_products[0]?.batch\">\n <div class=\"row\" techlifyFeatureEnabled=\"product-batch-numbers\">\n <div class=\"col-6\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Batch</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.batch?.batch_number }}</p>\n </div>\n </div>\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.batch?.expires_on\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Expires On</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.batch?.expires_on | date }}\n </p>\n </div>\n </div>\n </div>\n </ng-container>\n\n <!-- Particulars -->\n <div class=\"row\" *ngIf=\"stockIssue?.stock_issue_products[0]?.particulars\">\n <div class=\"col-12\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Particulars</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.particulars }}</p>\n </div>\n </div>\n </div>\n\n <!-- Creator -->\n <div class=\"row\" *ngIf=\"stockIssue?.creator\">\n <div class=\"col-12\">\n <small class=\"mb-0\">\n <span class=\"text-secondary\">Created By</span> {{ stockIssue?.creator?.name }}\n <span class=\"text-secondary\">On</span> {{ stockIssue?.created_at | date }}\n </small>\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n\n <app-note-list labelText=\"Notes\" viewMode=\"timeline\" modelType=\"StockIssue\"\n [relatedModelId]=\"stockIssue?.id\"></app-note-list>\n </div>\n\n <div style=\"width: calc(100% - 350px - 0.5rem)\">\n <app-entity-files-view-all title=\"Document\" [entityId]=\"stockIssue?.id\" entityType=\"StockIssue\"\n viewMode=\"timeline\">\n </app-entity-files-view-all>\n </div>\n </div>\n</div>" }]
63
- }], ctorParameters: () => [{ type: i4.ActivatedRoute }, { type: StockIssueService }, { type: i3.Location }] });
64
-
65
- export { StockIssueViewComponent };
66
- //# sourceMappingURL=techlify-inventory-common-stock-issue-view.component-C-SHFxmY.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"techlify-inventory-common-stock-issue-view.component-C-SHFxmY.mjs","sources":["../../../projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-view/stock-issue-view.component.ts","../../../projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-view/stock-issue-view.component.html"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { CommonModule, Location } from '@angular/common';\nimport { ActivatedRoute, RouterLink } from '@angular/router';\nimport { MaterialModule } from '../../material.module';\nimport { StockIssueService } from '../stock-issue.service';\nimport { EntityFilesViewAllModule, NoteModule, TechlifyFeatureModule } from 'ngx-techlify-core';\nimport { StockIssueFormModule } from '../stock-issue-form/stock-issue-form.module';\nimport { StockIssuanceDeleteButtonModule } from '../stock-issuance-delete-button/stock-issuance-delete-button.module';\n\n@Component({\n selector: 'app-stock-issue-view',\n templateUrl: './stock-issue-view.component.html',\n styleUrl: './stock-issue-view.component.css',\n standalone: true,\n imports: [\n CommonModule,\n MaterialModule,\n RouterLink,\n StockIssueFormModule,\n StockIssuanceDeleteButtonModule,\n NoteModule,\n EntityFilesViewAllModule,\n TechlifyFeatureModule,\n ],\n})\nexport class StockIssueViewComponent implements OnInit {\n\n id!: number;\n isLoading!: boolean;\n stockIssue!: any;\n\n constructor(\n private activatedRoute: ActivatedRoute,\n private service: StockIssueService,\n private location: Location\n ) { }\n\n ngOnInit(): void {\n this.activatedRoute.params.subscribe(params => {\n this.id = parseInt(params['id']);\n if (this.id) {\n this.loadData();\n }\n });\n }\n\n loadData() {\n this.isLoading = true;\n this.service.show(this.id).subscribe({\n next: (response: any) => {\n this.stockIssue = response?.item;\n this.isLoading = false;\n },\n error: () => {\n this.isLoading = false;\n }\n });\n }\n\n redirectBack() {\n this.location.back();\n }\n}\n","<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n\n<div *ngIf=\"stockIssue\" class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-card>\n <mat-card-content>\n <h3 class=\"mb-0\">Stock Issue for {{ stockIssue?.stock_issue_products[0]?.product?.name }}</h3>\n </mat-card-content>\n </mat-card>\n <div class=\"d-flex justify-content-start align-items-start gap-2\">\n <div class=\"d-flex flex-column gap-2\" style=\"width: 350px\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <strong class=\"mb-0 text-dark\">Information</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-stock-issue-form-button [stockIssue]=\"stockIssue\" (saved)=\"loadData()\">\n </app-stock-issue-form-button>\n <app-stock-issuance-delete-button [stockIssuance]=\"stockIssue\" (deleted)=\"redirectBack()\">\n </app-stock-issuance-delete-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"d-flex flex-column justify-content-start gap-2 mt-3\">\n <!-- Product & SKU / Date -->\n <div class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex flex-column gap-0\">\n <a class=\"text-decoration-none text-black\"\n [routerLink]=\"['/inventory/products', stockIssue?.stock_issue_products[0]?.product?.id, 'view']\">\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.product?.name }}</p>\n </a>\n <small *ngIf=\"stockIssue?.stock_issue_products[0]?.product?.sku\">{{\n stockIssue?.stock_issue_products[0]?.product?.sku }}</small>\n </div>\n <div class=\"d-flex flex-column justify-content-end gap-0\">\n <small *ngIf=\"stockIssue?.date\">{{ stockIssue?.date | date }}</small>\n <ng-container *ngIf=\"stockIssue?.stock_issue_products[0]?.batch?.expires_on\">\n <small techlifyFeatureEnabled=\"product-batch-numbers\">\n Expires on {{ stockIssue?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </ng-container>\n </div>\n </div>\n\n <!-- Quantity & Location -->\n <div class=\"row\">\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.quantity\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Quantity</small>\n <div class=\"d-flex gap-1\">\n <h3 class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.quantity }}</h3>\n <small class=\"text-secondary\">{{\n stockIssue?.stock_issue_products[0]?.product?.measure?.title\n }}</small>\n </div>\n </div>\n </div>\n\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.location\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Location</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.location?.title }}</p>\n </div>\n </div>\n </div>\n\n <!-- Batch & Expires On (if feature enabled) -->\n <ng-container *ngIf=\"stockIssue?.stock_issue_products[0]?.batch\">\n <div class=\"row\" techlifyFeatureEnabled=\"product-batch-numbers\">\n <div class=\"col-6\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Batch</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.batch?.batch_number }}</p>\n </div>\n </div>\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.batch?.expires_on\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Expires On</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.batch?.expires_on | date }}\n </p>\n </div>\n </div>\n </div>\n </ng-container>\n\n <!-- Particulars -->\n <div class=\"row\" *ngIf=\"stockIssue?.stock_issue_products[0]?.particulars\">\n <div class=\"col-12\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Particulars</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.particulars }}</p>\n </div>\n </div>\n </div>\n\n <!-- Creator -->\n <div class=\"row\" *ngIf=\"stockIssue?.creator\">\n <div class=\"col-12\">\n <small class=\"mb-0\">\n <span class=\"text-secondary\">Created By</span> {{ stockIssue?.creator?.name }}\n <span class=\"text-secondary\">On</span> {{ stockIssue?.created_at | date }}\n </small>\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n\n <app-note-list labelText=\"Notes\" viewMode=\"timeline\" modelType=\"StockIssue\"\n [relatedModelId]=\"stockIssue?.id\"></app-note-list>\n </div>\n\n <div style=\"width: calc(100% - 350px - 0.5rem)\">\n <app-entity-files-view-all title=\"Document\" [entityId]=\"stockIssue?.id\" entityType=\"StockIssue\"\n viewMode=\"timeline\">\n </app-entity-files-view-all>\n </div>\n </div>\n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