@barcoding/widget-piecework-in 3.5.0 → 3.5.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.
- package/esm2020/lib/config/config.component.mjs +3 -3
- package/esm2020/lib/widget-piecework-in.component.mjs +57 -17
- package/fesm2015/barcoding-widget-piecework-in.mjs +58 -18
- package/fesm2015/barcoding-widget-piecework-in.mjs.map +1 -1
- package/fesm2020/barcoding-widget-piecework-in.mjs +58 -18
- package/fesm2020/barcoding-widget-piecework-in.mjs.map +1 -1
- package/lib/widget-piecework-in.component.d.ts +2 -0
- package/package.json +5 -5
|
@@ -117,10 +117,10 @@ class PieceworkInConfigModal {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
PieceworkInConfigModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: PieceworkInConfigModal, deps: [{ token: i3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
120
|
-
PieceworkInConfigModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: PieceworkInConfigModal, selector: "assignmentFormDialog", ngImport: i0, template: "<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'\"></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 <button\n fxFlex\n (click)=\"onNoClick()\"\n mat-raised-button\n class=\"t_btn cancel\">\n Cancel\n </button>\n <button\n fxFlex\n [disabled]=\"!configForm.form.valid\"\n (click)=\"save(config)\"\n class=\"t_btn success\"\n mat-raised-button>\n Save\n </button>\n </div>\n </div>\n</form>\n", styles: [".mat-mdc-tab-body-wrapper{flex-grow:1}.mat-mdc-tab-body{display:flex!important;flex-direction:column}.mat-mdc-tab-body-content{display:flex;flex-direction:column;flex-grow:1}mat-form-field{margin-top:20px}\n"], dependencies: [{ kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i14.SwitchComponent, selector: "kendo-switch", inputs: ["focusableId", "onLabel", "offLabel", "checked", "disabled", "readonly", "tabindex", "size", "thumbRounded", "trackRounded", "tabIndex"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoSwitch"] }] });
|
|
120
|
+
PieceworkInConfigModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: PieceworkInConfigModal, selector: "assignmentFormDialog", ngImport: i0, template: "<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'\"></kendo-switch>\n </label>\n <label fxFlex class=\"k-form-field\">\n <span>Simple Version</span>\n <kendo-switch\n name=\"simple_version\"\n [(ngModel)]=\"config.simple_version\"\n [onLabel]=\"'Yes'\"\n [offLabel]=\"'No'\"></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 <button\n fxFlex\n (click)=\"onNoClick()\"\n mat-raised-button\n class=\"t_btn cancel\">\n Cancel\n </button>\n <button\n fxFlex\n [disabled]=\"!configForm.form.valid\"\n (click)=\"save(config)\"\n class=\"t_btn success\"\n mat-raised-button>\n Save\n </button>\n </div>\n </div>\n</form>\n", styles: [".mat-mdc-tab-body-wrapper{flex-grow:1}.mat-mdc-tab-body{display:flex!important;flex-direction:column}.mat-mdc-tab-body-content{display:flex;flex-direction:column;flex-grow:1}mat-form-field{margin-top:20px}\n"], dependencies: [{ kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i14.SwitchComponent, selector: "kendo-switch", inputs: ["focusableId", "onLabel", "offLabel", "checked", "disabled", "readonly", "tabindex", "size", "thumbRounded", "trackRounded", "tabIndex"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoSwitch"] }] });
|
|
121
121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: PieceworkInConfigModal, decorators: [{
|
|
122
122
|
type: Component,
|
|
123
|
-
args: [{ selector: 'assignmentFormDialog', template: "<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'\"></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 <button\n fxFlex\n (click)=\"onNoClick()\"\n mat-raised-button\n class=\"t_btn cancel\">\n Cancel\n </button>\n <button\n fxFlex\n [disabled]=\"!configForm.form.valid\"\n (click)=\"save(config)\"\n class=\"t_btn success\"\n mat-raised-button>\n Save\n </button>\n </div>\n </div>\n</form>\n", styles: [".mat-mdc-tab-body-wrapper{flex-grow:1}.mat-mdc-tab-body{display:flex!important;flex-direction:column}.mat-mdc-tab-body-content{display:flex;flex-direction:column;flex-grow:1}mat-form-field{margin-top:20px}\n"] }]
|
|
123
|
+
args: [{ selector: 'assignmentFormDialog', template: "<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'\"></kendo-switch>\n </label>\n <label fxFlex class=\"k-form-field\">\n <span>Simple Version</span>\n <kendo-switch\n name=\"simple_version\"\n [(ngModel)]=\"config.simple_version\"\n [onLabel]=\"'Yes'\"\n [offLabel]=\"'No'\"></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 <button\n fxFlex\n (click)=\"onNoClick()\"\n mat-raised-button\n class=\"t_btn cancel\">\n Cancel\n </button>\n <button\n fxFlex\n [disabled]=\"!configForm.form.valid\"\n (click)=\"save(config)\"\n class=\"t_btn success\"\n mat-raised-button>\n Save\n </button>\n </div>\n </div>\n</form>\n", styles: [".mat-mdc-tab-body-wrapper{flex-grow:1}.mat-mdc-tab-body{display:flex!important;flex-direction:column}.mat-mdc-tab-body-content{display:flex;flex-direction:column;flex-grow:1}mat-form-field{margin-top:20px}\n"] }]
|
|
124
124
|
}], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: undefined, decorators: [{
|
|
125
125
|
type: Inject,
|
|
126
126
|
args: [MAT_DIALOG_DATA]
|
|
@@ -147,6 +147,20 @@ class WidgetPieceworkInComponent extends ConfigInterfaceDashboard {
|
|
|
147
147
|
},
|
|
148
148
|
],
|
|
149
149
|
};
|
|
150
|
+
this.displayedColumnsOrg = [
|
|
151
|
+
'pw_line',
|
|
152
|
+
'employee',
|
|
153
|
+
'document',
|
|
154
|
+
'assembly',
|
|
155
|
+
'mode',
|
|
156
|
+
'unit_price',
|
|
157
|
+
'percentage',
|
|
158
|
+
'qty',
|
|
159
|
+
'in',
|
|
160
|
+
'finish',
|
|
161
|
+
'total',
|
|
162
|
+
'status',
|
|
163
|
+
];
|
|
150
164
|
this.displayedColumns = [
|
|
151
165
|
'pw_line',
|
|
152
166
|
'employee',
|
|
@@ -161,6 +175,13 @@ class WidgetPieceworkInComponent extends ConfigInterfaceDashboard {
|
|
|
161
175
|
'total',
|
|
162
176
|
'status',
|
|
163
177
|
]; // column display value
|
|
178
|
+
this.displayedColumnsSimple = [
|
|
179
|
+
'employee',
|
|
180
|
+
'document',
|
|
181
|
+
'assembly',
|
|
182
|
+
'finish',
|
|
183
|
+
'total',
|
|
184
|
+
]; // column display value
|
|
164
185
|
this.employee = null;
|
|
165
186
|
this.status = 1;
|
|
166
187
|
this.barcodes = [];
|
|
@@ -238,23 +259,42 @@ class WidgetPieceworkInComponent extends ConfigInterfaceDashboard {
|
|
|
238
259
|
if (!this.isAdmin) {
|
|
239
260
|
const currentUser = this.store.selectSnapshot(AuthState.user);
|
|
240
261
|
this.users.push(currentUser);
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
262
|
+
let filters = {};
|
|
263
|
+
if (this.item.config.simple_version) {
|
|
264
|
+
this.displayedColumns = this.displayedColumnsSimple.slice();
|
|
265
|
+
filters = {
|
|
266
|
+
logic: 'and',
|
|
267
|
+
filters: [
|
|
268
|
+
{
|
|
269
|
+
field: 'user_id',
|
|
270
|
+
value: currentUser.id,
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
field: 'piecework_line_status_id',
|
|
274
|
+
value: 2,
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
filters = {
|
|
281
|
+
logic: 'and',
|
|
282
|
+
filters: [
|
|
283
|
+
{
|
|
284
|
+
field: 'piecework_line_status_id',
|
|
285
|
+
value: 1,
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
field: 'user_id',
|
|
289
|
+
value: currentUser.id,
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
};
|
|
293
|
+
}
|
|
254
294
|
this.store.dispatch(new ChangeStatePieceWork({
|
|
255
295
|
skip: 0,
|
|
256
296
|
sort: [{ field: 'id', dir: 'desc' }],
|
|
257
|
-
take:
|
|
297
|
+
take: 20,
|
|
258
298
|
filter: filters,
|
|
259
299
|
}));
|
|
260
300
|
}
|
|
@@ -428,7 +468,7 @@ class WidgetPieceworkInComponent extends ConfigInterfaceDashboard {
|
|
|
428
468
|
}
|
|
429
469
|
}
|
|
430
470
|
WidgetPieceworkInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: WidgetPieceworkInComponent, deps: [{ token: i1$1.ModeControllerService }, { token: i1$1.UserControllerService }, { token: i4.Store }, { token: i0.ChangeDetectorRef }, { token: i3.MatDialog }, { token: i1$1.PieceWorkLineStatusControllerControllerService }, { token: i1$1.PieceWorkLineControllerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
431
|
-
WidgetPieceworkInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: WidgetPieceworkInComponent, selector: "widget-piece-work-in", usesInheritance: true, ngImport: i0, template: "<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 </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 <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 </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 </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 </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 </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]=\"'pieceworkActionColumn'\" *cdkHeaderCellDef\n >Actions</mat-header-cell\n >\n <mat-cell [ngClass]=\"'pieceworkActionColumn'\" *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\"></kendo-numerictextbox>\n <mat-checkbox\n matTooltip=\"Finish\"\n [matTooltipPosition]=\"'above'\"\n fxFlexAlign=\"center\"\n [name]=\"'finish_' + row.id\"\n [(ngModel)]=\"row.formFinish\">\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 <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 </mat-paginator>\n</div>\n", styles: [":host{padding:10px;display:flex;flex-direction:column}.spacer{flex-grow:1}.pieceworkActionColumn{flex:0 0 350px;padding-left:0!important}\n"], dependencies: [{ kind: "directive", type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i6$1.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i7$1.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "directive", type: i7$1.CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: i7$1.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: i7$1.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["sticky", "cdkColumnDef", "stickyEnd"] }, { kind: "directive", type: i7$1.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "component", type: i8$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i8$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i11.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i12.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i14.TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "rows", "cols", "maxlength", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "directive", type: i14.TextBoxDirective, selector: "input[kendoTextBox]", inputs: ["value"] }, { kind: "component", type: i14.NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur"], exportAs: ["kendoNumericTextBox"] }, { kind: "directive", type: i15.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i16.ComboBoxComponent, selector: "kendo-combobox", inputs: ["focusableId", "allowCustom", "data", "value", "textField", "valueField", "valuePrimitive", "valueNormalizer", "placeholder", "popupSettings", "listHeight", "iconClass", "loading", "suggest", "clearButton", "disabled", "itemDisabled", "readonly", "tabindex", "tabIndex", "filterable", "virtual", "size", "rounded", "fillMode"], outputs: ["valueChange", "selectionChange", "filterChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoComboBox"] }, { kind: "component", type: i16.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "pipe", type: i4$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.PercentPipe, name: "percent" }] });
|
|
471
|
+
WidgetPieceworkInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: WidgetPieceworkInComponent, selector: "widget-piece-work-in", usesInheritance: true, ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutGap=\"20px\">\n <label *ngIf=\"!item.config?.simple_version\" 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 </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 <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 </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 </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 </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 </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]=\"'pieceworkActionColumn'\" *cdkHeaderCellDef\n >Actions</mat-header-cell\n >\n <mat-cell [ngClass]=\"'pieceworkActionColumn'\" *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\"></kendo-numerictextbox>\n <mat-checkbox\n matTooltip=\"Finish\"\n [matTooltipPosition]=\"'above'\"\n fxFlexAlign=\"center\"\n [name]=\"'finish_' + row.id\"\n [(ngModel)]=\"row.formFinish\">\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 <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 </mat-paginator>\n</div>\n", styles: [":host{padding:10px;display:flex;flex-direction:column}.spacer{flex-grow:1}.pieceworkActionColumn{flex:0 0 350px;padding-left:0!important}\n"], dependencies: [{ kind: "directive", type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i6$1.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i7$1.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "directive", type: i7$1.CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: i7$1.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: i7$1.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["sticky", "cdkColumnDef", "stickyEnd"] }, { kind: "directive", type: i7$1.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "component", type: i8$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i8$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i11.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i12.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i14.TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "rows", "cols", "maxlength", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "directive", type: i14.TextBoxDirective, selector: "input[kendoTextBox]", inputs: ["value"] }, { kind: "component", type: i14.NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur"], exportAs: ["kendoNumericTextBox"] }, { kind: "directive", type: i15.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i16.ComboBoxComponent, selector: "kendo-combobox", inputs: ["focusableId", "allowCustom", "data", "value", "textField", "valueField", "valuePrimitive", "valueNormalizer", "placeholder", "popupSettings", "listHeight", "iconClass", "loading", "suggest", "clearButton", "disabled", "itemDisabled", "readonly", "tabindex", "tabIndex", "filterable", "virtual", "size", "rounded", "fillMode"], outputs: ["valueChange", "selectionChange", "filterChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoComboBox"] }, { kind: "component", type: i16.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "pipe", type: i4$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.PercentPipe, name: "percent" }] });
|
|
432
472
|
__decorate([
|
|
433
473
|
Select(PieceWorkState.pieceworks)
|
|
434
474
|
], WidgetPieceworkInComponent.prototype, "pieceworks$", void 0);
|
|
@@ -440,7 +480,7 @@ __decorate([
|
|
|
440
480
|
], WidgetPieceworkInComponent.prototype, "state$", void 0);
|
|
441
481
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: WidgetPieceworkInComponent, decorators: [{
|
|
442
482
|
type: Component,
|
|
443
|
-
args: [{ selector: 'widget-piece-work-in', template: "<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 </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 <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 </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 </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 </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 </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]=\"'pieceworkActionColumn'\" *cdkHeaderCellDef\n >Actions</mat-header-cell\n >\n <mat-cell [ngClass]=\"'pieceworkActionColumn'\" *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\"></kendo-numerictextbox>\n <mat-checkbox\n matTooltip=\"Finish\"\n [matTooltipPosition]=\"'above'\"\n fxFlexAlign=\"center\"\n [name]=\"'finish_' + row.id\"\n [(ngModel)]=\"row.formFinish\">\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 <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 </mat-paginator>\n</div>\n", styles: [":host{padding:10px;display:flex;flex-direction:column}.spacer{flex-grow:1}.pieceworkActionColumn{flex:0 0 350px;padding-left:0!important}\n"] }]
|
|
483
|
+
args: [{ selector: 'widget-piece-work-in', template: "<div fxLayout=\"column\" fxLayoutGap=\"20px\">\n <label *ngIf=\"!item.config?.simple_version\" 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 </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 <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 </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 </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 </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 </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]=\"'pieceworkActionColumn'\" *cdkHeaderCellDef\n >Actions</mat-header-cell\n >\n <mat-cell [ngClass]=\"'pieceworkActionColumn'\" *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\"></kendo-numerictextbox>\n <mat-checkbox\n matTooltip=\"Finish\"\n [matTooltipPosition]=\"'above'\"\n fxFlexAlign=\"center\"\n [name]=\"'finish_' + row.id\"\n [(ngModel)]=\"row.formFinish\">\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 <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 </mat-paginator>\n</div>\n", styles: [":host{padding:10px;display:flex;flex-direction:column}.spacer{flex-grow:1}.pieceworkActionColumn{flex:0 0 350px;padding-left:0!important}\n"] }]
|
|
444
484
|
}], ctorParameters: function () { return [{ type: i1$1.ModeControllerService }, { type: i1$1.UserControllerService }, { type: i4.Store }, { type: i0.ChangeDetectorRef }, { type: i3.MatDialog }, { type: i1$1.PieceWorkLineStatusControllerControllerService }, { type: i1$1.PieceWorkLineControllerService }]; }, propDecorators: { pieceworks$: [], total$: [], state$: [] } });
|
|
445
485
|
class FormatTime {
|
|
446
486
|
convertTime(input, separator) {
|