TailoredSummary component
This commit is contained in:
@@ -41,7 +41,7 @@ import {
|
|||||||
} from "@/components/ui/accordion";
|
} from "@/components/ui/accordion";
|
||||||
import { cn, copyTextToClipboard, formatJobForWebhook } from "@/lib/utils";
|
import { cn, copyTextToClipboard, formatJobForWebhook } from "@/lib/utils";
|
||||||
import * as api from "../api";
|
import * as api from "../api";
|
||||||
import { FitAssessment, JobHeader } from ".";
|
import { FitAssessment, JobHeader, TailoredSummary } from ".";
|
||||||
import type { Job, ResumeProjectCatalogItem } from "../../shared/types";
|
import type { Job, ResumeProjectCatalogItem } from "../../shared/types";
|
||||||
|
|
||||||
interface ReadyPanelProps {
|
interface ReadyPanelProps {
|
||||||
@@ -95,8 +95,6 @@ export const ReadyPanel: React.FC<ReadyPanelProps> = ({
|
|||||||
.filter(Boolean) as string[];
|
.filter(Boolean) as string[];
|
||||||
}, [catalog, selectedProjectIds]);
|
}, [catalog, selectedProjectIds]);
|
||||||
|
|
||||||
const tailoredSummary = job?.tailoredSummary || null;
|
|
||||||
|
|
||||||
// Handle mark as applied with undo capability
|
// Handle mark as applied with undo capability
|
||||||
const handleMarkApplied = useCallback(async () => {
|
const handleMarkApplied = useCallback(async () => {
|
||||||
if (!job) return;
|
if (!job) return;
|
||||||
@@ -277,18 +275,7 @@ export const ReadyPanel: React.FC<ReadyPanelProps> = ({
|
|||||||
{/* Job identity - confirm this is the right role */}
|
{/* Job identity - confirm this is the right role */}
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<FitAssessment job={job} />
|
<FitAssessment job={job} />
|
||||||
|
<TailoredSummary job={job} />
|
||||||
{/* Tailored summary snippet - shows what's in the PDF */}
|
|
||||||
{tailoredSummary && (
|
|
||||||
<div className="rounded-lg border border-border/40 bg-muted/10 px-3 py-2.5">
|
|
||||||
<div className="text-[11px] font-medium uppercase tracking-wide text-muted-foreground mb-1.5">
|
|
||||||
Tailored Summary
|
|
||||||
</div>
|
|
||||||
<p className="text-xs text-foreground/80 leading-relaxed italic whitespace-pre-wrap">
|
|
||||||
"{tailoredSummary}"
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Project selection - expandable accordion */}
|
{/* Project selection - expandable accordion */}
|
||||||
<Accordion type="single" collapsible className="w-full">
|
<Accordion type="single" collapsible className="w-full">
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
|
import type { Job } from "../../shared/types";
|
||||||
|
|
||||||
|
interface TailoredSummaryProps {
|
||||||
|
job: Job;
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const TailoredSummary: React.FC<TailoredSummaryProps> = ({ job, className }) => {
|
||||||
|
if (!job.tailoredSummary) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={cn("rounded-lg border border-border/40 bg-muted/10 px-3 py-2.5", className)}>
|
||||||
|
<div className="text-[11px] font-medium uppercase tracking-wide text-muted-foreground mb-1.5">
|
||||||
|
Tailored Summary
|
||||||
|
</div>
|
||||||
|
<p className="text-xs text-foreground/80 leading-relaxed italic whitespace-pre-wrap">
|
||||||
|
"{job.tailoredSummary}"
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -4,7 +4,7 @@ import { ExternalLink, Loader2, Sparkles, XCircle } from "lucide-react";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
|
|
||||||
import { FitAssessment, JobHeader } from "..";
|
import { FitAssessment, JobHeader, TailoredSummary } from "..";
|
||||||
import type { Job } from "../../../shared/types";
|
import type { Job } from "../../../shared/types";
|
||||||
import { CollapsibleSection } from "./CollapsibleSection";
|
import { CollapsibleSection } from "./CollapsibleSection";
|
||||||
import { getPlainDescription } from "./helpers";
|
import { getPlainDescription } from "./helpers";
|
||||||
@@ -65,6 +65,7 @@ export const DecideMode: React.FC<DecideModeProps> = ({
|
|||||||
|
|
||||||
<div className='flex-1 py-6 space-y-6 overflow-y-auto'>
|
<div className='flex-1 py-6 space-y-6 overflow-y-auto'>
|
||||||
<FitAssessment job={job} />
|
<FitAssessment job={job} />
|
||||||
|
<TailoredSummary job={job} />
|
||||||
|
|
||||||
<CollapsibleSection
|
<CollapsibleSection
|
||||||
isOpen={showDescription}
|
isOpen={showDescription}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ export { Stats } from './Stats';
|
|||||||
export { StatusBadge } from './StatusBadge';
|
export { StatusBadge } from './StatusBadge';
|
||||||
export { ScoreIndicator } from './ScoreIndicator';
|
export { ScoreIndicator } from './ScoreIndicator';
|
||||||
export { JobHeader } from './JobHeader';
|
export { JobHeader } from './JobHeader';
|
||||||
|
export { TailoredSummary } from './TailoredSummary';
|
||||||
export { FitAssessment } from './FitAssessment';
|
export { FitAssessment } from './FitAssessment';
|
||||||
export { PipelineProgress } from './PipelineProgress';
|
export { PipelineProgress } from './PipelineProgress';
|
||||||
export { TailoringEditor } from './TailoringEditor';
|
export { TailoringEditor } from './TailoringEditor';
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
|||||||
import { Textarea } from "@/components/ui/textarea";
|
import { Textarea } from "@/components/ui/textarea";
|
||||||
import { cn, copyTextToClipboard, formatJobForWebhook, safeFilenamePart, stripHtml } from "@/lib/utils";
|
import { cn, copyTextToClipboard, formatJobForWebhook, safeFilenamePart, stripHtml } from "@/lib/utils";
|
||||||
|
|
||||||
import { DiscoveredPanel, JobHeader } from "../../components";
|
import { DiscoveredPanel, FitAssessment, JobHeader, TailoredSummary } from "../../components";
|
||||||
import { ReadyPanel } from "../../components/ReadyPanel";
|
import { ReadyPanel } from "../../components/ReadyPanel";
|
||||||
import { TailoringEditor } from "../../components/TailoringEditor";
|
import { TailoringEditor } from "../../components/TailoringEditor";
|
||||||
import * as api from "../../api";
|
import * as api from "../../api";
|
||||||
@@ -401,11 +401,8 @@ export const JobDetailPanel: React.FC<JobDetailPanelProps> = ({
|
|||||||
</TabsList>
|
</TabsList>
|
||||||
|
|
||||||
<TabsContent value="overview" className="space-y-3 pt-2">
|
<TabsContent value="overview" className="space-y-3 pt-2">
|
||||||
{selectedJob.suitabilityReason && (
|
<FitAssessment job={selectedJob} />
|
||||||
<div className="rounded border border-border/30 bg-muted/10 px-3 py-2 text-xs text-muted-foreground italic">
|
<TailoredSummary job={selectedJob} />
|
||||||
"{selectedJob.suitabilityReason}"
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="grid gap-2 text-xs sm:grid-cols-2">
|
<div className="grid gap-2 text-xs sm:grid-cols-2">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user