@masterteam/workflow 0.0.37 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/assets/i18n/ar.json
CHANGED
|
@@ -78,7 +78,9 @@
|
|
|
78
78
|
"approvalCommitSubtitle": "نظام · مُقفل",
|
|
79
79
|
"approvalCommitHelper": "في هذه النقطة، يتم تأكيد النموذج المعتمد في سجل الأعمال الحقيقي.",
|
|
80
80
|
"unknownAppAction": "إجراء غير معروف",
|
|
81
|
-
"unknownAppActionHint": "إجراء التطبيق هذا لم يعد متاحًا أو غير مسجَّل في الخلفية. تم الحفاظ على الإعدادات المحفوظة، لكن لا يمكن تحرير الخطوة حتى يُستعاد الإجراء."
|
|
81
|
+
"unknownAppActionHint": "إجراء التطبيق هذا لم يعد متاحًا أو غير مسجَّل في الخلفية. تم الحفاظ على الإعدادات المحفوظة، لكن لا يمكن تحرير الخطوة حتى يُستعاد الإجراء.",
|
|
82
|
+
"edit": "تعديل",
|
|
83
|
+
"delete": "حذف"
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
86
|
}
|
package/assets/i18n/en.json
CHANGED
|
@@ -78,7 +78,9 @@
|
|
|
78
78
|
"approvalCommitSubtitle": "System · Locked",
|
|
79
79
|
"approvalCommitHelper": "At this point, the approved form is committed to the real business record.",
|
|
80
80
|
"unknownAppAction": "Unknown App Action",
|
|
81
|
-
"unknownAppActionHint": "This app action is no longer available or is not registered in the backend. The saved configuration is preserved, but the step cannot be edited until the action is restored."
|
|
81
|
+
"unknownAppActionHint": "This app action is no longer available or is not registered in the backend. The saved configuration is preserved, but the step cannot be edited until the action is restored.",
|
|
82
|
+
"edit": "Edit",
|
|
83
|
+
"delete": "Delete"
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
86
|
}
|
|
@@ -2189,13 +2189,13 @@ class WorkflowBuilder {
|
|
|
2189
2189
|
style: 'icon',
|
|
2190
2190
|
})),
|
|
2191
2191
|
], ...(ngDevMode ? [{ debugName: "availableNodes" }] : /* istanbul ignore next */ []));
|
|
2192
|
-
nodeActions =
|
|
2192
|
+
nodeActions = computed(() => [
|
|
2193
2193
|
{
|
|
2194
2194
|
key: 'edit',
|
|
2195
2195
|
icon: 'general.edit-05',
|
|
2196
2196
|
variant: 'outlined',
|
|
2197
2197
|
size: 'small',
|
|
2198
|
-
tooltip: '
|
|
2198
|
+
tooltip: this.transloco.translate('workflow.builder.edit'),
|
|
2199
2199
|
// Locked system steps (e.g. Commit Approved Form) are not editable.
|
|
2200
2200
|
condition: (node) => !node.isLocked,
|
|
2201
2201
|
},
|
|
@@ -2205,7 +2205,7 @@ class WorkflowBuilder {
|
|
|
2205
2205
|
variant: 'outlined',
|
|
2206
2206
|
size: 'small',
|
|
2207
2207
|
severity: 'danger',
|
|
2208
|
-
tooltip: '
|
|
2208
|
+
tooltip: this.transloco.translate('workflow.builder.delete'),
|
|
2209
2209
|
// Initial step + locked system steps are not deletable.
|
|
2210
2210
|
condition: (node) => !node.isInitial && !node.isLocked,
|
|
2211
2211
|
},
|
|
@@ -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
|
}
|