Add interruption toggle to TabServizio component for managing service status
This commit is contained in:
parent
fd22901c45
commit
c0da9daad0
1 changed files with 28 additions and 0 deletions
|
|
@ -232,6 +232,34 @@ export const TabServizio = ({
|
||||||
</DropdownMenuSubContent>
|
</DropdownMenuSubContent>
|
||||||
</DropdownMenuPortal>
|
</DropdownMenuPortal>
|
||||||
</DropdownMenuSub>
|
</DropdownMenuSub>
|
||||||
|
<DropdownMenuSub>
|
||||||
|
<DropdownMenuSubTrigger className="flex items-center gap-3 hover:cursor-pointer">
|
||||||
|
<Wrench className="stroke-foreground size-5" />
|
||||||
|
<span className="text-foreground">Interruzione</span>
|
||||||
|
</DropdownMenuSubTrigger>
|
||||||
|
<DropdownMenuPortal>
|
||||||
|
<DropdownMenuSubContent>
|
||||||
|
<DropdownMenuRadioGroup
|
||||||
|
value={servizio.isInterrotto.toString()}
|
||||||
|
onValueChange={(v) => {
|
||||||
|
update({
|
||||||
|
servizioId: servizio.servizio_id,
|
||||||
|
data: {
|
||||||
|
isInterrotto: v === "true",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<DropdownMenuRadioItem value="true">
|
||||||
|
Interrotto
|
||||||
|
</DropdownMenuRadioItem>
|
||||||
|
<DropdownMenuRadioItem value="false">
|
||||||
|
Non Interrotto
|
||||||
|
</DropdownMenuRadioItem>
|
||||||
|
</DropdownMenuRadioGroup>
|
||||||
|
</DropdownMenuSubContent>
|
||||||
|
</DropdownMenuPortal>
|
||||||
|
</DropdownMenuSub>
|
||||||
|
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue