techlify-inventory-common 18.0.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 (182) hide show
  1. package/README.md +24 -0
  2. package/esm2022/lib/inventory-common/category/category-form/category-form.component.mjs +77 -0
  3. package/esm2022/lib/inventory-common/category/category-form-button/category-form-button.component.mjs +32 -0
  4. package/esm2022/lib/inventory-common/category/category-list-page/category-list-page.component.mjs +68 -0
  5. package/esm2022/lib/inventory-common/category/category-routing.module.mjs +24 -0
  6. package/esm2022/lib/inventory-common/category/category.module.mjs +63 -0
  7. package/esm2022/lib/inventory-common/category/category.service.mjs +18 -0
  8. package/esm2022/lib/inventory-common/inventory-common-routing.module.mjs +53 -0
  9. package/esm2022/lib/inventory-common/inventory-common.module.mjs +39 -0
  10. package/esm2022/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.mjs +42 -0
  11. package/esm2022/lib/inventory-common/material.module.mjs +172 -0
  12. package/esm2022/lib/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.mjs +44 -0
  13. package/esm2022/lib/inventory-common/measure/measure-delete/measure-delete.module.mjs +19 -0
  14. package/esm2022/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.mjs +80 -0
  15. package/esm2022/lib/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.mjs +30 -0
  16. package/esm2022/lib/inventory-common/measure/measure-form/measure-form.module.mjs +21 -0
  17. package/esm2022/lib/inventory-common/measure/measure-routing.module.mjs +24 -0
  18. package/esm2022/lib/inventory-common/measure/measure.module.mjs +47 -0
  19. package/esm2022/lib/inventory-common/measure/measure.service.mjs +18 -0
  20. package/esm2022/lib/inventory-common/measure/measures-list/measures-list.component.mjs +71 -0
  21. package/esm2022/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.mjs +45 -0
  22. package/esm2022/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.module.mjs +36 -0
  23. package/esm2022/lib/inventory-common/product/product-basic-info/product-basic-info.component.mjs +54 -0
  24. package/esm2022/lib/inventory-common/product/product-delete-button/product-delete-button.component.mjs +54 -0
  25. package/esm2022/lib/inventory-common/product/product-form/product-form.component.mjs +180 -0
  26. package/esm2022/lib/inventory-common/product/product-form-button/product-form-button.component.mjs +40 -0
  27. package/esm2022/lib/inventory-common/product/product-form.service.mjs +17 -0
  28. package/esm2022/lib/inventory-common/product/product-import-page/product-import-page.component.mjs +66 -0
  29. package/esm2022/lib/inventory-common/product/product-list/product-list.component.mjs +189 -0
  30. package/esm2022/lib/inventory-common/product/product-measure-form/product-measure-form.component.mjs +101 -0
  31. package/esm2022/lib/inventory-common/product/product-measures-list/product-measures-list.component.mjs +151 -0
  32. package/esm2022/lib/inventory-common/product/product-nav-bar/product-nav-bar.component.mjs +12 -0
  33. package/esm2022/lib/inventory-common/product/product-routing.module.mjs +57 -0
  34. package/esm2022/lib/inventory-common/product/product-summary-chart/product-summary-chart.component.mjs +63 -0
  35. package/esm2022/lib/inventory-common/product/product-summary-chart/product-summary-chart.module.mjs +29 -0
  36. package/esm2022/lib/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.mjs +54 -0
  37. package/esm2022/lib/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.mjs +77 -0
  38. package/esm2022/lib/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.mjs +35 -0
  39. package/esm2022/lib/inventory-common/product/product-tax/product-tax.module.mjs +39 -0
  40. package/esm2022/lib/inventory-common/product/product-tax/product-tax.service.mjs +18 -0
  41. package/esm2022/lib/inventory-common/product/product-view-page/product-view-page.component.mjs +68 -0
  42. package/esm2022/lib/inventory-common/product/product.module.mjs +111 -0
  43. package/esm2022/lib/inventory-common/product/product.service.mjs +49 -0
  44. package/esm2022/lib/inventory-common/services/techlify-form-service.mjs +11 -0
  45. package/esm2022/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.mjs +47 -0
  46. package/esm2022/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.module.mjs +19 -0
  47. package/esm2022/lib/inventory-common/stock-issuances/stock-issuance.service.mjs +18 -0
  48. package/esm2022/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.mjs +126 -0
  49. package/esm2022/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.module.mjs +48 -0
  50. package/esm2022/lib/inventory-common/stock-issuances/stock-issuances-routing.module.mjs +24 -0
  51. package/esm2022/lib/inventory-common/stock-issuances/stock-issuances.module.mjs +67 -0
  52. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.mjs +120 -0
  53. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form-button/stock-issue-form-button.component.mjs +44 -0
  54. package/esm2022/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form.module.mjs +53 -0
  55. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.mjs +47 -0
  56. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.mjs +125 -0
  57. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form-button/stock-receipt-form-button.component.mjs +38 -0
  58. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.module.mjs +53 -0
  59. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt.service.mjs +18 -0
  60. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.mjs +119 -0
  61. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-routing.module.mjs +24 -0
  62. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts.module.mjs +75 -0
  63. package/esm2022/lib/inventory-common/stock-summary.service.mjs +26 -0
  64. package/esm2022/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.mjs +59 -0
  65. package/esm2022/lib/inventory-common/supplier/payee-selector/payee-selector.module.mjs +35 -0
  66. package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form.component.mjs +118 -0
  67. package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form.service.mjs +17 -0
  68. package/esm2022/lib/inventory-common/supplier/supplier-information/supplier-information.component.mjs +72 -0
  69. package/esm2022/lib/inventory-common/supplier/supplier-routing.module.mjs +40 -0
  70. package/esm2022/lib/inventory-common/supplier/supplier-type.service.mjs +25 -0
  71. package/esm2022/lib/inventory-common/supplier/supplier-view/supplier-view.component.mjs +66 -0
  72. package/esm2022/lib/inventory-common/supplier/supplier.component.mjs +20 -0
  73. package/esm2022/lib/inventory-common/supplier/supplier.module.mjs +63 -0
  74. package/esm2022/lib/inventory-common/supplier/supplier.service.mjs +61 -0
  75. package/esm2022/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.mjs +241 -0
  76. package/esm2022/lib/inventory-common/techlify-filter/techlify-filter.component.mjs +118 -0
  77. package/esm2022/lib/inventory-common/techlify-filter/techlify-filter.module.mjs +38 -0
  78. package/esm2022/public-api.mjs +9 -0
  79. package/esm2022/techlify-inventory-common.mjs +5 -0
  80. package/fesm2022/techlify-inventory-common-category.module-Stn6e73V.mjs +257 -0
  81. package/fesm2022/techlify-inventory-common-category.module-Stn6e73V.mjs.map +1 -0
  82. package/fesm2022/techlify-inventory-common-measure.module-CirswKXn.mjs +313 -0
  83. package/fesm2022/techlify-inventory-common-measure.module-CirswKXn.mjs.map +1 -0
  84. package/fesm2022/techlify-inventory-common-product.module-qdeafFV5.mjs +1172 -0
  85. package/fesm2022/techlify-inventory-common-product.module-qdeafFV5.mjs.map +1 -0
  86. package/fesm2022/techlify-inventory-common-stock-issuances-list.module-CyFDxARk.mjs +436 -0
  87. package/fesm2022/techlify-inventory-common-stock-issuances-list.module-CyFDxARk.mjs.map +1 -0
  88. package/fesm2022/techlify-inventory-common-stock-issuances.module-Dm9i2kcf.mjs +89 -0
  89. package/fesm2022/techlify-inventory-common-stock-issuances.module-Dm9i2kcf.mjs.map +1 -0
  90. package/fesm2022/techlify-inventory-common-stock-receipt-form.module-BZDrN7la.mjs +302 -0
  91. package/fesm2022/techlify-inventory-common-stock-receipt-form.module-BZDrN7la.mjs.map +1 -0
  92. package/fesm2022/techlify-inventory-common-stock-receipts.module-CUPdWteR.mjs +253 -0
  93. package/fesm2022/techlify-inventory-common-stock-receipts.module-CUPdWteR.mjs.map +1 -0
  94. package/fesm2022/techlify-inventory-common-supplier-form.component-CHmMG7O8.mjs +178 -0
  95. package/fesm2022/techlify-inventory-common-supplier-form.component-CHmMG7O8.mjs.map +1 -0
  96. package/fesm2022/techlify-inventory-common-supplier.module-gzHesNtQ.mjs +665 -0
  97. package/fesm2022/techlify-inventory-common-supplier.module-gzHesNtQ.mjs.map +1 -0
  98. package/fesm2022/techlify-inventory-common-techlify-form-service-CiVfwYTS.mjs +14 -0
  99. package/fesm2022/techlify-inventory-common-techlify-form-service-CiVfwYTS.mjs.map +1 -0
  100. package/fesm2022/techlify-inventory-common-techlify-inventory-common-Czyc0jLI.mjs +495 -0
  101. package/fesm2022/techlify-inventory-common-techlify-inventory-common-Czyc0jLI.mjs.map +1 -0
  102. package/fesm2022/techlify-inventory-common.mjs +2 -0
  103. package/fesm2022/techlify-inventory-common.mjs.map +1 -0
  104. package/index.d.ts +5 -0
  105. package/lib/inventory-common/category/category-form/category-form.component.d.ts +19 -0
  106. package/lib/inventory-common/category/category-form-button/category-form-button.component.d.ts +13 -0
  107. package/lib/inventory-common/category/category-list-page/category-list-page.component.d.ts +20 -0
  108. package/lib/inventory-common/category/category-routing.module.d.ts +7 -0
  109. package/lib/inventory-common/category/category.module.d.ts +19 -0
  110. package/lib/inventory-common/category/category.service.d.ts +7 -0
  111. package/lib/inventory-common/inventory-common-routing.module.d.ts +7 -0
  112. package/lib/inventory-common/inventory-common.module.d.ts +13 -0
  113. package/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.d.ts +14 -0
  114. package/lib/inventory-common/material.module.d.ts +40 -0
  115. package/lib/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.d.ts +19 -0
  116. package/lib/inventory-common/measure/measure-delete/measure-delete.module.d.ts +9 -0
  117. package/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.d.ts +19 -0
  118. package/lib/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.d.ts +13 -0
  119. package/lib/inventory-common/measure/measure-form/measure-form.module.d.ts +11 -0
  120. package/lib/inventory-common/measure/measure-routing.module.d.ts +7 -0
  121. package/lib/inventory-common/measure/measure.module.d.ts +15 -0
  122. package/lib/inventory-common/measure/measure.service.d.ts +7 -0
  123. package/lib/inventory-common/measure/measures-list/measures-list.component.d.ts +17 -0
  124. package/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.d.ts +13 -0
  125. package/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.module.d.ts +12 -0
  126. package/lib/inventory-common/product/product-basic-info/product-basic-info.component.d.ts +19 -0
  127. package/lib/inventory-common/product/product-delete-button/product-delete-button.component.d.ts +26 -0
  128. package/lib/inventory-common/product/product-form/product-form.component.d.ts +44 -0
  129. package/lib/inventory-common/product/product-form-button/product-form-button.component.d.ts +20 -0
  130. package/lib/inventory-common/product/product-form.service.d.ts +7 -0
  131. package/lib/inventory-common/product/product-import-page/product-import-page.component.d.ts +10 -0
  132. package/lib/inventory-common/product/product-list/product-list.component.d.ts +44 -0
  133. package/lib/inventory-common/product/product-measure-form/product-measure-form.component.d.ts +33 -0
  134. package/lib/inventory-common/product/product-measures-list/product-measures-list.component.d.ts +43 -0
  135. package/lib/inventory-common/product/product-nav-bar/product-nav-bar.component.d.ts +5 -0
  136. package/lib/inventory-common/product/product-routing.module.d.ts +7 -0
  137. package/lib/inventory-common/product/product-summary-chart/product-summary-chart.component.d.ts +15 -0
  138. package/lib/inventory-common/product/product-summary-chart/product-summary-chart.module.d.ts +10 -0
  139. package/lib/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.d.ts +26 -0
  140. package/lib/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.d.ts +21 -0
  141. package/lib/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.d.ts +13 -0
  142. package/lib/inventory-common/product/product-tax/product-tax.module.d.ts +12 -0
  143. package/lib/inventory-common/product/product-tax/product-tax.service.d.ts +7 -0
  144. package/lib/inventory-common/product/product-view-page/product-view-page.component.d.ts +33 -0
  145. package/lib/inventory-common/product/product.module.d.ts +28 -0
  146. package/lib/inventory-common/product/product.service.d.ts +19 -0
  147. package/lib/inventory-common/services/techlify-form-service.d.ts +5 -0
  148. package/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.d.ts +18 -0
  149. package/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.module.d.ts +9 -0
  150. package/lib/inventory-common/stock-issuances/stock-issuance.service.d.ts +7 -0
  151. package/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.d.ts +24 -0
  152. package/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.module.d.ts +15 -0
  153. package/lib/inventory-common/stock-issuances/stock-issuances-routing.module.d.ts +7 -0
  154. package/lib/inventory-common/stock-issuances/stock-issuances.module.d.ts +19 -0
  155. package/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.d.ts +24 -0
  156. package/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form-button/stock-issue-form-button.component.d.ts +18 -0
  157. package/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form.module.d.ts +17 -0
  158. package/lib/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.d.ts +18 -0
  159. package/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.d.ts +22 -0
  160. package/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form-button/stock-receipt-form-button.component.d.ts +16 -0
  161. package/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.module.d.ts +17 -0
  162. package/lib/inventory-common/stock-receipts/stock-receipt.service.d.ts +7 -0
  163. package/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.d.ts +21 -0
  164. package/lib/inventory-common/stock-receipts/stock-receipts-routing.module.d.ts +7 -0
  165. package/lib/inventory-common/stock-receipts/stock-receipts.module.d.ts +20 -0
  166. package/lib/inventory-common/stock-summary.service.d.ts +14 -0
  167. package/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.d.ts +20 -0
  168. package/lib/inventory-common/supplier/payee-selector/payee-selector.module.d.ts +11 -0
  169. package/lib/inventory-common/supplier/supplier-form/supplier-form.component.d.ts +29 -0
  170. package/lib/inventory-common/supplier/supplier-form/supplier-form.service.d.ts +7 -0
  171. package/lib/inventory-common/supplier/supplier-information/supplier-information.component.d.ts +18 -0
  172. package/lib/inventory-common/supplier/supplier-routing.module.d.ts +7 -0
  173. package/lib/inventory-common/supplier/supplier-type.service.d.ts +13 -0
  174. package/lib/inventory-common/supplier/supplier-view/supplier-view.component.d.ts +20 -0
  175. package/lib/inventory-common/supplier/supplier.component.d.ts +10 -0
  176. package/lib/inventory-common/supplier/supplier.module.d.ts +18 -0
  177. package/lib/inventory-common/supplier/supplier.service.d.ts +39 -0
  178. package/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.d.ts +51 -0
  179. package/lib/inventory-common/techlify-filter/techlify-filter.component.d.ts +31 -0
  180. package/lib/inventory-common/techlify-filter/techlify-filter.module.d.ts +11 -0
  181. package/package.json +25 -0
  182. package/public-api.d.ts +5 -0
@@ -0,0 +1,257 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Output, Input, Component, NgModule } from '@angular/core';
3
+ import * as i4 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i2$1 from '@angular/router';
6
+ import { RouterModule } from '@angular/router';
7
+ import * as i1 from 'ngx-techlify-core';
8
+ import { TechlifyServiceBaseClass, TechlifyFormComponentInterface, TechlifyListingControllerInterface, MaterialModule } from 'ngx-techlify-core';
9
+ import * as i2 from '@angular/forms';
10
+ import { Validators, ReactiveFormsModule } from '@angular/forms';
11
+ import * as i3$1 from '@angular/material/card';
12
+ import { MatCardModule } from '@angular/material/card';
13
+ import * as i5 from '@angular/material/sort';
14
+ import * as i6$1 from '@angular/material/table';
15
+ import * as i7$2 from '@angular/material/progress-bar';
16
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
17
+ import { T as TechlifyFilterComponent, a as TechlifyFilterModule } from './techlify-inventory-common-techlify-inventory-common-Czyc0jLI.mjs';
18
+ import * as i10 from 'ngx-infinite-scroll';
19
+ import { InfiniteScrollModule } from 'ngx-infinite-scroll';
20
+ import * as i1$1 from '@angular/material/dialog';
21
+ import { MatDialogModule } from '@angular/material/dialog';
22
+ import * as i3 from '@angular/material/icon';
23
+ import { MatIconModule } from '@angular/material/icon';
24
+ import * as i7 from '@angular/material/button';
25
+ import * as i6 from '@angular/material/form-field';
26
+ import * as i7$1 from '@angular/material/input';
27
+
28
+ class CategoryService extends TechlifyServiceBaseClass {
29
+ constructor(httpService) {
30
+ super(httpService, "product-categories");
31
+ }
32
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryService, deps: [{ token: i1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
33
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryService, providedIn: "root" });
34
+ }
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryService, decorators: [{
36
+ type: Injectable,
37
+ args: [{
38
+ providedIn: "root",
39
+ }]
40
+ }], ctorParameters: () => [{ type: i1.HttpService }] });
41
+
42
+ class CategoryFormComponent extends TechlifyFormComponentInterface {
43
+ formBuilder;
44
+ categoryService;
45
+ alertService;
46
+ category;
47
+ saved = new EventEmitter();
48
+ cancelled = new EventEmitter();
49
+ isSaving = false;
50
+ constructor(formValidatorService, formBuilder, categoryService, alertService) {
51
+ super(formValidatorService);
52
+ this.formBuilder = formBuilder;
53
+ this.categoryService = categoryService;
54
+ this.alertService = alertService;
55
+ this.errorMessages = {
56
+ title: {
57
+ required: "The title field is required.",
58
+ },
59
+ };
60
+ this.form = this.formBuilder.group({
61
+ id: [""],
62
+ title: ["", Validators.required],
63
+ description: [""],
64
+ });
65
+ }
66
+ save() {
67
+ this.form.markAllAsTouched();
68
+ if (this.form.invalid) {
69
+ this.alertService.addAlert("Please check the form for errors.", "error");
70
+ return;
71
+ }
72
+ this.isSaving = true;
73
+ const data = { ...this.form.value };
74
+ let request = this.categoryService.store(data);
75
+ if (this.category?.id) {
76
+ request = this.categoryService.update(data);
77
+ }
78
+ request.subscribe({
79
+ next: (response) => {
80
+ this.isSaving = false;
81
+ this.alertService.addAlert("Category saved successfully!", "success");
82
+ this.saved.emit(response?.item);
83
+ },
84
+ error: () => {
85
+ this.isSaving = false;
86
+ },
87
+ });
88
+ }
89
+ ngOnInit() {
90
+ if (this.category) {
91
+ this.form.patchValue({ ...this.category });
92
+ }
93
+ }
94
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.FormBuilder }, { token: CategoryService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
95
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CategoryFormComponent, selector: "app-category-form", inputs: { category: "category" }, outputs: { saved: "saved", cancelled: "cancelled" }, usesInheritance: true, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column justify-content-start\"\n>\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Title\" />\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage(\"title\") }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Description</mat-label>\n <textarea\n matInput\n formControlName=\"description\"\n placeholder=\"Description\"\n ></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button\n [disabled]=\"isSaving\"\n type=\"submit\"\n mat-raised-button\n color=\"primary\"\n >\n Save\n </button>\n <button\n [disabled]=\"isSaving\"\n type=\"button\"\n mat-flat-button\n (click)=\"cancelled.emit()\"\n >\n Cancel\n </button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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: "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: 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: i7$1.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"] }], preserveWhitespaces: true });
96
+ }
97
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryFormComponent, decorators: [{
98
+ type: Component,
99
+ args: [{ selector: "app-category-form", template: "<form\n [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column justify-content-start\"\n>\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Title\" />\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage(\"title\") }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Description</mat-label>\n <textarea\n matInput\n formControlName=\"description\"\n placeholder=\"Description\"\n ></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button\n [disabled]=\"isSaving\"\n type=\"submit\"\n mat-raised-button\n color=\"primary\"\n >\n Save\n </button>\n <button\n [disabled]=\"isSaving\"\n type=\"button\"\n mat-flat-button\n (click)=\"cancelled.emit()\"\n >\n Cancel\n </button>\n </div>\n</form>\n" }]
100
+ }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.FormBuilder }, { type: CategoryService }, { type: i1.AlertService }], propDecorators: { category: [{
101
+ type: Input
102
+ }], saved: [{
103
+ type: Output
104
+ }], cancelled: [{
105
+ type: Output
106
+ }] } });
107
+
108
+ class CategoryFormButtonComponent {
109
+ matDialog;
110
+ category;
111
+ saved = new EventEmitter();
112
+ constructor(matDialog) {
113
+ this.matDialog = matDialog;
114
+ }
115
+ showCategoryForm(templateRef) {
116
+ this.matDialog.open(templateRef, { width: "400px" });
117
+ }
118
+ onCategorySaved(category) {
119
+ this.matDialog.closeAll();
120
+ this.saved.emit(category);
121
+ }
122
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryFormButtonComponent, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
123
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CategoryFormButtonComponent, selector: "app-category-form-button", inputs: { category: "category" }, outputs: { saved: "saved" }, ngImport: i0, template: "<mat-icon\n *ngIf=\"!category\"\n color=\"primary\"\n class=\"cursor-pointer\"\n (click)=\"showCategoryForm(categoryFormTemplate)\"\n>\n add\n</mat-icon>\n\n<mat-icon\n *ngIf=\"category\"\n class=\"cursor-pointer\"\n (click)=\"showCategoryForm(categoryFormTemplate)\"\n>\n edit\n</mat-icon>\n\n<ng-template #categoryFormTemplate>\n <h3 mat-dialog-title class=\"mb-0\">\n {{ category ? \"Edit\" : \"Create\" }} Category\n </h3>\n <small class=\"text-secondary mb-1\">\n Note that category names are unique and cannot be duplicated.\n </small>\n <div mat-dialog-content>\n <app-category-form\n [category]=\"category\"\n (saved)=\"onCategorySaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-category-form>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: CategoryFormComponent, selector: "app-category-form", inputs: ["category"], outputs: ["saved", "cancelled"] }], preserveWhitespaces: true });
124
+ }
125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryFormButtonComponent, decorators: [{
126
+ type: Component,
127
+ args: [{ selector: "app-category-form-button", template: "<mat-icon\n *ngIf=\"!category\"\n color=\"primary\"\n class=\"cursor-pointer\"\n (click)=\"showCategoryForm(categoryFormTemplate)\"\n>\n add\n</mat-icon>\n\n<mat-icon\n *ngIf=\"category\"\n class=\"cursor-pointer\"\n (click)=\"showCategoryForm(categoryFormTemplate)\"\n>\n edit\n</mat-icon>\n\n<ng-template #categoryFormTemplate>\n <h3 mat-dialog-title class=\"mb-0\">\n {{ category ? \"Edit\" : \"Create\" }} Category\n </h3>\n <small class=\"text-secondary mb-1\">\n Note that category names are unique and cannot be duplicated.\n </small>\n <div mat-dialog-content>\n <app-category-form\n [category]=\"category\"\n (saved)=\"onCategorySaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-category-form>\n </div>\n</ng-template>\n" }]
128
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }], propDecorators: { category: [{
129
+ type: Input
130
+ }], saved: [{
131
+ type: Output
132
+ }] } });
133
+
134
+ class CategoryListPageComponent extends TechlifyListingControllerInterface {
135
+ formBuilder;
136
+ categoryService;
137
+ filterConfig = {
138
+ search: {
139
+ placeholder: "Search category title, description",
140
+ },
141
+ };
142
+ displayedColumns = [
143
+ "no",
144
+ "title",
145
+ "description",
146
+ "products",
147
+ "actions",
148
+ ];
149
+ constructor(formBuilder, categoryService) {
150
+ super();
151
+ this.formBuilder = formBuilder;
152
+ this.categoryService = categoryService;
153
+ this.filterForm = this.formBuilder.group({
154
+ search: [""],
155
+ sort_by: ["created_at|desc"],
156
+ });
157
+ }
158
+ loadData() {
159
+ this.isWorking = true;
160
+ const params = { ...this.filterForm.value };
161
+ params.perPage = this.perPage;
162
+ params.page = this.page;
163
+ params.withCount = "products";
164
+ this.categoryService.index(params).subscribe({
165
+ next: (response) => {
166
+ this.models = this.models.concat(response?.data);
167
+ this.lastPage = response?.last_page;
168
+ this.isWorking = false;
169
+ },
170
+ error: () => (this.isWorking = false),
171
+ });
172
+ }
173
+ onSortChange(sort) {
174
+ let { active, direction } = sort;
175
+ if (!active)
176
+ active = "created_at";
177
+ if (!direction)
178
+ direction = "desc";
179
+ this.filterForm.get("sort_by").setValue(active + "|" + direction);
180
+ }
181
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryListPageComponent, deps: [{ token: i2.FormBuilder }, { token: CategoryService }], target: i0.ɵɵFactoryTarget.Component });
182
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CategoryListPageComponent, selector: "app-category-list-page", usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content\n class=\"d-flex justify-content-start align-items-center gap-3\"\n >\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Product Categories</h3>\n <app-category-form-button\n class=\"mt-1\"\n (saved)=\"reload()\"\n ></app-category-form-button>\n </div>\n <app-techlify-filter\n [filterForm]=\"filterForm\"\n (filterUpdated)=\"reload()\"\n [filterConfig]=\"filterConfig\"\n ></app-techlify-filter>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-2 p-0\">\n <mat-card-content>\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n aria-describedby=\"Product Categories\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.title }}</td>\n </ng-container>\n\n <!-- Description Column -->\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <!-- Products Column -->\n <ng-container matColumnDef=\"products\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"products_count\">\n Products\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.products_count }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-category-form-button\n [category]=\"element\"\n (saved)=\"reload()\"\n ></app-category-form-button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$1.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i5.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: TechlifyFilterComponent, selector: "app-techlify-filter", inputs: ["filterForm", "filterConfig"], outputs: ["filterUpdated"] }, { kind: "directive", type: i10.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: CategoryFormButtonComponent, selector: "app-category-form-button", inputs: ["category"], outputs: ["saved"] }], preserveWhitespaces: true });
183
+ }
184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryListPageComponent, decorators: [{
185
+ type: Component,
186
+ args: [{ selector: "app-category-list-page", template: "<mat-card>\n <mat-card-content\n class=\"d-flex justify-content-start align-items-center gap-3\"\n >\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Product Categories</h3>\n <app-category-form-button\n class=\"mt-1\"\n (saved)=\"reload()\"\n ></app-category-form-button>\n </div>\n <app-techlify-filter\n [filterForm]=\"filterForm\"\n (filterUpdated)=\"reload()\"\n [filterConfig]=\"filterConfig\"\n ></app-techlify-filter>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-2 p-0\">\n <mat-card-content>\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n aria-describedby=\"Product Categories\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.title }}</td>\n </ng-container>\n\n <!-- Description Column -->\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <!-- Products Column -->\n <ng-container matColumnDef=\"products\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"products_count\">\n Products\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.products_count }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-category-form-button\n [category]=\"element\"\n (saved)=\"reload()\"\n ></app-category-form-button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n" }]
187
+ }], ctorParameters: () => [{ type: i2.FormBuilder }, { type: CategoryService }] });
188
+
189
+ const routes = [
190
+ {
191
+ path: "",
192
+ component: CategoryListPageComponent,
193
+ },
194
+ ];
195
+ class CategoryRoutingModule {
196
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
197
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: CategoryRoutingModule, imports: [i2$1.RouterModule], exports: [RouterModule] });
198
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
199
+ }
200
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryRoutingModule, decorators: [{
201
+ type: NgModule,
202
+ args: [{
203
+ imports: [RouterModule.forChild(routes)],
204
+ exports: [RouterModule],
205
+ }]
206
+ }] });
207
+
208
+ class CategoryModule {
209
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
210
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: CategoryModule, declarations: [CategoryListPageComponent,
211
+ CategoryFormButtonComponent,
212
+ CategoryFormComponent], imports: [CommonModule,
213
+ CategoryRoutingModule,
214
+ MatCardModule,
215
+ MatIconModule,
216
+ MatDialogModule,
217
+ ReactiveFormsModule,
218
+ MaterialModule,
219
+ TechlifyFilterModule,
220
+ InfiniteScrollModule,
221
+ MatProgressBarModule] });
222
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryModule, imports: [CommonModule,
223
+ CategoryRoutingModule,
224
+ MatCardModule,
225
+ MatIconModule,
226
+ MatDialogModule,
227
+ ReactiveFormsModule,
228
+ MaterialModule,
229
+ TechlifyFilterModule,
230
+ InfiniteScrollModule,
231
+ MatProgressBarModule] });
232
+ }
233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CategoryModule, decorators: [{
234
+ type: NgModule,
235
+ args: [{
236
+ declarations: [
237
+ CategoryListPageComponent,
238
+ CategoryFormButtonComponent,
239
+ CategoryFormComponent,
240
+ ],
241
+ imports: [
242
+ CommonModule,
243
+ CategoryRoutingModule,
244
+ MatCardModule,
245
+ MatIconModule,
246
+ MatDialogModule,
247
+ ReactiveFormsModule,
248
+ MaterialModule,
249
+ TechlifyFilterModule,
250
+ InfiniteScrollModule,
251
+ MatProgressBarModule,
252
+ ],
253
+ }]
254
+ }] });
255
+
256
+ export { CategoryModule };
257
+ //# sourceMappingURL=techlify-inventory-common-category.module-Stn6e73V.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"techlify-inventory-common-category.module-Stn6e73V.mjs","sources":["../../../projects/inventory-common/src/lib/inventory-common/category/category.service.ts","../../../projects/inventory-common/src/lib/inventory-common/category/category-form/category-form.component.ts","../../../projects/inventory-common/src/lib/inventory-common/category/category-form/category-form.component.html","../../../projects/inventory-common/src/lib/inventory-common/category/category-form-button/category-form-button.component.ts","../../../projects/inventory-common/src/lib/inventory-common/category/category-form-button/category-form-button.component.html","../../../projects/inventory-common/src/lib/inventory-common/category/category-list-page/category-list-page.component.ts","../../../projects/inventory-common/src/lib/inventory-common/category/category-list-page/category-list-page.component.html","../../../projects/inventory-common/src/lib/inventory-common/category/category-routing.module.ts","../../../projects/inventory-common/src/lib/inventory-common/category/category.module.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\nimport { HttpService, TechlifyServiceBaseClass } from \"ngx-techlify-core\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class CategoryService extends TechlifyServiceBaseClass {\n constructor(httpService: HttpService) {\n super(httpService, \"product-categories\");\n }\n}\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport {\n AlertService,\n FormValidatorService,\n TechlifyFormComponentInterface,\n} from \"ngx-techlify-core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { CategoryService } from \"../category.service\";\nimport { Observable } from \"rxjs\";\n\n@Component({\n selector: \"app-category-form\",\n templateUrl: \"./category-form.component.html\",\n styleUrls: [\"./category-form.component.scss\"],\n})\nexport class CategoryFormComponent\n extends TechlifyFormComponentInterface\n implements OnInit\n{\n @Input() category: any;\n @Output() saved: EventEmitter<any> = new EventEmitter<any>();\n @Output() cancelled: EventEmitter<any> = new EventEmitter<any>();\n\n isSaving: boolean = false;\n constructor(\n formValidatorService: FormValidatorService,\n private formBuilder: FormBuilder,\n private categoryService: CategoryService,\n private alertService: AlertService\n ) {\n super(formValidatorService);\n this.errorMessages = {\n title: {\n required: \"The title field is required.\",\n },\n };\n\n this.form = this.formBuilder.group({\n id: [\"\"],\n title: [\"\", Validators.required],\n description: [\"\"],\n });\n }\n\n save() {\n this.form.markAllAsTouched();\n if (this.form.invalid) {\n this.alertService.addAlert(\"Please check the form for errors.\", \"error\");\n return;\n }\n\n this.isSaving = true;\n const data: any = { ...this.form.value };\n let request: Observable<any> = this.categoryService.store(data);\n if (this.category?.id) {\n request = this.categoryService.update(data);\n }\n request.subscribe({\n next: (response: any) => {\n this.isSaving = false;\n this.alertService.addAlert(\"Category saved successfully!\", \"success\");\n this.saved.emit(response?.item);\n },\n error: () => {\n this.isSaving = false;\n },\n });\n }\n\n ngOnInit(): void {\n if (this.category) {\n this.form.patchValue({ ...this.category });\n }\n }\n}\n","<form\n [formGroup]=\"form\"\n (submit)=\"save()\"\n class=\"d-flex flex-column justify-content-start\"\n>\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Title\" />\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage(\"title\") }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Description</mat-label>\n <textarea\n matInput\n formControlName=\"description\"\n placeholder=\"Description\"\n ></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button\n [disabled]=\"isSaving\"\n type=\"submit\"\n mat-raised-button\n color=\"primary\"\n >\n Save\n </button>\n <button\n [disabled]=\"isSaving\"\n type=\"button\"\n mat-flat-button\n (click)=\"cancelled.emit()\"\n >\n Cancel\n </button>\n </div>\n</form>\n","import {\n Component,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n} from \"@angular/core\";\nimport { MatDialog } from \"@angular/material/dialog\";\n\n@Component({\n selector: \"app-category-form-button\",\n templateUrl: \"./category-form-button.component.html\",\n styleUrls: [\"./category-form-button.component.scss\"],\n})\nexport class CategoryFormButtonComponent {\n @Input() category: any;\n @Output() saved: EventEmitter<any> = new EventEmitter<any>();\n\n constructor(public matDialog: MatDialog) {}\n\n showCategoryForm(templateRef: TemplateRef<any>) {\n this.matDialog.open(templateRef, { width: \"400px\" });\n }\n\n onCategorySaved(category: any) {\n this.matDialog.closeAll();\n this.saved.emit(category);\n }\n}\n","<mat-icon\n *ngIf=\"!category\"\n color=\"primary\"\n class=\"cursor-pointer\"\n (click)=\"showCategoryForm(categoryFormTemplate)\"\n>\n add\n</mat-icon>\n\n<mat-icon\n *ngIf=\"category\"\n class=\"cursor-pointer\"\n (click)=\"showCategoryForm(categoryFormTemplate)\"\n>\n edit\n</mat-icon>\n\n<ng-template #categoryFormTemplate>\n <h3 mat-dialog-title class=\"mb-0\">\n {{ category ? \"Edit\" : \"Create\" }} Category\n </h3>\n <small class=\"text-secondary mb-1\">\n Note that category names are unique and cannot be duplicated.\n </small>\n <div mat-dialog-content>\n <app-category-form\n [category]=\"category\"\n (saved)=\"onCategorySaved($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-category-form>\n </div>\n</ng-template>\n","import { Component } from \"@angular/core\";\nimport { TechlifyListingControllerInterface } from \"ngx-techlify-core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { CategoryService } from \"../category.service\";\nimport { Sort } from \"@angular/material/sort\";\n\n@Component({\n selector: \"app-category-list-page\",\n templateUrl: \"./category-list-page.component.html\",\n styleUrls: [\"./category-list-page.component.scss\"],\n})\nexport class CategoryListPageComponent extends TechlifyListingControllerInterface {\n filterConfig = {\n search: {\n placeholder: \"Search category title, description\",\n },\n };\n displayedColumns: string[] = [\n \"no\",\n \"title\",\n \"description\",\n \"products\",\n \"actions\",\n ];\n\n constructor(\n private formBuilder: FormBuilder,\n private categoryService: CategoryService\n ) {\n super();\n this.filterForm = this.formBuilder.group({\n search: [\"\"],\n sort_by: [\"created_at|desc\"],\n });\n }\n\n override loadData() {\n this.isWorking = true;\n const params: any = { ...this.filterForm.value };\n params.perPage = this.perPage;\n params.page = this.page;\n params.withCount = \"products\";\n\n this.categoryService.index(params).subscribe({\n next: (response: any) => {\n this.models = this.models.concat(response?.data);\n this.lastPage = response?.last_page;\n this.isWorking = false;\n },\n error: () => (this.isWorking = false),\n });\n }\n\n onSortChange(sort: Sort) {\n let { active, direction } = sort;\n if (!active) active = \"created_at\";\n if (!direction) direction = \"desc\";\n\n this.filterForm.get(\"sort_by\").setValue(active + \"|\" + direction);\n }\n}\n","<mat-card>\n <mat-card-content\n class=\"d-flex justify-content-start align-items-center gap-3\"\n >\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Product Categories</h3>\n <app-category-form-button\n class=\"mt-1\"\n (saved)=\"reload()\"\n ></app-category-form-button>\n </div>\n <app-techlify-filter\n [filterForm]=\"filterForm\"\n (filterUpdated)=\"reload()\"\n [filterConfig]=\"filterConfig\"\n ></app-techlify-filter>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-2 p-0\">\n <mat-card-content>\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n aria-describedby=\"Product Categories\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n >\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.title }}</td>\n </ng-container>\n\n <!-- Description Column -->\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <!-- Products Column -->\n <ng-container matColumnDef=\"products\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"products_count\">\n Products\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.products_count }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-category-form-button\n [category]=\"element\"\n (saved)=\"reload()\"\n ></app-category-form-button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n","import { NgModule } from \"@angular/core\";\nimport { RouterModule, Routes } from \"@angular/router\";\nimport { CategoryListPageComponent } from \"./category-list-page/category-list-page.component\";\n\nconst routes: Routes = [\n {\n path: \"\",\n component: CategoryListPageComponent,\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class CategoryRoutingModule {}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { CategoryRoutingModule } from \"./category-routing.module\";\nimport { CategoryListPageComponent } from \"./category-list-page/category-list-page.component\";\nimport { MatCardModule } from \"@angular/material/card\";\nimport { CategoryFormButtonComponent } from \"./category-form-button/category-form-button.component\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { CategoryFormComponent } from \"./category-form/category-form.component\";\nimport { MatDialogModule } from \"@angular/material/dialog\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { InfiniteScrollModule } from \"ngx-infinite-scroll\";\nimport { MaterialModule } from \"ngx-techlify-core\";\nimport { MatProgressBarModule } from \"@angular/material/progress-bar\";\nimport { TechlifyFilterModule } from '../techlify-filter/techlify-filter.module';\n\n@NgModule({\n declarations: [\n CategoryListPageComponent,\n CategoryFormButtonComponent,\n CategoryFormComponent,\n ],\n imports: [\n CommonModule,\n CategoryRoutingModule,\n MatCardModule,\n MatIconModule,\n MatDialogModule,\n ReactiveFormsModule,\n MaterialModule,\n TechlifyFilterModule,\n InfiniteScrollModule,\n MatProgressBarModule,\n ],\n})\nexport class CategoryModule {}\n"],"names":["i3.CategoryService","i5","i7","i1","i2","i4.CategoryFormComponent","i2.CategoryService","i3","i4","i6","i8.TechlifyFilterComponent","i9","i10.CategoryFormButtonComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAMM,MAAO,eAAgB,SAAQ,wBAAwB,CAAA;AAC3D,IAAA,WAAA,CAAY,WAAwB,EAAA;AAClC,QAAA,KAAK,CAAC,WAAW,EAAE,oBAAoB,CAAC;;wGAF/B,eAAe,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;A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