techlify-inventory-common 18.41.2 → 18.41.3

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 (23) hide show
  1. package/esm2022/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.mjs +9 -4
  2. package/esm2022/lib/inventory-common/stock-issue/stock-issue-list/stock-issue-list.component.mjs +3 -3
  3. package/esm2022/lib/inventory-common/stock-issue/stock-issue-products-list/stock-issue-products-list.component.mjs +3 -3
  4. package/esm2022/lib/inventory-common/stock-issue/stock-issue-single-product-form/stock-issue-simple-form/stock-issue-single-product-form.component.mjs +2 -1
  5. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.component.mjs +7 -7
  6. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-single-product-form/stock-receipt-simple-form/stock-receipt-single-product-form.component.mjs +2 -1
  7. package/fesm2022/{techlify-inventory-common-category.module-DlISogvh.mjs → techlify-inventory-common-category.module-Y2smSZ-5.mjs} +2 -2
  8. package/fesm2022/{techlify-inventory-common-category.module-DlISogvh.mjs.map → techlify-inventory-common-category.module-Y2smSZ-5.mjs.map} +1 -1
  9. package/fesm2022/{techlify-inventory-common-measure.module-DFAzOs0e.mjs → techlify-inventory-common-measure.module-BTfW5R8B.mjs} +2 -2
  10. package/fesm2022/{techlify-inventory-common-measure.module-DFAzOs0e.mjs.map → techlify-inventory-common-measure.module-BTfW5R8B.mjs.map} +1 -1
  11. package/fesm2022/{techlify-inventory-common-purchase-order-view.component-DD03J7x-.mjs → techlify-inventory-common-purchase-order-view.component-CvL0Y_cN.mjs} +2 -2
  12. package/fesm2022/{techlify-inventory-common-purchase-order-view.component-DD03J7x-.mjs.map → techlify-inventory-common-purchase-order-view.component-CvL0Y_cN.mjs.map} +1 -1
  13. package/fesm2022/techlify-inventory-common-stock-issue-form.component-CZ8eIPdZ.mjs +180 -0
  14. package/fesm2022/techlify-inventory-common-stock-issue-form.component-CZ8eIPdZ.mjs.map +1 -0
  15. package/fesm2022/{techlify-inventory-common-stock-issue-view.component-Q_Vk36E_.mjs → techlify-inventory-common-stock-issue-view.component-DgM9M5va.mjs} +2 -2
  16. package/fesm2022/{techlify-inventory-common-stock-issue-view.component-Q_Vk36E_.mjs.map → techlify-inventory-common-stock-issue-view.component-DgM9M5va.mjs.map} +1 -1
  17. package/fesm2022/{techlify-inventory-common-techlify-inventory-common-DLCEKlO0.mjs → techlify-inventory-common-techlify-inventory-common-4kwSsCKJ.mjs} +19 -17
  18. package/fesm2022/techlify-inventory-common-techlify-inventory-common-4kwSsCKJ.mjs.map +1 -0
  19. package/fesm2022/techlify-inventory-common.mjs +1 -1
  20. package/package.json +1 -1
  21. package/fesm2022/techlify-inventory-common-stock-issue-form.component-BJ8GJhQi.mjs +0 -175
  22. package/fesm2022/techlify-inventory-common-stock-issue-form.component-BJ8GJhQi.mjs.map +0 -1
  23. package/fesm2022/techlify-inventory-common-techlify-inventory-common-DLCEKlO0.mjs.map +0 -1
@@ -1,2 +1,2 @@
1
- export { a7 as ExportToExcelButtonComponent, a1 as IncidentFormButtonComponent, a0 as IncidentFormComponent, $ as IncidentListComponent, Z as IncidentModule, _ as IncidentService, d as InventoryCommonModule, I as InventoryCommonRoutingModule, ab as LocationFormButtonComponent, aa as LocationFormComponent, a9 as LocationListComponent, a8 as LocationModule, L as LocationService, M as MeasureService, Y as PayeeSelectorComponent, X as PayeeSelectorModule, h as ProductBasicInfoComponent, p as ProductBatchUpdateFormComponent, i as ProductFormButtonComponent, g as ProductFormComponent, o as ProductFormService, q as ProductImportPageComponent, m as ProductListComponent, f as ProductModule, j as ProductQuickSearchComponent, l as ProductSearchComponent, k as ProductSearchModule, n as ProductService, r as ProductViewPageComponent, a6 as RatingFormButtonComponent, a5 as RatingFormComponent, a4 as RatingListComponent, a2 as RatingModule, a3 as RatingService, ag as ShelfFormButtonComponent, af as ShelfFormComponent, ae as ShelfListComponent, ac as ShelfModule, ad as ShelfService, w as StockIssueListComponent, s as StockIssueModule, t as StockIssuePageComponent, u as StockIssuePageModule, A as StockIssueProductFormButtonComponent, z as StockIssueProductFormComponent, x as StockIssueProductListComponent, y as StockIssueProductService, v as StockIssueSingleProductFormComponent, D as StockReceiptListComponent, C as StockReceiptPageComponent, J as StockReceiptProductFormButtonComponent, H as StockReceiptProductFormComponent, E as StockReceiptProductsListComponent, F as StockReceiptSingleProductFormComponent, G as StockReceiptViewComponent, B as StockReceiptsModule, e as StockSummaryService, N as StockTransferFormComponent, K as StockTransferListComponent, O as StockTransferService, R as SupplierFormButtonComponent, U as SupplierFormComponent, Q as SupplierModule, W as SupplierTypeService, V as SuppliersListComponent, T as TechlifyFilterComponent, a as TechlifyFilterModule } from './techlify-inventory-common-techlify-inventory-common-DLCEKlO0.mjs';
1
+ export { a7 as ExportToExcelButtonComponent, a1 as IncidentFormButtonComponent, a0 as IncidentFormComponent, $ as IncidentListComponent, Z as IncidentModule, _ as IncidentService, d as InventoryCommonModule, I as InventoryCommonRoutingModule, ab as LocationFormButtonComponent, aa as LocationFormComponent, a9 as LocationListComponent, a8 as LocationModule, L as LocationService, M as MeasureService, Y as PayeeSelectorComponent, X as PayeeSelectorModule, h as ProductBasicInfoComponent, p as ProductBatchUpdateFormComponent, i as ProductFormButtonComponent, g as ProductFormComponent, o as ProductFormService, q as ProductImportPageComponent, m as ProductListComponent, f as ProductModule, j as ProductQuickSearchComponent, l as ProductSearchComponent, k as ProductSearchModule, n as ProductService, r as ProductViewPageComponent, a6 as RatingFormButtonComponent, a5 as RatingFormComponent, a4 as RatingListComponent, a2 as RatingModule, a3 as RatingService, ag as ShelfFormButtonComponent, af as ShelfFormComponent, ae as ShelfListComponent, ac as ShelfModule, ad as ShelfService, w as StockIssueListComponent, s as StockIssueModule, t as StockIssuePageComponent, u as StockIssuePageModule, A as StockIssueProductFormButtonComponent, z as StockIssueProductFormComponent, x as StockIssueProductListComponent, y as StockIssueProductService, v as StockIssueSingleProductFormComponent, D as StockReceiptListComponent, C as StockReceiptPageComponent, J as StockReceiptProductFormButtonComponent, H as StockReceiptProductFormComponent, E as StockReceiptProductsListComponent, F as StockReceiptSingleProductFormComponent, G as StockReceiptViewComponent, B as StockReceiptsModule, e as StockSummaryService, N as StockTransferFormComponent, K as StockTransferListComponent, O as StockTransferService, R as SupplierFormButtonComponent, U as SupplierFormComponent, Q as SupplierModule, W as SupplierTypeService, V as SuppliersListComponent, T as TechlifyFilterComponent, a as TechlifyFilterModule } from './techlify-inventory-common-techlify-inventory-common-4kwSsCKJ.mjs';
2
2
  //# sourceMappingURL=techlify-inventory-common.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "techlify-inventory-common",
3
- "version": "18.41.2",
3
+ "version": "18.41.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.2.13",
6
6
  "@angular/core": "^18.2.13"
@@ -1,175 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { signal, Component } from '@angular/core';
3
- import * as i2 from '@angular/forms';
4
- import { Validators, ReactiveFormsModule } from '@angular/forms';
5
- import * as i1 from 'ngx-techlify-core';
6
- import { TechlifyFormComponent, SearchableSelectorModule, TechlifyIconModule } from 'ngx-techlify-core';
7
- import { S as StockIssueService, L as LocationService, b as MaterialModule, c as LocationSelectorComponent } from './techlify-inventory-common-techlify-inventory-common-DLCEKlO0.mjs';
8
- import * as i3 from '@angular/common';
9
- import { CommonModule } from '@angular/common';
10
- import moment from 'moment';
11
- import * as i4 from '@angular/router';
12
- import * as i7 from '@angular/material/button';
13
- import * as i4$1 from '@angular/material/card';
14
- import * as i9 from '@angular/material/datepicker';
15
- import * as i6 from '@angular/material/form-field';
16
- import * as i11 from '@angular/material/icon';
17
- import * as i8 from '@angular/material/input';
18
- import * as i9$1 from '@angular/material/tooltip';
19
-
20
- class StockIssueFormComponent extends TechlifyFormComponent {
21
- formValidatorService;
22
- fb;
23
- stockIssueService;
24
- route;
25
- locationService;
26
- location;
27
- locationCount = signal(0);
28
- stockIssue = signal(null);
29
- issuableData = signal(null);
30
- constructor(formValidatorService, fb, stockIssueService, route, locationService, location) {
31
- super(formValidatorService);
32
- this.formValidatorService = formValidatorService;
33
- this.fb = fb;
34
- this.stockIssueService = stockIssueService;
35
- this.route = route;
36
- this.locationService = locationService;
37
- this.location = location;
38
- this.form = this.fb.group({
39
- date: [new Date(), Validators.compose([Validators.required])],
40
- particulars: ['', Validators.compose([Validators.required])],
41
- stock_issue_products: this.fb.array([])
42
- });
43
- }
44
- ngOnInit() {
45
- this.locationService.count().subscribe((count) => {
46
- this.locationCount.set(count);
47
- });
48
- const id = this.route.snapshot.paramMap.get('id');
49
- if (id) {
50
- this.loadStockIssue(+id);
51
- }
52
- this.route.queryParams.subscribe({
53
- next: (params) => {
54
- this.issuableData.set({
55
- issuable_type: params['issuable_type'],
56
- issuable_id: params['issuable_id']
57
- });
58
- }
59
- });
60
- }
61
- loadStockIssue(id) {
62
- this.isWorking = true;
63
- this.stockIssueService.show(id, { with: 'stockIssueProducts.product' }).subscribe({
64
- next: (response) => {
65
- this.isWorking = false;
66
- this.stockIssue.set(response.item);
67
- },
68
- error: () => {
69
- this.isWorking = false;
70
- },
71
- complete: () => {
72
- const issue = this.stockIssue();
73
- this.form.patchValue({
74
- date: issue.date ? new Date(issue.date) : new Date(),
75
- particulars: issue.details,
76
- });
77
- this.stockIssueProducts.clear();
78
- issue.stock_issue_products?.forEach((sip) => {
79
- const group = this.createStockIssueProduct();
80
- group.patchValue({
81
- id: sip.id,
82
- product_id: sip.product_id,
83
- location_id: sip.location_id,
84
- quantity: sip.quantity,
85
- particulars: sip.particulars,
86
- });
87
- this.stockIssueProducts.push(group);
88
- });
89
- }
90
- });
91
- }
92
- get stockIssueProducts() {
93
- return this.form.get('stock_issue_products');
94
- }
95
- createStockIssueProduct() {
96
- return this.fb.group({
97
- id: [''],
98
- product_id: ['', Validators.required],
99
- location_id: ['', this.locationCount() > 0 ? Validators.required : null],
100
- quantity: [1, [Validators.required, Validators.min(1)]],
101
- particulars: [''],
102
- issuable_id: [this.issuableData()?.issuable_id ?? ''],
103
- issuable_type: [this.issuableData()?.issuable_type ?? '']
104
- });
105
- }
106
- addStockIssueProduct() {
107
- this.stockIssueProducts.push(this.createStockIssueProduct());
108
- }
109
- removeStockIssueProduct(index) {
110
- this.stockIssueProducts.removeAt(index);
111
- }
112
- clearProducts() {
113
- this.stockIssueProducts.clear();
114
- }
115
- save() {
116
- if (this.form.invalid) {
117
- this.form.markAllAsTouched();
118
- this.form.markAsDirty();
119
- this.alertService.addAlert('Please check the form for errors.', 'error');
120
- return;
121
- }
122
- if (this.stockIssueProducts.length === 0) {
123
- this.alertService.addAlert('Please add at least one product.', 'error');
124
- return;
125
- }
126
- const formData = this.form.getRawValue();
127
- const data = {
128
- id: this.stockIssue()?.id ?? null,
129
- date: moment(formData.date).format('YYYY-MM-DD'),
130
- details: formData.particulars,
131
- products: formData.stock_issue_products.map((row) => ({
132
- id: row.product_id,
133
- product_id: row.product_id,
134
- quantity: row.quantity,
135
- location_id: row.location_id,
136
- particulars: row.particulars,
137
- issuable_id: row.issuable_id,
138
- issuable_type: row.issuable_type
139
- }))
140
- };
141
- this.isWorking = true;
142
- const request$ = this.stockIssue()?.id
143
- ? this.stockIssueService.update(data)
144
- : this.stockIssueService.store(data);
145
- request$.subscribe({
146
- next: () => {
147
- this.isWorking = false;
148
- this.alertService.addAlert('Stock issues saved successfully!', 'success');
149
- this.location.back();
150
- },
151
- error: () => {
152
- this.isWorking = false;
153
- }
154
- });
155
- }
156
- cancel() {
157
- this.location.back();
158
- }
159
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.FormBuilder }, { token: StockIssueService }, { token: i4.ActivatedRoute }, { token: LocationService }, { token: i3.Location }], target: i0.ɵɵFactoryTarget.Component });
160
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueFormComponent, isStandalone: true, selector: "app-stock-issue-form", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"d-flex flex-column gap-2 container\">\n <mat-card-content>\n\n <div class=\"d-flex flex-column gap-1\">\n <h5>\n <span class=\"material-symbols-outlined align-middle\">upload</span>\n Issue Stock\n </h5>\n </div>\n\n <form class=\"d-flex flex-column gap-2\" [formGroup]=\"form\" (submit)=\"save()\">\n\n <div class=\"d-flex flex-column\">\n <div class=\"d-flex flex-row gap-2 justify-content-between\">\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Start Date</mat-label>\n <input matInput [matDatepicker]=\"picker\" placeholder=\"Date\" formControlName=\"date\" required>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">{{ getErrorMessage('date') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></textarea>\n <mat-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: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i11.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "isEmitInitialEvent", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: LocationSelectorComponent, selector: "app-location-selector", inputs: ["appearance", "label", "placeholder", "includeNone"] }, { kind: "ngmodule", type: TechlifyIconModule }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }], preserveWhitespaces: true });
161
- }
162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormComponent, decorators: [{
163
- type: Component,
164
- args: [{ selector: 'app-stock-issue-form', standalone: true, imports: [
165
- CommonModule,
166
- ReactiveFormsModule,
167
- MaterialModule,
168
- SearchableSelectorModule,
169
- LocationSelectorComponent,
170
- TechlifyIconModule
171
- ], 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" }]
172
- }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.FormBuilder }, { type: StockIssueService }, { type: i4.ActivatedRoute }, { type: LocationService }, { type: i3.Location }] });
173
-
174
- export { StockIssueFormComponent };
175
- //# sourceMappingURL=techlify-inventory-common-stock-issue-form.component-BJ8GJhQi.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"techlify-inventory-common-stock-issue-form.component-BJ8GJhQi.mjs","sources":["../../../projects/inventory-common/src/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.ts","../../../projects/inventory-common/src/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.html"],"sourcesContent":["import { Component, OnInit, signal } from \"@angular/core\";\nimport { FormArray, FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { FormValidatorService, TechlifyFormComponent, TechlifyIconModule } from \"ngx-techlify-core\";\nimport { MaterialModule } from '../../material.module';\nimport { CommonModule, Location } 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 } from '@angular/router';\nimport moment from 'moment';\nimport { LocationService } from '../../location/location.service';\n\n@Component({\n selector: 'app-stock-issue-form',\n templateUrl: './stock-issue-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 StockIssueFormComponent extends TechlifyFormComponent implements OnInit {\n\n locationCount = signal<number>(0);\n stockIssue = signal<any>(null);\n\n issuableData = signal<{\n issuable_type: String,\n issuable_id: number\n } | null>(null)\n\n constructor(protected override formValidatorService: FormValidatorService,\n private fb: FormBuilder,\n private stockIssueService: StockIssueService,\n private route: ActivatedRoute,\n private locationService: LocationService,\n private location: Location\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 this.route.queryParams.subscribe({\n next: (params: any) => {\n this.issuableData.set({\n issuable_type: params['issuable_type'],\n issuable_id: params['issuable_id']\n });\n\n }\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 issuable_id: [this.issuableData()?.issuable_id ?? ''],\n issuable_type: [this.issuableData()?.issuable_type ?? '']\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 issuable_id: row.issuable_id,\n issuable_type: row.issuable_type\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.location.back();\n },\n error: () => {\n this.isWorking = false;\n }\n });\n }\n\n cancel() {\n this.location.back();\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","i8","i10","i12","i13"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BM,MAAO,uBAAwB,SAAQ,qBAAqB,CAAA;AAU/B,IAAA,oBAAA,CAAA;AACnB,IAAA,EAAA,CAAA;AACA,IAAA,iBAAA,CAAA;AACA,IAAA,KAAA,CAAA;AACA,IAAA,eAAA,CAAA;AACA,IAAA,QAAA,CAAA;AAbZ,IAAA,aAAa,GAAG,MAAM,CAAS,CAAC,CAAC,CAAC;AAClC,IAAA,UAAU,GAAG,MAAM,CAAM,IAAI,CAAC,CAAC;AAE/B,IAAA,YAAY,GAAG,MAAM,CAGX,IAAI,CAAC,CAAA;IAEf,WAA+B,CAAA,oBAA0C,EAC7D,EAAe,EACf,iBAAoC,EACpC,KAAqB,EACrB,eAAgC,EAChC,QAAkB,EAAA;QAE1B,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,IAAK,CAAA,KAAA,GAAL,KAAK,CAAgB;QACrB,IAAe,CAAA,eAAA,GAAf,eAAe,CAAiB;QAChC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QAI1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC;AACtB,YAAA,IAAI,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,UAAU,CAAC,O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