Fix role selection defaults and phone input typing
This commit is contained in:
parent
a69d37a672
commit
2400f34c80
2 changed files with 9 additions and 9 deletions
|
|
@ -224,7 +224,7 @@ export function AdminUsersManager({ initialUsers, initialInvites, roleOptions, d
|
|||
const teamUsers = useMemo(() => users.filter((user) => user.role !== "machine"), [users])
|
||||
const machineUsers = useMemo(() => users.filter((user) => user.role === "machine"), [users])
|
||||
|
||||
const defaultCreateRole = (selectableRoles.find((role) => role !== "machine") ?? "agent") as RoleOption
|
||||
const defaultCreateRole: RoleOption = selectableRoles[0] ?? "agent"
|
||||
const [teamSearch, setTeamSearch] = useState("")
|
||||
const [teamRoleFilter, setTeamRoleFilter] = useState<"all" | RoleOption>("all")
|
||||
const [machineSearch, setMachineSearch] = useState("")
|
||||
|
|
@ -755,7 +755,7 @@ async function handleDeleteUser() {
|
|||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="all">Todos os papéis</SelectItem>
|
||||
{selectableRoles.filter((option) => option !== "machine").map((option) => (
|
||||
{selectableRoles.map((option) => (
|
||||
<SelectItem key={`team-filter-${option}`} value={option}>
|
||||
{formatRole(option)}
|
||||
</SelectItem>
|
||||
|
|
@ -1228,7 +1228,7 @@ async function handleDeleteUser() {
|
|||
<SelectValue placeholder="Selecione" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{selectableRoles.filter((option) => option !== "machine").map((option) => (
|
||||
{selectableRoles.map((option) => (
|
||||
<SelectItem key={`create-role-${option}`} value={option}>
|
||||
{formatRole(option)}
|
||||
</SelectItem>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue