Merge branch 'WorkflowChange' of https://github.com/Tria-plc/emaui into estif-branch-1

This commit is contained in:
Estifo77
2026-08-18 14:54:05 +03:00
42 changed files with 17179 additions and 40 deletions

View File

@@ -264,6 +264,16 @@ export interface WizardStep {
* the stepper short. Anything ungrouped keeps a step of its own, so a licence
* type that has not been grouped still behaves exactly as before.
*/
/** "identitySummary" -> "Identity Summary". Last resort for an untitled group. */
function humanise(key: string): string {
return key
.replace(/[_-]+/g, ' ')
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
.replace(/\s+/g, ' ')
.trim()
.replace(/^./, (c) => c.toUpperCase());
}
export function buildWizardSteps(
sections: FormSectionConfig[],
formData: Record<string, Record<string, unknown>>,
@@ -304,7 +314,11 @@ export function buildWizardSteps(
}
const step: WizardStep = {
key: `group:${group}`,
label: group,
// A group is a config key, not a caption — showing it raw put
// "identitySummary" and "applicant" in front of applicants. The first
// section's own title is the readable name for the step it opens; the
// humanised key is the fallback when a section carries no title.
label: localized(section.title, options?.language) || humanise(group),
kind: 'sections',
sections: [section],
};