@masterteam/work-center 0.0.27 → 0.0.29
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.
|
@@ -86,11 +86,11 @@ class WorkCenterClientFormModal {
|
|
|
86
86
|
return undefined;
|
|
87
87
|
}
|
|
88
88
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterClientFormModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
89
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterClientFormModal, isStandalone: true, selector: "mt-work-center-client-form-modal", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, operationKey: { classPropertyName: "operationKey", publicName: "operationKey", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "processForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n <div [class]=\"modal.contentClass + ' p-5 flex flex-col gap-4'\">\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [operationKey]=\"operationKey()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [formMode]=\"formMode()\"\r\n [autoLoad]=\"true\"\r\n [lookups]=\"lookups()\"\r\n (submitted)=\"onSubmitted($event)\"\r\n (errored)=\"onErrored($event)\"\r\n />\r\n\r\n @if (isSubmitting()) {\r\n <div class=\"text-sm text-muted-color\">{{ t(\"modal.submitting\") }}</div>\r\n }\r\n\r\n @if (validationMessage()) {\r\n <div\r\n class=\"mt-2 rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-700\"\r\n role=\"alert\"\r\n >\r\n {{ validationMessage() }}\r\n </div>\r\n }\r\n\r\n @if (submitError()) {\r\n <div\r\n class=\"mt-2 rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n {{ submitError() }}\r\n </div>\r\n }\r\n\r\n @if (submitStatus(); as status) {\r\n <div\r\n class=\"mt-2 rounded-lg border p-3 text-sm\"\r\n [class]=\"\r\n status === 'pending'\r\n ? 'border-amber-200 bg-amber-50 text-amber-700'\r\n : 'border-emerald-200 bg-emerald-50 text-emerald-700'\r\n \"\r\n >\r\n @if (status === \"pending\") {\r\n {{ t(\"modal.requestSubmitted\") }}\r\n } @else {\r\n {{ t(\"modal.operationExecuted\") }}\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"t('modal.submit')\"\r\n icon=\"general.check\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"onSubmit()\"\r\n />\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "requestSchemaId", "draftProcessId", "preview", "returnUrl", "defaultValues", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "confirmWarningsOnSubmit", "confirmWarningsOnStepChange", "lookups", "ignoredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }] });
|
|
89
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterClientFormModal, isStandalone: true, selector: "mt-work-center-client-form-modal", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, operationKey: { classPropertyName: "operationKey", publicName: "operationKey", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "processForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n <div [class]=\"modal.contentClass + ' p-5 flex flex-col gap-4'\">\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [operationKey]=\"operationKey()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [formMode]=\"formMode()\"\r\n [autoLoad]=\"true\"\r\n [lookups]=\"lookups()\"\r\n (submitted)=\"onSubmitted($event)\"\r\n (errored)=\"onErrored($event)\"\r\n />\r\n\r\n @if (isSubmitting()) {\r\n <div class=\"text-sm text-muted-color\">{{ t(\"modal.submitting\") }}</div>\r\n }\r\n\r\n @if (validationMessage()) {\r\n <div\r\n class=\"mt-2 rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-700\"\r\n role=\"alert\"\r\n >\r\n {{ validationMessage() }}\r\n </div>\r\n }\r\n\r\n @if (submitError()) {\r\n <div\r\n class=\"mt-2 rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n {{ submitError() }}\r\n </div>\r\n }\r\n\r\n @if (submitStatus(); as status) {\r\n <div\r\n class=\"mt-2 rounded-lg border p-3 text-sm\"\r\n [class]=\"\r\n status === 'pending'\r\n ? 'border-amber-200 bg-amber-50 text-amber-700'\r\n : 'border-emerald-200 bg-emerald-50 text-emerald-700'\r\n \"\r\n >\r\n @if (status === \"pending\") {\r\n {{ t(\"modal.requestSubmitted\") }}\r\n } @else {\r\n {{ t(\"modal.operationExecuted\") }}\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"t('modal.cancel')\"\r\n variant=\"outlined\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"ref.close(false)\"\r\n />\r\n <mt-button\r\n [label]=\"t('modal.submit')\"\r\n icon=\"general.check\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"onSubmit()\"\r\n />\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "requestSchemaId", "draftProcessId", "preview", "returnUrl", "defaultValues", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "confirmWarningsOnSubmit", "confirmWarningsOnStepChange", "lookups", "ignoredFieldKeys", "allowedFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }] });
|
|
90
90
|
}
|
|
91
91
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterClientFormModal, decorators: [{
|
|
92
92
|
type: Component,
|
|
93
|
-
args: [{ selector: 'mt-work-center-client-form-modal', standalone: true, imports: [Button, TranslocoDirective, ClientForm], template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n <div [class]=\"modal.contentClass + ' p-5 flex flex-col gap-4'\">\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [operationKey]=\"operationKey()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [formMode]=\"formMode()\"\r\n [autoLoad]=\"true\"\r\n [lookups]=\"lookups()\"\r\n (submitted)=\"onSubmitted($event)\"\r\n (errored)=\"onErrored($event)\"\r\n />\r\n\r\n @if (isSubmitting()) {\r\n <div class=\"text-sm text-muted-color\">{{ t(\"modal.submitting\") }}</div>\r\n }\r\n\r\n @if (validationMessage()) {\r\n <div\r\n class=\"mt-2 rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-700\"\r\n role=\"alert\"\r\n >\r\n {{ validationMessage() }}\r\n </div>\r\n }\r\n\r\n @if (submitError()) {\r\n <div\r\n class=\"mt-2 rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n {{ submitError() }}\r\n </div>\r\n }\r\n\r\n @if (submitStatus(); as status) {\r\n <div\r\n class=\"mt-2 rounded-lg border p-3 text-sm\"\r\n [class]=\"\r\n status === 'pending'\r\n ? 'border-amber-200 bg-amber-50 text-amber-700'\r\n : 'border-emerald-200 bg-emerald-50 text-emerald-700'\r\n \"\r\n >\r\n @if (status === \"pending\") {\r\n {{ t(\"modal.requestSubmitted\") }}\r\n } @else {\r\n {{ t(\"modal.operationExecuted\") }}\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"t('modal.submit')\"\r\n icon=\"general.check\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"onSubmit()\"\r\n />\r\n </div>\r\n</ng-container>\r\n" }]
|
|
93
|
+
args: [{ selector: 'mt-work-center-client-form-modal', standalone: true, imports: [Button, TranslocoDirective, ClientForm], template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n <div [class]=\"modal.contentClass + ' p-5 flex flex-col gap-4'\">\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [operationKey]=\"operationKey()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [formMode]=\"formMode()\"\r\n [autoLoad]=\"true\"\r\n [lookups]=\"lookups()\"\r\n (submitted)=\"onSubmitted($event)\"\r\n (errored)=\"onErrored($event)\"\r\n />\r\n\r\n @if (isSubmitting()) {\r\n <div class=\"text-sm text-muted-color\">{{ t(\"modal.submitting\") }}</div>\r\n }\r\n\r\n @if (validationMessage()) {\r\n <div\r\n class=\"mt-2 rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-700\"\r\n role=\"alert\"\r\n >\r\n {{ validationMessage() }}\r\n </div>\r\n }\r\n\r\n @if (submitError()) {\r\n <div\r\n class=\"mt-2 rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n {{ submitError() }}\r\n </div>\r\n }\r\n\r\n @if (submitStatus(); as status) {\r\n <div\r\n class=\"mt-2 rounded-lg border p-3 text-sm\"\r\n [class]=\"\r\n status === 'pending'\r\n ? 'border-amber-200 bg-amber-50 text-amber-700'\r\n : 'border-emerald-200 bg-emerald-50 text-emerald-700'\r\n \"\r\n >\r\n @if (status === \"pending\") {\r\n {{ t(\"modal.requestSubmitted\") }}\r\n } @else {\r\n {{ t(\"modal.operationExecuted\") }}\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"t('modal.cancel')\"\r\n variant=\"outlined\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"ref.close(false)\"\r\n />\r\n <mt-button\r\n [label]=\"t('modal.submit')\"\r\n icon=\"general.check\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"onSubmit()\"\r\n />\r\n </div>\r\n</ng-container>\r\n" }]
|
|
94
94
|
}], propDecorators: { processForm: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ClientForm), { isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], operationKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "operationKey", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }] } });
|
|
95
95
|
|
|
96
96
|
class EnterArea {
|
|
@@ -134,6 +134,34 @@ class LoadRuntime {
|
|
|
134
134
|
this.reason = reason;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Replaces the header filter slice (rules from
|
|
139
|
+
* `mt-property-filter-builder`). Resets `page` to 1 and triggers a
|
|
140
|
+
* BE reload with the merged `headerFilters` + `columnFilters` payload.
|
|
141
|
+
*/
|
|
142
|
+
class ApplyHeaderFilters {
|
|
143
|
+
area;
|
|
144
|
+
filters;
|
|
145
|
+
static type = '[WorkCenter] Apply Header Filters';
|
|
146
|
+
constructor(area, filters) {
|
|
147
|
+
this.area = area;
|
|
148
|
+
this.filters = filters;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Replaces the in-table column filter slice (rules translated from the
|
|
153
|
+
* `mt-table` filters map). Resets `page` to 1 and triggers a BE reload
|
|
154
|
+
* with the merged `headerFilters` + `columnFilters` payload.
|
|
155
|
+
*/
|
|
156
|
+
class ApplyColumnFilters {
|
|
157
|
+
area;
|
|
158
|
+
filters;
|
|
159
|
+
static type = '[WorkCenter] Apply Column Filters';
|
|
160
|
+
constructor(area, filters) {
|
|
161
|
+
this.area = area;
|
|
162
|
+
this.filters = filters;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
137
165
|
|
|
138
166
|
var WorkCenterActionKey;
|
|
139
167
|
(function (WorkCenterActionKey) {
|
|
@@ -146,7 +174,13 @@ const WORK_CENTER_MAX_SORT = 5;
|
|
|
146
174
|
|
|
147
175
|
const AREA_COLORS = ['violet', 'blue', 'emerald', 'amber', 'teal'];
|
|
148
176
|
const KPI_COLORS = ['violet', 'blue', 'emerald', 'amber', 'teal'];
|
|
149
|
-
|
|
177
|
+
/**
|
|
178
|
+
* Default page size when bootstrapping a work-center area. Matches the table
|
|
179
|
+
* paginator default so the first BE request asks for exactly one rendered
|
|
180
|
+
* page.
|
|
181
|
+
*/
|
|
182
|
+
const WORK_CENTER_DEFAULT_PAGE_SIZE = 20;
|
|
183
|
+
const WORK_CENTER_LOCAL_FETCH_SIZE = WORK_CENTER_DEFAULT_PAGE_SIZE;
|
|
150
184
|
const FILTER_OPERATORS = new Set([
|
|
151
185
|
'Eq',
|
|
152
186
|
'Neq',
|
|
@@ -413,6 +447,8 @@ function createDefaultContext(area) {
|
|
|
413
447
|
function createDefaultAreaState(area) {
|
|
414
448
|
return {
|
|
415
449
|
context: createDefaultContext(area),
|
|
450
|
+
headerFilters: [],
|
|
451
|
+
columnFilters: [],
|
|
416
452
|
menuItems: [],
|
|
417
453
|
rows: [],
|
|
418
454
|
columns: [],
|
|
@@ -423,6 +459,25 @@ function createDefaultAreaState(area) {
|
|
|
423
459
|
lastLoadedAt: null,
|
|
424
460
|
};
|
|
425
461
|
}
|
|
462
|
+
/**
|
|
463
|
+
* Combines header (property-filter-builder) and column (in-table) rules into
|
|
464
|
+
* the single `runtimeFilters` payload the BE expects. Header rules come
|
|
465
|
+
* first; a column rule with the same `(field, op)` pair replaces the matching
|
|
466
|
+
* header rule.
|
|
467
|
+
*/
|
|
468
|
+
function mergeRuntimeFilters(headerFilters, columnFilters) {
|
|
469
|
+
const seen = new Map();
|
|
470
|
+
const ordered = [];
|
|
471
|
+
const push = (rule) => {
|
|
472
|
+
const key = `${rule.field}::${rule.op}`;
|
|
473
|
+
if (!seen.has(key))
|
|
474
|
+
ordered.push(key);
|
|
475
|
+
seen.set(key, rule);
|
|
476
|
+
};
|
|
477
|
+
(headerFilters ?? []).forEach(push);
|
|
478
|
+
(columnFilters ?? []).forEach(push);
|
|
479
|
+
return sanitizeFilters(ordered.map((key) => seen.get(key)));
|
|
480
|
+
}
|
|
426
481
|
const WORK_CENTER_DEFAULT_STATE = {
|
|
427
482
|
activeArea: 'MyInbox',
|
|
428
483
|
byArea: {
|
|
@@ -547,6 +602,12 @@ let WorkCenterState = class WorkCenterState {
|
|
|
547
602
|
static runtimeFilterSchema(snapshot) {
|
|
548
603
|
return snapshot.runtimeFilterSchema;
|
|
549
604
|
}
|
|
605
|
+
static headerFilters(snapshot) {
|
|
606
|
+
return snapshot.headerFilters;
|
|
607
|
+
}
|
|
608
|
+
static columnFilters(snapshot) {
|
|
609
|
+
return snapshot.columnFilters;
|
|
610
|
+
}
|
|
550
611
|
static totalCount(snapshot) {
|
|
551
612
|
return snapshot.totalCount;
|
|
552
613
|
}
|
|
@@ -579,11 +640,23 @@ let WorkCenterState = class WorkCenterState {
|
|
|
579
640
|
isSameContext(current.context, nextContext)) {
|
|
580
641
|
return;
|
|
581
642
|
}
|
|
643
|
+
// External `runtimeFilters` writes are treated as header-slice writes so
|
|
644
|
+
// the in-table column filter slice doesn't get stranded out of sync.
|
|
645
|
+
const filtersChanged = action.patch.runtimeFilters !== undefined;
|
|
646
|
+
const nextHeaderFilters = filtersChanged
|
|
647
|
+
? nextContext.runtimeFilters
|
|
648
|
+
: current.headerFilters;
|
|
649
|
+
const nextColumnFilters = filtersChanged ? [] : current.columnFilters;
|
|
582
650
|
ctx.patchState({
|
|
583
651
|
activeArea: action.area,
|
|
584
652
|
byArea: {
|
|
585
653
|
...state.byArea,
|
|
586
|
-
[action.area]: {
|
|
654
|
+
[action.area]: {
|
|
655
|
+
...current,
|
|
656
|
+
headerFilters: nextHeaderFilters,
|
|
657
|
+
columnFilters: nextColumnFilters,
|
|
658
|
+
context: nextContext,
|
|
659
|
+
},
|
|
587
660
|
},
|
|
588
661
|
});
|
|
589
662
|
}
|
|
@@ -598,11 +671,24 @@ let WorkCenterState = class WorkCenterState {
|
|
|
598
671
|
contextChanged ||
|
|
599
672
|
(!current.lastLoadedAt && !runtimeLoading);
|
|
600
673
|
if (areaChanged || contextChanged) {
|
|
674
|
+
// URL-derived filters land on the header slice. Anything previously
|
|
675
|
+
// applied via the in-table column filters is dropped so the BE payload
|
|
676
|
+
// matches what the user sees on the page header.
|
|
677
|
+
const filtersFromInputs = action.inputs?.filters !== undefined;
|
|
678
|
+
const nextHeaderFilters = filtersFromInputs
|
|
679
|
+
? nextContext.runtimeFilters
|
|
680
|
+
: current.headerFilters;
|
|
681
|
+
const nextColumnFilters = filtersFromInputs ? [] : current.columnFilters;
|
|
601
682
|
ctx.patchState({
|
|
602
683
|
activeArea: action.area,
|
|
603
684
|
byArea: {
|
|
604
685
|
...state.byArea,
|
|
605
|
-
[action.area]: {
|
|
686
|
+
[action.area]: {
|
|
687
|
+
...current,
|
|
688
|
+
headerFilters: nextHeaderFilters,
|
|
689
|
+
columnFilters: nextColumnFilters,
|
|
690
|
+
context: nextContext,
|
|
691
|
+
},
|
|
606
692
|
},
|
|
607
693
|
});
|
|
608
694
|
}
|
|
@@ -618,6 +704,47 @@ let WorkCenterState = class WorkCenterState {
|
|
|
618
704
|
lookups: Array.isArray(action.lookups) ? action.lookups : [],
|
|
619
705
|
});
|
|
620
706
|
}
|
|
707
|
+
applyHeaderFilters(ctx, action) {
|
|
708
|
+
return this.applyFilterSlice(ctx, action.area, {
|
|
709
|
+
headerFilters: action.filters,
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
applyColumnFilters(ctx, action) {
|
|
713
|
+
return this.applyFilterSlice(ctx, action.area, {
|
|
714
|
+
columnFilters: action.filters,
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
applyFilterSlice(ctx, area, patch) {
|
|
718
|
+
const state = ctx.getState();
|
|
719
|
+
const current = state.byArea[area];
|
|
720
|
+
const headerFilters = patch.headerFilters ?? current.headerFilters;
|
|
721
|
+
const columnFilters = patch.columnFilters ?? current.columnFilters;
|
|
722
|
+
const runtimeFilters = mergeRuntimeFilters(headerFilters, columnFilters);
|
|
723
|
+
const sameHeader = JSON.stringify(headerFilters) === JSON.stringify(current.headerFilters);
|
|
724
|
+
const sameColumn = JSON.stringify(columnFilters) === JSON.stringify(current.columnFilters);
|
|
725
|
+
const sameMerged = JSON.stringify(runtimeFilters) ===
|
|
726
|
+
JSON.stringify(current.context.runtimeFilters);
|
|
727
|
+
if (sameHeader && sameColumn && sameMerged) {
|
|
728
|
+
return;
|
|
729
|
+
}
|
|
730
|
+
ctx.patchState({
|
|
731
|
+
activeArea: area,
|
|
732
|
+
byArea: {
|
|
733
|
+
...state.byArea,
|
|
734
|
+
[area]: {
|
|
735
|
+
...current,
|
|
736
|
+
headerFilters,
|
|
737
|
+
columnFilters,
|
|
738
|
+
context: {
|
|
739
|
+
...current.context,
|
|
740
|
+
runtimeFilters,
|
|
741
|
+
page: 1,
|
|
742
|
+
},
|
|
743
|
+
},
|
|
744
|
+
},
|
|
745
|
+
});
|
|
746
|
+
return ctx.dispatch(new LoadRuntime(area, 'filters-change'));
|
|
747
|
+
}
|
|
621
748
|
loadRuntime(ctx, action) {
|
|
622
749
|
const state = ctx.getState();
|
|
623
750
|
const areaState = state.byArea[action.area];
|
|
@@ -678,6 +805,12 @@ __decorate([
|
|
|
678
805
|
__decorate([
|
|
679
806
|
Action(SetLookups)
|
|
680
807
|
], WorkCenterState.prototype, "setLookups", null);
|
|
808
|
+
__decorate([
|
|
809
|
+
Action(ApplyHeaderFilters)
|
|
810
|
+
], WorkCenterState.prototype, "applyHeaderFilters", null);
|
|
811
|
+
__decorate([
|
|
812
|
+
Action(ApplyColumnFilters)
|
|
813
|
+
], WorkCenterState.prototype, "applyColumnFilters", null);
|
|
681
814
|
__decorate([
|
|
682
815
|
Action(LoadRuntime)
|
|
683
816
|
], WorkCenterState.prototype, "loadRuntime", null);
|
|
@@ -708,6 +841,12 @@ __decorate([
|
|
|
708
841
|
__decorate([
|
|
709
842
|
Selector([WorkCenterState.activeSnapshot])
|
|
710
843
|
], WorkCenterState, "runtimeFilterSchema", null);
|
|
844
|
+
__decorate([
|
|
845
|
+
Selector([WorkCenterState.activeSnapshot])
|
|
846
|
+
], WorkCenterState, "headerFilters", null);
|
|
847
|
+
__decorate([
|
|
848
|
+
Selector([WorkCenterState.activeSnapshot])
|
|
849
|
+
], WorkCenterState, "columnFilters", null);
|
|
711
850
|
__decorate([
|
|
712
851
|
Selector([WorkCenterState.activeSnapshot])
|
|
713
852
|
], WorkCenterState, "totalCount", null);
|
|
@@ -731,7 +870,7 @@ WorkCenterState = __decorate([
|
|
|
731
870
|
], WorkCenterState);
|
|
732
871
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterState, decorators: [{
|
|
733
872
|
type: Injectable
|
|
734
|
-
}], propDecorators: { enterArea: [], hydrateFromContext: [], setParams: [], setLookups: [], loadRuntime: [] } });
|
|
873
|
+
}], propDecorators: { enterArea: [], hydrateFromContext: [], setParams: [], setLookups: [], applyHeaderFilters: [], applyColumnFilters: [], loadRuntime: [] } });
|
|
735
874
|
|
|
736
875
|
class WorkCenterFacade {
|
|
737
876
|
store = inject(Store);
|
|
@@ -743,6 +882,8 @@ class WorkCenterFacade {
|
|
|
743
882
|
kpis = select(WorkCenterState.kpis);
|
|
744
883
|
lookups = select(WorkCenterState.lookups);
|
|
745
884
|
runtimeFilterSchema = select(WorkCenterState.runtimeFilterSchema);
|
|
885
|
+
headerFilters = select(WorkCenterState.headerFilters);
|
|
886
|
+
columnFilters = select(WorkCenterState.columnFilters);
|
|
746
887
|
totalCount = select(WorkCenterState.totalCount);
|
|
747
888
|
warnings = select(WorkCenterState.warnings);
|
|
748
889
|
loadingActive = select(WorkCenterState.getLoadingActive);
|
|
@@ -798,10 +939,24 @@ class WorkCenterFacade {
|
|
|
798
939
|
]);
|
|
799
940
|
}
|
|
800
941
|
applyRuntimeFiltersAndLoad(area, runtimeFilters) {
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
942
|
+
// Back-compat: any caller that previously set the entire `runtimeFilters`
|
|
943
|
+
// array now lands on the header slice. The in-table column filter slice is
|
|
944
|
+
// cleared so the merged payload matches what callers expect.
|
|
945
|
+
return this.store.dispatch(new ApplyHeaderFilters(area, runtimeFilters));
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Replaces the property-filter-builder slice. Resets pagination to page 1
|
|
949
|
+
* and reloads with merged `headerFilters` + `columnFilters`.
|
|
950
|
+
*/
|
|
951
|
+
applyHeaderFiltersAndLoad(area, runtimeFilters) {
|
|
952
|
+
return this.store.dispatch(new ApplyHeaderFilters(area, runtimeFilters));
|
|
953
|
+
}
|
|
954
|
+
/**
|
|
955
|
+
* Replaces the in-table column filter slice. Resets pagination to page 1
|
|
956
|
+
* and reloads with merged `headerFilters` + `columnFilters`.
|
|
957
|
+
*/
|
|
958
|
+
applyColumnFiltersAndLoad(area, runtimeFilters) {
|
|
959
|
+
return this.store.dispatch(new ApplyColumnFilters(area, runtimeFilters));
|
|
805
960
|
}
|
|
806
961
|
loadRuntime(area, reason = 'manual') {
|
|
807
962
|
return this.store.dispatch(new LoadRuntime(area, reason));
|
|
@@ -891,6 +1046,118 @@ function normalizeCardKey(value) {
|
|
|
891
1046
|
.replace(/[\s_-]/g, '')
|
|
892
1047
|
.toLowerCase();
|
|
893
1048
|
}
|
|
1049
|
+
/**
|
|
1050
|
+
* Strips the user envelope used by `mt-table` user filters down to the
|
|
1051
|
+
* scalar id that the BE rule payload accepts. Falls back to the original
|
|
1052
|
+
* value for non-user shapes (e.g. simple string in a select filter).
|
|
1053
|
+
*/
|
|
1054
|
+
function extractIdScalar(value) {
|
|
1055
|
+
if (value !== null &&
|
|
1056
|
+
typeof value === 'object' &&
|
|
1057
|
+
'id' in value) {
|
|
1058
|
+
return value['id'];
|
|
1059
|
+
}
|
|
1060
|
+
return value;
|
|
1061
|
+
}
|
|
1062
|
+
function toIsoDate(value) {
|
|
1063
|
+
if (value instanceof Date)
|
|
1064
|
+
return value.toISOString();
|
|
1065
|
+
return value;
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* Translates one in-table column filter value into a `WorkCenterFilterRule`.
|
|
1069
|
+
*
|
|
1070
|
+
* The shape of `raw` depends on the column's filter type — see
|
|
1071
|
+
* `mt-table` `table-filter-field` outputs:
|
|
1072
|
+
* - text → string → `Contains`
|
|
1073
|
+
* - select → scalar | scalar[] → `Eq` | `In`
|
|
1074
|
+
* - boolean → boolean → `Eq`
|
|
1075
|
+
* - date → `{ from?, to?, value? }` (Date|null)→ `Between`/`Gte`/`Lte`/`Eq`
|
|
1076
|
+
* - user → `{ id, ... }` | `{ id, ... }[]` → `Eq` (id) | `In` (ids)
|
|
1077
|
+
*
|
|
1078
|
+
* Returns `null` when the value is empty / nothing to send.
|
|
1079
|
+
*/
|
|
1080
|
+
function toRuntimeFilterRule(field, raw, column) {
|
|
1081
|
+
if (raw === null || raw === undefined || raw === '')
|
|
1082
|
+
return null;
|
|
1083
|
+
if (typeof raw === 'boolean') {
|
|
1084
|
+
return { field, op: 'Eq', value: raw };
|
|
1085
|
+
}
|
|
1086
|
+
if (typeof raw === 'number') {
|
|
1087
|
+
return { field, op: 'Eq', value: raw };
|
|
1088
|
+
}
|
|
1089
|
+
if (typeof raw === 'string') {
|
|
1090
|
+
if (!raw.trim().length)
|
|
1091
|
+
return null;
|
|
1092
|
+
return { field, op: 'Contains', value: raw };
|
|
1093
|
+
}
|
|
1094
|
+
if (Array.isArray(raw)) {
|
|
1095
|
+
const values = raw
|
|
1096
|
+
.map(extractIdScalar)
|
|
1097
|
+
.filter((v) => v !== null && v !== undefined && v !== '');
|
|
1098
|
+
if (!values.length)
|
|
1099
|
+
return null;
|
|
1100
|
+
return { field, op: 'In', values };
|
|
1101
|
+
}
|
|
1102
|
+
if (typeof raw === 'object') {
|
|
1103
|
+
const obj = raw;
|
|
1104
|
+
// User filter envelope -> single-id Eq.
|
|
1105
|
+
if (obj.id !== undefined && obj.id !== null && obj.id !== '') {
|
|
1106
|
+
return { field, op: 'Eq', value: obj.id };
|
|
1107
|
+
}
|
|
1108
|
+
const hasFrom = obj.from !== undefined && obj.from !== null;
|
|
1109
|
+
const hasTo = obj.to !== undefined && obj.to !== null;
|
|
1110
|
+
if (hasFrom && hasTo) {
|
|
1111
|
+
return {
|
|
1112
|
+
field,
|
|
1113
|
+
op: 'Between',
|
|
1114
|
+
from: toIsoDate(obj.from),
|
|
1115
|
+
to: toIsoDate(obj.to),
|
|
1116
|
+
};
|
|
1117
|
+
}
|
|
1118
|
+
if (hasFrom) {
|
|
1119
|
+
return { field, op: 'Gte', value: toIsoDate(obj.from) };
|
|
1120
|
+
}
|
|
1121
|
+
if (hasTo) {
|
|
1122
|
+
return { field, op: 'Lte', value: toIsoDate(obj.to) };
|
|
1123
|
+
}
|
|
1124
|
+
if (obj.value !== undefined && obj.value !== null && obj.value !== '') {
|
|
1125
|
+
const treatAsContains = column?.type === 'text' ||
|
|
1126
|
+
(column?.filterConfig?.type === 'text' &&
|
|
1127
|
+
typeof obj.value === 'string');
|
|
1128
|
+
if (treatAsContains) {
|
|
1129
|
+
return { field, op: 'Contains', value: obj.value };
|
|
1130
|
+
}
|
|
1131
|
+
return { field, op: 'Eq', value: extractIdScalar(obj.value) };
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
return null;
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Walks `mt-table`'s filter map and produces the `WorkCenterFilterRule[]`
|
|
1138
|
+
* sent on the BE column-filter slice. The synthetic `generalSearch` key is
|
|
1139
|
+
* skipped because the page keeps general search local-only.
|
|
1140
|
+
*/
|
|
1141
|
+
function buildColumnRuntimeFilters(filters, columns, allowedFields) {
|
|
1142
|
+
if (!filters)
|
|
1143
|
+
return [];
|
|
1144
|
+
const allowed = allowedFields && allowedFields.length ? new Set(allowedFields) : null;
|
|
1145
|
+
const columnByKey = new Map(columns.map((col) => [col.key, col]));
|
|
1146
|
+
const rules = [];
|
|
1147
|
+
for (const [key, raw] of Object.entries(filters)) {
|
|
1148
|
+
if (key === 'generalSearch')
|
|
1149
|
+
continue;
|
|
1150
|
+
if (allowed && !allowed.has(key))
|
|
1151
|
+
continue;
|
|
1152
|
+
const rule = toRuntimeFilterRule(key, raw, columnByKey.get(key));
|
|
1153
|
+
if (rule)
|
|
1154
|
+
rules.push(rule);
|
|
1155
|
+
}
|
|
1156
|
+
return rules;
|
|
1157
|
+
}
|
|
1158
|
+
function areFilterRulesEqual(left, right) {
|
|
1159
|
+
return JSON.stringify(left) === JSON.stringify(right);
|
|
1160
|
+
}
|
|
894
1161
|
function mapAllowedFields(schema) {
|
|
895
1162
|
const properties = schema.properties ?? [];
|
|
896
1163
|
const fromProperties = properties
|
|
@@ -965,6 +1232,8 @@ class WorkCenterPage {
|
|
|
965
1232
|
columns = this.facade.columns;
|
|
966
1233
|
kpis = this.facade.kpis;
|
|
967
1234
|
runtimeFilterSchema = this.facade.runtimeFilterSchema;
|
|
1235
|
+
totalCount = this.facade.totalCount;
|
|
1236
|
+
columnFilters = this.facade.columnFilters;
|
|
968
1237
|
loading = this.facade.loading;
|
|
969
1238
|
tableColumns = computed(() => this.columns().map((column) => ({
|
|
970
1239
|
...column,
|
|
@@ -1037,13 +1306,33 @@ class WorkCenterPage {
|
|
|
1037
1306
|
from: filter.from,
|
|
1038
1307
|
to: filter.to,
|
|
1039
1308
|
}));
|
|
1040
|
-
this.facade.
|
|
1309
|
+
this.facade.applyHeaderFiltersAndLoad(this.area(), mappedFilters);
|
|
1041
1310
|
this.runtimeFiltersChanged.emit(mappedFilters);
|
|
1042
1311
|
}
|
|
1043
1312
|
onRuntimeFiltersCleared() {
|
|
1044
|
-
this.facade.
|
|
1313
|
+
this.facade.applyHeaderFiltersAndLoad(this.area(), []);
|
|
1045
1314
|
this.runtimeFiltersChanged.emit([]);
|
|
1046
1315
|
}
|
|
1316
|
+
/**
|
|
1317
|
+
* Single entry point for `mt-table` (`lazy=true`) — handles both column
|
|
1318
|
+
* filters and pagination/sort. Filter changes always reset the page to 1
|
|
1319
|
+
* (handled by `applyColumnFiltersAndLoad`); when only paging/sort changed
|
|
1320
|
+
* we fall through to `applyTableLazyLoadAndLoad`.
|
|
1321
|
+
*/
|
|
1322
|
+
onTableLazyLoad(event) {
|
|
1323
|
+
const schema = this.runtimeFilterSchema();
|
|
1324
|
+
const propertyKeys = (schema?.properties ?? [])
|
|
1325
|
+
.map((p) => p?.key)
|
|
1326
|
+
.filter((k) => typeof k === 'string' && k.length > 0);
|
|
1327
|
+
const allowedKeys = schema?.allowedFields ?? [];
|
|
1328
|
+
const allowedFields = propertyKeys.length ? propertyKeys : allowedKeys;
|
|
1329
|
+
const nextColumnFilters = buildColumnRuntimeFilters(event?.filters, this.columns(), allowedFields.length ? allowedFields : undefined);
|
|
1330
|
+
if (!areFilterRulesEqual(nextColumnFilters, this.columnFilters())) {
|
|
1331
|
+
this.facade.applyColumnFiltersAndLoad(this.area(), nextColumnFilters);
|
|
1332
|
+
return;
|
|
1333
|
+
}
|
|
1334
|
+
this.facade.applyTableLazyLoadAndLoad(this.area(), event);
|
|
1335
|
+
}
|
|
1047
1336
|
onGeneralTaskCreateClick() {
|
|
1048
1337
|
const modalOptions = this.generalTaskModal();
|
|
1049
1338
|
const modalData = {
|
|
@@ -1091,7 +1380,7 @@ class WorkCenterPage {
|
|
|
1091
1380
|
if (!modalOptions?.component) {
|
|
1092
1381
|
return;
|
|
1093
1382
|
}
|
|
1094
|
-
this.modal.openModal(modalOptions.component, 'drawer', {
|
|
1383
|
+
const ref = this.modal.openModal(modalOptions.component, 'drawer', {
|
|
1095
1384
|
header: modalOptions?.header ??
|
|
1096
1385
|
this.transloco.translate('workCenter.page.itemDetails'),
|
|
1097
1386
|
styleClass: modalOptions?.styleClass ?? this.defaultModalStyleClass,
|
|
@@ -1101,6 +1390,9 @@ class WorkCenterPage {
|
|
|
1101
1390
|
...(modalOptions?.appendTo ? { appendTo: modalOptions.appendTo } : {}),
|
|
1102
1391
|
inputValues: { contextKey },
|
|
1103
1392
|
});
|
|
1393
|
+
ref.onClose.pipe(take(1)).subscribe(() => {
|
|
1394
|
+
this.facade.loadRuntime(this.area(), 'refresh');
|
|
1395
|
+
});
|
|
1104
1396
|
}
|
|
1105
1397
|
rowsClickable = computed(() => this.openItemsInModal(), ...(ngDevMode ? [{ debugName: "rowsClickable" }] : /* istanbul ignore next */ []));
|
|
1106
1398
|
getOpLabel(key) {
|
|
@@ -1117,7 +1409,7 @@ class WorkCenterPage {
|
|
|
1117
1409
|
return normalized.length ? normalized : null;
|
|
1118
1410
|
}
|
|
1119
1411
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1120
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterPage, isStandalone: true, selector: "mt-work-center-page", inputs: { area: { classPropertyName: "area", publicName: "area", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, menuIcon: { classPropertyName: "menuIcon", publicName: "menuIcon", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, openItemsInModal: { classPropertyName: "openItemsInModal", publicName: "openItemsInModal", isSignal: true, isRequired: false, transformFunction: null }, itemModal: { classPropertyName: "itemModal", publicName: "itemModal", isSignal: true, isRequired: false, transformFunction: null }, generalTaskModal: { classPropertyName: "generalTaskModal", publicName: "generalTaskModal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { runtimeFiltersChanged: "runtimeFiltersChanged", itemClicked: "itemClicked" }, ngImport: i0, template: "<mt-client-page\r\n [menuIcon]=\"menuIcon()\"\r\n [menuTitle]=\"resolvedPageTitle()\"\r\n [menuItems]=\"menuItems()\"\r\n [menuItemsLoading]=\"loading() && !menuItems().length\"\r\n [activeItem]=\"context().selectedCardKey ?? undefined\"\r\n storageKey=\"work-center-client-page\"\r\n (menuItemClick)=\"onMenuItemClick($event)\"\r\n>\r\n <ng-template #headerClientPageEnd>\r\n <div class=\"flex flex-wrap items-center justify-end gap-2\">\r\n <mt-property-filter-builder\r\n [schema]=\"propertyFilterSchema()\"\r\n [filters]=\"context().runtimeFilters\"\r\n (applied)=\"onRuntimeFiltersApplied($event)\"\r\n (cleared)=\"onRuntimeFiltersCleared()\"\r\n />\r\n\r\n @if (showGeneralTaskCreateButton()) {\r\n <mt-button\r\n [label]=\"generalTaskButtonLabel()\"\r\n [icon]=\"generalTaskButtonIcon()\"\r\n size=\"small\"\r\n (onClick)=\"onGeneralTaskCreateClick()\"\r\n />\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-8\">\r\n @if (loading()) {\r\n <div\r\n class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 gap-3\"\r\n >\r\n @for (_ of [1, 2, 3, 4, 5]; track $index) {\r\n <p-skeleton height=\"6.5rem\" class=\"rounded-lg\" />\r\n }\r\n </div>\r\n } @else if (kpis().length) {\r\n <div class=\"gap-3 flex flex-wrap\">\r\n @for (kpi of kpis(); track $index) {\r\n <mt-statistic-card [data]=\"kpi\" class=\"min-w-[200px]\" />\r\n }\r\n </div>\r\n }\r\n\r\n <mt-table\r\n noCard\r\n [data]=\"rows()\"\r\n [columns]=\"tableColumns()\"\r\n tableLayout=\"auto\"\r\n [clickableRows]=\"rowsClickable()\"\r\n [loading]=\"loading()\"\r\n [showFilters]=\"true\"\r\n filterMode=\"column\"\r\n [cellClickFilter]=\"true\"\r\n [generalSearch]=\"true\"\r\n [exportable]=\"true\"\r\n [printable]=\"true\"\r\n [groupable]=\"true\"\r\n [freezeActions]=\"true\"\r\n [pageSize]=\"
|
|
1412
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterPage, isStandalone: true, selector: "mt-work-center-page", inputs: { area: { classPropertyName: "area", publicName: "area", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, menuIcon: { classPropertyName: "menuIcon", publicName: "menuIcon", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, openItemsInModal: { classPropertyName: "openItemsInModal", publicName: "openItemsInModal", isSignal: true, isRequired: false, transformFunction: null }, itemModal: { classPropertyName: "itemModal", publicName: "itemModal", isSignal: true, isRequired: false, transformFunction: null }, generalTaskModal: { classPropertyName: "generalTaskModal", publicName: "generalTaskModal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { runtimeFiltersChanged: "runtimeFiltersChanged", itemClicked: "itemClicked" }, ngImport: i0, template: "<mt-client-page\r\n [menuIcon]=\"menuIcon()\"\r\n [menuTitle]=\"resolvedPageTitle()\"\r\n [menuItems]=\"menuItems()\"\r\n [menuItemsLoading]=\"loading() && !menuItems().length\"\r\n [activeItem]=\"context().selectedCardKey ?? undefined\"\r\n storageKey=\"work-center-client-page\"\r\n (menuItemClick)=\"onMenuItemClick($event)\"\r\n>\r\n <ng-template #headerClientPageEnd>\r\n <div class=\"flex flex-wrap items-center justify-end gap-2\">\r\n <mt-property-filter-builder\r\n [schema]=\"propertyFilterSchema()\"\r\n [filters]=\"context().runtimeFilters\"\r\n (applied)=\"onRuntimeFiltersApplied($event)\"\r\n (cleared)=\"onRuntimeFiltersCleared()\"\r\n />\r\n\r\n @if (showGeneralTaskCreateButton()) {\r\n <mt-button\r\n [label]=\"generalTaskButtonLabel()\"\r\n [icon]=\"generalTaskButtonIcon()\"\r\n size=\"small\"\r\n (onClick)=\"onGeneralTaskCreateClick()\"\r\n />\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-8\">\r\n @if (loading()) {\r\n <div\r\n class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 gap-3\"\r\n >\r\n @for (_ of [1, 2, 3, 4, 5]; track $index) {\r\n <p-skeleton height=\"6.5rem\" class=\"rounded-lg\" />\r\n }\r\n </div>\r\n } @else if (kpis().length) {\r\n <div class=\"gap-3 flex flex-wrap\">\r\n @for (kpi of kpis(); track $index) {\r\n <mt-statistic-card [data]=\"kpi\" class=\"min-w-[200px]\" />\r\n }\r\n </div>\r\n }\r\n\r\n <mt-table\r\n noCard\r\n [data]=\"rows()\"\r\n [columns]=\"tableColumns()\"\r\n tableLayout=\"auto\"\r\n [clickableRows]=\"rowsClickable()\"\r\n [loading]=\"loading()\"\r\n [showFilters]=\"true\"\r\n filterMode=\"column\"\r\n [cellClickFilter]=\"true\"\r\n [generalSearch]=\"true\"\r\n [exportable]=\"true\"\r\n [printable]=\"true\"\r\n [groupable]=\"true\"\r\n [freezeActions]=\"true\"\r\n [lazy]=\"true\"\r\n [lazyLocalSearch]=\"true\"\r\n [lazyTotalRecords]=\"totalCount()\"\r\n [pageSize]=\"context().pageSize\"\r\n [currentPage]=\"context().page - 1\"\r\n [first]=\"(context().page - 1) * context().pageSize\"\r\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\r\n storageKey=\"work-center-page-table\"\r\n (lazyLoad)=\"onTableLazyLoad($event)\"\r\n (rowClick)=\"onRowClick($event)\"\r\n />\r\n </div>\r\n</mt-client-page>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ClientPage, selector: "mt-client-page", inputs: ["menuIcon", "menuTitle", "menuItems", "menuItemsLoading", "activeItem", "collapsed", "resizable", "storageKey", "storageMode", "minSidebarWidth", "maxSidebarWidth", "defaultSidebarWidth"], outputs: ["collapsedChange", "menuItemClick"] }, { kind: "component", type: PropertyFilterBuilder, selector: "mt-property-filter-builder", inputs: ["schema", "filters", "title", "buttonLabel", "disabled"], outputs: ["filtersChange", "applied", "cleared"] }, { kind: "component", type: StatisticCard, selector: "mt-statistic-card", inputs: ["data", "cardClass"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "exportable", "printable", "groupable", "cellClickFilter", "freezeActions", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
|
|
1121
1413
|
}
|
|
1122
1414
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterPage, decorators: [{
|
|
1123
1415
|
type: Component,
|
|
@@ -1129,7 +1421,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
1129
1421
|
StatisticCard,
|
|
1130
1422
|
Table,
|
|
1131
1423
|
SkeletonModule,
|
|
1132
|
-
], template: "<mt-client-page\r\n [menuIcon]=\"menuIcon()\"\r\n [menuTitle]=\"resolvedPageTitle()\"\r\n [menuItems]=\"menuItems()\"\r\n [menuItemsLoading]=\"loading() && !menuItems().length\"\r\n [activeItem]=\"context().selectedCardKey ?? undefined\"\r\n storageKey=\"work-center-client-page\"\r\n (menuItemClick)=\"onMenuItemClick($event)\"\r\n>\r\n <ng-template #headerClientPageEnd>\r\n <div class=\"flex flex-wrap items-center justify-end gap-2\">\r\n <mt-property-filter-builder\r\n [schema]=\"propertyFilterSchema()\"\r\n [filters]=\"context().runtimeFilters\"\r\n (applied)=\"onRuntimeFiltersApplied($event)\"\r\n (cleared)=\"onRuntimeFiltersCleared()\"\r\n />\r\n\r\n @if (showGeneralTaskCreateButton()) {\r\n <mt-button\r\n [label]=\"generalTaskButtonLabel()\"\r\n [icon]=\"generalTaskButtonIcon()\"\r\n size=\"small\"\r\n (onClick)=\"onGeneralTaskCreateClick()\"\r\n />\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-8\">\r\n @if (loading()) {\r\n <div\r\n class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 gap-3\"\r\n >\r\n @for (_ of [1, 2, 3, 4, 5]; track $index) {\r\n <p-skeleton height=\"6.5rem\" class=\"rounded-lg\" />\r\n }\r\n </div>\r\n } @else if (kpis().length) {\r\n <div class=\"gap-3 flex flex-wrap\">\r\n @for (kpi of kpis(); track $index) {\r\n <mt-statistic-card [data]=\"kpi\" class=\"min-w-[200px]\" />\r\n }\r\n </div>\r\n }\r\n\r\n <mt-table\r\n noCard\r\n [data]=\"rows()\"\r\n [columns]=\"tableColumns()\"\r\n tableLayout=\"auto\"\r\n [clickableRows]=\"rowsClickable()\"\r\n [loading]=\"loading()\"\r\n [showFilters]=\"true\"\r\n filterMode=\"column\"\r\n [cellClickFilter]=\"true\"\r\n [generalSearch]=\"true\"\r\n [exportable]=\"true\"\r\n [printable]=\"true\"\r\n [groupable]=\"true\"\r\n [freezeActions]=\"true\"\r\n [pageSize]=\"
|
|
1424
|
+
], template: "<mt-client-page\r\n [menuIcon]=\"menuIcon()\"\r\n [menuTitle]=\"resolvedPageTitle()\"\r\n [menuItems]=\"menuItems()\"\r\n [menuItemsLoading]=\"loading() && !menuItems().length\"\r\n [activeItem]=\"context().selectedCardKey ?? undefined\"\r\n storageKey=\"work-center-client-page\"\r\n (menuItemClick)=\"onMenuItemClick($event)\"\r\n>\r\n <ng-template #headerClientPageEnd>\r\n <div class=\"flex flex-wrap items-center justify-end gap-2\">\r\n <mt-property-filter-builder\r\n [schema]=\"propertyFilterSchema()\"\r\n [filters]=\"context().runtimeFilters\"\r\n (applied)=\"onRuntimeFiltersApplied($event)\"\r\n (cleared)=\"onRuntimeFiltersCleared()\"\r\n />\r\n\r\n @if (showGeneralTaskCreateButton()) {\r\n <mt-button\r\n [label]=\"generalTaskButtonLabel()\"\r\n [icon]=\"generalTaskButtonIcon()\"\r\n size=\"small\"\r\n (onClick)=\"onGeneralTaskCreateClick()\"\r\n />\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-8\">\r\n @if (loading()) {\r\n <div\r\n class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 gap-3\"\r\n >\r\n @for (_ of [1, 2, 3, 4, 5]; track $index) {\r\n <p-skeleton height=\"6.5rem\" class=\"rounded-lg\" />\r\n }\r\n </div>\r\n } @else if (kpis().length) {\r\n <div class=\"gap-3 flex flex-wrap\">\r\n @for (kpi of kpis(); track $index) {\r\n <mt-statistic-card [data]=\"kpi\" class=\"min-w-[200px]\" />\r\n }\r\n </div>\r\n }\r\n\r\n <mt-table\r\n noCard\r\n [data]=\"rows()\"\r\n [columns]=\"tableColumns()\"\r\n tableLayout=\"auto\"\r\n [clickableRows]=\"rowsClickable()\"\r\n [loading]=\"loading()\"\r\n [showFilters]=\"true\"\r\n filterMode=\"column\"\r\n [cellClickFilter]=\"true\"\r\n [generalSearch]=\"true\"\r\n [exportable]=\"true\"\r\n [printable]=\"true\"\r\n [groupable]=\"true\"\r\n [freezeActions]=\"true\"\r\n [lazy]=\"true\"\r\n [lazyLocalSearch]=\"true\"\r\n [lazyTotalRecords]=\"totalCount()\"\r\n [pageSize]=\"context().pageSize\"\r\n [currentPage]=\"context().page - 1\"\r\n [first]=\"(context().page - 1) * context().pageSize\"\r\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\r\n storageKey=\"work-center-page-table\"\r\n (lazyLoad)=\"onTableLazyLoad($event)\"\r\n (rowClick)=\"onRowClick($event)\"\r\n />\r\n </div>\r\n</mt-client-page>\r\n" }]
|
|
1133
1425
|
}], ctorParameters: () => [], propDecorators: { area: [{ type: i0.Input, args: [{ isSignal: true, alias: "area", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], menuIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuIcon", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], openItemsInModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "openItemsInModal", required: false }] }], itemModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemModal", required: false }] }], generalTaskModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "generalTaskModal", required: false }] }], runtimeFiltersChanged: [{ type: i0.Output, args: ["runtimeFiltersChanged"] }], itemClicked: [{ type: i0.Output, args: ["itemClicked"] }] } });
|
|
1134
1426
|
|
|
1135
1427
|
function readItemContext(details) {
|
|
@@ -1414,7 +1706,7 @@ class WorkCenterModuleType {
|
|
|
1414
1706
|
this.actionContext?.setFormSource(null);
|
|
1415
1707
|
}
|
|
1416
1708
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterModuleType, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1417
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterModuleType, isStandalone: true, selector: "mt-work-center-module-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <div\r\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\r\n >\r\n @if (tabOptions().length > 1) {\r\n <mt-tabs\r\n [(active)]=\"activeTab\"\r\n [options]=\"tabOptions()\"\r\n mode=\"vertical\"\r\n size=\"small\"\r\n />\r\n }\r\n\r\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'details'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n @if (canRenderForm()) {\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [operationKey]=\"operationKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [readonly]=\"true\"\r\n [lookups]=\"lookups()\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.moduleFormUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"h-full min-h-0 overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'discussion'\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div\r\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\r\n >\r\n <mt-discussion-thread\r\n [moduleType]=\"discussionModuleType()\"\r\n [recordId]=\"resolvedInstanceId()\"\r\n [mentionSearchEndpoint]=\"'Identity/users'\"\r\n [mentionSearchParam]=\"'query'\"\r\n [mentionSearchDataPath]=\"'data'\"\r\n [uploadEndpoint]=\"'uploader'\"\r\n [attachmentDownloadEndpoint]=\"'uploader'\"\r\n [showParticipants]=\"true\"\r\n [autoMarkRead]=\"true\"\r\n [refreshIntervalMs]=\"0\"\r\n [styleClass]=\"'h-full'\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.moduleDiscussionUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "requestSchemaId", "draftProcessId", "preview", "returnUrl", "defaultValues", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "confirmWarningsOnSubmit", "confirmWarningsOnStepChange", "lookups", "ignoredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }, { kind: "component", type: DiscussionThread, selector: "mt-discussion-thread", inputs: ["moduleType", "recordId", "title", "subtitle", "placeholder", "pageSize", "currentUserId", "requestContext", "mentionableUsers", "mentionSearchEndpoint", "mentionSearchParam", "mentionSearchDataPath", "allowAttachments", "uploadEndpoint", "attachmentDownloadEndpoint", "showParticipants", "autoMarkRead", "refreshIntervalMs", "styleClass", "disabled"], outputs: ["loaded", "errored", "commentCreated", "commentUpdated", "commentDeleted", "readStateChanged"] }] });
|
|
1709
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterModuleType, isStandalone: true, selector: "mt-work-center-module-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <div\r\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\r\n >\r\n @if (tabOptions().length > 1) {\r\n <mt-tabs\r\n [(active)]=\"activeTab\"\r\n [options]=\"tabOptions()\"\r\n mode=\"vertical\"\r\n size=\"small\"\r\n />\r\n }\r\n\r\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'details'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n @if (canRenderForm()) {\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [operationKey]=\"operationKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [readonly]=\"true\"\r\n [lookups]=\"lookups()\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.moduleFormUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"h-full min-h-0 overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'discussion'\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div\r\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\r\n >\r\n <mt-discussion-thread\r\n [moduleType]=\"discussionModuleType()\"\r\n [recordId]=\"resolvedInstanceId()\"\r\n [mentionSearchEndpoint]=\"'Identity/users'\"\r\n [mentionSearchParam]=\"'query'\"\r\n [mentionSearchDataPath]=\"'data'\"\r\n [uploadEndpoint]=\"'uploader'\"\r\n [attachmentDownloadEndpoint]=\"'uploader'\"\r\n [showParticipants]=\"true\"\r\n [autoMarkRead]=\"true\"\r\n [refreshIntervalMs]=\"0\"\r\n [styleClass]=\"'h-full'\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.moduleDiscussionUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "requestSchemaId", "draftProcessId", "preview", "returnUrl", "defaultValues", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "confirmWarningsOnSubmit", "confirmWarningsOnStepChange", "lookups", "ignoredFieldKeys", "allowedFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }, { kind: "component", type: DiscussionThread, selector: "mt-discussion-thread", inputs: ["moduleType", "recordId", "title", "subtitle", "placeholder", "pageSize", "currentUserId", "requestContext", "mentionableUsers", "mentionSearchEndpoint", "mentionSearchParam", "mentionSearchDataPath", "allowAttachments", "uploadEndpoint", "attachmentDownloadEndpoint", "showParticipants", "autoMarkRead", "refreshIntervalMs", "styleClass", "disabled"], outputs: ["loaded", "errored", "commentCreated", "commentUpdated", "commentDeleted", "readStateChanged"] }] });
|
|
1418
1710
|
}
|
|
1419
1711
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterModuleType, decorators: [{
|
|
1420
1712
|
type: Component,
|
|
@@ -1638,7 +1930,7 @@ class WorkCenterProcessRequestType {
|
|
|
1638
1930
|
this.actionContext?.setFormSource(null);
|
|
1639
1931
|
}
|
|
1640
1932
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterProcessRequestType, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1641
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterProcessRequestType, isStandalone: true, selector: "mt-work-center-process-request-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <div\r\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\r\n >\r\n @if (tabOptions().length > 1) {\r\n <mt-tabs\r\n [(active)]=\"activeTab\"\r\n [options]=\"tabOptions()\"\r\n mode=\"vertical\"\r\n size=\"small\"\r\n />\r\n }\r\n\r\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'requestDetails'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n @if (canRenderForm()) {\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [operationKey]=\"operationKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [requestSchemaId]=\"requestSchemaId()\"\r\n [draftProcessId]=\"draftProcessId()\"\r\n [readonly]=\"true\"\r\n [lookups]=\"lookups()\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestFormUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'approvals'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'approvals'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'schema'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'schema'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"h-full min-h-0 overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'discussion'\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div\r\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\r\n >\r\n <mt-discussion-thread\r\n [moduleType]=\"'ProcessRequest'\"\r\n [recordId]=\"discussionRecordId()\"\r\n [mentionSearchEndpoint]=\"'Identity/users'\"\r\n [mentionSearchParam]=\"'query'\"\r\n [mentionSearchDataPath]=\"'data'\"\r\n [uploadEndpoint]=\"'uploader'\"\r\n [attachmentDownloadEndpoint]=\"'uploader'\"\r\n [showParticipants]=\"true\"\r\n [autoMarkRead]=\"true\"\r\n [refreshIntervalMs]=\"0\"\r\n [styleClass]=\"'h-full'\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestDiscussionUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "requestSchemaId", "draftProcessId", "preview", "returnUrl", "defaultValues", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "confirmWarningsOnSubmit", "confirmWarningsOnStepChange", "lookups", "ignoredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }, { kind: "component", type: DiscussionThread, selector: "mt-discussion-thread", inputs: ["moduleType", "recordId", "title", "subtitle", "placeholder", "pageSize", "currentUserId", "requestContext", "mentionableUsers", "mentionSearchEndpoint", "mentionSearchParam", "mentionSearchDataPath", "allowAttachments", "uploadEndpoint", "attachmentDownloadEndpoint", "showParticipants", "autoMarkRead", "refreshIntervalMs", "styleClass", "disabled"], outputs: ["loaded", "errored", "commentCreated", "commentUpdated", "commentDeleted", "readStateChanged"] }, { kind: "component", type: WorkCenterProcessPreview, selector: "mt-work-center-process-preview", inputs: ["requestId", "view"] }] });
|
|
1933
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterProcessRequestType, isStandalone: true, selector: "mt-work-center-process-request-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <div\r\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\r\n >\r\n @if (tabOptions().length > 1) {\r\n <mt-tabs\r\n [(active)]=\"activeTab\"\r\n [options]=\"tabOptions()\"\r\n mode=\"vertical\"\r\n size=\"small\"\r\n />\r\n }\r\n\r\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'requestDetails'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n @if (canRenderForm()) {\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [operationKey]=\"operationKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [requestSchemaId]=\"requestSchemaId()\"\r\n [draftProcessId]=\"draftProcessId()\"\r\n [readonly]=\"true\"\r\n [lookups]=\"lookups()\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestFormUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'approvals'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'approvals'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'schema'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'schema'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"h-full min-h-0 overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'discussion'\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div\r\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\r\n >\r\n <mt-discussion-thread\r\n [moduleType]=\"'ProcessRequest'\"\r\n [recordId]=\"discussionRecordId()\"\r\n [mentionSearchEndpoint]=\"'Identity/users'\"\r\n [mentionSearchParam]=\"'query'\"\r\n [mentionSearchDataPath]=\"'data'\"\r\n [uploadEndpoint]=\"'uploader'\"\r\n [attachmentDownloadEndpoint]=\"'uploader'\"\r\n [showParticipants]=\"true\"\r\n [autoMarkRead]=\"true\"\r\n [refreshIntervalMs]=\"0\"\r\n [styleClass]=\"'h-full'\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestDiscussionUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "requestSchemaId", "draftProcessId", "preview", "returnUrl", "defaultValues", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "confirmWarningsOnSubmit", "confirmWarningsOnStepChange", "lookups", "ignoredFieldKeys", "allowedFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }, { kind: "component", type: DiscussionThread, selector: "mt-discussion-thread", inputs: ["moduleType", "recordId", "title", "subtitle", "placeholder", "pageSize", "currentUserId", "requestContext", "mentionableUsers", "mentionSearchEndpoint", "mentionSearchParam", "mentionSearchDataPath", "allowAttachments", "uploadEndpoint", "attachmentDownloadEndpoint", "showParticipants", "autoMarkRead", "refreshIntervalMs", "styleClass", "disabled"], outputs: ["loaded", "errored", "commentCreated", "commentUpdated", "commentDeleted", "readStateChanged"] }, { kind: "component", type: WorkCenterProcessPreview, selector: "mt-work-center-process-preview", inputs: ["requestId", "view"] }] });
|
|
1642
1934
|
}
|
|
1643
1935
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterProcessRequestType, decorators: [{
|
|
1644
1936
|
type: Component,
|
|
@@ -1717,7 +2009,7 @@ class WorkCenterProcessStepType {
|
|
|
1717
2009
|
this.actionContext?.setFormSource(null);
|
|
1718
2010
|
}
|
|
1719
2011
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterProcessStepType, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1720
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterProcessStepType, isStandalone: true, selector: "mt-work-center-process-step-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <div\r\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\r\n >\r\n @if (tabOptions().length > 1) {\r\n <mt-tabs\r\n [(active)]=\"activeTab\"\r\n [options]=\"tabOptions()\"\r\n mode=\"vertical\"\r\n size=\"small\"\r\n />\r\n }\r\n\r\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'form'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n @if (canRenderForm()) {\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [operationKey]=\"operationKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [requestSchemaId]=\"requestSchemaId()\"\r\n [draftProcessId]=\"draftProcessId()\"\r\n [lookups]=\"lookups()\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processFormUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'approvals'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'approvals'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'schema'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'schema'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"h-full min-h-0 overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'discussion'\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div\r\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\r\n >\r\n <mt-discussion-thread\r\n [moduleType]=\"'ProcessRequest'\"\r\n [recordId]=\"discussionRecordId()\"\r\n [mentionSearchEndpoint]=\"'Identity/users'\"\r\n [mentionSearchParam]=\"'query'\"\r\n [mentionSearchDataPath]=\"'data'\"\r\n [uploadEndpoint]=\"'uploader'\"\r\n [attachmentDownloadEndpoint]=\"'uploader'\"\r\n [showParticipants]=\"true\"\r\n [autoMarkRead]=\"true\"\r\n [refreshIntervalMs]=\"0\"\r\n [styleClass]=\"'h-full'\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processDiscussionUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "requestSchemaId", "draftProcessId", "preview", "returnUrl", "defaultValues", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "confirmWarningsOnSubmit", "confirmWarningsOnStepChange", "lookups", "ignoredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }, { kind: "component", type: DiscussionThread, selector: "mt-discussion-thread", inputs: ["moduleType", "recordId", "title", "subtitle", "placeholder", "pageSize", "currentUserId", "requestContext", "mentionableUsers", "mentionSearchEndpoint", "mentionSearchParam", "mentionSearchDataPath", "allowAttachments", "uploadEndpoint", "attachmentDownloadEndpoint", "showParticipants", "autoMarkRead", "refreshIntervalMs", "styleClass", "disabled"], outputs: ["loaded", "errored", "commentCreated", "commentUpdated", "commentDeleted", "readStateChanged"] }, { kind: "component", type: WorkCenterProcessPreview, selector: "mt-work-center-process-preview", inputs: ["requestId", "view"] }] });
|
|
2012
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterProcessStepType, isStandalone: true, selector: "mt-work-center-process-step-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <div\r\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\r\n >\r\n @if (tabOptions().length > 1) {\r\n <mt-tabs\r\n [(active)]=\"activeTab\"\r\n [options]=\"tabOptions()\"\r\n mode=\"vertical\"\r\n size=\"small\"\r\n />\r\n }\r\n\r\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'form'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n @if (canRenderForm()) {\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [operationKey]=\"operationKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [requestSchemaId]=\"requestSchemaId()\"\r\n [draftProcessId]=\"draftProcessId()\"\r\n [lookups]=\"lookups()\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processFormUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'approvals'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'approvals'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'schema'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'schema'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"h-full min-h-0 overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'discussion'\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div\r\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\r\n >\r\n <mt-discussion-thread\r\n [moduleType]=\"'ProcessRequest'\"\r\n [recordId]=\"discussionRecordId()\"\r\n [mentionSearchEndpoint]=\"'Identity/users'\"\r\n [mentionSearchParam]=\"'query'\"\r\n [mentionSearchDataPath]=\"'data'\"\r\n [uploadEndpoint]=\"'uploader'\"\r\n [attachmentDownloadEndpoint]=\"'uploader'\"\r\n [showParticipants]=\"true\"\r\n [autoMarkRead]=\"true\"\r\n [refreshIntervalMs]=\"0\"\r\n [styleClass]=\"'h-full'\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processDiscussionUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "requestSchemaId", "draftProcessId", "preview", "returnUrl", "defaultValues", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "confirmWarningsOnSubmit", "confirmWarningsOnStepChange", "lookups", "ignoredFieldKeys", "allowedFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }, { kind: "component", type: DiscussionThread, selector: "mt-discussion-thread", inputs: ["moduleType", "recordId", "title", "subtitle", "placeholder", "pageSize", "currentUserId", "requestContext", "mentionableUsers", "mentionSearchEndpoint", "mentionSearchParam", "mentionSearchDataPath", "allowAttachments", "uploadEndpoint", "attachmentDownloadEndpoint", "showParticipants", "autoMarkRead", "refreshIntervalMs", "styleClass", "disabled"], outputs: ["loaded", "errored", "commentCreated", "commentUpdated", "commentDeleted", "readStateChanged"] }, { kind: "component", type: WorkCenterProcessPreview, selector: "mt-work-center-process-preview", inputs: ["requestId", "view"] }] });
|
|
1721
2013
|
}
|
|
1722
2014
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterProcessStepType, decorators: [{
|
|
1723
2015
|
type: Component,
|
|
@@ -1820,6 +2112,7 @@ class WorkCenterItemModalFooterActions {
|
|
|
1820
2112
|
this.currentExecution = execution;
|
|
1821
2113
|
const result = await this.runner.execute(action, {
|
|
1822
2114
|
defaultAfterSuccess: 'refresh',
|
|
2115
|
+
silent: true,
|
|
1823
2116
|
externalPayloadResolvers: {
|
|
1824
2117
|
values: () => this.actionContext.resolveFormValues(),
|
|
1825
2118
|
},
|
|
@@ -2085,5 +2378,5 @@ const APP_STATES = [WorkCenterState];
|
|
|
2085
2378
|
* Generated bundle index. Do not edit.
|
|
2086
2379
|
*/
|
|
2087
2380
|
|
|
2088
|
-
export { APP_STATES, EnterArea, HydrateFromContext, LoadRuntime, SetLookups, SetParams, WORK_CENTER_MAX_FILTERS, WORK_CENTER_MAX_PAGE_SIZE, WORK_CENTER_MAX_SORT, WORK_CENTER_QUERY_VERSION, WorkCenterActionKey, WorkCenterClientFormModal, WorkCenterFacade, WorkCenterItemModal, WorkCenterItemModalRoute, WorkCenterPage, WorkCenterState };
|
|
2381
|
+
export { APP_STATES, ApplyColumnFilters, ApplyHeaderFilters, EnterArea, HydrateFromContext, LoadRuntime, SetLookups, SetParams, WORK_CENTER_MAX_FILTERS, WORK_CENTER_MAX_PAGE_SIZE, WORK_CENTER_MAX_SORT, WORK_CENTER_QUERY_VERSION, WorkCenterActionKey, WorkCenterClientFormModal, WorkCenterFacade, WorkCenterItemModal, WorkCenterItemModalRoute, WorkCenterPage, WorkCenterState };
|
|
2089
2382
|
//# sourceMappingURL=masterteam-work-center.mjs.map
|