@masterteam/workflow 0.0.37 → 0.0.38
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.
|
@@ -2240,8 +2240,17 @@ class WorkflowBuilder {
|
|
|
2240
2240
|
steps = computed(() => this.workflowFacade.steps().map((step) => {
|
|
2241
2241
|
const isAppAction = step.type === 'AppAction';
|
|
2242
2242
|
const isApprovalCommit = step.type === 'ApprovalCommit';
|
|
2243
|
+
// Always populate name.display so structure-builder's
|
|
2244
|
+
// `nodeFields.name = 'name.display'` lookup never falls back to
|
|
2245
|
+
// an empty string (the backend may return name without a
|
|
2246
|
+
// `display` key — e.g. ApprovalCommit returns `{ en, ar }`).
|
|
2247
|
+
const displayName = this.resolveDisplayName(step.name);
|
|
2248
|
+
const stepName = typeof step.name === 'object' && step.name !== null
|
|
2249
|
+
? { ...step.name, display: displayName }
|
|
2250
|
+
: { display: displayName, en: displayName, ar: displayName };
|
|
2243
2251
|
return {
|
|
2244
2252
|
...step,
|
|
2253
|
+
name: stepName,
|
|
2245
2254
|
// System Approval-Commit step gets a distinct emerald accent + a
|
|
2246
2255
|
// verified-check icon. Authoring is locked; the step is rendered
|
|
2247
2256
|
// in icon mode like AppActions to communicate "system boundary".
|
|
@@ -3030,7 +3039,13 @@ class WorkflowBuilder {
|
|
|
3030
3039
|
return name;
|
|
3031
3040
|
}
|
|
3032
3041
|
if (name && typeof name === 'object') {
|
|
3033
|
-
|
|
3042
|
+
const locale = this.transloco.getActiveLang();
|
|
3043
|
+
return (name['display'] ||
|
|
3044
|
+
name[locale] ||
|
|
3045
|
+
name['en'] ||
|
|
3046
|
+
name['ar'] ||
|
|
3047
|
+
Object.values(name).find((value) => typeof value === 'string') ||
|
|
3048
|
+
'');
|
|
3034
3049
|
}
|
|
3035
3050
|
return '';
|
|
3036
3051
|
}
|