-
Notifications
You must be signed in to change notification settings - Fork 27
Feature/botao buscar scraper auto #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
960bf44
6576ace
52d2457
c8e9d84
b081101
c9a6f6e
bbb1ea3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,27 @@ | ||
| import { Badge } from "@/components/ui/badge"; | ||
| import { Card, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; | ||
| import type { JobsMeta } from "@/types/jobs"; | ||
| import { BriefcaseBusiness, FileSpreadsheet } from "lucide-react"; | ||
| import type { ReactNode } from "react"; | ||
| import { | ||
| CardDescription, | ||
| CardTitle, | ||
| } from "@/components/ui/card"; | ||
| import Logo from "../assets/logo-painel-vagas.svg"; | ||
| import { ThemeToggle } from "@/components/ui/theme-toggle"; | ||
| import { useTheme } from "@/hooks/useTheme"; | ||
|
|
||
| interface JobsHeaderCardProps { | ||
| meta: JobsMeta; | ||
| actions?: ReactNode; | ||
| } | ||
|
|
||
| export function JobsHeaderCard({ meta, actions }: JobsHeaderCardProps) { | ||
| export function JobsHeaderCard() { | ||
| const { resolvedTheme, toggleTheme } = useTheme(); | ||
| return ( | ||
| <Card className="border-border/70 bg-card/85 backdrop-blur dark:bg-card/95"> | ||
| <CardHeader className="gap-4 pb-4 md:flex-row md:items-center md:justify-between"> | ||
| <div> | ||
| <CardTitle className="text-3xl">Painel de Vagas</CardTitle> | ||
| <CardDescription>Leitura automatica dos arquivos XLSX gerados em output.</CardDescription> | ||
| </div> | ||
| <div className="flex flex-wrap items-center gap-2"> | ||
| {actions} | ||
| <Badge variant="secondary" className="gap-1 text-xs"> | ||
| <FileSpreadsheet className="h-3.5 w-3.5" /> | ||
| {meta.file || "Sem arquivo"} | ||
| </Badge> | ||
| <Badge className="gap-1 text-xs"> | ||
| <BriefcaseBusiness className="h-3.5 w-3.5" /> | ||
| {meta.total} vagas | ||
| </Badge> | ||
| <> | ||
| <div className="w-screen bg-[#004726] dark:bg-[#003318] p-6 -mx-8 flex items-end"> | ||
| <CardTitle className="text-3xl text-white"> | ||
| <img src={Logo} alt="Painel de Vagas" /> | ||
| </CardTitle> | ||
| <CardDescription className="text-white"> | ||
| Leitura automatica dos arquivos XLSX gerados em output. | ||
| </CardDescription> | ||
| <div className="ml-auto self-start mr-8"> | ||
| <ThemeToggle theme={resolvedTheme} onToggle={toggleTheme} /> | ||
| </div> | ||
| </CardHeader> | ||
| </Card> | ||
| </div> | ||
|
|
||
| </> | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -35,7 +35,7 @@ export function JobsTableCard({ | |||||
| onPageSizeChange, | ||||||
| }: JobsTableCardProps) { | ||||||
| return ( | ||||||
| <Card className="border-border/70 bg-card/90 backdrop-blur dark:bg-card/95"> | ||||||
| <Card className="border-border/70 bg-card/90 backdrop-blur dark:bg-card/95 mb-4"> | ||||||
| <CardHeader> | ||||||
| <CardTitle className="text-lg">Vagas Encontradas</CardTitle> | ||||||
| <CardDescription> | ||||||
|
|
@@ -44,7 +44,7 @@ export function JobsTableCard({ | |||||
| </CardHeader> | ||||||
| <CardContent> | ||||||
| {error ? ( | ||||||
| <div className="rounded-md border border-red-500/40 bg-red-500/10 p-4 text-sm text-red-700 dark:text-red-300"> | ||||||
| <div className="rounded-md border border-red-500/40 bg-red-500/10 p-4 text-sm text-red-700 dark:text-red-300 mb-4"> | ||||||
| {error} | ||||||
| </div> | ||||||
| ) : null} | ||||||
|
|
@@ -91,36 +91,36 @@ export function JobsTableCard({ | |||||
| <Table> | ||||||
| <TableHeader> | ||||||
| <TableRow> | ||||||
| <TableHead>Palavra-chave</TableHead> | ||||||
| <TableHead>Titulo</TableHead> | ||||||
| <TableHead>Empresa</TableHead> | ||||||
| <TableHead>Fonte</TableHead> | ||||||
| <TableHead>Local</TableHead> | ||||||
| <TableHead>Link</TableHead> | ||||||
| <TableHead>Palavra-chave</TableHead> | ||||||
| <TableHead>Fonte</TableHead> | ||||||
| </TableRow> | ||||||
| </TableHeader> | ||||||
| <TableBody> | ||||||
| {paginatedJobs.map((job, index) => ( | ||||||
| <TableRow key={`${job.link || `${job.titulo || "vaga"}-${index}`}-${index}`}> | ||||||
| <TableCell>{job.palavra || "-"}</TableCell> | ||||||
| <TableCell className="font-medium">{job.titulo || "-"}</TableCell> | ||||||
| <TableCell>{job.empresa || "-"}</TableCell> | ||||||
| <TableCell>{job.source || "-"}</TableCell> | ||||||
| <TableCell>{job.local || "-"}</TableCell> | ||||||
| <TableCell> | ||||||
| {job.link ? ( | ||||||
| <a | ||||||
| href={job.link} | ||||||
| target="_blank" | ||||||
| rel="noreferrer" | ||||||
| className="text-primary underline-offset-4 hover:underline" | ||||||
| className="text-primary underline-offset-4 hover:underline dark:text-[#14AE5C]" | ||||||
|
||||||
| className="text-primary underline-offset-4 hover:underline dark:text-[#14AE5C]" | |
| className="text-primary underline-offset-4 hover:underline" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
w-screentogether with a fixed-mx-8inside a container that haspx-4on small screens can create horizontal overflow/scroll (the negative margin overcompensates the parent padding whenpx-4is active). Consider usingw-fullwith padding handled by the parent, or make the negative margin responsive (e.g. matchpx-4on small andpx-8on md+) to avoid layout overflow.