feat: update layout and styling in UserDashboard and ServizioPage components
This commit is contained in:
parent
b32ebf9fde
commit
6211be289c
5 changed files with 24 additions and 15 deletions
|
|
@ -66,7 +66,7 @@ export const UserDashboard = ({ userId }: { userId: UsersId }) => {
|
||||||
if (isLoading) return <LoadingPage />;
|
if (isLoading) return <LoadingPage />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mt-2 flex w-full flex-1 flex-col items-start justify-center gap-4 overflow-auto p-2 md:gap-6">
|
<div className="flex w-full flex-1 flex-col items-start justify-center gap-4 overflow-auto p-2 md:gap-6">
|
||||||
<h3 className="font-bold text-2xl">Le tue ricerche</h3>
|
<h3 className="font-bold text-2xl">Le tue ricerche</h3>
|
||||||
|
|
||||||
<div className="flex w-full flex-1 grow flex-col space-y-5">
|
<div className="flex w-full flex-1 grow flex-col space-y-5">
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import {
|
||||||
CircleCheck,
|
CircleCheck,
|
||||||
CircleCheckBig,
|
CircleCheckBig,
|
||||||
CircleMinus,
|
CircleMinus,
|
||||||
|
Clock,
|
||||||
ClockFading,
|
ClockFading,
|
||||||
type LucideIcon,
|
type LucideIcon,
|
||||||
PackageCheck,
|
PackageCheck,
|
||||||
|
|
@ -58,9 +59,9 @@ export const ServizioList = ({
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (servizi.length === 1 && servizi[0]) {
|
// if (servizi.length === 1 && servizi[0]) {
|
||||||
return <Servizio isAdmin={isAdmin} servizio={servizi[0]} userId={userId} />;
|
// return <Servizio isAdmin={isAdmin} servizio={servizi[0]} userId={userId} />;
|
||||||
}
|
// }
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-4">
|
<div className="flex flex-col gap-4">
|
||||||
{servizi.map((servizio) => (
|
{servizi.map((servizio) => (
|
||||||
|
|
@ -198,11 +199,18 @@ const Content = () => {
|
||||||
return (
|
return (
|
||||||
<div className="w-full space-y-4">
|
<div className="w-full space-y-4">
|
||||||
<div className="flex flex-col flex-wrap items-start justify-between gap-4 sm:flex-row">
|
<div className="flex flex-col flex-wrap items-start justify-between gap-4 sm:flex-row">
|
||||||
<div>
|
<div className="flex flex-col gap-1">
|
||||||
<h3 className="font-semibold text-xl">
|
<h3 className="font-semibold text-xl">
|
||||||
{t.servizio.servizio_titolo} {servizio.tipologia}
|
{t.servizio.servizio_titolo} {servizio.tipologia}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
<div className="flex items-center gap-2 text-muted-foreground text-sm">
|
||||||
|
<Clock className="size-5" />
|
||||||
|
<span>
|
||||||
|
Creato il: {servizio.created_at.toLocaleDateString("it-IT")}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-wrap items-center gap-2 text-muted-foreground text-sm">
|
<div className="flex flex-wrap items-center gap-2 text-muted-foreground text-sm">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<CalendarClock className="size-5" />
|
<CalendarClock className="size-5" />
|
||||||
|
|
|
||||||
|
|
@ -118,14 +118,15 @@ export const ServizioPacksInfos = () => {
|
||||||
<Collapsible className="flex flex-col gap-2">
|
<Collapsible className="flex flex-col gap-2">
|
||||||
<CollapsibleTrigger asChild>
|
<CollapsibleTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
className="h-fit w-fit flex-wrap items-center py-1"
|
className="h-fit w-full flex-wrap items-center justify-start py-1 sm:w-fit sm:justify-center"
|
||||||
|
size="sm"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
>
|
>
|
||||||
<Euro className="size-5" />
|
<Euro className="size-5" />
|
||||||
|
|
||||||
<h3 className="font-semibold text-lg">{t.servizio.prezzi.title}</h3>
|
<h3 className="font-semibold text-lg">{t.servizio.prezzi.title}</h3>
|
||||||
|
|
||||||
<ChevronDown className="size-4" />
|
<ChevronDown className="ml-auto size-4 sm:ml-0" />
|
||||||
</Button>
|
</Button>
|
||||||
</CollapsibleTrigger>
|
</CollapsibleTrigger>
|
||||||
<CollapsibleContent className="flex flex-col gap-2">
|
<CollapsibleContent className="flex flex-col gap-2">
|
||||||
|
|
|
||||||
|
|
@ -696,8 +696,8 @@ export const it: LangDict = {
|
||||||
areaRiservataUserNav: [
|
areaRiservataUserNav: [
|
||||||
{
|
{
|
||||||
href: "/area-riservata/dashboard",
|
href: "/area-riservata/dashboard",
|
||||||
icon: "dashboard",
|
icon: "search",
|
||||||
title: "Dashboard",
|
title: "Servizi di ricerca",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: "/area-riservata/comunicazioni",
|
href: "/area-riservata/comunicazioni",
|
||||||
|
|
@ -760,8 +760,8 @@ export const it: LangDict = {
|
||||||
loginMenuUser: [
|
loginMenuUser: [
|
||||||
{
|
{
|
||||||
href: "/area-riservata/dashboard",
|
href: "/area-riservata/dashboard",
|
||||||
icon: { className: "", icon: "dashboard" },
|
icon: { className: "", icon: "search" },
|
||||||
title: "Dashboard",
|
title: "Servizi di ricerca",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: "/area-riservata/comunicazioni",
|
href: "/area-riservata/comunicazioni",
|
||||||
|
|
|
||||||
|
|
@ -35,17 +35,17 @@ const ServizioPage: NextPageWithLayout<ServizioPageProps> = ({
|
||||||
return <Status500 />;
|
return <Status500 />;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className="mt-2 flex w-full flex-1 flex-col items-start justify-center gap-4 overflow-auto p-2 md:gap-6">
|
<div className="flex w-full flex-1 flex-col items-start justify-center gap-3 overflow-auto p-2 md:gap-6">
|
||||||
<div className="flex w-full flex-col gap-4">
|
<div className="flex w-full flex-col gap-2">
|
||||||
<div className="flex w-full items-center justify-between">
|
<div className="flex w-full items-center justify-between">
|
||||||
<h3 className="font-semibold text-2xl">
|
<h3 className="font-semibold text-xl">
|
||||||
{t.servizio.dettaglio_servizio}
|
{t.servizio.dettaglio_servizio}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<Link href="/area-riservata/dashboard">
|
<Link href="/area-riservata/dashboard">
|
||||||
<Button size="sm" variant="outline">
|
<Button size="sm" variant="outline">
|
||||||
<ArrowRight className="size-4" />
|
<ArrowRight className="size-4" />
|
||||||
{t.servizio.torna_alla_dashboard}
|
<span>lista servizi</span>
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue