@masterteam/work-center 0.0.14 → 0.0.16
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.
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, viewChild, input, computed, signal, Component, Injectable, output, effect, untracked } from '@angular/core';
|
|
3
|
+
import { inject, viewChild, input, computed, signal, Component, Injectable, DestroyRef, output, effect, untracked } from '@angular/core';
|
|
4
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
+
import { TranslocoService, TranslocoDirective } from '@jsverse/transloco';
|
|
4
6
|
import { Button } from '@masterteam/components/button';
|
|
5
7
|
import { ClientPage } from '@masterteam/components/client-page';
|
|
6
8
|
import { ModalService } from '@masterteam/components/modal';
|
|
@@ -32,6 +34,7 @@ class WorkCenterClientFormModal {
|
|
|
32
34
|
modal = inject(ModalService);
|
|
33
35
|
ref = inject(ModalRef);
|
|
34
36
|
drawerController = inject(DrawerController, { optional: true });
|
|
37
|
+
transloco = inject(TranslocoService);
|
|
35
38
|
processForm = viewChild.required(ClientForm);
|
|
36
39
|
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
37
40
|
operationKey = input('Create', ...(ngDevMode ? [{ debugName: "operationKey" }] : []));
|
|
@@ -54,7 +57,7 @@ class WorkCenterClientFormModal {
|
|
|
54
57
|
this.submitError.set(null);
|
|
55
58
|
this.submitStatus.set(null);
|
|
56
59
|
if (!this.processForm().isValid()) {
|
|
57
|
-
this.validationMessage.set('
|
|
60
|
+
this.validationMessage.set(this.transloco.translate('workCenter.validation.fillRequiredFields'));
|
|
58
61
|
return;
|
|
59
62
|
}
|
|
60
63
|
this.isSubmitting.set(true);
|
|
@@ -71,7 +74,8 @@ class WorkCenterClientFormModal {
|
|
|
71
74
|
}
|
|
72
75
|
onErrored(error) {
|
|
73
76
|
this.isSubmitting.set(false);
|
|
74
|
-
this.submitError.set(error ??
|
|
77
|
+
this.submitError.set(error ??
|
|
78
|
+
this.transloco.translate('workCenter.error.failedSubmit'));
|
|
75
79
|
}
|
|
76
80
|
toNumber(value) {
|
|
77
81
|
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
@@ -86,11 +90,11 @@ class WorkCenterClientFormModal {
|
|
|
86
90
|
return undefined;
|
|
87
91
|
}
|
|
88
92
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterClientFormModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
89
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", 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: "<div [class]=\"modal.contentClass + ' p-5 flex flex-col gap-4'\">\r\n
|
|
93
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", 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", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "lookups", "ignoredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }] });
|
|
90
94
|
}
|
|
91
95
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterClientFormModal, decorators: [{
|
|
92
96
|
type: Component,
|
|
93
|
-
args: [{ selector: 'mt-work-center-client-form-modal', standalone: true, imports: [Button, ClientForm], template: "<div [class]=\"modal.contentClass + ' p-5 flex flex-col gap-4'\">\r\n
|
|
97
|
+
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" }]
|
|
94
98
|
}], 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
99
|
|
|
96
100
|
class EnterArea {
|
|
@@ -856,13 +860,13 @@ function mapAllowedFields(schema) {
|
|
|
856
860
|
label: toLabel(field),
|
|
857
861
|
}));
|
|
858
862
|
}
|
|
859
|
-
function mapAllowedOperators(schema) {
|
|
863
|
+
function mapAllowedOperators(schema, getLabel) {
|
|
860
864
|
const options = [];
|
|
861
865
|
for (const operator of schema.allowedOperators ?? []) {
|
|
862
866
|
if (typeof operator === 'string') {
|
|
863
867
|
options.push({
|
|
864
868
|
key: operator,
|
|
865
|
-
label:
|
|
869
|
+
label: getLabel(operator),
|
|
866
870
|
valueMode: OPERATOR_VALUE_MODE[operator] ?? 'single',
|
|
867
871
|
});
|
|
868
872
|
continue;
|
|
@@ -876,8 +880,7 @@ function mapAllowedOperators(schema) {
|
|
|
876
880
|
label: operator.display?.display ||
|
|
877
881
|
operator.display?.en ||
|
|
878
882
|
operator.display?.ar ||
|
|
879
|
-
|
|
880
|
-
toLabel(key),
|
|
883
|
+
getLabel(key),
|
|
881
884
|
valueMode: OPERATOR_VALUE_MODE[key] ?? 'single',
|
|
882
885
|
});
|
|
883
886
|
}
|
|
@@ -886,8 +889,11 @@ function mapAllowedOperators(schema) {
|
|
|
886
889
|
class WorkCenterPage {
|
|
887
890
|
facade = inject(WorkCenterFacade);
|
|
888
891
|
modal = inject(ModalService);
|
|
892
|
+
transloco = inject(TranslocoService);
|
|
893
|
+
destroyRef = inject(DestroyRef);
|
|
894
|
+
activeLang = signal(this.transloco.getActiveLang(), ...(ngDevMode ? [{ debugName: "activeLang" }] : []));
|
|
889
895
|
area = input('MyInbox', ...(ngDevMode ? [{ debugName: "area" }] : []));
|
|
890
|
-
pageTitle = input('
|
|
896
|
+
pageTitle = input('', ...(ngDevMode ? [{ debugName: "pageTitle" }] : []));
|
|
891
897
|
menuIcon = input('communication.inbox-01', ...(ngDevMode ? [{ debugName: "menuIcon" }] : []));
|
|
892
898
|
lookups = input([], ...(ngDevMode ? [{ debugName: "lookups" }] : []));
|
|
893
899
|
openItemsInModal = input(true, ...(ngDevMode ? [{ debugName: "openItemsInModal" }] : []));
|
|
@@ -910,10 +916,11 @@ class WorkCenterPage {
|
|
|
910
916
|
sortable: true,
|
|
911
917
|
})), ...(ngDevMode ? [{ debugName: "tableColumns" }] : []));
|
|
912
918
|
propertyFilterSchema = computed(() => {
|
|
919
|
+
this.activeLang();
|
|
913
920
|
const schema = this.runtimeFilterSchema();
|
|
914
921
|
if (schema) {
|
|
915
922
|
const allowedFields = mapAllowedFields(schema);
|
|
916
|
-
const allowedOperators = mapAllowedOperators(schema);
|
|
923
|
+
const allowedOperators = mapAllowedOperators(schema, (key) => this.getOpLabel(key));
|
|
917
924
|
if (allowedFields.length && allowedOperators.length) {
|
|
918
925
|
return { allowedFields, allowedOperators };
|
|
919
926
|
}
|
|
@@ -930,7 +937,7 @@ class WorkCenterPage {
|
|
|
930
937
|
}
|
|
931
938
|
const fallbackOperators = Object.keys(OPERATOR_LABELS).map((key) => ({
|
|
932
939
|
key,
|
|
933
|
-
label:
|
|
940
|
+
label: this.getOpLabel(key),
|
|
934
941
|
valueMode: OPERATOR_VALUE_MODE[key] ?? 'single',
|
|
935
942
|
}));
|
|
936
943
|
return {
|
|
@@ -939,11 +946,23 @@ class WorkCenterPage {
|
|
|
939
946
|
};
|
|
940
947
|
}, ...(ngDevMode ? [{ debugName: "propertyFilterSchema" }] : []));
|
|
941
948
|
showGeneralTaskCreateButton = computed(() => GENERAL_TASK_CARD_KEYS.has(normalizeCardKey(this.context().selectedCardKey)), ...(ngDevMode ? [{ debugName: "showGeneralTaskCreateButton" }] : []));
|
|
942
|
-
generalTaskButtonLabel = computed(() =>
|
|
949
|
+
generalTaskButtonLabel = computed(() => {
|
|
950
|
+
this.activeLang();
|
|
951
|
+
return (this.generalTaskModal()?.buttonLabel?.trim() ||
|
|
952
|
+
this.transloco.translate('workCenter.page.new'));
|
|
953
|
+
}, ...(ngDevMode ? [{ debugName: "generalTaskButtonLabel" }] : []));
|
|
954
|
+
resolvedPageTitle = computed(() => {
|
|
955
|
+
this.activeLang();
|
|
956
|
+
return (this.pageTitle() ||
|
|
957
|
+
this.transloco.translate('workCenter.page.title'));
|
|
958
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedPageTitle" }] : []));
|
|
943
959
|
generalTaskButtonIcon = computed(() => this.generalTaskModal()?.buttonIcon?.trim() || 'general.plus', ...(ngDevMode ? [{ debugName: "generalTaskButtonIcon" }] : []));
|
|
944
960
|
defaultModalStyleClass = '!w-[96vw] xl:!w-[calc(100%-8rem)] 2xl:!w-[calc(100%-12rem)] !shadow-none';
|
|
945
961
|
defaultGeneralTaskModalStyleClass = '!w-[70vw] !h-[90vh]';
|
|
946
962
|
constructor() {
|
|
963
|
+
this.transloco.langChanges$
|
|
964
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
965
|
+
.subscribe((lang) => this.activeLang.set(lang));
|
|
947
966
|
effect(() => {
|
|
948
967
|
this.facade.setLookups(this.lookups());
|
|
949
968
|
});
|
|
@@ -979,7 +998,8 @@ class WorkCenterPage {
|
|
|
979
998
|
moduleKey: 'GeneralTask',
|
|
980
999
|
...(modalOptions?.data ?? {}),
|
|
981
1000
|
};
|
|
982
|
-
const modalHeader = modalOptions?.header ??
|
|
1001
|
+
const modalHeader = modalOptions?.header ??
|
|
1002
|
+
this.transloco.translate('workCenter.page.create');
|
|
983
1003
|
const modalStyleClass = modalOptions?.styleClass ?? this.defaultGeneralTaskModalStyleClass;
|
|
984
1004
|
const operationKey = modalOptions?.operationKey ?? 'Create';
|
|
985
1005
|
const lookups = modalOptions?.lookups ?? this.lookups();
|
|
@@ -1020,7 +1040,8 @@ class WorkCenterPage {
|
|
|
1020
1040
|
return;
|
|
1021
1041
|
}
|
|
1022
1042
|
this.modal.openModal(modalOptions.component, 'drawer', {
|
|
1023
|
-
header: modalOptions?.header ??
|
|
1043
|
+
header: modalOptions?.header ??
|
|
1044
|
+
this.transloco.translate('workCenter.page.itemDetails'),
|
|
1024
1045
|
styleClass: modalOptions?.styleClass ?? this.defaultModalStyleClass,
|
|
1025
1046
|
position: modalOptions?.position ?? 'end',
|
|
1026
1047
|
dismissible: true,
|
|
@@ -1030,6 +1051,11 @@ class WorkCenterPage {
|
|
|
1030
1051
|
});
|
|
1031
1052
|
}
|
|
1032
1053
|
rowsClickable = computed(() => this.openItemsInModal(), ...(ngDevMode ? [{ debugName: "rowsClickable" }] : []));
|
|
1054
|
+
getOpLabel(key) {
|
|
1055
|
+
return (this.transloco.translate('workCenter.operator.' + key) ||
|
|
1056
|
+
OPERATOR_LABELS[key] ||
|
|
1057
|
+
toLabel(key));
|
|
1058
|
+
}
|
|
1033
1059
|
resolveRowContextKey(row) {
|
|
1034
1060
|
const value = row['contextKey'];
|
|
1035
1061
|
if (typeof value !== 'string') {
|
|
@@ -1039,7 +1065,7 @@ class WorkCenterPage {
|
|
|
1039
1065
|
return normalized.length ? normalized : null;
|
|
1040
1066
|
}
|
|
1041
1067
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1042
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", 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]=\"
|
|
1068
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", 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 (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\" borderRadius=\"1rem\" />\r\n }\r\n </div>\r\n } @else if (kpis().length) {\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 (kpi of kpis(); track $index) {\r\n <mt-statistic-card [data]=\"kpi\" cardClass=\"shadow-sm\" />\r\n }\r\n </div>\r\n }\r\n\r\n <mt-table\r\n [data]=\"rows()\"\r\n [columns]=\"tableColumns()\"\r\n [lazy]=\"true\"\r\n [lazyLocalSearch]=\"true\"\r\n [lazyLocalSort]=\"true\"\r\n [clickableRows]=\"rowsClickable()\"\r\n [loading]=\"loading()\"\r\n [lazyTotalRecords]=\"totalCount()\"\r\n [showFilters]=\"false\"\r\n [generalSearch]=\"true\"\r\n [exportable]=\"true\"\r\n [pageSize]=\"context().pageSize\"\r\n [currentPage]=\"tableCurrentPage()\"\r\n [first]=\"tableFirst()\"\r\n (lazyLoad)=\"onLazyLoad($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"], 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", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "exportable", "exportFilename", "actionShape", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "pageSize", "currentPage", "first", "filterTerm"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
|
|
1043
1069
|
}
|
|
1044
1070
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterPage, decorators: [{
|
|
1045
1071
|
type: Component,
|
|
@@ -1051,7 +1077,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1051
1077
|
StatisticCard,
|
|
1052
1078
|
Table,
|
|
1053
1079
|
SkeletonModule,
|
|
1054
|
-
], template: "<mt-client-page\r\n [menuIcon]=\"menuIcon()\"\r\n [menuTitle]=\"
|
|
1080
|
+
], 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 (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\" borderRadius=\"1rem\" />\r\n }\r\n </div>\r\n } @else if (kpis().length) {\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 (kpi of kpis(); track $index) {\r\n <mt-statistic-card [data]=\"kpi\" cardClass=\"shadow-sm\" />\r\n }\r\n </div>\r\n }\r\n\r\n <mt-table\r\n [data]=\"rows()\"\r\n [columns]=\"tableColumns()\"\r\n [lazy]=\"true\"\r\n [lazyLocalSearch]=\"true\"\r\n [lazyLocalSort]=\"true\"\r\n [clickableRows]=\"rowsClickable()\"\r\n [loading]=\"loading()\"\r\n [lazyTotalRecords]=\"totalCount()\"\r\n [showFilters]=\"false\"\r\n [generalSearch]=\"true\"\r\n [exportable]=\"true\"\r\n [pageSize]=\"context().pageSize\"\r\n [currentPage]=\"tableCurrentPage()\"\r\n [first]=\"tableFirst()\"\r\n (lazyLoad)=\"onLazyLoad($event)\"\r\n (rowClick)=\"onRowClick($event)\"\r\n />\r\n </div>\r\n</mt-client-page>\r\n" }]
|
|
1055
1081
|
}], 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"] }] } });
|
|
1056
1082
|
|
|
1057
1083
|
function readItemContext(details) {
|
|
@@ -1082,23 +1108,30 @@ function readString$1(source, key) {
|
|
|
1082
1108
|
|
|
1083
1109
|
class WorkCenterEscalationInstanceType {
|
|
1084
1110
|
http = inject(HttpClient);
|
|
1111
|
+
transloco = inject(TranslocoService);
|
|
1112
|
+
destroyRef = inject(DestroyRef);
|
|
1085
1113
|
loadSub;
|
|
1086
1114
|
details = input.required(...(ngDevMode ? [{ debugName: "details" }] : []));
|
|
1087
1115
|
activeTab = signal('escalationDetails', ...(ngDevMode ? [{ debugName: "activeTab" }] : []));
|
|
1116
|
+
activeLang = signal(this.transloco.getActiveLang(), ...(ngDevMode ? [{ debugName: "activeLang" }] : []));
|
|
1117
|
+
tabOptions = computed(() => {
|
|
1118
|
+
this.activeLang();
|
|
1119
|
+
return [
|
|
1120
|
+
{
|
|
1121
|
+
label: this.transloco.translate('workCenter.tabs.escalationDetails'),
|
|
1122
|
+
value: 'escalationDetails',
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
label: this.transloco.translate('workCenter.tabs.schema'),
|
|
1126
|
+
value: 'schema',
|
|
1127
|
+
},
|
|
1128
|
+
];
|
|
1129
|
+
}, ...(ngDevMode ? [{ debugName: "tabOptions" }] : []));
|
|
1088
1130
|
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
1089
1131
|
error = signal(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
1090
1132
|
preview = signal(null, ...(ngDevMode ? [{ debugName: "preview" }] : []));
|
|
1091
|
-
tabOptions = [
|
|
1092
|
-
{
|
|
1093
|
-
label: 'Escalation Details',
|
|
1094
|
-
value: 'escalationDetails',
|
|
1095
|
-
},
|
|
1096
|
-
{
|
|
1097
|
-
label: 'Schema',
|
|
1098
|
-
value: 'schema',
|
|
1099
|
-
},
|
|
1100
|
-
];
|
|
1101
1133
|
detailEntities = computed(() => {
|
|
1134
|
+
this.activeLang();
|
|
1102
1135
|
const preview = this.preview();
|
|
1103
1136
|
if (!preview) {
|
|
1104
1137
|
return [];
|
|
@@ -1106,7 +1139,7 @@ class WorkCenterEscalationInstanceType {
|
|
|
1106
1139
|
return [
|
|
1107
1140
|
{
|
|
1108
1141
|
key: 'initiatedBy',
|
|
1109
|
-
name: '
|
|
1142
|
+
name: this.transloco.translate('workCenter.entity.initiatedBy'),
|
|
1110
1143
|
value: mapUserValue(preview.initiatedBy),
|
|
1111
1144
|
viewType: 'User',
|
|
1112
1145
|
order: 1,
|
|
@@ -1114,7 +1147,7 @@ class WorkCenterEscalationInstanceType {
|
|
|
1114
1147
|
},
|
|
1115
1148
|
{
|
|
1116
1149
|
key: 'startedAt',
|
|
1117
|
-
name: '
|
|
1150
|
+
name: this.transloco.translate('workCenter.entity.startedAt'),
|
|
1118
1151
|
value: resolveDisplayValue(preview.startedAt),
|
|
1119
1152
|
rawValue: resolveRawValue(preview.startedAt),
|
|
1120
1153
|
viewType: 'DateTime',
|
|
@@ -1123,7 +1156,7 @@ class WorkCenterEscalationInstanceType {
|
|
|
1123
1156
|
},
|
|
1124
1157
|
{
|
|
1125
1158
|
key: 'reason',
|
|
1126
|
-
name: '
|
|
1159
|
+
name: this.transloco.translate('workCenter.entity.reason'),
|
|
1127
1160
|
value: preview.reason ?? '',
|
|
1128
1161
|
viewType: 'LongText',
|
|
1129
1162
|
order: 3,
|
|
@@ -1131,7 +1164,7 @@ class WorkCenterEscalationInstanceType {
|
|
|
1131
1164
|
},
|
|
1132
1165
|
{
|
|
1133
1166
|
key: 'attachments',
|
|
1134
|
-
name: '
|
|
1167
|
+
name: this.transloco.translate('workCenter.entity.attachments'),
|
|
1135
1168
|
value: mapAttachments(preview.attachments),
|
|
1136
1169
|
viewType: 'Attachment',
|
|
1137
1170
|
order: 4,
|
|
@@ -1139,11 +1172,15 @@ class WorkCenterEscalationInstanceType {
|
|
|
1139
1172
|
},
|
|
1140
1173
|
];
|
|
1141
1174
|
}, ...(ngDevMode ? [{ debugName: "detailEntities" }] : []));
|
|
1142
|
-
schemaNodes = computed(() =>
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1175
|
+
schemaNodes = computed(() => {
|
|
1176
|
+
this.activeLang();
|
|
1177
|
+
return resolveSchemaSteps(this.preview()).map((step) => ({
|
|
1178
|
+
id: String(step.id),
|
|
1179
|
+
name: resolveTranslatable(step.name) ||
|
|
1180
|
+
`${this.transloco.translate('workCenter.entity.step')} ${step.id}`,
|
|
1181
|
+
color: step.isFinal ? '#059669' : step.isInitial ? '#2563eb' : '#0f172a',
|
|
1182
|
+
}));
|
|
1183
|
+
}, ...(ngDevMode ? [{ debugName: "schemaNodes" }] : []));
|
|
1147
1184
|
schemaConnections = computed(() => (this.preview()?.schema?.connections ?? []).map((connection, index) => ({
|
|
1148
1185
|
id: String(connection.id ?? `${connection.source}-${connection.target}-${index}`),
|
|
1149
1186
|
from: String(connection.source),
|
|
@@ -1157,6 +1194,9 @@ class WorkCenterEscalationInstanceType {
|
|
|
1157
1194
|
canRenderDetails = computed(() => this.resolvedInstanceId() > 0, ...(ngDevMode ? [{ debugName: "canRenderDetails" }] : []));
|
|
1158
1195
|
canRenderDiscussion = computed(() => this.resolvedInstanceId() > 0, ...(ngDevMode ? [{ debugName: "canRenderDiscussion" }] : []));
|
|
1159
1196
|
constructor() {
|
|
1197
|
+
this.transloco.langChanges$
|
|
1198
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1199
|
+
.subscribe((lang) => this.activeLang.set(lang));
|
|
1160
1200
|
effect(() => {
|
|
1161
1201
|
const instanceId = this.resolvedInstanceId();
|
|
1162
1202
|
if (instanceId > 0) {
|
|
@@ -1186,22 +1226,23 @@ class WorkCenterEscalationInstanceType {
|
|
|
1186
1226
|
this.preview.set(null);
|
|
1187
1227
|
this.error.set(error?.error?.message ??
|
|
1188
1228
|
error?.message ??
|
|
1189
|
-
'
|
|
1229
|
+
this.transloco.translate('workCenter.error.failedLoadEscalation'));
|
|
1190
1230
|
},
|
|
1191
1231
|
});
|
|
1192
1232
|
}
|
|
1193
1233
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterEscalationInstanceType, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1194
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterEscalationInstanceType, isStandalone: true, selector: "mt-work-center-escalation-instance-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null } }, 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>\r\n @if (tabOptions.length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'escalationDetails'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg:min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n @if (canRenderDetails()) {\r\n @if (loading()) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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
|
|
1234
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterEscalationInstanceType, isStandalone: true, selector: "mt-work-center-escalation-instance-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null } }, 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 @if (tabOptions().length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions()\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'escalationDetails'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg:min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n @if (canRenderDetails()) {\r\n @if (loading()) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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(\"loading.escalationDetails\") }}\r\n </p>\r\n </div>\r\n } @else if (error(); as error) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl border border-dashed border-red-300 bg-red-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-red-600\">\r\n {{ error }}\r\n </p>\r\n </div>\r\n } @else if (preview()) {\r\n <mt-entities-preview [entities]=\"detailEntities()\" />\r\n }\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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.escalationDetailsUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"min-w-0 overflow-hidden rounded-2xl border border-surface-200 bg-surface-50 lg:min-h-0\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div class=\"h-[32rem] min-h-[22rem] lg:h-full lg:min-h-0\">\r\n <mt-discussion-thread\r\n [moduleType]=\"'EscalationInstance'\"\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 h-full min-h-[22rem] items-center justify-center rounded-2xl 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.escalationDiscussionUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"flex-1 min-h-0 overflow-auto\" [hidden]=\"activeTab() !== 'schema'\">\r\n @if (canRenderDetails()) {\r\n @if (loading()) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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(\"loading.escalationSchema\") }}\r\n </p>\r\n </div>\r\n } @else if (error(); as error) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl border border-dashed border-red-300 bg-red-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-red-600\">\r\n {{ error }}\r\n </p>\r\n </div>\r\n } @else if (hasSchema()) {\r\n <div class=\"h-[70vh] overflow-hidden rounded-2xl\">\r\n <mt-structure-builder\r\n class=\"h-full\"\r\n [readonly]=\"true\"\r\n [nodes]=\"schemaNodes()\"\r\n [connections]=\"schemaConnections()\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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.escalationSchemaUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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.escalationSchemaContextUnavailable\") }}\r\n </p>\r\n </div>\r\n }\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", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { 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: EntitiesPreview, selector: "mt-entities-preview", inputs: ["entities", "attachmentShape"] }, { kind: "component", type: StructureBuilder, selector: "mt-structure-builder", inputs: ["availableNodes", "nodeForm", "nodeDialogFooterConfig", "connectionForm", "connectionFormulaSchemaId", "connectionFormulaConfig", "nodeActions", "nodeFields", "isAutoLayout", "readonly", "addModalType", "updateModalType", "addModalStyleClass", "updateModalStyleClass", "addModalHeader", "updateModalHeader", "appendTo", "availableTabsClass", "layoutDirection", "nodes", "connections", "nodeTemplate"], outputs: ["nodeActionsEvent", "action", "nodesChange", "connectionsChange"] }] });
|
|
1195
1235
|
}
|
|
1196
1236
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterEscalationInstanceType, decorators: [{
|
|
1197
1237
|
type: Component,
|
|
1198
1238
|
args: [{ selector: 'mt-work-center-escalation-instance-type', standalone: true, imports: [
|
|
1199
1239
|
CommonModule,
|
|
1240
|
+
TranslocoDirective,
|
|
1200
1241
|
Tabs,
|
|
1201
1242
|
DiscussionThread,
|
|
1202
1243
|
EntitiesPreview,
|
|
1203
1244
|
StructureBuilder,
|
|
1204
|
-
], 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>\r\n @if (tabOptions.length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'escalationDetails'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg:min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n @if (canRenderDetails()) {\r\n @if (loading()) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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
|
|
1245
|
+
], 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 @if (tabOptions().length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions()\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'escalationDetails'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg:min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n @if (canRenderDetails()) {\r\n @if (loading()) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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(\"loading.escalationDetails\") }}\r\n </p>\r\n </div>\r\n } @else if (error(); as error) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl border border-dashed border-red-300 bg-red-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-red-600\">\r\n {{ error }}\r\n </p>\r\n </div>\r\n } @else if (preview()) {\r\n <mt-entities-preview [entities]=\"detailEntities()\" />\r\n }\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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.escalationDetailsUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"min-w-0 overflow-hidden rounded-2xl border border-surface-200 bg-surface-50 lg:min-h-0\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div class=\"h-[32rem] min-h-[22rem] lg:h-full lg:min-h-0\">\r\n <mt-discussion-thread\r\n [moduleType]=\"'EscalationInstance'\"\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 h-full min-h-[22rem] items-center justify-center rounded-2xl 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.escalationDiscussionUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"flex-1 min-h-0 overflow-auto\" [hidden]=\"activeTab() !== 'schema'\">\r\n @if (canRenderDetails()) {\r\n @if (loading()) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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(\"loading.escalationSchema\") }}\r\n </p>\r\n </div>\r\n } @else if (error(); as error) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl border border-dashed border-red-300 bg-red-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-red-600\">\r\n {{ error }}\r\n </p>\r\n </div>\r\n } @else if (hasSchema()) {\r\n <div class=\"h-[70vh] overflow-hidden rounded-2xl\">\r\n <mt-structure-builder\r\n class=\"h-full\"\r\n [readonly]=\"true\"\r\n [nodes]=\"schemaNodes()\"\r\n [connections]=\"schemaConnections()\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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.escalationSchemaUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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.escalationSchemaContextUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
1205
1246
|
}], ctorParameters: () => [], propDecorators: { details: [{ type: i0.Input, args: [{ isSignal: true, alias: "details", required: true }] }] } });
|
|
1206
1247
|
function mapUserValue(value) {
|
|
1207
1248
|
if (!value || typeof value !== 'object') {
|
|
@@ -1286,16 +1327,22 @@ class WorkCenterModuleType {
|
|
|
1286
1327
|
actionContext = inject(WorkCenterItemActionContextStore, {
|
|
1287
1328
|
optional: true,
|
|
1288
1329
|
});
|
|
1330
|
+
transloco = inject(TranslocoService);
|
|
1331
|
+
destroyRef = inject(DestroyRef);
|
|
1289
1332
|
details = input.required(...(ngDevMode ? [{ debugName: "details" }] : []));
|
|
1290
1333
|
clientForm = viewChild(ClientForm, ...(ngDevMode ? [{ debugName: "clientForm" }] : []));
|
|
1291
1334
|
lookups = this.facade.lookups;
|
|
1292
1335
|
activeTab = signal('details', ...(ngDevMode ? [{ debugName: "activeTab" }] : []));
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1336
|
+
activeLang = signal(this.transloco.getActiveLang(), ...(ngDevMode ? [{ debugName: "activeLang" }] : []));
|
|
1337
|
+
tabOptions = computed(() => {
|
|
1338
|
+
this.activeLang();
|
|
1339
|
+
return [
|
|
1340
|
+
{
|
|
1341
|
+
label: this.transloco.translate('workCenter.tabs.details'),
|
|
1342
|
+
value: 'details',
|
|
1343
|
+
},
|
|
1344
|
+
];
|
|
1345
|
+
}, ...(ngDevMode ? [{ debugName: "tabOptions" }] : []));
|
|
1299
1346
|
itemContext = computed(() => readItemContext(this.details()), ...(ngDevMode ? [{ debugName: "itemContext" }] : []));
|
|
1300
1347
|
instanceId = computed(() => readNumber(this.itemContext(), 'instanceId'), ...(ngDevMode ? [{ debugName: "instanceId" }] : []));
|
|
1301
1348
|
moduleId = computed(() => readNumber(this.itemContext(), 'moduleId'), ...(ngDevMode ? [{ debugName: "moduleId" }] : []));
|
|
@@ -1313,6 +1360,9 @@ class WorkCenterModuleType {
|
|
|
1313
1360
|
canRenderDiscussion = computed(() => this.resolvedInstanceId() > 0 &&
|
|
1314
1361
|
this.discussionModuleType().trim().length > 0, ...(ngDevMode ? [{ debugName: "canRenderDiscussion" }] : []));
|
|
1315
1362
|
constructor() {
|
|
1363
|
+
this.transloco.langChanges$
|
|
1364
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1365
|
+
.subscribe((lang) => this.activeLang.set(lang));
|
|
1316
1366
|
effect(() => {
|
|
1317
1367
|
this.actionContext?.setClientForm(this.clientForm() ?? null);
|
|
1318
1368
|
});
|
|
@@ -1321,11 +1371,17 @@ class WorkCenterModuleType {
|
|
|
1321
1371
|
this.actionContext?.setClientForm(null);
|
|
1322
1372
|
}
|
|
1323
1373
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterModuleType, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1324
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", 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>\r\n @if (tabOptions.length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'details'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg: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-2xl 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
|
|
1374
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", 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 @if (tabOptions().length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions()\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'details'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg: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-2xl 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\r\n <div\r\n class=\"min-w-0 overflow-hidden rounded-2xl border border-surface-200 bg-surface-50 lg:min-h-0\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div class=\"h-[32rem] min-h-[22rem] lg:h-full lg:min-h-0\">\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 h-full min-h-[22rem] items-center justify-center rounded-2xl 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", "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", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "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"] }] });
|
|
1325
1375
|
}
|
|
1326
1376
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterModuleType, decorators: [{
|
|
1327
1377
|
type: Component,
|
|
1328
|
-
args: [{ selector: 'mt-work-center-module-type', standalone: true, imports: [
|
|
1378
|
+
args: [{ selector: 'mt-work-center-module-type', standalone: true, imports: [
|
|
1379
|
+
CommonModule,
|
|
1380
|
+
TranslocoDirective,
|
|
1381
|
+
Tabs,
|
|
1382
|
+
ClientForm,
|
|
1383
|
+
DiscussionThread,
|
|
1384
|
+
], 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 @if (tabOptions().length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions()\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'details'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg: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-2xl 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\r\n <div\r\n class=\"min-w-0 overflow-hidden rounded-2xl border border-surface-200 bg-surface-50 lg:min-h-0\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div class=\"h-[32rem] min-h-[22rem] lg:h-full lg:min-h-0\">\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 h-full min-h-[22rem] items-center justify-center rounded-2xl 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" }]
|
|
1329
1385
|
}], ctorParameters: () => [], propDecorators: { details: [{ type: i0.Input, args: [{ isSignal: true, alias: "details", required: true }] }], clientForm: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ClientForm), { isSignal: true }] }] } });
|
|
1330
1386
|
|
|
1331
1387
|
class WorkCenterProcessPreview {
|
|
@@ -1441,24 +1497,30 @@ class WorkCenterProcessRequestType {
|
|
|
1441
1497
|
actionContext = inject(WorkCenterItemActionContextStore, {
|
|
1442
1498
|
optional: true,
|
|
1443
1499
|
});
|
|
1500
|
+
transloco = inject(TranslocoService);
|
|
1501
|
+
destroyRef = inject(DestroyRef);
|
|
1444
1502
|
details = input.required(...(ngDevMode ? [{ debugName: "details" }] : []));
|
|
1445
1503
|
clientForm = viewChild(ClientForm, ...(ngDevMode ? [{ debugName: "clientForm" }] : []));
|
|
1446
1504
|
lookups = this.facade.lookups;
|
|
1447
1505
|
activeTab = signal('requestDetails', ...(ngDevMode ? [{ debugName: "activeTab" }] : []));
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1506
|
+
activeLang = signal(this.transloco.getActiveLang(), ...(ngDevMode ? [{ debugName: "activeLang" }] : []));
|
|
1507
|
+
tabOptions = computed(() => {
|
|
1508
|
+
this.activeLang();
|
|
1509
|
+
return [
|
|
1510
|
+
{
|
|
1511
|
+
label: this.transloco.translate('workCenter.tabs.requestDetails'),
|
|
1512
|
+
value: 'requestDetails',
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
label: this.transloco.translate('workCenter.tabs.approvals'),
|
|
1516
|
+
value: 'approvals',
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
label: this.transloco.translate('workCenter.tabs.steps'),
|
|
1520
|
+
value: 'schema',
|
|
1521
|
+
},
|
|
1522
|
+
];
|
|
1523
|
+
}, ...(ngDevMode ? [{ debugName: "tabOptions" }] : []));
|
|
1462
1524
|
itemContext = computed(() => readItemContext(this.details()), ...(ngDevMode ? [{ debugName: "itemContext" }] : []));
|
|
1463
1525
|
requestId = computed(() => readNumber(this.itemContext(), 'requestId') ??
|
|
1464
1526
|
readNumber(this.itemContext(), 'draftProcessId'), ...(ngDevMode ? [{ debugName: "requestId" }] : []));
|
|
@@ -1476,6 +1538,9 @@ class WorkCenterProcessRequestType {
|
|
|
1476
1538
|
canRenderDiscussion = computed(() => this.discussionRecordId() > 0, ...(ngDevMode ? [{ debugName: "canRenderDiscussion" }] : []));
|
|
1477
1539
|
canRenderPreview = computed(() => (this.requestId() ?? 0) > 0, ...(ngDevMode ? [{ debugName: "canRenderPreview" }] : []));
|
|
1478
1540
|
constructor() {
|
|
1541
|
+
this.transloco.langChanges$
|
|
1542
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1543
|
+
.subscribe((lang) => this.activeLang.set(lang));
|
|
1479
1544
|
effect(() => {
|
|
1480
1545
|
this.actionContext?.setClientForm(this.clientForm() ?? null);
|
|
1481
1546
|
});
|
|
@@ -1484,17 +1549,18 @@ class WorkCenterProcessRequestType {
|
|
|
1484
1549
|
this.actionContext?.setClientForm(null);
|
|
1485
1550
|
}
|
|
1486
1551
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterProcessRequestType, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1487
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", 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>\r\n @if (tabOptions.length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'requestDetails'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg: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-2xl 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 Process form context is not available for this item yet.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"min-w-0 overflow-hidden rounded-2xl border border-surface-200 bg-surface-50 lg:min-h-0\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div class=\"h-[32rem] min-h-[22rem] lg:h-full lg:min-h-0\">\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 h-full min-h-[22rem] items-center justify-center rounded-2xl 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
|
|
1552
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", 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 @if (tabOptions().length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions()\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'requestDetails'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg: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-2xl 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 Process form context is not available for this item yet.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"min-w-0 overflow-hidden rounded-2xl border border-surface-200 bg-surface-50 lg:min-h-0\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div class=\"h-[32rem] min-h-[22rem] lg:h-full lg:min-h-0\">\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 h-full min-h-[22rem] items-center justify-center rounded-2xl 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 </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-2xl 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 class=\"flex-1 min-h-0 overflow-auto\" [hidden]=\"activeTab() !== 'schema'\">\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-2xl 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</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", "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", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "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"] }] });
|
|
1488
1553
|
}
|
|
1489
1554
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterProcessRequestType, decorators: [{
|
|
1490
1555
|
type: Component,
|
|
1491
1556
|
args: [{ selector: 'mt-work-center-process-request-type', standalone: true, imports: [
|
|
1492
1557
|
CommonModule,
|
|
1558
|
+
TranslocoDirective,
|
|
1493
1559
|
Tabs,
|
|
1494
1560
|
ClientForm,
|
|
1495
1561
|
DiscussionThread,
|
|
1496
1562
|
WorkCenterProcessPreview,
|
|
1497
|
-
], 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>\r\n @if (tabOptions.length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'requestDetails'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg: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-2xl 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 Process form context is not available for this item yet.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"min-w-0 overflow-hidden rounded-2xl border border-surface-200 bg-surface-50 lg:min-h-0\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div class=\"h-[32rem] min-h-[22rem] lg:h-full lg:min-h-0\">\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 h-full min-h-[22rem] items-center justify-center rounded-2xl 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
|
|
1563
|
+
], 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 @if (tabOptions().length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions()\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'requestDetails'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg: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-2xl 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 Process form context is not available for this item yet.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"min-w-0 overflow-hidden rounded-2xl border border-surface-200 bg-surface-50 lg:min-h-0\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div class=\"h-[32rem] min-h-[22rem] lg:h-full lg:min-h-0\">\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 h-full min-h-[22rem] items-center justify-center rounded-2xl 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 </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-2xl 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 class=\"flex-1 min-h-0 overflow-auto\" [hidden]=\"activeTab() !== 'schema'\">\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-2xl 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</div>\r\n" }]
|
|
1498
1564
|
}], ctorParameters: () => [], propDecorators: { details: [{ type: i0.Input, args: [{ isSignal: true, alias: "details", required: true }] }], clientForm: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ClientForm), { isSignal: true }] }] } });
|
|
1499
1565
|
|
|
1500
1566
|
class WorkCenterProcessStepType {
|
|
@@ -1502,24 +1568,30 @@ class WorkCenterProcessStepType {
|
|
|
1502
1568
|
actionContext = inject(WorkCenterItemActionContextStore, {
|
|
1503
1569
|
optional: true,
|
|
1504
1570
|
});
|
|
1571
|
+
transloco = inject(TranslocoService);
|
|
1572
|
+
destroyRef = inject(DestroyRef);
|
|
1505
1573
|
details = input.required(...(ngDevMode ? [{ debugName: "details" }] : []));
|
|
1506
1574
|
clientForm = viewChild(ClientForm, ...(ngDevMode ? [{ debugName: "clientForm" }] : []));
|
|
1507
1575
|
lookups = this.facade.lookups;
|
|
1508
1576
|
activeTab = signal('form', ...(ngDevMode ? [{ debugName: "activeTab" }] : []));
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1577
|
+
activeLang = signal(this.transloco.getActiveLang(), ...(ngDevMode ? [{ debugName: "activeLang" }] : []));
|
|
1578
|
+
tabOptions = computed(() => {
|
|
1579
|
+
this.activeLang();
|
|
1580
|
+
return [
|
|
1581
|
+
{
|
|
1582
|
+
label: this.transloco.translate('workCenter.tabs.form'),
|
|
1583
|
+
value: 'form',
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
label: this.transloco.translate('workCenter.tabs.approvals'),
|
|
1587
|
+
value: 'approvals',
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
label: this.transloco.translate('workCenter.tabs.steps'),
|
|
1591
|
+
value: 'schema',
|
|
1592
|
+
},
|
|
1593
|
+
];
|
|
1594
|
+
}, ...(ngDevMode ? [{ debugName: "tabOptions" }] : []));
|
|
1523
1595
|
itemContext = computed(() => readItemContext(this.details()), ...(ngDevMode ? [{ debugName: "itemContext" }] : []));
|
|
1524
1596
|
requestId = computed(() => readNumber(this.itemContext(), 'requestId') ??
|
|
1525
1597
|
readNumber(this.itemContext(), 'draftProcessId'), ...(ngDevMode ? [{ debugName: "requestId" }] : []));
|
|
@@ -1537,6 +1609,9 @@ class WorkCenterProcessStepType {
|
|
|
1537
1609
|
canRenderDiscussion = computed(() => this.discussionRecordId() > 0, ...(ngDevMode ? [{ debugName: "canRenderDiscussion" }] : []));
|
|
1538
1610
|
canRenderPreview = computed(() => (this.requestId() ?? 0) > 0, ...(ngDevMode ? [{ debugName: "canRenderPreview" }] : []));
|
|
1539
1611
|
constructor() {
|
|
1612
|
+
this.transloco.langChanges$
|
|
1613
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1614
|
+
.subscribe((lang) => this.activeLang.set(lang));
|
|
1540
1615
|
effect(() => {
|
|
1541
1616
|
this.actionContext?.setClientForm(this.clientForm() ?? null);
|
|
1542
1617
|
});
|
|
@@ -1545,53 +1620,66 @@ class WorkCenterProcessStepType {
|
|
|
1545
1620
|
this.actionContext?.setClientForm(null);
|
|
1546
1621
|
}
|
|
1547
1622
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterProcessStepType, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1548
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", 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>\r\n @if (tabOptions.length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'form'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg: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-2xl 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
|
|
1623
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", 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 @if (tabOptions().length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions()\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'form'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg: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-2xl 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\r\n <div\r\n class=\"min-w-0 overflow-hidden rounded-2xl border border-surface-200 bg-surface-50 lg:min-h-0\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div class=\"h-[32rem] min-h-[22rem] lg:h-full lg:min-h-0\">\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 h-full min-h-[22rem] items-center justify-center rounded-2xl 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\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-2xl 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 class=\"flex-1 min-h-0 overflow-auto\" [hidden]=\"activeTab() !== 'schema'\">\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-2xl 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</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", "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", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "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"] }] });
|
|
1549
1624
|
}
|
|
1550
1625
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterProcessStepType, decorators: [{
|
|
1551
1626
|
type: Component,
|
|
1552
1627
|
args: [{ selector: 'mt-work-center-process-step-type', standalone: true, imports: [
|
|
1553
1628
|
CommonModule,
|
|
1629
|
+
TranslocoDirective,
|
|
1554
1630
|
Tabs,
|
|
1555
1631
|
ClientForm,
|
|
1556
1632
|
DiscussionThread,
|
|
1557
1633
|
WorkCenterProcessPreview,
|
|
1558
|
-
], 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>\r\n @if (tabOptions.length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'form'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg: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-2xl 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
|
|
1634
|
+
], 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 @if (tabOptions().length > 1) {\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions()\" />\r\n }\r\n\r\n <div\r\n class=\"flex-1 min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'form'\"\r\n >\r\n <div\r\n class=\"grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(22rem,26rem)] lg:items-stretch xl:grid-cols-[minmax(0,1fr)_28rem]\"\r\n >\r\n <div\r\n class=\"min-w-0 lg: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-2xl 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\r\n <div\r\n class=\"min-w-0 overflow-hidden rounded-2xl border border-surface-200 bg-surface-50 lg:min-h-0\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div class=\"h-[32rem] min-h-[22rem] lg:h-full lg:min-h-0\">\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 h-full min-h-[22rem] items-center justify-center rounded-2xl 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\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-2xl 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 class=\"flex-1 min-h-0 overflow-auto\" [hidden]=\"activeTab() !== 'schema'\">\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-2xl 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</div>\r\n" }]
|
|
1559
1635
|
}], ctorParameters: () => [], propDecorators: { details: [{ type: i0.Input, args: [{ isSignal: true, alias: "details", required: true }] }], clientForm: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ClientForm), { isSignal: true }] }] } });
|
|
1560
1636
|
|
|
1561
1637
|
class WorkCenterItemModal {
|
|
1562
1638
|
details = input.required(...(ngDevMode ? [{ debugName: "details" }] : []));
|
|
1563
1639
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterItemModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1564
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterItemModal, isStandalone: true, selector: "mt-work-center-item-modal", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "block h-full min-h-0" }, ngImport: i0, template: "@if (details().type === \"ProcessStep\") {\r\n
|
|
1640
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterItemModal, isStandalone: true, selector: "mt-work-center-item-modal", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "block h-full min-h-0" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n @if (details().type === \"ProcessStep\") {\r\n <mt-work-center-process-step-type [details]=\"details()\" />\r\n } @else if (details().type === \"ProcessRequest\") {\r\n <mt-work-center-process-request-type [details]=\"details()\" />\r\n } @else if (details().type === \"EscalationInstance\") {\r\n <mt-work-center-escalation-instance-type [details]=\"details()\" />\r\n } @else if (details().type === \"Module\") {\r\n <mt-work-center-module-type [details]=\"details()\" />\r\n } @else {\r\n <div class=\"mt-modal-content flex h-full items-center justify-center p-4\">\r\n <p class=\"text-sm text-surface-500\">{{ t(\"modal.unsupportedType\") }}</p>\r\n </div>\r\n }\r\n</ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: WorkCenterProcessStepType, selector: "mt-work-center-process-step-type", inputs: ["details"] }, { kind: "component", type: WorkCenterProcessRequestType, selector: "mt-work-center-process-request-type", inputs: ["details"] }, { kind: "component", type: WorkCenterEscalationInstanceType, selector: "mt-work-center-escalation-instance-type", inputs: ["details"] }, { kind: "component", type: WorkCenterModuleType, selector: "mt-work-center-module-type", inputs: ["details"] }] });
|
|
1565
1641
|
}
|
|
1566
1642
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterItemModal, decorators: [{
|
|
1567
1643
|
type: Component,
|
|
1568
1644
|
args: [{ selector: 'mt-work-center-item-modal', standalone: true, imports: [
|
|
1569
1645
|
CommonModule,
|
|
1646
|
+
TranslocoDirective,
|
|
1570
1647
|
WorkCenterProcessStepType,
|
|
1571
1648
|
WorkCenterProcessRequestType,
|
|
1572
1649
|
WorkCenterEscalationInstanceType,
|
|
1573
1650
|
WorkCenterModuleType,
|
|
1574
1651
|
], host: {
|
|
1575
1652
|
class: 'block h-full min-h-0',
|
|
1576
|
-
}, template: "@if (details().type === \"ProcessStep\") {\r\n
|
|
1653
|
+
}, template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n @if (details().type === \"ProcessStep\") {\r\n <mt-work-center-process-step-type [details]=\"details()\" />\r\n } @else if (details().type === \"ProcessRequest\") {\r\n <mt-work-center-process-request-type [details]=\"details()\" />\r\n } @else if (details().type === \"EscalationInstance\") {\r\n <mt-work-center-escalation-instance-type [details]=\"details()\" />\r\n } @else if (details().type === \"Module\") {\r\n <mt-work-center-module-type [details]=\"details()\" />\r\n } @else {\r\n <div class=\"mt-modal-content flex h-full items-center justify-center p-4\">\r\n <p class=\"text-sm text-surface-500\">{{ t(\"modal.unsupportedType\") }}</p>\r\n </div>\r\n }\r\n</ng-container>\r\n" }]
|
|
1577
1654
|
}], propDecorators: { details: [{ type: i0.Input, args: [{ isSignal: true, alias: "details", required: true }] }] } });
|
|
1578
1655
|
|
|
1579
1656
|
class WorkCenterItemActionConfirmDialog {
|
|
1580
1657
|
ref = inject(ModalRef);
|
|
1581
1658
|
modal = inject(ModalService);
|
|
1659
|
+
transloco = inject(TranslocoService);
|
|
1660
|
+
destroyRef = inject(DestroyRef);
|
|
1661
|
+
activeLang = signal(this.transloco.getActiveLang(), ...(ngDevMode ? [{ debugName: "activeLang" }] : []));
|
|
1582
1662
|
action = input.required(...(ngDevMode ? [{ debugName: "action" }] : []));
|
|
1583
1663
|
formControl = new FormControl({});
|
|
1584
1664
|
actionLabel = computed(() => this.action().actionName?.display || this.action().actionKey, ...(ngDevMode ? [{ debugName: "actionLabel" }] : []));
|
|
1585
|
-
formConfig = computed(() =>
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1665
|
+
formConfig = computed(() => {
|
|
1666
|
+
this.activeLang();
|
|
1667
|
+
return {
|
|
1668
|
+
sections: [
|
|
1669
|
+
{
|
|
1670
|
+
key: 'action-confirmation',
|
|
1671
|
+
type: 'none',
|
|
1672
|
+
fields: buildActionFields(this.action(), (key) => this.transloco.translate(key)),
|
|
1673
|
+
},
|
|
1674
|
+
],
|
|
1675
|
+
};
|
|
1676
|
+
}, ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
1594
1677
|
hasFormFields = computed(() => this.formConfig().sections[0]?.fields.length > 0, ...(ngDevMode ? [{ debugName: "hasFormFields" }] : []));
|
|
1678
|
+
constructor() {
|
|
1679
|
+
this.transloco.langChanges$
|
|
1680
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1681
|
+
.subscribe((lang) => this.activeLang.set(lang));
|
|
1682
|
+
}
|
|
1595
1683
|
onCancel() {
|
|
1596
1684
|
this.ref.close(null);
|
|
1597
1685
|
}
|
|
@@ -1603,13 +1691,19 @@ class WorkCenterItemActionConfirmDialog {
|
|
|
1603
1691
|
this.ref.close(this.formControl.getRawValue() ?? {});
|
|
1604
1692
|
}
|
|
1605
1693
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterItemActionConfirmDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1606
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterItemActionConfirmDialog, isStandalone: true, selector: "mt-work-center-item-action-confirm-dialog", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"modal.contentClass + ' p-4'\">\r\n
|
|
1694
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterItemActionConfirmDialog, isStandalone: true, selector: "mt-work-center-item-action-confirm-dialog", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n <div [class]=\"modal.contentClass + ' p-4'\">\r\n @if (hasFormFields()) {\r\n <mt-dynamic-form\r\n [formConfig]=\"formConfig()\"\r\n [formControl]=\"formControl\"\r\n />\r\n } @else {\r\n <p class=\"text-sm text-surface-500\">\r\n {{ t(\"modal.confirmAction\", { action: actionLabel() }) }}\r\n </p>\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 severity=\"secondary\"\r\n variant=\"outlined\"\r\n (onClick)=\"onCancel()\"\r\n />\r\n <mt-button [label]=\"actionLabel()\" (onClick)=\"onConfirm()\" />\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys"], outputs: ["runtimeMessagesChange"] }, { 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"] }] });
|
|
1607
1695
|
}
|
|
1608
1696
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterItemActionConfirmDialog, decorators: [{
|
|
1609
1697
|
type: Component,
|
|
1610
|
-
args: [{ selector: 'mt-work-center-item-action-confirm-dialog', standalone: true, imports: [
|
|
1611
|
-
|
|
1612
|
-
|
|
1698
|
+
args: [{ selector: 'mt-work-center-item-action-confirm-dialog', standalone: true, imports: [
|
|
1699
|
+
CommonModule,
|
|
1700
|
+
ReactiveFormsModule,
|
|
1701
|
+
TranslocoDirective,
|
|
1702
|
+
DynamicForm,
|
|
1703
|
+
Button,
|
|
1704
|
+
], template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n <div [class]=\"modal.contentClass + ' p-4'\">\r\n @if (hasFormFields()) {\r\n <mt-dynamic-form\r\n [formConfig]=\"formConfig()\"\r\n [formControl]=\"formControl\"\r\n />\r\n } @else {\r\n <p class=\"text-sm text-surface-500\">\r\n {{ t(\"modal.confirmAction\", { action: actionLabel() }) }}\r\n </p>\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 severity=\"secondary\"\r\n variant=\"outlined\"\r\n (onClick)=\"onCancel()\"\r\n />\r\n <mt-button [label]=\"actionLabel()\" (onClick)=\"onConfirm()\" />\r\n </div>\r\n</ng-container>\r\n" }]
|
|
1705
|
+
}], ctorParameters: () => [], propDecorators: { action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: true }] }] } });
|
|
1706
|
+
function buildActionFields(action, t) {
|
|
1613
1707
|
const requestedKeys = new Set(action.payloadKeys ?? []);
|
|
1614
1708
|
const requiredKeys = new Set(action.requiredPayloadKeys ?? []);
|
|
1615
1709
|
const fields = [];
|
|
@@ -1618,7 +1712,7 @@ function buildActionFields(action) {
|
|
|
1618
1712
|
fields.push({
|
|
1619
1713
|
key: 'progress',
|
|
1620
1714
|
type: 'slider',
|
|
1621
|
-
label: '
|
|
1715
|
+
label: t('workCenter.field.progress'),
|
|
1622
1716
|
min: 0,
|
|
1623
1717
|
max: 100,
|
|
1624
1718
|
step: 1,
|
|
@@ -1632,8 +1726,8 @@ function buildActionFields(action) {
|
|
|
1632
1726
|
fields.push({
|
|
1633
1727
|
key: 'delegatedUser',
|
|
1634
1728
|
type: 'user-search',
|
|
1635
|
-
label: '
|
|
1636
|
-
placeholder: '
|
|
1729
|
+
label: t('workCenter.field.delegatedUser'),
|
|
1730
|
+
placeholder: t('workCenter.field.delegatedUserPlaceholder'),
|
|
1637
1731
|
apiUrl: 'Identity/users',
|
|
1638
1732
|
optionLabel: 'displayName',
|
|
1639
1733
|
optionValue: 'id',
|
|
@@ -1645,8 +1739,8 @@ function buildActionFields(action) {
|
|
|
1645
1739
|
fields.push({
|
|
1646
1740
|
key: 'reason',
|
|
1647
1741
|
type: 'textarea',
|
|
1648
|
-
label: '
|
|
1649
|
-
placeholder: '
|
|
1742
|
+
label: t('workCenter.field.reason'),
|
|
1743
|
+
placeholder: t('workCenter.field.reasonPlaceholder'),
|
|
1650
1744
|
rows: 4,
|
|
1651
1745
|
validators: buildRequiredValidators(requiredKeys.has('reason')),
|
|
1652
1746
|
colSpan: 12,
|
|
@@ -1656,8 +1750,8 @@ function buildActionFields(action) {
|
|
|
1656
1750
|
fields.push({
|
|
1657
1751
|
key: 'note',
|
|
1658
1752
|
type: 'textarea',
|
|
1659
|
-
label: '
|
|
1660
|
-
placeholder: '
|
|
1753
|
+
label: t('workCenter.field.note'),
|
|
1754
|
+
placeholder: t('workCenter.field.notePlaceholder'),
|
|
1661
1755
|
rows: 4,
|
|
1662
1756
|
validators: buildRequiredValidators(requiredKeys.has('note')),
|
|
1663
1757
|
colSpan: 12,
|
|
@@ -1667,11 +1761,11 @@ function buildActionFields(action) {
|
|
|
1667
1761
|
fields.push({
|
|
1668
1762
|
key: 'attachments',
|
|
1669
1763
|
type: 'upload-file',
|
|
1670
|
-
label: '
|
|
1764
|
+
label: t('workCenter.field.attachments'),
|
|
1671
1765
|
endPoint: 'uploader',
|
|
1672
1766
|
multiple: true,
|
|
1673
|
-
title: '
|
|
1674
|
-
description: '
|
|
1767
|
+
title: t('workCenter.field.uploadTitle'),
|
|
1768
|
+
description: t('workCenter.field.uploadDescription'),
|
|
1675
1769
|
validators: buildRequiredValidators(requiredKeys.has('attachments')),
|
|
1676
1770
|
colSpan: 12,
|
|
1677
1771
|
});
|
|
@@ -1983,13 +2077,13 @@ class WorkCenterItemModalFooterActions {
|
|
|
1983
2077
|
});
|
|
1984
2078
|
}
|
|
1985
2079
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterItemModalFooterActions, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1986
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterItemModalFooterActions, isStandalone: true, selector: "mt-work-center-item-modal-footer-actions", inputs: { contextKey: { classPropertyName: "contextKey", publicName: "contextKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionExecuted: "actionExecuted", visibilityChange: "visibilityChange" }, host: { classAttribute: "flex w-full flex-1 flex-wrap items-center justify-end gap-2" }, ngImport: i0, template: "@if (shouldRender()) {\r\n
|
|
2080
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterItemModalFooterActions, isStandalone: true, selector: "mt-work-center-item-modal-footer-actions", inputs: { contextKey: { classPropertyName: "contextKey", publicName: "contextKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionExecuted: "actionExecuted", visibilityChange: "visibilityChange" }, host: { classAttribute: "flex w-full flex-1 flex-wrap items-center justify-end gap-2" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n @if (shouldRender()) {\r\n @if (error(); as error) {\r\n <span class=\"me-auto max-w-md text-sm text-red-600\">\r\n {{ error }}\r\n </span>\r\n } @else if (loading() && !displayActions().length) {\r\n <span class=\"me-auto text-sm text-surface-500\">{{\r\n t(\"modal.loadingActions\")\r\n }}</span>\r\n }\r\n\r\n @for (action of displayActions(); track action.actionKey + action.url) {\r\n <mt-button\r\n [label]=\"action.label\"\r\n [severity]=\"action.severity\"\r\n [variant]=\"action.variant\"\r\n [disabled]=\"loading() || !!pendingActionKey()\"\r\n [loading]=\"pendingActionKey() === action.actionKey\"\r\n (onClick)=\"executeAction(action)\"\r\n />\r\n }\r\n }\r\n</ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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"] }] });
|
|
1987
2081
|
}
|
|
1988
2082
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterItemModalFooterActions, decorators: [{
|
|
1989
2083
|
type: Component,
|
|
1990
|
-
args: [{ selector: 'mt-work-center-item-modal-footer-actions', standalone: true, imports: [CommonModule, Button], host: {
|
|
2084
|
+
args: [{ selector: 'mt-work-center-item-modal-footer-actions', standalone: true, imports: [CommonModule, TranslocoDirective, Button], host: {
|
|
1991
2085
|
class: 'flex w-full flex-1 flex-wrap items-center justify-end gap-2',
|
|
1992
|
-
}, template: "@if (shouldRender()) {\r\n
|
|
2086
|
+
}, template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n @if (shouldRender()) {\r\n @if (error(); as error) {\r\n <span class=\"me-auto max-w-md text-sm text-red-600\">\r\n {{ error }}\r\n </span>\r\n } @else if (loading() && !displayActions().length) {\r\n <span class=\"me-auto text-sm text-surface-500\">{{\r\n t(\"modal.loadingActions\")\r\n }}</span>\r\n }\r\n\r\n @for (action of displayActions(); track action.actionKey + action.url) {\r\n <mt-button\r\n [label]=\"action.label\"\r\n [severity]=\"action.severity\"\r\n [variant]=\"action.variant\"\r\n [disabled]=\"loading() || !!pendingActionKey()\"\r\n [loading]=\"pendingActionKey() === action.actionKey\"\r\n (onClick)=\"executeAction(action)\"\r\n />\r\n }\r\n }\r\n</ng-container>\r\n" }]
|
|
1993
2087
|
}], ctorParameters: () => [], propDecorators: { contextKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextKey", required: false }] }], actionExecuted: [{ type: i0.Output, args: ["actionExecuted"] }], visibilityChange: [{ type: i0.Output, args: ["visibilityChange"] }] } });
|
|
1994
2088
|
function buildRequestOptions(method, payload) {
|
|
1995
2089
|
if (!payload || !methodSupportsBody(method)) {
|
|
@@ -2125,6 +2219,7 @@ class WorkCenterItemModalRoute {
|
|
|
2125
2219
|
http = inject(HttpClient);
|
|
2126
2220
|
router = inject(Router);
|
|
2127
2221
|
route = inject(ActivatedRoute);
|
|
2222
|
+
transloco = inject(TranslocoService);
|
|
2128
2223
|
modal = inject(ModalService);
|
|
2129
2224
|
contextKey = input(null, ...(ngDevMode ? [{ debugName: "contextKey" }] : []));
|
|
2130
2225
|
drawerVisible = signal(true, ...(ngDevMode ? [{ debugName: "drawerVisible" }] : []));
|
|
@@ -2134,7 +2229,8 @@ class WorkCenterItemModalRoute {
|
|
|
2134
2229
|
detailsReloadTick = signal(0, ...(ngDevMode ? [{ debugName: "detailsReloadTick" }] : []));
|
|
2135
2230
|
footerActionsMounted = signal(false, ...(ngDevMode ? [{ debugName: "footerActionsMounted" }] : []));
|
|
2136
2231
|
resolvedContextKey = computed(() => this.decodeContextKey(this.contextKey()), ...(ngDevMode ? [{ debugName: "resolvedContextKey" }] : []));
|
|
2137
|
-
drawerTitle = computed(() => this.readDisplayField(this.details()?.item, 'title')
|
|
2232
|
+
drawerTitle = computed(() => this.readDisplayField(this.details()?.item, 'title') ||
|
|
2233
|
+
this.transloco.translate('workCenter.page.itemDetails'), ...(ngDevMode ? [{ debugName: "drawerTitle" }] : []));
|
|
2138
2234
|
drawerSubtitle = computed(() => this.readDisplayField(this.details()?.item, 'subtitle') ?? '', ...(ngDevMode ? [{ debugName: "drawerSubtitle" }] : []));
|
|
2139
2235
|
constructor() {
|
|
2140
2236
|
effect(() => {
|
|
@@ -2185,7 +2281,7 @@ class WorkCenterItemModalRoute {
|
|
|
2185
2281
|
});
|
|
2186
2282
|
this.error.set(error instanceof Error
|
|
2187
2283
|
? error.message
|
|
2188
|
-
: '
|
|
2284
|
+
: this.transloco.translate('workCenter.error.failedLoadDetails'));
|
|
2189
2285
|
this.loading.set(false);
|
|
2190
2286
|
},
|
|
2191
2287
|
});
|
|
@@ -2260,17 +2356,18 @@ class WorkCenterItemModalRoute {
|
|
|
2260
2356
|
: null;
|
|
2261
2357
|
}
|
|
2262
2358
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterItemModalRoute, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2263
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterItemModalRoute, isStandalone: true, selector: "mt-work-center-item-modal-route", inputs: { contextKey: { classPropertyName: "contextKey", publicName: "contextKey", isSignal: true, isRequired: false, transformFunction: null } }, providers: [WorkCenterItemActionContextStore], ngImport: i0, template: "<mt-drawer\r\n [visible]=\"drawerVisible()\"\r\n [loadingHeader]=\"loading()\"\r\n [title]=\"drawerTitle()\"\r\n [subtitle]=\"drawerSubtitle()\"\r\n styleClass=\"mt-work-center-item-drawer !absolute !w-[90%]\"\r\n position=\"right\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n>\r\n <ng-container content>\r\n @if (loading()) {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] flex-col gap-5\">\r\n <div class=\"flex items-center gap-3\">\r\n <p-skeleton shape=\"circle\" size=\"3rem\" />\r\n <div class=\"flex flex-1 flex-col gap-2\">\r\n <p-skeleton width=\"12rem\" height=\"1rem\" />\r\n <p-skeleton width=\"8rem\" height=\"0.875rem\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid gap-3 md:grid-cols-2\">\r\n @for (_ of [1, 2, 3, 4]; track $index) {\r\n <p-skeleton height=\"5rem\" borderRadius=\"1rem\" />\r\n }\r\n </div>\r\n\r\n <p-skeleton height=\"16rem\" borderRadius=\"1rem\" />\r\n </div>\r\n </div>\r\n } @else if (error(); as errorMessage) {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] items-center justify-center\">\r\n <p class=\"max-w-xl text-sm font-medium text-red-600\">\r\n {{ errorMessage }}\r\n </p>\r\n </div>\r\n </div>\r\n } @else if (details(); as details) {\r\n <div [class]=\"modal.contentClass + ' h-full min-h-0'\">\r\n <mt-work-center-item-modal [details]=\"details\" />\r\n </div>\r\n } @else {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] items-center justify-center\">\r\n <p class=\"text-sm font-medium text-surface-500\"
|
|
2359
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterItemModalRoute, isStandalone: true, selector: "mt-work-center-item-modal-route", inputs: { contextKey: { classPropertyName: "contextKey", publicName: "contextKey", isSignal: true, isRequired: false, transformFunction: null } }, providers: [WorkCenterItemActionContextStore], ngImport: i0, template: "<mt-drawer\r\n [visible]=\"drawerVisible()\"\r\n [loadingHeader]=\"loading()\"\r\n [title]=\"drawerTitle()\"\r\n [subtitle]=\"drawerSubtitle()\"\r\n styleClass=\"mt-work-center-item-drawer !absolute !w-[90%]\"\r\n position=\"right\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <ng-container content>\r\n @if (loading()) {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] flex-col gap-5\">\r\n <div class=\"flex items-center gap-3\">\r\n <p-skeleton shape=\"circle\" size=\"3rem\" />\r\n <div class=\"flex flex-1 flex-col gap-2\">\r\n <p-skeleton width=\"12rem\" height=\"1rem\" />\r\n <p-skeleton width=\"8rem\" height=\"0.875rem\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid gap-3 md:grid-cols-2\">\r\n @for (_ of [1, 2, 3, 4]; track $index) {\r\n <p-skeleton height=\"5rem\" borderRadius=\"1rem\" />\r\n }\r\n </div>\r\n\r\n <p-skeleton height=\"16rem\" borderRadius=\"1rem\" />\r\n </div>\r\n </div>\r\n } @else if (error(); as errorMessage) {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] items-center justify-center\">\r\n <p class=\"max-w-xl text-sm font-medium text-red-600\">\r\n {{ errorMessage }}\r\n </p>\r\n </div>\r\n </div>\r\n } @else if (details(); as details) {\r\n <div [class]=\"modal.contentClass + ' h-full min-h-0'\">\r\n <mt-work-center-item-modal [details]=\"details\" />\r\n </div>\r\n } @else {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] items-center justify-center\">\r\n <p class=\"text-sm font-medium text-surface-500\">\r\n {{ t(\"modal.noItemSelected\") }}\r\n </p>\r\n </div>\r\n </div>\r\n }\r\n </ng-container>\r\n\r\n @if (footerActionsMounted()) {\r\n <div footer [class]=\"modal.footerClass\">\r\n <mt-work-center-item-modal-footer-actions\r\n [contextKey]=\"resolvedContextKey()\"\r\n (actionExecuted)=\"onActionExecuted($event)\"\r\n (visibilityChange)=\"onFooterVisibilityChange($event)\"\r\n />\r\n </div>\r\n }\r\n</mt-drawer>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Drawer, selector: "mt-drawer", inputs: ["visible", "position", "fullScreen", "closeOnEscape", "blockScroll", "dismissible", "title", "subtitle", "loadingHeader", "styleClass", "transitionOptions", "appendTo", "modal"], outputs: ["visibleChange", "onShow", "onHide"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: WorkCenterItemModal, selector: "mt-work-center-item-modal", inputs: ["details"] }, { kind: "component", type: WorkCenterItemModalFooterActions, selector: "mt-work-center-item-modal-footer-actions", inputs: ["contextKey"], outputs: ["actionExecuted", "visibilityChange"] }] });
|
|
2264
2360
|
}
|
|
2265
2361
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterItemModalRoute, decorators: [{
|
|
2266
2362
|
type: Component,
|
|
2267
2363
|
args: [{ selector: 'mt-work-center-item-modal-route', standalone: true, imports: [
|
|
2268
2364
|
CommonModule,
|
|
2365
|
+
TranslocoDirective,
|
|
2269
2366
|
Drawer,
|
|
2270
2367
|
SkeletonModule,
|
|
2271
2368
|
WorkCenterItemModal,
|
|
2272
2369
|
WorkCenterItemModalFooterActions,
|
|
2273
|
-
], providers: [WorkCenterItemActionContextStore], template: "<mt-drawer\r\n [visible]=\"drawerVisible()\"\r\n [loadingHeader]=\"loading()\"\r\n [title]=\"drawerTitle()\"\r\n [subtitle]=\"drawerSubtitle()\"\r\n styleClass=\"mt-work-center-item-drawer !absolute !w-[90%]\"\r\n position=\"right\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n>\r\n <ng-container content>\r\n @if (loading()) {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] flex-col gap-5\">\r\n <div class=\"flex items-center gap-3\">\r\n <p-skeleton shape=\"circle\" size=\"3rem\" />\r\n <div class=\"flex flex-1 flex-col gap-2\">\r\n <p-skeleton width=\"12rem\" height=\"1rem\" />\r\n <p-skeleton width=\"8rem\" height=\"0.875rem\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid gap-3 md:grid-cols-2\">\r\n @for (_ of [1, 2, 3, 4]; track $index) {\r\n <p-skeleton height=\"5rem\" borderRadius=\"1rem\" />\r\n }\r\n </div>\r\n\r\n <p-skeleton height=\"16rem\" borderRadius=\"1rem\" />\r\n </div>\r\n </div>\r\n } @else if (error(); as errorMessage) {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] items-center justify-center\">\r\n <p class=\"max-w-xl text-sm font-medium text-red-600\">\r\n {{ errorMessage }}\r\n </p>\r\n </div>\r\n </div>\r\n } @else if (details(); as details) {\r\n <div [class]=\"modal.contentClass + ' h-full min-h-0'\">\r\n <mt-work-center-item-modal [details]=\"details\" />\r\n </div>\r\n } @else {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] items-center justify-center\">\r\n <p class=\"text-sm font-medium text-surface-500\"
|
|
2370
|
+
], providers: [WorkCenterItemActionContextStore], template: "<mt-drawer\r\n [visible]=\"drawerVisible()\"\r\n [loadingHeader]=\"loading()\"\r\n [title]=\"drawerTitle()\"\r\n [subtitle]=\"drawerSubtitle()\"\r\n styleClass=\"mt-work-center-item-drawer !absolute !w-[90%]\"\r\n position=\"right\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <ng-container content>\r\n @if (loading()) {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] flex-col gap-5\">\r\n <div class=\"flex items-center gap-3\">\r\n <p-skeleton shape=\"circle\" size=\"3rem\" />\r\n <div class=\"flex flex-1 flex-col gap-2\">\r\n <p-skeleton width=\"12rem\" height=\"1rem\" />\r\n <p-skeleton width=\"8rem\" height=\"0.875rem\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid gap-3 md:grid-cols-2\">\r\n @for (_ of [1, 2, 3, 4]; track $index) {\r\n <p-skeleton height=\"5rem\" borderRadius=\"1rem\" />\r\n }\r\n </div>\r\n\r\n <p-skeleton height=\"16rem\" borderRadius=\"1rem\" />\r\n </div>\r\n </div>\r\n } @else if (error(); as errorMessage) {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] items-center justify-center\">\r\n <p class=\"max-w-xl text-sm font-medium text-red-600\">\r\n {{ errorMessage }}\r\n </p>\r\n </div>\r\n </div>\r\n } @else if (details(); as details) {\r\n <div [class]=\"modal.contentClass + ' h-full min-h-0'\">\r\n <mt-work-center-item-modal [details]=\"details\" />\r\n </div>\r\n } @else {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] items-center justify-center\">\r\n <p class=\"text-sm font-medium text-surface-500\">\r\n {{ t(\"modal.noItemSelected\") }}\r\n </p>\r\n </div>\r\n </div>\r\n }\r\n </ng-container>\r\n\r\n @if (footerActionsMounted()) {\r\n <div footer [class]=\"modal.footerClass\">\r\n <mt-work-center-item-modal-footer-actions\r\n [contextKey]=\"resolvedContextKey()\"\r\n (actionExecuted)=\"onActionExecuted($event)\"\r\n (visibilityChange)=\"onFooterVisibilityChange($event)\"\r\n />\r\n </div>\r\n }\r\n</mt-drawer>\r\n" }]
|
|
2274
2371
|
}], ctorParameters: () => [], propDecorators: { contextKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextKey", required: false }] }] } });
|
|
2275
2372
|
|
|
2276
2373
|
const APP_STATES = [WorkCenterState];
|