diff --git a/CHANGELOG b/CHANGELOG index c5efd32..e48c1f2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ Dates should be in`YYYY-MM-DD` format and versions are in [semantic versioning]( - Resolved issue where Supabase client would become unresponsive after tab change. - Improved styling of fields. +- Sorted role titles on process page. ## v0.6.0 2024-07-05 diff --git a/src/routes/org/[orgid]/process/[processid]/+page.svelte b/src/routes/org/[orgid]/process/[processid]/+page.svelte index 4d4d125..5b0ffea 100644 --- a/src/routes/org/[orgid]/process/[processid]/+page.svelte +++ b/src/routes/org/[orgid]/process/[processid]/+page.svelte @@ -128,9 +128,12 @@ tip="Choose a role to be accountable for the processes outcomes." options={[ { value: undefined, label: '—' }, - ...$org.getRoles().map((role) => { - return { value: role.id, label: role.title }; - }) + ...$org + .getRoles() + .toSorted((a, b) => a.title.localeCompare(b.title)) + .map((role) => { + return { value: role.id, label: role.title }; + }) ]} selection={process.accountable ?? undefined} change={(value) => $db.updateProcessAccountable(process, value ?? null)}