-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba2fb16
commit f2e549e
Showing
9 changed files
with
89 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
"use client" | ||
|
||
import { Session } from "next-auth" | ||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" | ||
import { Input } from "@/components/ui/input" | ||
import { Label } from "@/components/ui/label" | ||
|
||
type ProfileFormProps = { | ||
defaultValues: Session["user"] | undefined | ||
} | ||
|
||
export function ProfileCard({ defaultValues }: ProfileFormProps) { | ||
return ( | ||
<div className="space-y-8 flex flex-col gap-6"> | ||
<Card> | ||
<CardHeader> | ||
<CardTitle>Nome</CardTitle> | ||
<CardDescription>Nome do colaborador</CardDescription> | ||
</CardHeader> | ||
<CardContent> | ||
<Input readOnly value={defaultValues?.name as string} /> | ||
</CardContent> | ||
</Card> | ||
<Card> | ||
<CardHeader> | ||
<CardTitle>Email</CardTitle> | ||
<CardDescription>Email do colaborador</CardDescription> | ||
</CardHeader> | ||
<CardContent> | ||
<Input readOnly value={defaultValues?.email as string} /> | ||
</CardContent> | ||
</Card> | ||
</div> | ||
|
||
<Card> | ||
<CardHeader className="border-b border-border"> | ||
<CardTitle>Perfil</CardTitle> | ||
<CardDescription>Gerencie as configurações para o seu perfil</CardDescription> | ||
</CardHeader> | ||
<CardContent> | ||
<div className="mt-6"> | ||
<div className="space-y-6"> | ||
<div className="space-y-1"> | ||
<Label>Nome</Label> | ||
<Input readOnly value={defaultValues?.name as string} /> | ||
</div> | ||
<div className="space-y-1"> | ||
<Label >E-mail</Label> | ||
<Input readOnly value={defaultValues?.email as string} /> | ||
</div> | ||
</div> | ||
</div> | ||
</CardContent> | ||
</Card> | ||
|
||
) | ||
} |
28 changes: 28 additions & 0 deletions
28
src/app/app/vehicles/(main)/_components/edit-vehicle-dialog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"use client" | ||
|
||
import { DialogContent, DialogTrigger } from "@/components/ui/dialog"; | ||
import { Dialog } from "@radix-ui/react-dialog"; | ||
import { useRef } from "react"; | ||
|
||
type EditVehicleDialogProps = { | ||
children?: React.ReactNode, | ||
vehicle: { | ||
automaker: string | ||
|
||
} | ||
} | ||
|
||
export function EditVehicleDialog({ children, vehicle }: EditVehicleDialogProps) { | ||
|
||
const ref = useRef<HTMLDivElement>(null) | ||
return ( | ||
<Dialog> | ||
<DialogTrigger asChild> | ||
<div ref={ref}>{children}</div> | ||
</DialogTrigger> | ||
<DialogContent> | ||
<h1>{vehicle.automaker}</h1> | ||
</DialogContent> | ||
</Dialog> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters