mirror of
https://github.com/Luchexx/wacrm.git
synced 2026-11-02 09:19:51 +00:00
fix(i18n): render translated label inside role SelectValue
Base UI's <SelectValue> with no children does not reliably extract
text from the selected <SelectItem> when the item's children is a
function call (e.g. tRoles(r.value)) — the trigger falls back to
displaying the raw enum string ('admin', 'agent', 'viewer').
Render the translated label explicitly as children of <SelectValue>
so the trigger always shows the human-readable role name.
Scope: only the two role selectors in Settings (matches this PR's
theme). The same pattern affects ~5 other sites (template-manager
header format, button type; ai-config provider and handoff target;
flows/broadcasts) — those are left as follow-up and tracked in #375.
Part of #375
This commit is contained in:
parent
4f02b4cf58
commit
999a080a29
@ -274,7 +274,7 @@ export function InviteMemberDialog({
|
|||||||
onValueChange={(v) => v && setRole(v as InviteRole)}
|
onValueChange={(v) => v && setRole(v as InviteRole)}
|
||||||
>
|
>
|
||||||
<SelectTrigger className="w-full bg-muted border-border text-foreground">
|
<SelectTrigger className="w-full bg-muted border-border text-foreground">
|
||||||
<SelectValue />
|
<SelectValue>{tRoles(role)}</SelectValue>
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="admin">{tRoles('admin')}</SelectItem>
|
<SelectItem value="admin">{tRoles('admin')}</SelectItem>
|
||||||
|
|||||||
@ -428,7 +428,7 @@ export function MembersTab() {
|
|||||||
className="w-32 bg-muted border-border text-foreground"
|
className="w-32 bg-muted border-border text-foreground"
|
||||||
disabled={isBusy}
|
disabled={isBusy}
|
||||||
>
|
>
|
||||||
<SelectValue />
|
<SelectValue>{tRoles(member.role)}</SelectValue>
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
{EDITABLE_ROLES.map((r) => (
|
{EDITABLE_ROLES.map((r) => (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user