@barcoding/widget-piecework-in 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"barcoding-widget-piecework-in.mjs","sources":["../../src/lib/piece-work-in-form/piece-work-in-form.component.ts","../../src/lib/piece-work-in-form/piece-work-in-form.component.html","../../src/lib/config/config.component.ts","../../src/lib/config/modal.html","../../src/lib/widget-piecework-in.component.ts","../../src/lib/widget-piecework-in.component.html","../../src/lib/widget-piecework-in.module.ts","../../src/public-api.ts","../../src/barcoding-widget-piecework-in.ts"],"sourcesContent":["import { Component, Inject, OnInit, OnDestroy } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { FormControl, Validators, FormGroup } from '@angular/forms';\nimport { FocusService } from '@barcoding/frontend-core';\nimport {\n FaultCategoryControllerService,\n FaultControllerService,\n FaultsCategoryWithRelations,\n FaultWithRelations,\n PieceWorkLineWithRelations,\n SessionWithRelations,\n User,\n UserControllerService,\n UserWithRelations,\n} from '@barcoding/sdk';\nimport { Store } from '@ngxs/store';\nimport { AuthState } from '@barcoding/auth-core';\nimport { PieceWorkLineControllerService } from '@barcoding/sdk';\n\n@Component({\n selector: 'piece-work-in-form',\n styles: [\n `\n kendo-textbox-container {\n width: 100%;\n }\n\n .h_t {\n font: normal normal normal 10px/40px IBM Plex Sans;\n letter-spacing: 0px;\n color: #666666;\n opacity: 1;\n }\n\n .v_t {\n font: normal normal normal 18px/40px IBM Plex Sans;\n letter-spacing: 0px;\n color: #666666;\n opacity: 1;\n }\n\n .spacer {\n display: flex;\n flex-grow: 1;\n }\n `,\n ],\n templateUrl: 'piece-work-in-form.component.html',\n})\nexport class PieceWorkInForm implements OnInit, OnDestroy {\n line: PieceWorkLineWithRelations;\n public finish = false;\n public qty_in = 0;\n constructor(\n private focusService: FocusService,\n private pieceWorkLineApi: PieceWorkLineControllerService,\n public dialogRef: MatDialogRef<PieceWorkInForm>,\n private store: Store,\n @Inject(MAT_DIALOG_DATA) public data: any\n ) {\n this.line = Object.assign({}, data.line);\n this.qty_in = this.line.out - this.line.in;\n }\n\n ngOnInit() {\n this.focusService.unFocus();\n }\n\n ngOnDestroy() {\n this.focusService.setFocus();\n }\n cancel() {\n this.dialogRef.close();\n }\n\n save(qty_in, finish) {\n this.pieceWorkLineApi\n .find({\n filter: JSON.stringify({\n where: { piecework_id: this.line.piecework_id },\n }),\n })\n .subscribe(lines => {\n let isFinished = false;\n const totalLines = lines.length;\n let totalFinishedLines = 0;\n\n lines.forEach(line => {\n if (line.piecework_line_status_id === 2) {\n totalFinishedLines++;\n }\n });\n if (qty_in === this.line.out) {\n totalFinishedLines++;\n }\n if (totalFinishedLines === totalLines) {\n isFinished = true;\n }\n\n this.dialogRef.close({\n qty_in,\n finish,\n isFinished,\n });\n });\n }\n}\n","<div fxLayout=\"column\" style=\"width: 100%\" fxLayoutAlign=\" none\">\n <h4>Piece Work</h4>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div fxLayout=\"column\" fxLayoutAlign=\"space-between none\">\n <span class=\"h_t\">Assembly Name</span>\n <span class=\"v_t\">{{ line.part?.part_number }}</span>\n </div>\n\n <div class=\"spacer\"></div>\n\n <div fxLayout=\"column\" fxLayoutAlign=\"space-between none\">\n <span class=\"h_t\">Mode</span>\n <span class=\"v_t\">{{ line.mode?.controller }}</span>\n </div>\n\n <div class=\"spacer\"></div>\n\n <div fxLayout=\"column\" fxLayoutAlign=\"space-between none\">\n <span class=\"h_t\">Allocated Time</span>\n <span class=\"v_t\">--</span>\n </div>\n </div>\n <form class=\"k-form\" autocomplete=\"off\" #pieceWork=\"ngForm\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\" fxLayoutGap=\"20px\">\n <kendo-floatinglabel fxFlex=\"80%\" text=\"Qty\">\n <kendo-numerictextbox\n [format]=\"'n0'\"\n style=\"width: 100%\"\n [min]=\"1\"\n required\n [(ngModel)]=\"qty_in\"\n [name]=\"'in'\"\n [max]=\"line.out\"\n type=\"number\"></kendo-numerictextbox>\n </kendo-floatinglabel>\n <mat-checkbox fxFlexAlign=\"center\" name=\"finish\" [(ngModel)]=\"finish\">\n Finish\n </mat-checkbox>\n </div>\n </form>\n</div>\n<div\n style=\"margin-top: 25px\"\n fxLayoutGap=\"10px\"\n fxLayout=\"row\"\n fxLayoutAlign=\"end none\">\n <button (click)=\"cancel()\" mat-raised-button color=\"danger\">Cancel</button>\n <button\n (click)=\"save(qty_in, finish)\"\n [disabled]=\"!pieceWork.valid\"\n mat-raised-button\n class=\"save_button\"\n color=\"primary\">\n Save\n </button>\n</div>\n","import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { Component, Inject, OnInit } from '@angular/core';\nimport {\n ExternalDashboardControllerService,\n ExternalDashboardWithRelations,\n} from '@barcoding/sdk';\n@Component({\n selector: 'assignmentFormDialog',\n templateUrl: 'modal.html',\n styleUrls: ['./style.css'],\n})\nexport class PieceworkInConfigModal implements OnInit {\n public config: any = {};\n constructor(\n public dialogRef: MatDialogRef<PieceworkInConfigModal>,\n @Inject(MAT_DIALOG_DATA) public data: any\n ) {\n this.config = Object.assign({}, data.currentConfig);\n }\n\n ngOnInit() {}\n\n save(config) {\n this.dialogRef.close(config);\n }\n\n onNoClick(): void {\n this.dialogRef.close();\n }\n}\n","<form class=\"k-form\" autocomplete=\"off\" #configForm=\"ngForm\">\n <div fxLayout=\"column\" fxLayoutAlign=\"space-between none\">\n <div fxLayout=\"column\" fxLayoutAlign=\" stretch\">\n <fieldset>\n <legend>Main</legend>\n <label fxFlex class=\"k-form-field\">\n <span>Current User</span>\n <kendo-switch\n name=\"current_user\"\n [(ngModel)]=\"config.current_user\"\n [onLabel]=\"'Yes'\"\n [offLabel]=\"'No'\"\n ></kendo-switch>\n </label>\n </fieldset>\n </div>\n\n <div\n fxLayoutGap=\"20px\"\n style=\"margin-top: 10px\"\n fxLayout=\"row\"\n fxLayoutAlign=\"space-around end\"\n >\n <button fxFlex (click)=\"onNoClick()\" mat-raised-button>Cancel</button>\n <button\n fxFlex\n [disabled]=\"!configForm.form.valid\"\n (click)=\"save(config)\"\n color=\"primary\"\n mat-raised-button\n >\n Save\n </button>\n </div>\n </div>\n</form>\n","import {\n ChangeDetectorRef,\n Component,\n OnDestroy,\n OnInit,\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { Select, Store } from '@ngxs/store';\nimport {\n ConfigInterfaceDashboard,\n WidgetInterface,\n WidgetParams,\n} from '@barcoding/gridster-core';\nimport {\n ModeAccessViewWithRelations,\n ModeControllerService,\n ModeWithRelations,\n ModuleWithRelations,\n PieceWorkLineControllerService,\n PieceWorkLineStatusControllerControllerService,\n PieceWorkLineStatusWithRelations,\n PieceWorkLineWithRelations,\n PieceworkTransactionStatusControllerService,\n PieceworkTransactionStatusWithRelations,\n PieceWorkWithRelations,\n UserControllerService,\n UserWithRelations,\n WidgetConfigWithRelations,\n} from '@barcoding/sdk';\nimport { PieceWorkFrontState } from '@barcoding/module-piecework';\nimport { Observable, Subject, Subscription } from 'rxjs';\nimport {\n ResetStorePieceWork,\n FindPieceWorkEmployee,\n} from '@barcoding/module-piecework';\nimport { MatDialog } from '@angular/material/dialog';\nimport { AuthState } from '@barcoding/auth-core';\nimport { PieceWorkInForm } from './piece-work-in-form/piece-work-in-form.component';\nimport {\n ChangeStatePieceWork,\n isMode,\n ModeState,\n PieceWorkState,\n PieceWorkCollect,\n} from '@barcoding/frontend-core';\nimport { ModuleState } from '@barcoding/core';\nimport { PieceworkInConfigModal } from './config/config.component';\nimport {\n CompositeFilterDescriptor,\n FilterDescriptor,\n} from '@progress/kendo-data-query';\nimport { DataStateChangeEvent } from '@progress/kendo-angular-grid';\nimport { PageEvent } from '@angular/material/paginator';\n\nexport interface PieceWorkInFilters {\n pw_id?: number;\n document?: string;\n user?: UserWithRelations;\n mode?: ModeWithRelations;\n status?: PieceWorkLineStatusWithRelations;\n}\n\n@Component({\n selector: 'widget-piece-work-in',\n styleUrls: ['./widget-piecework-in.component.scss'],\n templateUrl: './widget-piecework-in.component.html',\n})\nexport class WidgetPieceworkInComponent\n extends ConfigInterfaceDashboard\n implements OnInit, OnDestroy, WidgetInterface\n{\n public configChanged$: Subject<any> = new Subject<any>();\n public myConfigSubscription: Subscription;\n public isAdmin = false;\n public item: WidgetConfigWithRelations;\n public params: WidgetParams;\n public filters: any = {\n logic: 'and',\n filters: [\n {\n field: 'piecework_line_status_id',\n value: 1,\n },\n ],\n };\n displayedColumns = [\n 'pw_line',\n 'employee',\n 'document',\n 'assembly',\n 'mode',\n 'unit_price',\n 'percentage',\n 'qty',\n 'in',\n 'finish',\n 'total',\n 'status',\n ]; // column display value\n dataSource: MatTableDataSource<any>;\n @Select(PieceWorkState.pieceworks) pieceworks$: Observable<\n PieceWorkLineWithRelations[]\n >;\n @Select(PieceWorkState.total) total$: Observable<number>;\n\n public pieceworkSubscription: Subscription;\n public employee = null;\n public status = 1;\n public object;\n public barcodes: Array<string> = [];\n public users: UserWithRelations[] = [];\n public objectSubscription: Subscription;\n public statuses: PieceWorkLineStatusWithRelations[] = [];\n public currentUserConfig;\n public state: Observable<any>;\n public stateSubscription: Subscription;\n @Select(PieceWorkState.state) state$: Observable<DataStateChangeEvent>;\n public modes: ModeWithRelations[] = [];\n public defaultItemMode: any = { id: null, controller: 'Show all...' };\n public defaultItemStatus: any = { id: null, name: 'Show all...' };\n\n constructor(\n public modeApi: ModeControllerService,\n private userApi: UserControllerService,\n public store: Store,\n private cdr: ChangeDetectorRef,\n public dialog: MatDialog,\n private statusesApi: PieceWorkLineStatusControllerControllerService,\n private pieceWorkLineApi: PieceWorkLineControllerService\n ) {\n super(dialog, PieceworkInConfigModal, store, '60%');\n }\n\n getValue(field: string, isMultiLine: boolean = false) {\n if (!this.filters) {\n return null;\n }\n\n if (!this.filters.filters) {\n return null;\n }\n const data: any = this.filters.filters.find(\n (value: FilterDescriptor) => value.field === field\n );\n\n if (isMultiLine) {\n if (data && data.value && data.value.length) {\n return data.value.join('\\n');\n }\n }\n\n return data ? data.value : '';\n }\n ngOnInit() {\n this.modeApi\n .find({ filter: JSON.stringify({ where: { is_piecework: true } }) })\n .subscribe(_ => {\n this.modes = _;\n });\n\n this.statusesApi.find().subscribe(_ => {\n this.statuses = _;\n });\n const currentUser = this.store.selectSnapshot<UserWithRelations>(\n AuthState.user\n );\n // example of default filter on start\n // this.filters.filters.push({\n // operator: 'eq',\n // field: 'piecework_id',\n // value: 200,\n // });\n // this.store.dispatch(\n // new ChangeStatePieceWork({\n // skip: 0,\n // sort: [{ field: 'id', dir: 'desc' }],\n // take: 10,\n // filter: this.filters,\n // })\n // );\n this.stateSubscription = this.state$.subscribe(_ => {\n if (_.filter) {\n this.filters = _.filter;\n }\n });\n\n const mode = this.store.selectSnapshot<ModeAccessViewWithRelations | {}>(\n ModeState.mode\n );\n\n const currentModule = this.store.selectSnapshot<ModuleWithRelations>(\n ModuleState.module\n );\n\n if (currentModule) {\n const isAdmin = currentUser.groups.find(\n value => value.module_group_id === currentModule.admin_group_id\n );\n if (isAdmin) {\n this.isAdmin = true;\n }\n }\n\n if (mode && isMode(mode)) {\n const isAdminMode = currentUser.groups.find(\n value => value.module_group_id === mode.admin_group_id\n );\n const isModeratorMode = currentUser.groups.find(\n value => value.module_group_id === mode.moderator_group_id\n );\n console.log(isAdminMode, isModeratorMode);\n if (isModeratorMode || isAdminMode) {\n this.isAdmin = true;\n }\n }\n\n const currentUserConfig =\n this.item.config && this.item.config.current_user ? true : false;\n if (currentUserConfig) {\n this.isAdmin = false;\n }\n\n console.log(`isAdmin: ${this.isAdmin}`);\n\n if (!this.isAdmin) {\n const currentUser = this.store.selectSnapshot<UserWithRelations>(\n AuthState.user\n );\n\n this.users.push(currentUser);\n\n const filters: any = {\n logic: 'and',\n filters: [\n {\n field: 'piecework_line_status_id',\n value: 1,\n },\n {\n field: 'user_id',\n value: currentUser.id,\n },\n ],\n };\n this.store.dispatch(\n new ChangeStatePieceWork({\n skip: 0,\n sort: [{ field: 'id', dir: 'desc' }],\n take: 10,\n filter: filters,\n })\n );\n }\n\n if (this.isAdmin) {\n this.displayedColumns = [\n 'pw_line',\n 'employee',\n 'document',\n 'mode',\n 'percentage',\n 'qty',\n 'finish',\n 'total',\n 'status',\n 'actions',\n ]; // column display value\n }\n\n /**\n * example set filter outside\n */\n // setTimeout(() => {\n // const filters: CompositeFilterDescriptor = {\n // logic: 'and',\n // filters: [\n // {\n // operator: 'eq',\n // field: 'piecework_id',\n // value: 202,\n // },\n // ],\n // };\n // this.store.dispatch(\n // new ChangeStatePieceWork({\n // skip: 0,\n // sort: [{ field: 'id', dir: 'desc' }],\n // take: 10,\n // filter: filters,\n // })\n // );\n // }, 8000);\n\n this.pieceworkSubscription = this.pieceworks$.subscribe(_ => {\n const data = _.map(value => {\n return {\n ...value,\n formIn: value.out - value.in,\n };\n });\n this.dataSource = new MatTableDataSource(data);\n });\n }\n\n getMax(row: PieceWorkLineWithRelations) {\n return row.out - row.in;\n }\n\n registerIn(row: PieceWorkLineWithRelations, qty_in: number, finish) {\n console.log(row, qty_in);\n this.pieceWorkLineApi\n .find({\n filter: JSON.stringify({\n where: { piecework_id: row.piecework_id },\n }),\n })\n .subscribe(lines => {\n let isFinished = false;\n const totalLines = lines.length;\n let totalFinishedLines = 0;\n\n lines.forEach(line => {\n if (line.piecework_line_status_id === 2) {\n totalFinishedLines++;\n }\n });\n if (qty_in === row.out) {\n totalFinishedLines++;\n }\n if (totalFinishedLines === totalLines) {\n isFinished = true;\n }\n\n const user_id = this.store.selectSnapshot<UserWithRelations>(\n AuthState.user\n ).id;\n const finishObject = finish ? qty_in : 0;\n this.store.dispatch(\n new PieceWorkCollect(\n row.piecework_id,\n qty_in,\n row.id,\n user_id,\n finishObject,\n isFinished\n )\n );\n });\n }\n\n buildBarcodeList(value: string) {\n this.barcodes = value\n .split('\\n')\n .filter(value => value != null && value.length > 0)\n .map(value => value.trim());\n console.log(this.barcodes);\n }\n\n valueChange(field, event) {\n console.log(`valueChange: ${field}, ${event}`);\n\n if (!this.filters.filters) {\n this.filters.filters = [];\n }\n\n const filterExists = this.filters.filters.findIndex(\n (value: FilterDescriptor) => value.field === field\n );\n\n if (filterExists >= 0) {\n this.filters.filters[filterExists].value = event;\n } else {\n this.filters.filters.push({\n operator: 'eq',\n field,\n value: event,\n });\n }\n\n this.store.dispatch(\n new ChangeStatePieceWork({\n skip: 0,\n sort: [{ field: 'id', dir: 'desc' }],\n take: 10,\n filter: this.filters,\n })\n );\n }\n\n filterChange(event) {\n if (event) {\n this.userApi\n .find({\n filter: JSON.stringify({\n limit: 5,\n where: { full_name: { like: `%${event}%` } },\n }),\n })\n .subscribe(_ => {\n this.users = _;\n });\n }\n }\n\n ngOnDestroy() {\n if (this.pieceworkSubscription) {\n this.pieceworkSubscription.unsubscribe();\n }\n if (this.myConfigSubscription) {\n this.myConfigSubscription.unsubscribe();\n }\n if (this.objectSubscription) {\n this.objectSubscription.unsubscribe();\n }\n\n if (this.stateSubscription) {\n this.stateSubscription.unsubscribe();\n }\n this.store.dispatch(new ResetStorePieceWork());\n super.destroy();\n }\n\n openInForm(row: PieceWorkLineWithRelations) {\n const dialogRef = this.dialog.open(PieceWorkInForm, {\n width: '40%',\n data: { line: row },\n });\n dialogRef.afterClosed().subscribe(data => {\n if (data) {\n const user_id = this.store.selectSnapshot<UserWithRelations>(\n AuthState.user\n ).id;\n const finish = data.finish ? data.qty_in : 0;\n this.store.dispatch(\n new PieceWorkCollect(\n row.piecework_id,\n data.qty_in,\n row.id,\n user_id,\n finish,\n data.isFinished\n )\n );\n }\n });\n }\n\n changePage(event: PageEvent) {\n const take = event.pageSize;\n const skip = event.pageIndex > 0 ? event.pageIndex * event.pageSize : 0;\n\n this.store.dispatch(\n new ChangeStatePieceWork({\n skip,\n sort: [{ field: 'id', dir: 'desc' }],\n take,\n filter: this.filters,\n })\n );\n }\n\n formatCurrency(value, currency) {\n const region = currency.region;\n const symbol = currency.symbol;\n\n return value\n ? value.toLocaleString(region, { style: 'currency', currency: symbol })\n : 0;\n }\n}\n@Pipe({ name: 'formatTime' })\nexport class FormatTime implements PipeTransform {\n convertTime(input, separator) {\n const pad = input => {\n return input < 10 ? '0' + input : input;\n };\n return [\n pad(Math.floor(input / 3600)),\n pad(Math.floor((input % 3600) / 60)),\n pad(Math.floor(input % 60)),\n ].join(typeof separator !== 'undefined' ? separator : ':');\n }\n\n transform(value: any): any {\n return value ? this.convertTime(value, ':') : '00:00:00';\n }\n}\n","<div fxLayout=\"column\" fxLayoutGap=\"20px\">\n <label fxFlex class=\"k-form-field\">\n <form class=\"k-form\" id=\"piecework_in_form\">\n <div fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"start center\">\n <label fxFlex class=\"k-form-field\">\n <span>Barcode</span>\n <kendo-textarea\n placeholder=\"Scan barcodes here\"\n [resizable]=\"'vertical'\"\n [rows]=\"3\"\n [value]=\"getValue('barcodes', true)\"\n (valueChange)=\"buildBarcodeList($event)\"\n flow=\"vertical\"\n >\n </kendo-textarea>\n </label>\n <button\n fxFlex=\"50px\"\n (click)=\"valueChange('barcodes', barcodes)\"\n matTooltip=\"Filter\"\n [matTooltipPosition]=\"'above'\"\n mat-icon-button\n color=\"primary\"\n aria-label=\"Example icon button with a heart icon\"\n >\n <mat-icon>refresh</mat-icon>\n </button>\n </div>\n <div fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"start center\">\n <label fxFlex=\"25%\" class=\"k-form-field\">\n <span>PW ID</span>\n <input\n style=\"width: 100%\"\n kendoTextBox\n [value]=\"getValue('piecework_id')\"\n (input)=\"valueChange('piecework_id', $event.target.value)\"\n name=\"piecework_id\"\n type=\"text\"\n />\n </label>\n\n <!-- <label fxFlex=\"20%\" class=\"k-form-field\">\n <span>Barcode</span>\n <kendo-textarea\n [style.marginBottom.px]=\"10\"\n placeholder=\"Event name\"\n resizable=\"auto\"\n flow=\"horizontal\"\n >\n </kendo-textarea>\n\n <!-- <input\n style=\"width: 100%\"\n kendoTextBox\n [value]=\"getValue('barcode')\"\n (input)=\"valueChange('barcode', $event.target.value)\"\n name=\"barcode\"\n type=\"text\"\n /> -->\n\n <label fxFlex=\"25%\" class=\"k-form-field\">\n <span>Employee</span>\n <kendo-combobox\n style=\"width: 100%\"\n name=\"user_id\"\n [value]=\"getValue('user_id')\"\n [filterable]=\"true\"\n (filterChange)=\"filterChange($event)\"\n (valueChange)=\"valueChange('user_id', $event)\"\n [data]=\"users\"\n [textField]=\"'full_name'\"\n [disabled]=\"!isAdmin\"\n [valueField]=\"'id'\"\n [valuePrimitive]=\"true\"\n >\n </kendo-combobox>\n </label>\n\n <label fxFlex=\"25%\" class=\"k-form-field\">\n <span>Mode</span>\n <kendo-dropdownlist\n [defaultItem]=\"defaultItemMode\"\n [data]=\"modes\"\n [value]=\"getValue('mode_id')\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"valueChange('mode_id', $event)\"\n [textField]=\"'controller'\"\n [valueField]=\"'id'\"\n name=\"true\"\n >\n </kendo-dropdownlist>\n </label>\n\n <label fxFlex=\"25%\" class=\"k-form-field\">\n <span>Status</span>\n <kendo-dropdownlist\n [defaultItem]=\"defaultItemStatus\"\n [data]=\"statuses\"\n [value]=\"getValue('piecework_line_status_id')\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"valueChange('piecework_line_status_id', $event)\"\n [textField]=\"'name'\"\n [valueField]=\"'id'\"\n name=\"true\"\n >\n </kendo-dropdownlist>\n </label>\n </div>\n </form>\n </label>\n\n <mat-table #table [dataSource]=\"dataSource\">\n <ng-container cdkColumnDef=\"pw_line\">\n <mat-header-cell *cdkHeaderCellDef>PW</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n <span>{{ row.piecework?.id }}/{{ row.piecework_order_line }}</span>\n </mat-cell>\n </ng-container>\n <ng-container cdkColumnDef=\"employee\">\n <mat-header-cell *cdkHeaderCellDef>Employee</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n <span>{{ row?.piecework?.prepared_for?.full_name }}</span>\n </mat-cell>\n </ng-container>\n <ng-container cdkColumnDef=\"document\">\n <mat-header-cell *cdkHeaderCellDef>Document</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n <span>{{ row.document?.barcode }}</span>\n </mat-cell>\n </ng-container>\n <ng-container cdkColumnDef=\"assembly\">\n <mat-header-cell *cdkHeaderCellDef>Assembly</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n <span>{{ row.part?.part_number }}</span>\n </mat-cell>\n </ng-container>\n <!-- <ng-container cdkColumnDef=\"qty_max\">\n <mat-header-cell *cdkHeaderCellDef>Qty</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n <span>{{ getMaxQtyLeftForRow(row)}}</span>\n </mat-cell>\n </ng-container> -->\n <ng-container cdkColumnDef=\"mode\">\n <mat-header-cell *cdkHeaderCellDef>Mode</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n <span>{{ row.mode?.controller }}</span>\n </mat-cell>\n </ng-container>\n <ng-container cdkColumnDef=\"unit_price\">\n <mat-header-cell *cdkHeaderCellDef>Unit Price</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n {{ formatCurrency(row.unit_price, row.currency) }}\n </mat-cell>\n </ng-container>\n <ng-container cdkColumnDef=\"percentage\">\n <mat-header-cell *cdkHeaderCellDef>Job %</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n {{ row.work_percentage | percent }}\n </mat-cell>\n </ng-container>\n\n <ng-container cdkColumnDef=\"qty\">\n <mat-header-cell *cdkHeaderCellDef>Out / In</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n {{ row.out }} / {{ !row.in ? 0 : row.in }}\n </mat-cell>\n </ng-container>\n\n <ng-container cdkColumnDef=\"in\">\n <mat-header-cell *cdkHeaderCellDef>Qty In</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n {{ !row.in ? 0 : row.in }}\n </mat-cell>\n </ng-container>\n\n <ng-container cdkColumnDef=\"finish\">\n <mat-header-cell *cdkHeaderCellDef>Qty Finish</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n {{ row.finish }}\n </mat-cell>\n </ng-container>\n\n <ng-container cdkColumnDef=\"status\">\n <mat-header-cell *cdkHeaderCellDef>Status</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n {{ row.line_status?.name }}\n </mat-cell>\n </ng-container>\n\n <ng-container cdkColumnDef=\"total\">\n <mat-header-cell *cdkHeaderCellDef>Total</mat-header-cell>\n <mat-cell *cdkCellDef=\"let row\">\n <span>{{ formatCurrency(row.value, row.currency) }}</span>\n </mat-cell>\n </ng-container>\n\n <ng-container cdkColumnDef=\"actions\">\n <mat-header-cell [ngClass]=\"'actionColumn'\" *cdkHeaderCellDef\n >Actions</mat-header-cell\n >\n <mat-cell [ngClass]=\"'actionColumn'\" *cdkCellDef=\"let row\">\n <ng-container *ngIf=\"row.piecework_line_status_id == 1\">\n <div fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"start center\">\n <kendo-numerictextbox\n [format]=\"'n0'\"\n style=\"width: 100%\"\n [min]=\"1\"\n [(ngModel)]=\"row.formIn\"\n [name]=\"'in_' + row.id\"\n [max]=\"getMax(row)\"\n type=\"number\"\n ></kendo-numerictextbox>\n <mat-checkbox\n matTooltip=\"Finish\"\n [matTooltipPosition]=\"'above'\"\n fxFlexAlign=\"center\"\n [name]=\"'finish_' + row.id\"\n [(ngModel)]=\"row.formFinish\"\n >\n </mat-checkbox>\n <button\n [disabled]=\"row.in == row.out || row.formIn > row.out - row.in\"\n matTooltip=\"Save\"\n (click)=\"registerIn(row, row.formIn, row.formFinish)\"\n [matTooltipPosition]=\"'above'\"\n mat-icon-button\n color=\"warn\"\n aria-label=\"Example icon button with a heart icon\"\n >\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"row.piecework_line_status_id == 2\">\n <span>Line finished</span>\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *cdkHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *cdkRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n <mat-paginator\n #paginator\n [length]=\"total$ | async\"\n [pageIndex]=\"0\"\n (page)=\"changePage($event)\"\n [pageSize]=\"10\"\n [pageSizeOptions]=\"[5, 10, 25, 100]\"\n >\n </mat-paginator>\n</div>\n","import { CdkTableModule } from '@angular/cdk/table';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTableModule } from '@angular/material/table';\nimport { PieceWorkFrontState } from '@barcoding/module-piecework';\nimport { NgxsModule } from '@ngxs/store';\nimport { DropDownsModule } from '@progress/kendo-angular-dropdowns';\nimport { InputsModule, SwitchModule } from '@progress/kendo-angular-inputs';\nimport { DynamicComponentLoaderModule } from '@barcoding/gridster-core';\nimport { PieceWorkState } from '@barcoding/frontend-core';\nimport { PieceworkInConfigModal } from './config/config.component';\nimport { PieceWorkInForm } from './piece-work-in-form/piece-work-in-form.component';\nimport {\n FormatTime,\n WidgetPieceworkInComponent,\n} from './widget-piecework-in.component';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n@NgModule({\n declarations: [\n WidgetPieceworkInComponent,\n FormatTime,\n PieceWorkInForm,\n PieceworkInConfigModal,\n ],\n imports: [\n CommonModule,\n FlexLayoutModule,\n MatDialogModule,\n CdkTableModule,\n MatTableModule,\n MatButtonModule,\n MatCheckboxModule,\n MatPaginatorModule,\n MatIconModule,\n FormsModule,\n InputsModule,\n MatTooltipModule,\n DropDownsModule,\n InputsModule,\n FormsModule,\n SwitchModule,\n NgxsModule.forFeature([PieceWorkFrontState, PieceWorkState]),\n DynamicComponentLoaderModule.forChild(WidgetPieceworkInComponent),\n ],\n exports: [WidgetPieceworkInComponent],\n})\nexport class WidgetPieceworkInModule {}\n","/*\n * Public API Surface of widget-piecework-in\n */\n\nexport * from './lib/widget-piecework-in.component';\nexport * from './lib/widget-piecework-in.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiDa,eAAe;IAI1B,YACU,YAA0B,EAC1B,gBAAgD,EACjD,SAAwC,EACvC,KAAY,EACY,IAAS;QAJjC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,qBAAgB,GAAhB,gBAAgB,CAAgC;QACjD,cAAS,GAAT,SAAS,CAA+B;QACvC,UAAK,GAAL,KAAK,CAAO;QACY,SAAI,GAAJ,IAAI,CAAK;QAPpC,WAAM,GAAG,KAAK,CAAC;QACf,WAAM,GAAG,CAAC,CAAC;QAQhB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;KAC5C;IAED,QAAQ;QACN,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;KAC7B;IAED,WAAW;QACT,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;KAC9B;IACD,MAAM;QACJ,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;KACxB;IAED,IAAI,CAAC,MAAM,EAAE,MAAM;QACjB,IAAI,CAAC,gBAAgB;aAClB,IAAI,CAAC;YACJ,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;gBACrB,KAAK,EAAE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