techlify-inventory-common 18.29.0 → 18.30.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.
- package/esm2022/lib/inventory-common/location/location-form-button/location-form-button.component.mjs +7 -4
- package/esm2022/lib/inventory-common/location/location-information/location-information.component.mjs +17 -15
- package/esm2022/lib/inventory-common/location/location-list/location-list.component.mjs +7 -7
- package/esm2022/lib/inventory-common/location/location-selector/location-selector.component.mjs +6 -5
- package/esm2022/lib/inventory-common/location/location-view/location-view.component.mjs +8 -9
- package/esm2022/lib/inventory-common/location/shelf/shelf-form-button/shelf-form-button.component.mjs +10 -6
- package/esm2022/lib/inventory-common/location/shelf/shelf-list/shelf-list.component.mjs +17 -16
- package/esm2022/lib/inventory-common/product/product-form-button/product-form-button.component.mjs +3 -3
- package/esm2022/lib/inventory-common/stock-issuances/stock-issue-batch-form/stock-issue-batch-form.component.mjs +120 -0
- package/esm2022/lib/inventory-common/stock-issuances/stock-issue-list/stock-issue-list.component.mjs +3 -3
- package/esm2022/lib/inventory-common/stock-issuances/stock-issue-routing.module.mjs +6 -1
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-batch-form/stock-receipt-batch-form.component.mjs +152 -0
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.mjs +1 -1
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-view/stock-receipt-view.component.mjs +1 -1
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.mjs +19 -72
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-routing.module.mjs +7 -1
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipts.module.mjs +31 -30
- package/esm2022/public-api.mjs +1 -3
- package/fesm2022/{techlify-inventory-common-category.module-BT3uLLqI.mjs → techlify-inventory-common-category.module--x7n_KLq.mjs} +9 -9
- package/fesm2022/{techlify-inventory-common-category.module-BT3uLLqI.mjs.map → techlify-inventory-common-category.module--x7n_KLq.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-measure.module-s9xhNWZM.mjs → techlify-inventory-common-measure.module-D2jxHH_D.mjs} +4 -4
- package/fesm2022/{techlify-inventory-common-measure.module-s9xhNWZM.mjs.map → techlify-inventory-common-measure.module-D2jxHH_D.mjs.map} +1 -1
- package/fesm2022/techlify-inventory-common-stock-issue-batch-form.component-DWWhMwul.mjs +119 -0
- package/fesm2022/techlify-inventory-common-stock-issue-batch-form.component-DWWhMwul.mjs.map +1 -0
- package/fesm2022/{techlify-inventory-common-stock-issue-view.component-CNrY99hf.mjs → techlify-inventory-common-stock-issue-view.component-CVmdJazX.mjs} +2 -2
- package/fesm2022/{techlify-inventory-common-stock-issue-view.component-CNrY99hf.mjs.map → techlify-inventory-common-stock-issue-view.component-CVmdJazX.mjs.map} +1 -1
- package/fesm2022/{techlify-inventory-common-techlify-inventory-common-DRw7na0D.mjs → techlify-inventory-common-techlify-inventory-common-DZ-tDtUV.mjs} +252 -269
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-DZ-tDtUV.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common.mjs +1 -1
- package/lib/inventory-common/location/location-information/location-information.component.d.ts +3 -1
- package/lib/inventory-common/location/location-selector/location-selector.component.d.ts +3 -1
- package/lib/inventory-common/stock-issuances/stock-issue-batch-form/stock-issue-batch-form.component.d.ts +31 -0
- package/lib/inventory-common/stock-receipts/stock-receipt-batch-form/stock-receipt-batch-form.component.d.ts +39 -0
- package/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.d.ts +3 -10
- package/lib/inventory-common/stock-receipts/stock-receipts.module.d.ts +10 -12
- package/package.json +1 -1
- package/public-api.d.ts +0 -2
- package/esm2022/lib/inventory-common/location/location-delete-button/location-delete-button.component.mjs +0 -68
- package/esm2022/lib/inventory-common/location/shelf/shelf-delete-button/shelf-delete-button.component.mjs +0 -60
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-DRw7na0D.mjs.map +0 -1
- package/lib/inventory-common/location/location-delete-button/location-delete-button.component.d.ts +0 -28
- package/lib/inventory-common/location/shelf/shelf-delete-button/shelf-delete-button.component.d.ts +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"techlify-inventory-common-measure.module-s9xhNWZM.mjs","sources":["../../../projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.html","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.html","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.html","../../../projects/inventory-common/src/lib/inventory-common/measure/measures-list/measures-list.component.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measures-list/measures-list.component.html","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-routing.module.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form.module.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete.module.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measure.module.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { AlertService, FormValidatorService, TechlifyFormComponentInterface } from 'ngx-techlify-core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { MeasureService } from '../../measure.service';\nimport { Observable } from 'rxjs';\n\n@Component({\n selector: 'app-measure-form',\n templateUrl: './measure-form.component.html',\n styleUrls: ['./measure-form.component.scss'],\n})\nexport class MeasureFormComponent extends TechlifyFormComponentInterface implements OnInit {\n @Input() measure: any;\n @Output() saved: EventEmitter<any> = new EventEmitter<any>();\n @Output() cancelled: EventEmitter<any> = new EventEmitter<any>();\n\n constructor(\n formValidatorService: FormValidatorService,\n private formBuilder: FormBuilder,\n private measureService: MeasureService\n ) {\n super(formValidatorService);\n\n this.errorMessages = {\n title: {\n required: 'The title field is required.',\n },\n quantity_measure: {\n required: 'The quantity measure field is required.',\n },\n };\n\n this.form = this.formBuilder.group({\n id: [''],\n title: ['', Validators.required],\n quantity_measure: ['', Validators.required],\n description: [''],\n });\n }\n\n ngOnInit(): void {\n if (this.measure) {\n this.form.patchValue({ ...this.measure });\n }\n }\n\n save() {\n if (this.form.invalid) {\n this.alertService.addAlert('Please check the form for errors.', 'error');\n return;\n }\n const data: any = {\n ...this.form.value,\n };\n this.isWorking = true;\n let request: Observable<any> = this.measureService.store(data);\n if (this.measure?.id) {\n request = this.measureService.update(data);\n }\n request.subscribe({\n next: (response: any) => {\n this.alertService.addAlert('Measure saved successfully!', 'success');\n this.isWorking = false;\n this.saved.emit(response?.item);\n },\n error: () => (this.isWorking = false),\n });\n }\n}\n","<h3 class=\"text-center mb-1\">{{ measure?.id ? 'Edit' : 'Create' }} Measure</h3>\n<p class=\"text-center text-secondary\">Measures are used throughout the app. ONLY create measure as is applicable.</p>\n\n<form [formGroup]=\"form\" class=\"d-flex flex-row flex-wrap justify-content-start gap-2\" (submit)=\"save()\">\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Title</mat-label>\n <input formControlName=\"title\" type=\"text\" matInput placeholder=\"Title\" />\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Quantity Measure</mat-label>\n <input formControlName=\"quantity_measure\" type=\"text\" matInput placeholder=\"Quantity Measure\" />\n <mat-hint> What is this measure for? eg: Unit, Length, Mass, Capacity. </mat-hint>\n <mat-error *ngIf=\"isFieldValid('quantity_measure')\">\n {{ getErrorMessage('quantity_measure') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\" style=\"width: calc(100%)\">\n <button [disabled]=\"isWorking\" type=\"submit\" mat-raised-button color=\"primary\">Save</button>\n <button [disabled]=\"isWorking\" type=\"button\" mat-flat-button (click)=\"cancelled.emit()\">Cancel</button>\n </div>\n</form>\n","import { Component, EventEmitter, Input, Output, TemplateRef } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\n@Component({\n selector: 'app-measure-form-button',\n templateUrl: './measure-form-button.component.html',\n styleUrls: ['./measure-form-button.component.scss'],\n})\nexport class MeasureFormButtonComponent {\n @Input() measure: any;\n @Output() saved: EventEmitter<any> = new EventEmitter<any>();\n\n constructor(public matDialog: MatDialog) {}\n\n showForm(templateRef: TemplateRef<any>) {\n this.matDialog.open(templateRef, { width: '500px' });\n }\n\n onSave(measure: any) {\n this.matDialog.closeAll();\n this.saved.emit(measure);\n }\n}\n","<span\n class=\"material-symbols-outlined cursor-pointer\"\n (click)=\"showForm(measureFormTemplate)\"\n [class.text-primary]=\"!measure?.id\"\n>\n {{ measure?.id ? 'edit' : 'add' }}\n</span>\n\n<ng-template #measureFormTemplate>\n <app-measure-form\n [measure]=\"measure\"\n mat-dialog-content\n (saved)=\"onSave($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-measure-form>\n</ng-template>\n","import { Component, EventEmitter, Input, Output, TemplateRef } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { MeasureService } from '../../measure.service';\n\n@Component({\n selector: 'app-measure-delete-button',\n templateUrl: './measure-delete-button.component.html',\n styleUrls: ['./measure-delete-button.component.scss'],\n})\nexport class MeasureDeleteButtonComponent {\n @Input() measure: any;\n @Output() deleted: EventEmitter<any> = new EventEmitter<any>();\n isDeleting: boolean = false;\n\n constructor(private measureService: MeasureService, private matDialog: MatDialog) {}\n\n /**\n * Delete the expense record.\n */\n deleteMeasure() {\n this.isDeleting = true;\n this.measureService.delete(this.measure).subscribe({\n next: () => {\n this.matDialog.closeAll();\n this.isDeleting = false;\n this.deleted.emit();\n },\n error: () => (this.isDeleting = false),\n });\n }\n\n showConfirmDialog(templateRef: TemplateRef<any>) {\n this.matDialog.open(templateRef);\n }\n}\n","<span\n (click)=\"showConfirmDialog(deleteMeasureTemplate)\"\n class=\"material-symbols-outlined cursor-pointer text-secondary\"\n>\n delete\n</span>\n\n<ng-template #deleteMeasureTemplate>\n <h3 mat-dialog-title>Delete Measure</h3>\n <div mat-dialog-content>\n <p>Deleting this measure cannot be undone, are you sure you want to proceed?</p>\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isDeleting\" mat-flat-button type=\"button\" mat-dialog-close>Cancel</button>\n <button [disabled]=\"isDeleting\" mat-raised-button color=\"warn\" type=\"button\" (click)=\"deleteMeasure()\">\n Delete\n </button>\n </div>\n</ng-template>\n","import { Component, OnInit } from '@angular/core';\nimport { FormBuilder } from '@angular/forms';\nimport { TechlifyListingControllerInterface } from 'ngx-techlify-core';\nimport { MeasureService } from '../measure.service';\nimport { Sort } from '@angular/material/sort';\n\n@Component({\n selector: 'app-measure-list',\n templateUrl: './measures-list.component.html',\n styleUrls: ['./measures-list.component.scss'],\n})\nexport class MeasuresListComponent extends TechlifyListingControllerInterface implements OnInit {\n displayedColumns: string[] = [\n 'no',\n 'title',\n 'products',\n 'quantity_measure',\n 'description',\n 'actions'\n ];\n\n constructor(private formBuilder: FormBuilder, private measureService: MeasureService) {\n super();\n this.filterForm = this.formBuilder.group({\n search: [''],\n sort_by: ['created_at|desc'],\n });\n }\n\n ngOnInit(): void {\n this.loadData();\n }\n\n override loadData(): void {\n const params: any = {\n page: this.page,\n perPage: this.perPage,\n withCount: 'products',\n ...this.filterForm.value,\n };\n this.isWorking = true;\n this.measureService.index(params).subscribe({\n next: (response: any) => {\n this.isWorking = false;\n this.models = this.models.concat(response?.data);\n this.lastPage = response?.last_page;\n },\n error: () => (this.isWorking = false),\n });\n }\n\n onSortChange(sort: Sort) {\n let { active, direction } = sort;\n if (!active) {\n active = 'created_at';\n }\n if (!direction) {\n direction = 'desc';\n active = 'created_at';\n }\n this.filterForm.get('sort_by').setValue(active + '|' + direction);\n }\n}\n","<mat-card class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Measures</h3>\n <app-measure-form-button (saved)=\"reload()\"></app-measure-form-button>\n </div>\n <app-techlify-filter [filterForm]=\"filterForm\" (filterUpdated)=\"reload()\"></app-techlify-filter>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"p-0\">\n <mat-card-content>\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Service Centers\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Title</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"products\">\n <th mat-header-cell *matHeaderCellDef>Products</th>\n <td mat-cell *matCellDef=\"let element\">\n <a\n class=\"cursor-pointer text-dark text-decoration-none\"\n [routerLink]=\"['/inventory/products']\"\n [queryParams]=\"{ measure_ids: element.id }\"\n >\n {{ element?.products_count }} products\n </a>\n </td>\n </ng-container>\n\n <!-- Quantity Measure Column -->\n <ng-container matColumnDef=\"quantity_measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity Measure</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.quantity_measure }}\n </td>\n </ng-container>\n\n <!-- Description Column -->\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-measure-form-button [measure]=\"element\" (saved)=\"reload()\"\n *ngIf=\"element?.client_id\"></app-measure-form-button>\n <app-measure-delete-button [measure]=\"element\" (deleted)=\"reload()\"\n *ngIf=\"element?.client_id && element?.products_count == 0\"></app-measure-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { MeasuresListComponent } from './measures-list/measures-list.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: MeasuresListComponent,\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class MeasureRoutingModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MeasureFormComponent } from './measure-form/measure-form.component';\nimport { MeasureFormButtonComponent } from './measure-form-button/measure-form-button.component';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from 'ngx-techlify-core';\n\n@NgModule({\n declarations: [MeasureFormComponent, MeasureFormButtonComponent],\n imports: [CommonModule, MaterialModule, ReactiveFormsModule],\n exports: [MeasureFormComponent, MeasureFormButtonComponent],\n})\nexport class MeasureFormModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MeasureDeleteButtonComponent } from './measure-delete-button/measure-delete-button.component';\nimport { MaterialModule } from 'ngx-techlify-core';\n\n@NgModule({\n declarations: [MeasureDeleteButtonComponent],\n imports: [CommonModule, MaterialModule],\n exports: [MeasureDeleteButtonComponent],\n})\nexport class MeasureDeleteModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MeasureRoutingModule } from './measure-routing.module';\nimport { MeasuresListComponent } from './measures-list/measures-list.component';\nimport { MeasureFormModule } from './measure-form/measure-form.module';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { MeasureDeleteModule } from './measure-delete/measure-delete.module';\nimport { MaterialModule } from 'ngx-techlify-core';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { TechlifyFilterModule } from '../techlify-filter/techlify-filter.module';\n\n@NgModule({\n declarations: [MeasuresListComponent],\n imports: [\n CommonModule,\n MeasureRoutingModule,\n MaterialModule,\n MeasureFormModule,\n TechlifyFilterModule,\n InfiniteScrollModule,\n MeasureDeleteModule,\n MatProgressBarModule,\n ],\n})\nexport class MeasureModule {}\n"],"names":["i3.MeasureService","i4","i5","i7","i1","i2.MeasureFormComponent","i1.MeasureService","i2","i3","i2.MeasureService","i6","i8","i9.MeasureFormButtonComponent","i10.TechlifyFilterComponent","i11","i12.MeasureDeleteButtonComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAWM,MAAO,oBAAqB,SAAQ,8BAA8B,CAAA;AAO5D,IAAA,WAAA,CAAA;AACA,IAAA,cAAA,CAAA;AAPD,IAAA,OAAO,CAAM;AACZ,IAAA,KAAK,GAAsB,IAAI,YAAY,EAAO,CAAC;AACnD,IAAA,SAAS,GAAsB,IAAI,YAAY,EAAO,CAAC;AAEjE,IAAA,WAAA,CACE,oBAA0C,EAClC,WAAwB,EACxB,cAA8B,EAAA;QAEtC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAHpB,IAA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AY,EAAE,cAAc,CAAC;oBACvC,OAAO,EAAE,CAAC,4BAA4B,CAAC;AACxC,iBAAA,CAAA;;;MCgBY,aAAa,CAAA;wGAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;yGAAb,aAAa,EAAA,YAAA,EAAA,CAZT,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAElC,YAAY;YACZ,oBAAoB;YACpB,cAAc;YACd,iBAAiB;YACjB,oBAAoB;YACpB,oBAAoB;YACpB,mBAAmB;YACnB,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAGX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAVtB,YAAY;YACZ,oBAAoB;YACpB,cAAc;YACd,iBAAiB;YACjB,oBAAoB;YACpB,oBAAoB;YACpB,mBAAmB;YACnB,oBAAoB,CAAA,EAAA,CAAA,CAAA;;4FAGX,aAAa,EAAA,UAAA,EAAA,CAAA;kBAbzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;AACrC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,oBAAoB;wBACpB,cAAc;wBACd,iBAAiB;wBACjB,oBAAoB;wBACpB,oBAAoB;wBACpB,mBAAmB;wBACnB,oBAAoB;AACrB,qBAAA;AACF,iBAAA,CAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"techlify-inventory-common-measure.module-D2jxHH_D.mjs","sources":["../../../projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.html","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.html","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.html","../../../projects/inventory-common/src/lib/inventory-common/measure/measures-list/measures-list.component.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measures-list/measures-list.component.html","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-routing.module.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form.module.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete.module.ts","../../../projects/inventory-common/src/lib/inventory-common/measure/measure.module.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { AlertService, FormValidatorService, TechlifyFormComponentInterface } from 'ngx-techlify-core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { MeasureService } from '../../measure.service';\nimport { Observable } from 'rxjs';\n\n@Component({\n selector: 'app-measure-form',\n templateUrl: './measure-form.component.html',\n styleUrls: ['./measure-form.component.scss'],\n})\nexport class MeasureFormComponent extends TechlifyFormComponentInterface implements OnInit {\n @Input() measure: any;\n @Output() saved: EventEmitter<any> = new EventEmitter<any>();\n @Output() cancelled: EventEmitter<any> = new EventEmitter<any>();\n\n constructor(\n formValidatorService: FormValidatorService,\n private formBuilder: FormBuilder,\n private measureService: MeasureService\n ) {\n super(formValidatorService);\n\n this.errorMessages = {\n title: {\n required: 'The title field is required.',\n },\n quantity_measure: {\n required: 'The quantity measure field is required.',\n },\n };\n\n this.form = this.formBuilder.group({\n id: [''],\n title: ['', Validators.required],\n quantity_measure: ['', Validators.required],\n description: [''],\n });\n }\n\n ngOnInit(): void {\n if (this.measure) {\n this.form.patchValue({ ...this.measure });\n }\n }\n\n save() {\n if (this.form.invalid) {\n this.alertService.addAlert('Please check the form for errors.', 'error');\n return;\n }\n const data: any = {\n ...this.form.value,\n };\n this.isWorking = true;\n let request: Observable<any> = this.measureService.store(data);\n if (this.measure?.id) {\n request = this.measureService.update(data);\n }\n request.subscribe({\n next: (response: any) => {\n this.alertService.addAlert('Measure saved successfully!', 'success');\n this.isWorking = false;\n this.saved.emit(response?.item);\n },\n error: () => (this.isWorking = false),\n });\n }\n}\n","<h3 class=\"text-center mb-1\">{{ measure?.id ? 'Edit' : 'Create' }} Measure</h3>\n<p class=\"text-center text-secondary\">Measures are used throughout the app. ONLY create measure as is applicable.</p>\n\n<form [formGroup]=\"form\" class=\"d-flex flex-row flex-wrap justify-content-start gap-2\" (submit)=\"save()\">\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Title</mat-label>\n <input formControlName=\"title\" type=\"text\" matInput placeholder=\"Title\" />\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Quantity Measure</mat-label>\n <input formControlName=\"quantity_measure\" type=\"text\" matInput placeholder=\"Quantity Measure\" />\n <mat-hint> What is this measure for? eg: Unit, Length, Mass, Capacity. </mat-hint>\n <mat-error *ngIf=\"isFieldValid('quantity_measure')\">\n {{ getErrorMessage('quantity_measure') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field style=\"width: calc(100%)\">\n <mat-label>Description</mat-label>\n <textarea matInput formControlName=\"description\" placeholder=\"Description\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\" style=\"width: calc(100%)\">\n <button [disabled]=\"isWorking\" type=\"submit\" mat-raised-button color=\"primary\">Save</button>\n <button [disabled]=\"isWorking\" type=\"button\" mat-flat-button (click)=\"cancelled.emit()\">Cancel</button>\n </div>\n</form>\n","import { Component, EventEmitter, Input, Output, TemplateRef } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\n\n@Component({\n selector: 'app-measure-form-button',\n templateUrl: './measure-form-button.component.html',\n styleUrls: ['./measure-form-button.component.scss'],\n})\nexport class MeasureFormButtonComponent {\n @Input() measure: any;\n @Output() saved: EventEmitter<any> = new EventEmitter<any>();\n\n constructor(public matDialog: MatDialog) {}\n\n showForm(templateRef: TemplateRef<any>) {\n this.matDialog.open(templateRef, { width: '500px' });\n }\n\n onSave(measure: any) {\n this.matDialog.closeAll();\n this.saved.emit(measure);\n }\n}\n","<span\n class=\"material-symbols-outlined cursor-pointer\"\n (click)=\"showForm(measureFormTemplate)\"\n [class.text-primary]=\"!measure?.id\"\n>\n {{ measure?.id ? 'edit' : 'add' }}\n</span>\n\n<ng-template #measureFormTemplate>\n <app-measure-form\n [measure]=\"measure\"\n mat-dialog-content\n (saved)=\"onSave($event)\"\n (cancelled)=\"matDialog.closeAll()\"\n ></app-measure-form>\n</ng-template>\n","import { Component, EventEmitter, Input, Output, TemplateRef } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { MeasureService } from '../../measure.service';\n\n@Component({\n selector: 'app-measure-delete-button',\n templateUrl: './measure-delete-button.component.html',\n styleUrls: ['./measure-delete-button.component.scss'],\n})\nexport class MeasureDeleteButtonComponent {\n @Input() measure: any;\n @Output() deleted: EventEmitter<any> = new EventEmitter<any>();\n isDeleting: boolean = false;\n\n constructor(private measureService: MeasureService, private matDialog: MatDialog) {}\n\n /**\n * Delete the expense record.\n */\n deleteMeasure() {\n this.isDeleting = true;\n this.measureService.delete(this.measure).subscribe({\n next: () => {\n this.matDialog.closeAll();\n this.isDeleting = false;\n this.deleted.emit();\n },\n error: () => (this.isDeleting = false),\n });\n }\n\n showConfirmDialog(templateRef: TemplateRef<any>) {\n this.matDialog.open(templateRef);\n }\n}\n","<span\n (click)=\"showConfirmDialog(deleteMeasureTemplate)\"\n class=\"material-symbols-outlined cursor-pointer text-secondary\"\n>\n delete\n</span>\n\n<ng-template #deleteMeasureTemplate>\n <h3 mat-dialog-title>Delete Measure</h3>\n <div mat-dialog-content>\n <p>Deleting this measure cannot be undone, are you sure you want to proceed?</p>\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isDeleting\" mat-flat-button type=\"button\" mat-dialog-close>Cancel</button>\n <button [disabled]=\"isDeleting\" mat-raised-button color=\"warn\" type=\"button\" (click)=\"deleteMeasure()\">\n Delete\n </button>\n </div>\n</ng-template>\n","import { Component, OnInit } from '@angular/core';\nimport { FormBuilder } from '@angular/forms';\nimport { TechlifyListingControllerInterface } from 'ngx-techlify-core';\nimport { MeasureService } from '../measure.service';\nimport { Sort } from '@angular/material/sort';\n\n@Component({\n selector: 'app-measure-list',\n templateUrl: './measures-list.component.html',\n styleUrls: ['./measures-list.component.scss'],\n})\nexport class MeasuresListComponent extends TechlifyListingControllerInterface implements OnInit {\n displayedColumns: string[] = [\n 'no',\n 'title',\n 'products',\n 'quantity_measure',\n 'description',\n 'actions'\n ];\n\n constructor(private formBuilder: FormBuilder, private measureService: MeasureService) {\n super();\n this.filterForm = this.formBuilder.group({\n search: [''],\n sort_by: ['created_at|desc'],\n });\n }\n\n ngOnInit(): void {\n this.loadData();\n }\n\n override loadData(): void {\n const params: any = {\n page: this.page,\n perPage: this.perPage,\n withCount: 'products',\n ...this.filterForm.value,\n };\n this.isWorking = true;\n this.measureService.index(params).subscribe({\n next: (response: any) => {\n this.isWorking = false;\n this.models = this.models.concat(response?.data);\n this.lastPage = response?.last_page;\n },\n error: () => (this.isWorking = false),\n });\n }\n\n onSortChange(sort: Sort) {\n let { active, direction } = sort;\n if (!active) {\n active = 'created_at';\n }\n if (!direction) {\n direction = 'desc';\n active = 'created_at';\n }\n this.filterForm.get('sort_by').setValue(active + '|' + direction);\n }\n}\n","<mat-card class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"mb-0\">Measures</h3>\n <app-measure-form-button (saved)=\"reload()\"></app-measure-form-button>\n </div>\n <app-techlify-filter [filterForm]=\"filterForm\" (filterUpdated)=\"reload()\"></app-techlify-filter>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"p-0\">\n <mat-card-content>\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Service Centers\" infiniteScroll\n [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"onSortChange($event)\">\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Title</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.title }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"products\">\n <th mat-header-cell *matHeaderCellDef>Products</th>\n <td mat-cell *matCellDef=\"let element\">\n <a\n class=\"cursor-pointer text-dark text-decoration-none\"\n [routerLink]=\"['/inventory/products']\"\n [queryParams]=\"{ measure_ids: element.id }\"\n >\n {{ element?.products_count }} products\n </a>\n </td>\n </ng-container>\n\n <!-- Quantity Measure Column -->\n <ng-container matColumnDef=\"quantity_measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity Measure</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.quantity_measure }}\n </td>\n </ng-container>\n\n <!-- Description Column -->\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef>Description</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-measure-form-button [measure]=\"element\" (saved)=\"reload()\"\n *ngIf=\"element?.client_id\"></app-measure-form-button>\n <app-measure-delete-button [measure]=\"element\" (deleted)=\"reload()\"\n *ngIf=\"element?.client_id && element?.products_count == 0\"></app-measure-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { MeasuresListComponent } from './measures-list/measures-list.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: MeasuresListComponent,\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class MeasureRoutingModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MeasureFormComponent } from './measure-form/measure-form.component';\nimport { MeasureFormButtonComponent } from './measure-form-button/measure-form-button.component';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from 'ngx-techlify-core';\n\n@NgModule({\n declarations: [MeasureFormComponent, MeasureFormButtonComponent],\n imports: [CommonModule, MaterialModule, ReactiveFormsModule],\n exports: [MeasureFormComponent, MeasureFormButtonComponent],\n})\nexport class MeasureFormModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MeasureDeleteButtonComponent } from './measure-delete-button/measure-delete-button.component';\nimport { MaterialModule } from 'ngx-techlify-core';\n\n@NgModule({\n declarations: [MeasureDeleteButtonComponent],\n imports: [CommonModule, MaterialModule],\n exports: [MeasureDeleteButtonComponent],\n})\nexport class MeasureDeleteModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MeasureRoutingModule } from './measure-routing.module';\nimport { MeasuresListComponent } from './measures-list/measures-list.component';\nimport { MeasureFormModule } from './measure-form/measure-form.module';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { MeasureDeleteModule } from './measure-delete/measure-delete.module';\nimport { MaterialModule } from 'ngx-techlify-core';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { TechlifyFilterModule } from '../techlify-filter/techlify-filter.module';\n\n@NgModule({\n declarations: [MeasuresListComponent],\n imports: [\n CommonModule,\n MeasureRoutingModule,\n MaterialModule,\n MeasureFormModule,\n TechlifyFilterModule,\n InfiniteScrollModule,\n MeasureDeleteModule,\n MatProgressBarModule,\n ],\n})\nexport class MeasureModule {}\n"],"names":["i3.MeasureService","i4","i5","i7","i1","i2.MeasureFormComponent","i1.MeasureService","i2","i3","i2.MeasureService","i6","i8","i9.MeasureFormButtonComponent","i10.TechlifyFilterComponent","i11","i12.MeasureDeleteButtonComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAWM,MAAO,oBAAqB,SAAQ,8BAA8B,CAAA;AAO5D,IAAA,WAAA,CAAA;AACA,IAAA,cAAA,CAAA;AAPD,IAAA,OAAO,CAAM;AACZ,IAAA,KAAK,GAAsB,IAAI,YAAY,EAAO,CAAC;AACnD,IAAA,SAAS,GAAsB,IAAI,YAAY,EAAO,CAAC;AAEjE,IAAA,WAAA,CACE,oBAA0C,EAClC,WAAwB,EACxB,cAA8B,EAAA;QAEtC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAHpB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QACxB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAgB;QAItC,IAAI,CAAC,aAAa,GAAG;AACnB,YAAA,KAAK,EAAE;AACL,gBAAA,QAAQ,EAAE,8BAA8B;AACzC,aAAA;AACD,YAAA,gBAAgB,EAAE;AAChB,gBAAA,QAAQ,EAAE,yCAAyC;AACpD,aAAA;SACF,CAAC;QAEF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;YACjC,EAAE,EAAE,CAAC,EAAE,CAAC;AACR,YAAA,KAAK,EAAE,CAA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AA,EAAA,CAAA,CAAA;AAGX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAVtB,YAAY;YACZ,oBAAoB;YACpB,cAAc;YACd,iBAAiB;YACjB,oBAAoB;YACpB,oBAAoB;YACpB,mBAAmB;YACnB,oBAAoB,CAAA,EAAA,CAAA,CAAA;;4FAGX,aAAa,EAAA,UAAA,EAAA,CAAA;kBAbzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;AACrC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,oBAAoB;wBACpB,cAAc;wBACd,iBAAiB;wBACjB,oBAAoB;wBACpB,oBAAoB;wBACpB,mBAAmB;wBACnB,oBAAoB;AACrB,qBAAA;AACF,iBAAA,CAAA;;;;;"}
|
|
@@ -0,0 +1,119 @@
|
|
|
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 { TechlifyFormComponentInterface, SearchableSelectorModule, TechlifyIconModule } from 'ngx-techlify-core';
|
|
7
|
+
import { S as StockIssueService, L as LocationService, b as MaterialModule, c as LocationSelectorComponent } from './techlify-inventory-common-techlify-inventory-common-DZ-tDtUV.mjs';
|
|
8
|
+
import * as i3 from '@angular/common';
|
|
9
|
+
import { CommonModule } from '@angular/common';
|
|
10
|
+
import moment from 'moment';
|
|
11
|
+
import * as i2$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 i8 from '@angular/material/icon';
|
|
17
|
+
import * as i9$1 from '@angular/material/input';
|
|
18
|
+
import * as i13 from '@angular/material/tooltip';
|
|
19
|
+
|
|
20
|
+
class StockIssueBatchFormComponent extends TechlifyFormComponentInterface {
|
|
21
|
+
formValidatorService;
|
|
22
|
+
fb;
|
|
23
|
+
stockIssueService;
|
|
24
|
+
router;
|
|
25
|
+
locationService;
|
|
26
|
+
locationCount = signal(0);
|
|
27
|
+
constructor(formValidatorService, fb, stockIssueService, router, locationService) {
|
|
28
|
+
super(formValidatorService);
|
|
29
|
+
this.formValidatorService = formValidatorService;
|
|
30
|
+
this.fb = fb;
|
|
31
|
+
this.stockIssueService = stockIssueService;
|
|
32
|
+
this.router = router;
|
|
33
|
+
this.locationService = locationService;
|
|
34
|
+
this.form = this.fb.group({
|
|
35
|
+
date: [new Date(), Validators.compose([Validators.required])],
|
|
36
|
+
particulars: ['', Validators.compose([Validators.required])],
|
|
37
|
+
stock_issue_products: this.fb.array([])
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
ngOnInit() {
|
|
41
|
+
this.locationService.count().subscribe((count) => {
|
|
42
|
+
this.locationCount.set(count);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
get stockIssueProducts() {
|
|
46
|
+
return this.form.get('stock_issue_products');
|
|
47
|
+
}
|
|
48
|
+
createStockIssueProduct() {
|
|
49
|
+
return this.fb.group({
|
|
50
|
+
product_id: ['', Validators.required],
|
|
51
|
+
location_id: ['', this.locationCount() > 0 ? Validators.required : null],
|
|
52
|
+
quantity: [1, [Validators.required, Validators.min(1)]],
|
|
53
|
+
particulars: ['']
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
addStockIssueProduct() {
|
|
57
|
+
this.stockIssueProducts.push(this.createStockIssueProduct());
|
|
58
|
+
}
|
|
59
|
+
removeStockIssueProduct(index) {
|
|
60
|
+
this.stockIssueProducts.removeAt(index);
|
|
61
|
+
}
|
|
62
|
+
clearProducts() {
|
|
63
|
+
this.stockIssueProducts.clear();
|
|
64
|
+
}
|
|
65
|
+
save() {
|
|
66
|
+
if (this.form.invalid) {
|
|
67
|
+
this.form.markAllAsTouched();
|
|
68
|
+
this.form.markAsDirty();
|
|
69
|
+
this.alertService.addAlert('Please check the form for errors.', 'error');
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (this.stockIssueProducts.length === 0) {
|
|
73
|
+
this.alertService.addAlert('Please add at least one product.', 'error');
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const formData = this.form.getRawValue();
|
|
77
|
+
const data = {
|
|
78
|
+
date: moment(formData.date).format('YYYY-MM-DD'),
|
|
79
|
+
details: formData.particulars,
|
|
80
|
+
products: formData.stock_issue_products.map((row) => ({
|
|
81
|
+
id: row.product_id,
|
|
82
|
+
product_id: row.product_id,
|
|
83
|
+
quantity: row.quantity,
|
|
84
|
+
location_id: row.location_id,
|
|
85
|
+
particulars: row.particulars,
|
|
86
|
+
}))
|
|
87
|
+
};
|
|
88
|
+
this.isWorking = true;
|
|
89
|
+
this.stockIssueService.store(data).subscribe({
|
|
90
|
+
next: (response) => {
|
|
91
|
+
this.isWorking = false;
|
|
92
|
+
this.alertService.addAlert('Stock issues saved successfully!', 'success');
|
|
93
|
+
this.router.navigate(['/inventory/stock-issues']);
|
|
94
|
+
},
|
|
95
|
+
error: () => {
|
|
96
|
+
this.isWorking = false;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
cancel() {
|
|
101
|
+
this.router.navigate(['/inventory/stock-issues']);
|
|
102
|
+
}
|
|
103
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueBatchFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.FormBuilder }, { token: StockIssueService }, { token: i2$1.Router }, { token: LocationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
104
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StockIssueBatchFormComponent, isStandalone: true, selector: "app-stock-issue-batch-form", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"d-flex flex-column gap-2 container\">\n <mat-card-content>\n\n <div class=\"d-flex flex-column gap-1\">\n <h5>\n <span class=\"material-symbols-outlined align-middle\">upload</span>\n Issue Stock\n </h5>\n </div>\n\n <form class=\"d-flex flex-column gap-2\" [formGroup]=\"form\" (submit)=\"save()\">\n\n <div class=\"d-flex flex-column\">\n <div class=\"d-flex flex-row gap-2 justify-content-between\">\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Start Date</mat-label>\n <input matInput [matDatepicker]=\"picker\" placeholder=\"Date\" formControlName=\"date\" required>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">{{ getErrorMessage('date') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></textarea>\n <mat-error *ngIf=\"isFieldValid('particulars')\">{{ getErrorMessage('particulars') }}</mat-error>\n </mat-form-field>\n </div>\n </div>\n\n <table class=\"table mt-3\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Product</th>\n <th *ngIf=\"locationCount() > 0\" scope=\"col\">Location</th>\n <th scope=\"col\">Quantity</th>\n <th scope=\"col\">Particulars</th>\n <th scope=\"col\" class=\"text-center\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody formArrayName=\"stock_issue_products\">\n <tr *ngFor=\"let row of stockIssueProducts.controls; let i = index\" [formGroupName]=\"i\">\n <th scope=\"row\">{{ i + 1 }}</th>\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector apiUrl='api/products' formControlName=\"product_id\"\n titleField='name' [cache]=\"true\" required></app-searchable-selector>\n </mat-form-field>\n </td>\n <td *ngIf=\"locationCount() > 0\">\n <app-location-selector appearance='outline'\n formControlName=\"location_id\"></app-location-selector>\n </td>\n <td>\n <mat-form-field appearance='outline' class='fl-sm'>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"1\">\n </mat-form-field>\n </td>\n <td>\n <mat-form-field appearance='outline'>\n <mat-label>Particulars</mat-label>\n <input matInput formControlName=\"particulars\">\n </mat-form-field>\n </td>\n <td class=\"text-center align-middle\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center text-secondary\">\n <app-techlify-icon role='button' name='delete' (click)=\"removeStockIssueProduct(i)\"\n matTooltip=\"Remove row\"></app-techlify-icon>\n </div>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <td colspan=\"6\" class=\"text-end\">\n <div class=\"d-flex flex-row gap-2 justify-content-end\">\n <button mat-button color=\"primary\" type=\"button\" (click)=\"clearProducts()\"\n [disabled]=\"stockIssueProducts.length === 0\">\n <mat-icon>block</mat-icon> CLEAR ALL\n </button>\n <button mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"addStockIssueProduct()\">\n <mat-icon>add</mat-icon> ADD\n </button>\n </div>\n </td>\n </tr>\n </tfoot>\n </table>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-2\">\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancel()\">Cancel</button>\n <button [disabled]=\"isWorking || stockIssueProducts.length === 0\" mat-raised-button color=\"primary\"\n type=\"submit\">Save</button>\n </div>\n\n </form>\n\n </mat-card-content>\n</mat-card>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: 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: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i13.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: SearchableSelectorModule }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: LocationSelectorComponent, selector: "app-location-selector", inputs: ["appearance", "label", "placeholder", "includeNone"] }, { kind: "ngmodule", type: TechlifyIconModule }, { kind: "component", type: i1.TechlifyIconComponent, selector: "app-techlify-icon", inputs: ["name", "size"] }], preserveWhitespaces: true });
|
|
105
|
+
}
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StockIssueBatchFormComponent, decorators: [{
|
|
107
|
+
type: Component,
|
|
108
|
+
args: [{ selector: 'app-stock-issue-batch-form', standalone: true, imports: [
|
|
109
|
+
CommonModule,
|
|
110
|
+
ReactiveFormsModule,
|
|
111
|
+
MaterialModule,
|
|
112
|
+
SearchableSelectorModule,
|
|
113
|
+
LocationSelectorComponent,
|
|
114
|
+
TechlifyIconModule
|
|
115
|
+
], 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" }]
|
|
116
|
+
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.FormBuilder }, { type: StockIssueService }, { type: i2$1.Router }, { type: LocationService }] });
|
|
117
|
+
|
|
118
|
+
export { StockIssueBatchFormComponent };
|
|
119
|
+
//# sourceMappingURL=techlify-inventory-common-stock-issue-batch-form.component-DWWhMwul.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"techlify-inventory-common-stock-issue-batch-form.component-DWWhMwul.mjs","sources":["../../../projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-batch-form/stock-issue-batch-form.component.ts","../../../projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-batch-form/stock-issue-batch-form.component.html"],"sourcesContent":["import { Component, OnInit, signal } from \"@angular/core\";\nimport { FormArray, FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { FormValidatorService, TechlifyFormComponentInterface, TechlifyIconModule } from \"ngx-techlify-core\";\nimport { MaterialModule } from '../../material.module';\nimport { CommonModule } from '@angular/common';\nimport { SearchableSelectorModule } from 'ngx-techlify-core';\nimport { LocationSelectorComponent } from '../../location/location-selector/location-selector.component';\nimport { StockIssueService } from '../stock-issue.service';\nimport { Router } from '@angular/router';\nimport moment from 'moment';\nimport { LocationService } from '../../location/location.service';\n\n@Component({\n selector: 'app-stock-issue-batch-form',\n templateUrl: './stock-issue-batch-form.component.html',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MaterialModule,\n SearchableSelectorModule,\n LocationSelectorComponent,\n TechlifyIconModule\n ]\n})\n\nexport class StockIssueBatchFormComponent extends TechlifyFormComponentInterface implements OnInit {\n\n locationCount = signal<number>(0);\n\n constructor(protected override formValidatorService: FormValidatorService,\n private fb: FormBuilder,\n private stockIssueService: StockIssueService,\n private router: Router,\n private locationService: LocationService\n ) {\n super(formValidatorService);\n\n this.form = this.fb.group({\n date: [new Date(), Validators.compose([Validators.required])],\n particulars: ['', Validators.compose([Validators.required])],\n stock_issue_products: this.fb.array([])\n });\n }\n\n ngOnInit(): void {\n this.locationService.count().subscribe((count: number) => {\n this.locationCount.set(count);\n });\n }\n\n get stockIssueProducts(): FormArray {\n return this.form.get('stock_issue_products') as FormArray;\n }\n\n createStockIssueProduct() {\n return this.fb.group({\n product_id: ['', Validators.required],\n location_id: ['', this.locationCount() > 0 ? Validators.required : null],\n quantity: [1, [Validators.required, Validators.min(1)]],\n particulars: ['']\n });\n }\n\n addStockIssueProduct() {\n this.stockIssueProducts.push(this.createStockIssueProduct());\n }\n\n removeStockIssueProduct(index: number) {\n this.stockIssueProducts.removeAt(index);\n }\n\n clearProducts() {\n this.stockIssueProducts.clear();\n }\n\n save() {\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n this.form.markAsDirty();\n this.alertService.addAlert('Please check the form for errors.', 'error');\n return;\n }\n\n if (this.stockIssueProducts.length === 0) {\n this.alertService.addAlert('Please add at least one product.', 'error');\n return;\n }\n\n const formData = this.form.getRawValue();\n const data: any = {\n date: moment(formData.date).format('YYYY-MM-DD'),\n details: formData.particulars,\n products: formData.stock_issue_products.map((row: any) => ({\n id: row.product_id,\n product_id: row.product_id,\n quantity: row.quantity,\n location_id: row.location_id,\n particulars: row.particulars,\n }))\n };\n\n this.isWorking = true;\n this.stockIssueService.store(data).subscribe({\n next: (response: any) => {\n this.isWorking = false;\n this.alertService.addAlert('Stock issues saved successfully!', 'success');\n this.router.navigate(['/inventory/stock-issues']);\n },\n error: () => {\n this.isWorking = false;\n }\n });\n }\n\n cancel() {\n this.router.navigate(['/inventory/stock-issues']);\n }\n}\n","<mat-card class=\"d-flex flex-column gap-2 container\">\n <mat-card-content>\n\n <div class=\"d-flex flex-column gap-1\">\n <h5>\n <span class=\"material-symbols-outlined align-middle\">upload</span>\n Issue Stock\n </h5>\n </div>\n\n <form class=\"d-flex flex-column gap-2\" [formGroup]=\"form\" (submit)=\"save()\">\n\n <div class=\"d-flex flex-column\">\n <div class=\"d-flex flex-row gap-2 justify-content-between\">\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Start Date</mat-label>\n <input matInput [matDatepicker]=\"picker\" placeholder=\"Date\" formControlName=\"date\" required>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\">{{ getErrorMessage('date') }}</mat-error>\n </mat-form-field>\n\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></textarea>\n <mat-error *ngIf=\"isFieldValid('particulars')\">{{ getErrorMessage('particulars') }}</mat-error>\n </mat-form-field>\n </div>\n </div>\n\n <table class=\"table mt-3\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Product</th>\n <th *ngIf=\"locationCount() > 0\" scope=\"col\">Location</th>\n <th scope=\"col\">Quantity</th>\n <th scope=\"col\">Particulars</th>\n <th scope=\"col\" class=\"text-center\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody formArrayName=\"stock_issue_products\">\n <tr *ngFor=\"let row of stockIssueProducts.controls; let i = index\" [formGroupName]=\"i\">\n <th scope=\"row\">{{ i + 1 }}</th>\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector apiUrl='api/products' formControlName=\"product_id\"\n titleField='name' [cache]=\"true\" required></app-searchable-selector>\n </mat-form-field>\n </td>\n <td *ngIf=\"locationCount() > 0\">\n <app-location-selector appearance='outline'\n formControlName=\"location_id\"></app-location-selector>\n </td>\n <td>\n <mat-form-field appearance='outline' class='fl-sm'>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"1\">\n </mat-form-field>\n </td>\n <td>\n <mat-form-field appearance='outline'>\n <mat-label>Particulars</mat-label>\n <input matInput formControlName=\"particulars\">\n </mat-form-field>\n </td>\n <td class=\"text-center align-middle\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center text-secondary\">\n <app-techlify-icon role='button' name='delete' (click)=\"removeStockIssueProduct(i)\"\n matTooltip=\"Remove row\"></app-techlify-icon>\n </div>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <td colspan=\"6\" class=\"text-end\">\n <div class=\"d-flex flex-row gap-2 justify-content-end\">\n <button mat-button color=\"primary\" type=\"button\" (click)=\"clearProducts()\"\n [disabled]=\"stockIssueProducts.length === 0\">\n <mat-icon>block</mat-icon> CLEAR ALL\n </button>\n <button mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"addStockIssueProduct()\">\n <mat-icon>add</mat-icon> ADD\n </button>\n </div>\n </td>\n </tr>\n </tfoot>\n </table>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-2\">\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancel()\">Cancel</button>\n <button [disabled]=\"isWorking || stockIssueProducts.length === 0\" mat-raised-button color=\"primary\"\n type=\"submit\">Save</button>\n </div>\n\n </form>\n\n </mat-card-content>\n</mat-card>\n"],"names":["i3.StockIssueService","i4","i5.LocationService","i6","i8","i10","i11","i12"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BM,MAAO,4BAA6B,SAAQ,8BAA8B,CAAA;AAI7C,IAAA,oBAAA,CAAA;AACnB,IAAA,EAAA,CAAA;AACA,IAAA,iBAAA,CAAA;AACA,IAAA,MAAA,CAAA;AACA,IAAA,eAAA,CAAA;AANZ,IAAA,aAAa,GAAG,MAAM,CAAS,CAAC,CAAC,CAAC;IAElC,WAA+B,CAAA,oBAA0C,EAC7D,EAAe,EACf,iBAAoC,EACpC,MAAc,EACd,eAAgC,EA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AAA,iBAAA,EAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,yBAAyB,gIACzB,kBAAkB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,qBAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;4FAIb,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAdxC,SAAS;+BACI,4BAA4B,EAAA,UAAA,EAE1B,IAAI,EACP,OAAA,EAAA;wBACL,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBACd,wBAAwB;wBACxB,yBAAyB;wBACzB,kBAAkB;AACrB,qBAAA,EAAA,QAAA,EAAA,4gLAAA,EAAA,CAAA;;;;;"}
|
|
@@ -4,7 +4,7 @@ import * as i3 from '@angular/common';
|
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i2 from '@angular/router';
|
|
6
6
|
import { RouterLink } from '@angular/router';
|
|
7
|
-
import { S as StockIssueService, b as MaterialModule,
|
|
7
|
+
import { S as StockIssueService, b as MaterialModule, d as StockIssueFormModule, e as StockIssueFormButtonComponent, f as StockIssuanceDeleteButtonModule, g as StockIssuanceDeleteButtonComponent } from './techlify-inventory-common-techlify-inventory-common-DZ-tDtUV.mjs';
|
|
8
8
|
import * as i1 from 'ngx-techlify-core';
|
|
9
9
|
import { NoteModule, EntityFilesViewAllModule, TechlifyFeatureModule } from 'ngx-techlify-core';
|
|
10
10
|
import * as i4 from '@angular/material/card';
|
|
@@ -63,4 +63,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
63
63
|
}], ctorParameters: () => [{ type: i2.ActivatedRoute }, { type: StockIssueService }, { type: i3.Location }] });
|
|
64
64
|
|
|
65
65
|
export { StockIssueViewComponent };
|
|
66
|
-
//# sourceMappingURL=techlify-inventory-common-stock-issue-view.component-
|
|
66
|
+
//# sourceMappingURL=techlify-inventory-common-stock-issue-view.component-CVmdJazX.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"techlify-inventory-common-stock-issue-view.component-CNrY99hf.mjs","sources":["../../../projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-view/stock-issue-view.component.ts","../../../projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-view/stock-issue-view.component.html"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { CommonModule, Location } from '@angular/common';\nimport { ActivatedRoute, RouterLink } from '@angular/router';\nimport { MaterialModule } from '../../material.module';\nimport { StockIssueService } from '../stock-issue.service';\nimport { EntityFilesViewAllModule, NoteModule, TechlifyFeatureModule } from 'ngx-techlify-core';\nimport { StockIssueFormModule } from '../stock-issue-form/stock-issue-form.module';\nimport { StockIssuanceDeleteButtonModule } from '../stock-issuance-delete-button/stock-issuance-delete-button.module';\n\n@Component({\n selector: 'app-stock-issue-view',\n templateUrl: './stock-issue-view.component.html',\n styleUrl: './stock-issue-view.component.css',\n standalone: true,\n imports: [\n CommonModule,\n MaterialModule,\n RouterLink,\n StockIssueFormModule,\n StockIssuanceDeleteButtonModule,\n NoteModule,\n EntityFilesViewAllModule,\n TechlifyFeatureModule,\n ],\n})\nexport class StockIssueViewComponent implements OnInit {\n\n id!: number;\n isLoading!: boolean;\n stockIssue!: any;\n\n constructor(\n private activatedRoute: ActivatedRoute,\n private service: StockIssueService,\n private location: Location\n ) { }\n\n ngOnInit(): void {\n this.activatedRoute.params.subscribe(params => {\n this.id = parseInt(params['id']);\n if (this.id) {\n this.loadData();\n }\n });\n }\n\n loadData() {\n this.isLoading = true;\n this.service.show(this.id).subscribe({\n next: (response: any) => {\n this.stockIssue = response?.item;\n this.isLoading = false;\n },\n error: () => {\n this.isLoading = false;\n }\n });\n }\n\n redirectBack() {\n this.location.back();\n }\n}\n","<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n\n<div *ngIf=\"stockIssue\" class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-card>\n <mat-card-content>\n <h3 class=\"mb-0\">Stock Issue for {{ stockIssue?.stock_issue_products[0]?.product?.name }}</h3>\n </mat-card-content>\n </mat-card>\n <div class=\"d-flex justify-content-start align-items-start gap-2\">\n <div class=\"d-flex flex-column gap-2\" style=\"width: 350px\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <strong class=\"mb-0 text-dark\">Information</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-stock-issue-form-button [stockIssue]=\"stockIssue\" (saved)=\"loadData()\">\n </app-stock-issue-form-button>\n <app-stock-issuance-delete-button [stockIssuance]=\"stockIssue\" (deleted)=\"redirectBack()\">\n </app-stock-issuance-delete-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"d-flex flex-column justify-content-start gap-2 mt-3\">\n <!-- Product & SKU / Date -->\n <div class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex flex-column gap-0\">\n <a class=\"text-decoration-none text-black\"\n [routerLink]=\"['/inventory/products', stockIssue?.stock_issue_products[0]?.product?.id, 'view']\">\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.product?.name }}</p>\n </a>\n <small *ngIf=\"stockIssue?.stock_issue_products[0]?.product?.sku\">{{\n stockIssue?.stock_issue_products[0]?.product?.sku }}</small>\n </div>\n <div class=\"d-flex flex-column justify-content-end gap-0\">\n <small *ngIf=\"stockIssue?.date\">{{ stockIssue?.date | date }}</small>\n <ng-container *ngIf=\"stockIssue?.stock_issue_products[0]?.batch?.expires_on\">\n <small techlifyFeatureEnabled=\"product-batch-numbers\">\n Expires on {{ stockIssue?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </ng-container>\n </div>\n </div>\n\n <!-- Quantity & Location -->\n <div class=\"row\">\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.quantity\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Quantity</small>\n <div class=\"d-flex gap-1\">\n <h3 class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.quantity }}</h3>\n <small class=\"text-secondary\">{{\n stockIssue?.stock_issue_products[0]?.product?.measure?.title\n }}</small>\n </div>\n </div>\n </div>\n\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.location\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Location</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.location?.title }}</p>\n </div>\n </div>\n </div>\n\n <!-- Batch & Expires On (if feature enabled) -->\n <ng-container *ngIf=\"stockIssue?.stock_issue_products[0]?.batch\">\n <div class=\"row\" techlifyFeatureEnabled=\"product-batch-numbers\">\n <div class=\"col-6\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Batch</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.batch?.batch_number }}</p>\n </div>\n </div>\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.batch?.expires_on\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Expires On</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.batch?.expires_on | date }}\n </p>\n </div>\n </div>\n </div>\n </ng-container>\n\n <!-- Particulars -->\n <div class=\"row\" *ngIf=\"stockIssue?.stock_issue_products[0]?.particulars\">\n <div class=\"col-12\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Particulars</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.particulars }}</p>\n </div>\n </div>\n </div>\n\n <!-- Creator -->\n <div class=\"row\" *ngIf=\"stockIssue?.creator\">\n <div class=\"col-12\">\n <small class=\"mb-0\">\n <span class=\"text-secondary\">Created By</span> {{ stockIssue?.creator?.name }}\n <span class=\"text-secondary\">On</span> {{ stockIssue?.created_at | date }}\n </small>\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n\n <app-note-list labelText=\"Notes\" viewMode=\"timeline\" modelType=\"StockIssue\"\n [relatedModelId]=\"stockIssue?.id\"></app-note-list>\n </div>\n\n <div style=\"width: calc(100% - 350px - 0.5rem)\">\n <app-entity-files-view-all title=\"Document\" [entityId]=\"stockIssue?.id\" entityType=\"StockIssue\"\n viewMode=\"timeline\">\n </app-entity-files-view-all>\n </div>\n </div>\n</div>"],"names":["i1","i2.StockIssueService","i5","i7.StockIssuanceDeleteButtonComponent","i8"],"mappings":";;;;;;;;;;;;MAyBa,uBAAuB,CAAA;AAOpB,IAAA,cAAA,CAAA;AACA,IAAA,OAAA,CAAA;AACA,IAAA,QAAA,CAAA;AAPZ,IAAA,EAAE,CAAU;AACZ,IAAA,SAAS,CAAW;AACpB,IAAA,UAAU,CAAO;AAEjB,IAAA,WAAA,CACY,cAA8B,EAC9B,OAA0B,EAC1B,QAAkB,EAAA;QAFlB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAgB;QAC9B,IAAO,CAAA,OAAA,GAAP,OAAO,CAAmB;QAC1B,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;KACzB;IAEL,QAAQ,GAAA;QACJ,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,IAAG;YAC1C,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACjC,YAAA,IAAI,IAAI,CAAC,EAAE,EAAE;gBACT,IAAI,CAAC,QAAQ,EAAE,CAAC;aACnB;AACL,SAAC,CAAC,CAAC;KACN;IAED,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC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AAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,wBAAwB,maACxB,qBAAqB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,+BAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;4FAGhB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAhBnC,SAAS;+BACI,sBAAsB,EAAA,UAAA,EAGpB,IAAI,EACP,OAAA,EAAA;wBACL,YAAY;wBACZ,cAAc;wBACd,UAAU;wBACV,oBAAoB;wBACpB,+BAA+B;wBAC/B,UAAU;wBACV,wBAAwB;wBACxB,qBAAqB;AACxB,qBAAA,EAAA,QAAA,EAAA,q/NAAA,EAAA,CAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"techlify-inventory-common-stock-issue-view.component-CVmdJazX.mjs","sources":["../../../projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-view/stock-issue-view.component.ts","../../../projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-view/stock-issue-view.component.html"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { CommonModule, Location } from '@angular/common';\nimport { ActivatedRoute, RouterLink } from '@angular/router';\nimport { MaterialModule } from '../../material.module';\nimport { StockIssueService } from '../stock-issue.service';\nimport { EntityFilesViewAllModule, NoteModule, TechlifyFeatureModule } from 'ngx-techlify-core';\nimport { StockIssueFormModule } from '../stock-issue-form/stock-issue-form.module';\nimport { StockIssuanceDeleteButtonModule } from '../stock-issuance-delete-button/stock-issuance-delete-button.module';\n\n@Component({\n selector: 'app-stock-issue-view',\n templateUrl: './stock-issue-view.component.html',\n styleUrl: './stock-issue-view.component.css',\n standalone: true,\n imports: [\n CommonModule,\n MaterialModule,\n RouterLink,\n StockIssueFormModule,\n StockIssuanceDeleteButtonModule,\n NoteModule,\n EntityFilesViewAllModule,\n TechlifyFeatureModule,\n ],\n})\nexport class StockIssueViewComponent implements OnInit {\n\n id!: number;\n isLoading!: boolean;\n stockIssue!: any;\n\n constructor(\n private activatedRoute: ActivatedRoute,\n private service: StockIssueService,\n private location: Location\n ) { }\n\n ngOnInit(): void {\n this.activatedRoute.params.subscribe(params => {\n this.id = parseInt(params['id']);\n if (this.id) {\n this.loadData();\n }\n });\n }\n\n loadData() {\n this.isLoading = true;\n this.service.show(this.id).subscribe({\n next: (response: any) => {\n this.stockIssue = response?.item;\n this.isLoading = false;\n },\n error: () => {\n this.isLoading = false;\n }\n });\n }\n\n redirectBack() {\n this.location.back();\n }\n}\n","<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n\n<div *ngIf=\"stockIssue\" class=\"d-flex flex-column justify-content-start gap-2\">\n <mat-card>\n <mat-card-content>\n <h3 class=\"mb-0\">Stock Issue for {{ stockIssue?.stock_issue_products[0]?.product?.name }}</h3>\n </mat-card-content>\n </mat-card>\n <div class=\"d-flex justify-content-start align-items-start gap-2\">\n <div class=\"d-flex flex-column gap-2\" style=\"width: 350px\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\"> ungroup </span>\n <strong class=\"mb-0 text-dark\">Information</strong>\n </div>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <app-stock-issue-form-button [stockIssue]=\"stockIssue\" (saved)=\"loadData()\">\n </app-stock-issue-form-button>\n <app-stock-issuance-delete-button [stockIssuance]=\"stockIssue\" (deleted)=\"redirectBack()\">\n </app-stock-issuance-delete-button>\n </div>\n </mat-card-content>\n <mat-card-content class=\"d-flex flex-column justify-content-start gap-2 mt-3\">\n <!-- Product & SKU / Date -->\n <div class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex flex-column gap-0\">\n <a class=\"text-decoration-none text-black\"\n [routerLink]=\"['/inventory/products', stockIssue?.stock_issue_products[0]?.product?.id, 'view']\">\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.product?.name }}</p>\n </a>\n <small *ngIf=\"stockIssue?.stock_issue_products[0]?.product?.sku\">{{\n stockIssue?.stock_issue_products[0]?.product?.sku }}</small>\n </div>\n <div class=\"d-flex flex-column justify-content-end gap-0\">\n <small *ngIf=\"stockIssue?.date\">{{ stockIssue?.date | date }}</small>\n <ng-container *ngIf=\"stockIssue?.stock_issue_products[0]?.batch?.expires_on\">\n <small techlifyFeatureEnabled=\"product-batch-numbers\">\n Expires on {{ stockIssue?.stock_issue_products[0]?.batch?.expires_on | date }}\n </small>\n </ng-container>\n </div>\n </div>\n\n <!-- Quantity & Location -->\n <div class=\"row\">\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.quantity\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Quantity</small>\n <div class=\"d-flex gap-1\">\n <h3 class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.quantity }}</h3>\n <small class=\"text-secondary\">{{\n stockIssue?.stock_issue_products[0]?.product?.measure?.title\n }}</small>\n </div>\n </div>\n </div>\n\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.location\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Location</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.location?.title }}</p>\n </div>\n </div>\n </div>\n\n <!-- Batch & Expires On (if feature enabled) -->\n <ng-container *ngIf=\"stockIssue?.stock_issue_products[0]?.batch\">\n <div class=\"row\" techlifyFeatureEnabled=\"product-batch-numbers\">\n <div class=\"col-6\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Batch</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.batch?.batch_number }}</p>\n </div>\n </div>\n <div class=\"col-6\" *ngIf=\"stockIssue?.stock_issue_products[0]?.batch?.expires_on\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Expires On</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.batch?.expires_on | date }}\n </p>\n </div>\n </div>\n </div>\n </ng-container>\n\n <!-- Particulars -->\n <div class=\"row\" *ngIf=\"stockIssue?.stock_issue_products[0]?.particulars\">\n <div class=\"col-12\">\n <div class=\"d-flex flex-column gap-0\">\n <small class=\"text-secondary\">Particulars</small>\n <p class=\"mb-0\">{{ stockIssue?.stock_issue_products[0]?.particulars }}</p>\n </div>\n </div>\n </div>\n\n <!-- Creator -->\n <div class=\"row\" *ngIf=\"stockIssue?.creator\">\n <div class=\"col-12\">\n <small class=\"mb-0\">\n <span class=\"text-secondary\">Created By</span> {{ stockIssue?.creator?.name }}\n <span class=\"text-secondary\">On</span> {{ stockIssue?.created_at | date }}\n </small>\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n\n <app-note-list labelText=\"Notes\" viewMode=\"timeline\" modelType=\"StockIssue\"\n [relatedModelId]=\"stockIssue?.id\"></app-note-list>\n </div>\n\n <div style=\"width: calc(100% - 350px - 0.5rem)\">\n <app-entity-files-view-all title=\"Document\" [entityId]=\"stockIssue?.id\" entityType=\"StockIssue\"\n viewMode=\"timeline\">\n </app-entity-files-view-all>\n </div>\n </div>\n</div>"],"names":["i1","i2.StockIssueService","i5","i7.StockIssuanceDeleteButtonComponent","i8"],"mappings":";;;;;;;;;;;;MAyBa,uBAAuB,CAAA;AAOpB,IAAA,cAAA,CAAA;AACA,IAAA,OAAA,CAAA;AACA,IAAA,QAAA,CAAA;AAPZ,IAAA,EAAE,CAAU;AACZ,IAAA,SAAS,CAAW;AACpB,IAAA,UAAU,CAAO;AAEjB,IAAA,WAAA,CACY,cAA8B,EAC9B,OAA0B,EAC1B,QAAkB,EAAA;QAFlB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAgB;QAC9B,IAAO,CAAA,OAAA,GAAP,OAAO,CAAm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