massive UploadAvatar improvements

This commit is contained in:
Oliver Bryan
2026-01-01 12:02:09 +00:00
parent d158f51141
commit 494badfdaa
4 changed files with 59 additions and 35 deletions

View File

@@ -5,7 +5,9 @@ import { Button } from "@/components/ui/button";
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectSeparator,
SelectTrigger,
SelectValue,
@@ -40,20 +42,23 @@ export function OrganisationSelect({
onOpenChange={setOpen}
>
<SelectTrigger className="text-sm" isOpen={open}>
<SelectValue
placeholder={
selectedOrganisation ? `O: ${selectedOrganisation.Organisation.name}` : placeholder
}
/>
<SelectValue placeholder={placeholder} />
</SelectTrigger>
<SelectContent side="bottom" position="popper">
{organisations.map((organisation) => (
<SelectItem key={organisation.Organisation.id} value={`${organisation.Organisation.id}`}>
{organisation.Organisation.name}
</SelectItem>
))}
<SelectGroup>
<SelectLabel>Organisations</SelectLabel>
{organisations.map((organisation) => (
<SelectItem
key={organisation.Organisation.id}
value={`${organisation.Organisation.id}`}
>
{organisation.Organisation.name}
</SelectItem>
))}
{organisations.length > 0 && <SelectSeparator />}
</SelectGroup>
{organisations.length > 0 && <SelectSeparator />}
<CreateOrganisation
trigger={
<Button variant="ghost" className={"w-full"} size={"sm"}>