techlify-inventory-common 18.47.0 → 18.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/esm2022/lib/inventory-common/incident/incident-form/incident-form.component.mjs +2 -2
  2. package/esm2022/lib/inventory-common/incident/incident-list/incident-list.component.mjs +2 -2
  3. package/esm2022/lib/inventory-common/inventory-common-routing.module.mjs +5 -1
  4. package/esm2022/lib/inventory-common/location/location-form/location-form.component.mjs +2 -2
  5. package/esm2022/lib/inventory-common/location/location-selector/location-selector.component.mjs +5 -4
  6. package/esm2022/lib/inventory-common/location/location-status-changer/location-status-changer.component.mjs +1 -1
  7. package/esm2022/lib/inventory-common/location/shelf/shelf-form/shelf-form.component.mjs +1 -1
  8. package/esm2022/lib/inventory-common/location/shelf/shelf-list/shelf-list.component.mjs +2 -2
  9. package/esm2022/lib/inventory-common/product/product-batch-update-form/product-batch-update-form.component.mjs +1 -1
  10. package/esm2022/lib/inventory-common/product/product-form/product-form.component.mjs +1 -1
  11. package/esm2022/lib/inventory-common/product/product-list/product-list.component.mjs +1 -1
  12. package/esm2022/lib/inventory-common/rating/rating-form/rating-form.component.mjs +2 -2
  13. package/esm2022/lib/inventory-common/rating/rating-list/rating-list.component.mjs +2 -2
  14. package/esm2022/lib/inventory-common/recipient/recipient-form/recipient-form.component.mjs +59 -0
  15. package/esm2022/lib/inventory-common/recipient/recipient-list/recipient-list.component.mjs +49 -0
  16. package/esm2022/lib/inventory-common/recipient/recipient-routing.module.mjs +24 -0
  17. package/esm2022/lib/inventory-common/recipient/recipient.module.mjs +18 -0
  18. package/esm2022/lib/inventory-common/recipient/recipient.service.mjs +18 -0
  19. package/esm2022/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.mjs +2 -2
  20. package/esm2022/lib/inventory-common/reports/low-stock-report/low-stock-report.component.mjs +2 -2
  21. package/esm2022/lib/inventory-common/reports/stock-issue-summary-report/stock-issue-summary-report.component.mjs +31 -32
  22. package/esm2022/lib/inventory-common/shared.module.mjs +17 -4
  23. package/esm2022/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.mjs +29 -19
  24. package/esm2022/lib/inventory-common/stock-issue/stock-issue-list/stock-issue-list.component.mjs +6 -7
  25. package/esm2022/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.component.mjs +3 -3
  26. package/esm2022/lib/inventory-common/stock-issue/stock-issue-product-form/stock-issue-product-form.component.mjs +6 -6
  27. package/esm2022/lib/inventory-common/stock-issue/stock-issue-product-view/stock-issue-product-view.component.mjs +2 -2
  28. package/esm2022/lib/inventory-common/stock-issue/stock-issue-products-list/stock-issue-products-list.component.mjs +7 -7
  29. package/esm2022/lib/inventory-common/stock-issue/stock-issue-single-product-form/stock-issue-single-product-form.component.mjs +38 -17
  30. package/esm2022/lib/inventory-common/stock-issue/stock-issue-view/stock-issue-view.component.mjs +2 -2
  31. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.component.mjs +2 -2
  32. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-list/stock-receipt-list.component.mjs +5 -5
  33. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-form/stock-receipt-product-form.component.mjs +1 -1
  34. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-list/stock-receipt-product-list.component.mjs +6 -6
  35. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-view/stock-receipt-product-view.component.mjs +2 -2
  36. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-single-product-form/stock-receipt-simple-form/stock-receipt-single-product-form.component.mjs +2 -2
  37. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-view/stock-receipt-view.component.mjs +1 -1
  38. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-page/stock-receipts-page.component.mjs +1 -1
  39. package/esm2022/lib/inventory-common/stock-transfer/stock-transfer-form/stock-transfer-form.component.mjs +2 -2
  40. package/esm2022/lib/inventory-common/stock-transfer/stock-transfer-list/stock-transfer-list.component.mjs +1 -1
  41. package/esm2022/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.mjs +1 -1
  42. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-form/purchase-order-form.component.mjs +2 -2
  43. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-listing/purchase-order-listing.component.mjs +2 -2
  44. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-form/purchase-order-product-form.component.mjs +1 -1
  45. package/esm2022/lib/inventory-common/supplier/supplier-branches-list/supplier-branches-list.component.mjs +12 -12
  46. package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form.component.mjs +47 -56
  47. package/esm2022/lib/inventory-common/supplier/supplier-information/supplier-information.component.mjs +1 -1
  48. package/esm2022/lib/inventory-common/supplier/supplier-list/supplier-list.component.mjs +68 -0
  49. package/esm2022/lib/inventory-common/supplier/supplier-routing.module.mjs +3 -3
  50. package/esm2022/lib/inventory-common/supplier/supplier-view/supplier-view.component.mjs +11 -11
  51. package/esm2022/lib/inventory-common/supplier/supplier.module.mjs +10 -45
  52. package/esm2022/lib/inventory-common/techlify-filter/techlify-filter.component.mjs +1 -1
  53. package/esm2022/public-api.mjs +2 -3
  54. package/fesm2022/{techlify-inventory-common-category.module-BL0mKMMU.mjs → techlify-inventory-common-category.module-BBpgG9L3.mjs} +9 -9
  55. package/fesm2022/{techlify-inventory-common-category.module-BL0mKMMU.mjs.map → techlify-inventory-common-category.module-BBpgG9L3.mjs.map} +1 -1
  56. package/fesm2022/{techlify-inventory-common-purchase-order-view.component-BDdTC81P.mjs → techlify-inventory-common-purchase-order-view.component-6qbMJdAs.mjs} +8 -8
  57. package/fesm2022/{techlify-inventory-common-purchase-order-view.component-BDdTC81P.mjs.map → techlify-inventory-common-purchase-order-view.component-6qbMJdAs.mjs.map} +1 -1
  58. package/fesm2022/techlify-inventory-common-recipient.module-DsYw54Uj.mjs +147 -0
  59. package/fesm2022/techlify-inventory-common-recipient.module-DsYw54Uj.mjs.map +1 -0
  60. package/fesm2022/techlify-inventory-common-stock-issue-form.component-C3RoFfcY.mjs +194 -0
  61. package/fesm2022/techlify-inventory-common-stock-issue-form.component-C3RoFfcY.mjs.map +1 -0
  62. package/fesm2022/{techlify-inventory-common-stock-issue-product-view.component-Di1fJWqD.mjs → techlify-inventory-common-stock-issue-product-view.component-b_8gpI7x.mjs} +3 -3
  63. package/fesm2022/{techlify-inventory-common-stock-issue-product-view.component-Di1fJWqD.mjs.map → techlify-inventory-common-stock-issue-product-view.component-b_8gpI7x.mjs.map} +1 -1
  64. package/fesm2022/{techlify-inventory-common-stock-issue-view.component-DfntkifG.mjs → techlify-inventory-common-stock-issue-view.component-BDOR4X49.mjs} +3 -3
  65. package/fesm2022/{techlify-inventory-common-stock-issue-view.component-DfntkifG.mjs.map → techlify-inventory-common-stock-issue-view.component-BDOR4X49.mjs.map} +1 -1
  66. package/fesm2022/{techlify-inventory-common-techlify-inventory-common-BbtWdC-G.mjs → techlify-inventory-common-techlify-inventory-common-Bveawfj2.mjs} +284 -311
  67. package/fesm2022/techlify-inventory-common-techlify-inventory-common-Bveawfj2.mjs.map +1 -0
  68. package/fesm2022/techlify-inventory-common.mjs +1 -1
  69. package/lib/inventory-common/location/location-selector/location-selector.component.d.ts +2 -1
  70. package/lib/inventory-common/recipient/recipient-form/recipient-form.component.d.ts +21 -0
  71. package/lib/inventory-common/recipient/recipient-list/recipient-list.component.d.ts +16 -0
  72. package/lib/inventory-common/recipient/recipient-routing.module.d.ts +7 -0
  73. package/lib/inventory-common/recipient/recipient.module.d.ts +9 -0
  74. package/lib/inventory-common/recipient/recipient.service.d.ts +7 -0
  75. package/lib/inventory-common/reports/stock-issue-summary-report/stock-issue-summary-report.component.d.ts +4 -10
  76. package/lib/inventory-common/shared.module.d.ts +4 -3
  77. package/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.d.ts +5 -3
  78. package/lib/inventory-common/stock-issue/stock-issue-list/stock-issue-list.component.d.ts +2 -2
  79. package/lib/inventory-common/stock-issue/stock-issue-products-list/stock-issue-products-list.component.d.ts +2 -2
  80. package/lib/inventory-common/stock-issue/stock-issue-single-product-form/stock-issue-single-product-form.component.d.ts +5 -3
  81. package/lib/inventory-common/stock-receipts/stock-receipt-list/stock-receipt-list.component.d.ts +2 -2
  82. package/lib/inventory-common/stock-receipts/stock-receipt-product-list/stock-receipt-product-list.component.d.ts +2 -2
  83. package/lib/inventory-common/stock-receipts/stock-receipts.module.d.ts +1 -1
  84. package/lib/inventory-common/supplier/supplier-form/supplier-form.component.d.ts +13 -12
  85. package/lib/inventory-common/supplier/supplier-list/supplier-list.component.d.ts +20 -0
  86. package/lib/inventory-common/supplier/supplier.module.d.ts +13 -20
  87. package/package.json +1 -1
  88. package/public-api.d.ts +1 -2
  89. package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form-button/supplier-form-button.component.mjs +0 -43
  90. package/esm2022/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.mjs +0 -59
  91. package/fesm2022/techlify-inventory-common-stock-issue-form.component-B-5myP-N.mjs +0 -183
  92. package/fesm2022/techlify-inventory-common-stock-issue-form.component-B-5myP-N.mjs.map +0 -1
  93. package/fesm2022/techlify-inventory-common-techlify-inventory-common-BbtWdC-G.mjs.map +0 -1
  94. package/lib/inventory-common/supplier/supplier-form/supplier-form-button/supplier-form-button.component.d.ts +0 -13
  95. package/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.d.ts +0 -15
@@ -1,59 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { TechlifyListComponent } from 'ngx-techlify-core';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@angular/forms";
5
- import * as i2 from "../supplier.service";
6
- import * as i3 from "@angular/common";
7
- import * as i4 from "@angular/router";
8
- import * as i5 from "@angular/material/card";
9
- import * as i6 from "@angular/material/form-field";
10
- import * as i7 from "@angular/material/icon";
11
- import * as i8 from "@angular/material/input";
12
- import * as i9 from "@angular/material/progress-bar";
13
- import * as i10 from "@angular/material/sort";
14
- import * as i11 from "@angular/material/table";
15
- import * as i12 from "@angular/material/tooltip";
16
- import * as i13 from "ngx-techlify-core";
17
- import * as i14 from "ngx-infinite-scroll";
18
- import * as i15 from "ngx-permissions";
19
- import * as i16 from "../supplier-form/supplier-form-button/supplier-form-button.component";
20
- export class SuppliersListComponent extends TechlifyListComponent {
21
- fb;
22
- service;
23
- displayedColumns = [
24
- '#',
25
- 'company_name',
26
- 'type',
27
- 'contact_name',
28
- 'phone',
29
- 'address',
30
- 'email',
31
- 'details',
32
- 'actions',
33
- ];
34
- filterFormConfiguration = {
35
- supplier_type_ids: { multuple: true }
36
- };
37
- constructor(fb, service) {
38
- super();
39
- this.fb = fb;
40
- this.service = service;
41
- this.filterForm = this.fb.group({
42
- search: [''],
43
- supplier_type_ids: [''],
44
- sort_by: ['created_at|desc'],
45
- });
46
- }
47
- ngOnInit() {
48
- this.patchFiltersFromRoute();
49
- this.loadData();
50
- this.listenFilterChanges();
51
- }
52
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuppliersListComponent, deps: [{ token: i1.FormBuilder }, { token: i2.SupplierService }], target: i0.ɵɵFactoryTarget.Component });
53
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SuppliersListComponent, selector: "app-suppliers-list", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-1\">\n <h3 class=\"mb-0 fw-bold\">Suppliers</h3>\n <app-supplier-form-button class='mt-2' (onSaved)=\"reload()\"></app-supplier-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Suppliers List\">\n <ng-container matColumnDef=\"#\">\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 <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.company_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef>Contact</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-1\">\n\n <a class=\"text-decoration-none text-secondary\" [routerLink]=\"['/inventory/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\" *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </a>\n <app-supplier-form-button *ngxPermissionsOnly=\"['supplier.update']\" [supplier]=\"element\"\n (onSaved)=\"reload()\"></app-supplier-form-button>\n <app-techlify-delete-button [service]=\"service\" [model]=\"element\"\n [data]='{title: element?.company_name, type: \"Supplier\"}'\n (deleted)=\"reload()\"></app-techlify-delete-button>\n <app-audit-log-for-model [modelId]=\"element?.id\" modelType=\"Supplier\"\n logView=\"all\"></app-audit-log-for-model>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i5.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i5.MatCardContent, selector: "mat-card-content" }, { 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.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i7.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: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i12.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i13.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: i13.AuditLogForModelComponent, selector: "app-audit-log-for-model", inputs: ["isIconView", "modelType", "modelId", "logView"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i14.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: i15.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }, { kind: "component", type: i16.SupplierFormButtonComponent, selector: "app-supplier-form-button", inputs: ["supplier"], outputs: ["onSaved"] }, { kind: "component", type: i13.TechlifyDeleteButtonComponent, selector: "app-techlify-delete-button", inputs: ["data", "model", "message", "service"], outputs: ["deleted"] }], preserveWhitespaces: true });
54
- }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuppliersListComponent, decorators: [{
56
- type: Component,
57
- args: [{ selector: 'app-suppliers-list', template: "<mat-card class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-1\">\n <h3 class=\"mb-0 fw-bold\">Suppliers</h3>\n <app-supplier-form-button class='mt-2' (onSaved)=\"reload()\"></app-supplier-form-button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search Supplier by Name, Phone, Address, Email, Description\"\n formControlName=\"search\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Type</mat-label>\n <app-searchable-selector apiUrl=\"api/supplier-types\" formControlName=\"supplier_type_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table #table [dataSource]=\"models\" class=\"w-100 table-hover\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [fromRoot]=\"true\" matSort\n (matSortChange)=\"sortColumn($event)\" aria-describedby=\"Suppliers List\">\n <ng-container matColumnDef=\"#\">\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 <ng-container matColumnDef=\"company_name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.company_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"type\">\n <th mat-header-cell *matHeaderCellDef>Type</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.type?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"contact_name\">\n <th mat-header-cell *matHeaderCellDef>Contact</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.contact_name }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"phone\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.phone }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"address\">\n <th mat-header-cell *matHeaderCellDef>Address</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.address }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.details }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"text-secondary d-flex align-items-center gap-1\">\n\n <a class=\"text-decoration-none text-secondary\" [routerLink]=\"['/inventory/suppliers', element.id, 'view']\"\n routerLinkActive=\"route-link-active\" *ngxPermissionsOnly=\"['supplier.read']\">\n <mat-icon matTooltip=\"View\">remove_red_eye</mat-icon>\n </a>\n <app-supplier-form-button *ngxPermissionsOnly=\"['supplier.update']\" [supplier]=\"element\"\n (onSaved)=\"reload()\"></app-supplier-form-button>\n <app-techlify-delete-button [service]=\"service\" [model]=\"element\"\n [data]='{title: element?.company_name, type: \"Supplier\"}'\n (deleted)=\"reload()\"></app-techlify-delete-button>\n <app-audit-log-for-model [modelId]=\"element?.id\" modelType=\"Supplier\"\n logView=\"all\"></app-audit-log-for-model>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>" }]
58
- }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.SupplierService }] });
59
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VwcGxpZXJzLWxpc3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4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dEhlYWRlclJvd0RlZj1cImRpc3BsYXllZENvbHVtbnM7IHN0aWNreTogdHJ1ZVwiPjwvdHI+XG4gICAgICA8dHIgbWF0LXJvdyAqbWF0Um93RGVmPVwibGV0IHJvdzsgY29sdW1uczogZGlzcGxheWVkQ29sdW1uc1wiPjwvdHI+XG4gICAgPC90YWJsZT5cblxuICAgIDxtYXQtcHJvZ3Jlc3MtYmFyIG1vZGU9XCJpbmRldGVybWluYXRlXCIgKm5nSWY9XCJpc1dvcmtpbmdcIj48L21hdC1wcm9ncmVzcy1iYXI+XG4gIDwvbWF0LWNhcmQtY29udGVudD5cbjwvbWF0LWNhcmQ+Il19
@@ -1,183 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { signal, Component } from '@angular/core';
3
- import * as i2 from '@angular/forms';
4
- import { Validators, ReactiveFormsModule } from '@angular/forms';
5
- import * as i1 from 'ngx-techlify-core';
6
- import { TechlifyFormComponent, SearchableSelectorModule, TechlifyIconModule } from 'ngx-techlify-core';
7
- import { S as StockIssueService, L as LocationService, M as MaterialModule, b as LocationSelectorComponent } from './techlify-inventory-common-techlify-inventory-common-BbtWdC-G.mjs';
8
- import * as i3 from '@angular/common';
9
- import { CommonModule } from '@angular/common';
10
- import moment from 'moment';
11
- import * as i1$1 from '@angular/router';
12
- import * as i7 from '@angular/material/button';
13
- import * as i4 from '@angular/material/card';
14
- import * as i9 from '@angular/material/datepicker';
15
- import * as i6 from '@angular/material/form-field';
16
- import * as i11 from '@angular/material/icon';
17
- import * as i8 from '@angular/material/input';
18
- import * as i9$1 from '@angular/material/tooltip';
19
-
20
- class StockIssueFormComponent extends TechlifyFormComponent {
21
- formValidatorService;
22
- fb;
23
- stockIssueService;
24
- route;
25
- locationService;
26
- location;
27
- locationCount = signal(0);
28
- stockIssue = signal(null);
29
- issuableData = signal(null);
30
- constructor(formValidatorService, fb, stockIssueService, route, locationService, location) {
31
- super(formValidatorService);
32
- this.formValidatorService = formValidatorService;
33
- this.fb = fb;
34
- this.stockIssueService = stockIssueService;
35
- this.route = route;
36
- this.locationService = locationService;
37
- this.location = location;
38
- this.errorMessages = {
39
- date: {
40
- required: 'The date field is required.',
41
- },
42
- };
43
- this.form = this.fb.group({
44
- date: [new Date(), Validators.compose([Validators.required])],
45
- particulars: [''],
46
- stock_issue_products: this.fb.array([])
47
- });
48
- }
49
- ngOnInit() {
50
- this.locationService.count().subscribe((count) => {
51
- this.locationCount.set(count);
52
- });
53
- const id = this.route.snapshot.paramMap.get('id');
54
- if (id) {
55
- this.loadStockIssue(+id);
56
- }
57
- else {
58
- this.addStockIssueProduct();
59
- }
60
- this.route.queryParams.subscribe({
61
- next: (params) => {
62
- this.issuableData.set({
63
- issuable_type: params['issuable_type'],
64
- issuable_id: params['issuable_id']
65
- });
66
- }
67
- });
68
- }
69
- loadStockIssue(id) {
70
- this.isWorking = true;
71
- this.stockIssueService.show(id, { with: 'stockIssueProducts.product' }).subscribe({
72
- next: (response) => {
73
- this.isWorking = false;
74
- this.stockIssue.set(response.item);
75
- },
76
- error: () => {
77
- this.isWorking = false;
78
- },
79
- complete: () => {
80
- const issue = this.stockIssue();
81
- this.form.patchValue({
82
- date: issue.date ? new Date(issue.date) : new Date(),
83
- particulars: issue.details,
84
- });
85
- this.stockIssueProducts.clear();
86
- issue.stock_issue_products?.forEach((sip) => {
87
- const group = this.createStockIssueProduct();
88
- group.patchValue({
89
- id: sip.id,
90
- product_id: sip.product_id,
91
- location_id: sip.location_id,
92
- quantity: sip.quantity,
93
- particulars: sip.particulars,
94
- });
95
- this.stockIssueProducts.push(group);
96
- });
97
- }
98
- });
99
- }
100
- get stockIssueProducts() {
101
- return this.form.get('stock_issue_products');
102
- }
103
- createStockIssueProduct() {
104
- return this.fb.group({
105
- id: [''],
106
- product_id: ['', Validators.required],
107
- location_id: ['', this.locationCount() > 0 ? Validators.required : null],
108
- quantity: [0, [Validators.required, Validators.min(0)]],
109
- particulars: [''],
110
- issuable_id: [this.issuableData()?.issuable_id ?? ''],
111
- issuable_type: [this.issuableData()?.issuable_type ?? '']
112
- });
113
- }
114
- addStockIssueProduct() {
115
- this.stockIssueProducts.push(this.createStockIssueProduct());
116
- }
117
- removeStockIssueProduct(index) {
118
- this.stockIssueProducts.removeAt(index);
119
- }
120
- clearProducts() {
121
- this.stockIssueProducts.clear();
122
- }
123
- save() {
124
- if (this.form.invalid) {
125
- this.form.markAllAsTouched();
126
- this.form.markAsDirty();
127
- this.alertService.addAlert('Please check the form for errors.', 'error');
128
- return;
129
- }
130
- if (this.stockIssueProducts.length === 0) {
131
- this.alertService.addAlert('Please add at least one product.', 'error');
132
- return;
133
- }
134
- const formData = this.form.getRawValue();
135
- const data = {
136
- id: this.stockIssue()?.id ?? null,
137
- date: moment(formData.date).format('YYYY-MM-DD'),
138
- details: formData.particulars,
139
- products: formData.stock_issue_products.map((row) => ({
140
- id: row.product_id,
141
- product_id: row.product_id,
142
- quantity: row.quantity,
143
- location_id: row.location_id,
144
- particulars: row.particulars,
145
- issuable_id: row.issuable_id,
146
- issuable_type: row.issuable_type
147
- }))
148
- };
149
- this.isWorking = true;
150
- const request$ = this.stockIssue()?.id
151
- ? this.stockIssueService.update(data)
152
- : this.stockIssueService.store(data);
153
- request$.subscribe({
154
- next: () => {
155
- this.isWorking = false;
156
- this.alertService.addAlert('Stock issues saved successfully!', 'success');
157
- this.location.back();
158
- },
159
- error: () => {
160
- this.isWorking = false;
161
- }
162
- });
163
- }
164
- cancel() {
165
- this.location.back();
166
- }
167
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.FormBuilder }, { token: StockIssueService }, { token: i1$1.ActivatedRoute }, { token: LocationService }, { token: i3.Location }], target: i0.ɵɵFactoryTarget.Component });
168
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueFormComponent, isStandalone: true, selector: "app-stock-issue-form", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"d-flex flex-column gap-2 container\">\n <mat-card-content>\n\n <div class=\"d-flex flex-column gap-1\">\n <h5>\n <span class=\"material-symbols-outlined align-middle\">upload</span>\n Issue Stock\n </h5>\n </div>\n\n <form class=\"d-flex flex-column gap-2\" [formGroup]=\"form\" (submit)=\"save()\">\n\n <div class=\"d-flex flex-column\">\n <div class=\"d-flex flex-row gap-2 justify-content-between\">\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Start Date</mat-label>\n <input matInput [matDatepicker]=\"picker\" placeholder=\"Date\" formControlName=\"date\" required>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">{{ getErrorMessage('date') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></textarea>\n </mat-form-field>\n </div>\n </div>\n\n <table class=\"table mt-3\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Product</th>\n <th *ngIf=\"locationCount() > 0\" scope=\"col\">Location</th>\n <th scope=\"col\">Quantity</th>\n <th scope=\"col\">Particulars</th>\n <th scope=\"col\" class=\"text-center\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody formArrayName=\"stock_issue_products\">\n <tr *ngFor=\"let row of stockIssueProducts.controls; let i = index\" [formGroupName]=\"i\">\n <th scope=\"row\">{{ i + 1 }}</th>\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector apiUrl='api/products' formControlName=\"product_id\"\n titleField='name' [cache]=\"true\" required></app-searchable-selector>\n </mat-form-field>\n </td>\n <td *ngIf=\"locationCount() > 0\">\n <app-location-selector appearance='outline'\n formControlName=\"location_id\"></app-location-selector>\n </td>\n <td>\n <mat-form-field appearance='outline' class='fl-sm'>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\">\n </mat-form-field>\n </td>\n <td>\n <mat-form-field appearance='outline'>\n <mat-label>Particulars</mat-label>\n <input matInput formControlName=\"particulars\">\n </mat-form-field>\n </td>\n <td class=\"text-center align-middle\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center text-secondary\">\n <app-techlify-icon role='button' name='delete' (click)=\"removeStockIssueProduct(i)\"\n matTooltip=\"Remove row\"></app-techlify-icon>\n </div>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <td colspan=\"6\" class=\"text-end\">\n <div class=\"d-flex flex-row gap-2 justify-content-end\">\n <button mat-button color=\"primary\" type=\"button\" (click)=\"clearProducts()\"\n [disabled]=\"stockIssueProducts.length === 0\">\n <mat-icon>block</mat-icon> CLEAR ALL\n </button>\n <button mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"addStockIssueProduct()\">\n <mat-icon>add</mat-icon> ADD\n </button>\n </div>\n </td>\n </tr>\n </tfoot>\n </table>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-2\">\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancel()\">Cancel</button>\n <button [disabled]=\"isWorking || stockIssueProducts.length === 0\" mat-raised-button color=\"primary\"\n type=\"submit\">Save</button>\n </div>\n\n </form>\n\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i11.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i9$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "isEmitInitialEvent", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: LocationSelectorComponent, selector: "app-location-selector", inputs: ["appearance", "label", "placeholder", "includeNone"] }, { kind: "ngmodule", type: TechlifyIconModule }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }], preserveWhitespaces: true });
169
- }
170
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueFormComponent, decorators: [{
171
- type: Component,
172
- args: [{ selector: 'app-stock-issue-form', standalone: true, imports: [
173
- CommonModule,
174
- ReactiveFormsModule,
175
- MaterialModule,
176
- SearchableSelectorModule,
177
- LocationSelectorComponent,
178
- TechlifyIconModule
179
- ], template: "<mat-card class=\"d-flex flex-column gap-2 container\">\n <mat-card-content>\n\n <div class=\"d-flex flex-column gap-1\">\n <h5>\n <span class=\"material-symbols-outlined align-middle\">upload</span>\n Issue Stock\n </h5>\n </div>\n\n <form class=\"d-flex flex-column gap-2\" [formGroup]=\"form\" (submit)=\"save()\">\n\n <div class=\"d-flex flex-column\">\n <div class=\"d-flex flex-row gap-2 justify-content-between\">\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Start Date</mat-label>\n <input matInput [matDatepicker]=\"picker\" placeholder=\"Date\" formControlName=\"date\" required>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">{{ getErrorMessage('date') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></textarea>\n </mat-form-field>\n </div>\n </div>\n\n <table class=\"table mt-3\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Product</th>\n <th *ngIf=\"locationCount() > 0\" scope=\"col\">Location</th>\n <th scope=\"col\">Quantity</th>\n <th scope=\"col\">Particulars</th>\n <th scope=\"col\" class=\"text-center\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody formArrayName=\"stock_issue_products\">\n <tr *ngFor=\"let row of stockIssueProducts.controls; let i = index\" [formGroupName]=\"i\">\n <th scope=\"row\">{{ i + 1 }}</th>\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector apiUrl='api/products' formControlName=\"product_id\"\n titleField='name' [cache]=\"true\" required></app-searchable-selector>\n </mat-form-field>\n </td>\n <td *ngIf=\"locationCount() > 0\">\n <app-location-selector appearance='outline'\n formControlName=\"location_id\"></app-location-selector>\n </td>\n <td>\n <mat-form-field appearance='outline' class='fl-sm'>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\">\n </mat-form-field>\n </td>\n <td>\n <mat-form-field appearance='outline'>\n <mat-label>Particulars</mat-label>\n <input matInput formControlName=\"particulars\">\n </mat-form-field>\n </td>\n <td class=\"text-center align-middle\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center text-secondary\">\n <app-techlify-icon role='button' name='delete' (click)=\"removeStockIssueProduct(i)\"\n matTooltip=\"Remove row\"></app-techlify-icon>\n </div>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <td colspan=\"6\" class=\"text-end\">\n <div class=\"d-flex flex-row gap-2 justify-content-end\">\n <button mat-button color=\"primary\" type=\"button\" (click)=\"clearProducts()\"\n [disabled]=\"stockIssueProducts.length === 0\">\n <mat-icon>block</mat-icon> CLEAR ALL\n </button>\n <button mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"addStockIssueProduct()\">\n <mat-icon>add</mat-icon> ADD\n </button>\n </div>\n </td>\n </tr>\n </tfoot>\n </table>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-2\">\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancel()\">Cancel</button>\n <button [disabled]=\"isWorking || stockIssueProducts.length === 0\" mat-raised-button color=\"primary\"\n type=\"submit\">Save</button>\n </div>\n\n </form>\n\n </mat-card-content>\n</mat-card>\n" }]
180
- }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.FormBuilder }, { type: StockIssueService }, { type: i1$1.ActivatedRoute }, { type: LocationService }, { type: i3.Location }] });
181
-
182
- export { StockIssueFormComponent };
183
- //# sourceMappingURL=techlify-inventory-common-stock-issue-form.component-B-5myP-N.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"techlify-inventory-common-stock-issue-form.component-B-5myP-N.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.errorMessages = {\n date: {\n required: 'The date field is required.',\n },\n };\n\n this.form = this.fb.group({\n date: [new Date(), Validators.compose([Validators.required])],\n particulars: [''],\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 } else {\n this.addStockIssueProduct();\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: [0, [Validators.required, Validators.min(0)]],\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-form-field>\n </div>\n </div>\n\n <table class=\"table mt-3\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Product</th>\n <th *ngIf=\"locationCount() > 0\" scope=\"col\">Location</th>\n <th scope=\"col\">Quantity</th>\n <th scope=\"col\">Particulars</th>\n <th scope=\"col\" class=\"text-center\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody formArrayName=\"stock_issue_products\">\n <tr *ngFor=\"let row of stockIssueProducts.controls; let i = index\" [formGroupName]=\"i\">\n <th scope=\"row\">{{ i + 1 }}</th>\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector apiUrl='api/products' formControlName=\"product_id\"\n titleField='name' [cache]=\"true\" required></app-searchable-selector>\n </mat-form-field>\n </td>\n <td *ngIf=\"locationCount() > 0\">\n <app-location-selector appearance='outline'\n formControlName=\"location_id\"></app-location-selector>\n </td>\n <td>\n <mat-form-field appearance='outline' class='fl-sm'>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\">\n </mat-form-field>\n </td>\n <td>\n <mat-form-field appearance='outline'>\n <mat-label>Particulars</mat-label>\n <input matInput formControlName=\"particulars\">\n </mat-form-field>\n </td>\n <td class=\"text-center align-middle\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center text-secondary\">\n <app-techlify-icon role='button' name='delete' (click)=\"removeStockIssueProduct(i)\"\n matTooltip=\"Remove row\"></app-techlify-icon>\n </div>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <td colspan=\"6\" class=\"text-end\">\n <div class=\"d-flex flex-row gap-2 justify-content-end\">\n <button mat-button color=\"primary\" type=\"button\" (click)=\"clearProducts()\"\n [disabled]=\"stockIssueProducts.length === 0\">\n <mat-icon>block</mat-icon> CLEAR ALL\n </button>\n <button mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"addStockIssueProduct()\">\n <mat-icon>add</mat-icon> ADD\n </button>\n </div>\n </td>\n </tr>\n </tfoot>\n </table>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-2\">\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancel()\">Cancel</button>\n <button [disabled]=\"isWorking || stockIssueProducts.length === 0\" mat-raised-button color=\"primary\"\n type=\"submit\">Save</button>\n </div>\n\n </form>\n\n </mat-card-content>\n</mat-card>\n"],"names":["i3.StockIssueService","i4","i5.LocationService","i6","i8","i10","i12","i13"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BM,MAAO,uBAAwB,SAAQ,qBAAqB,CAAA;AAUjC,IAAA,oBAAA,CAAA;AACrB,IAAA,EAAA,CAAA;AACA,IAAA,iBAAA,CAAA;AACA,IAAA,KAAA,CAAA;AACA,IAAA,eAAA,CAAA;AACA,IAAA,QAAA,CAAA;AAbV,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,EAC/D,EAAe,EACf,iBAAoC,EACpC,KAAqB,EACrB,eAAgC,EAChC,QAAkB,EAAA;QAE1B,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAPC,IAAoB,CAAA,oBAAA,GAApB,oBAAoB,CAAsB;QAC/D,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,aAAa,GAAG;AACnB,YAAA,IAAI,EAAE;AACJ,gBAAA,QAAQ,EAAE,6BAA6B;AACxC,aAAA;SACF,CAAC;QAEF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC;AACxB,YAAA,IAAI,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC7D,WAAW,EAAE,CAAC,EAAE,C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