diff --git a/src/client/components/CandidateCard.tsx b/src/client/components/CandidateCard.tsx index e1b198f..4d25272 100644 --- a/src/client/components/CandidateCard.tsx +++ b/src/client/components/CandidateCard.tsx @@ -18,6 +18,8 @@ interface CandidateCardProps { isActive: boolean; status: "researching" | "ordered" | "arrived"; onStatusChange: (status: "researching" | "ordered" | "arrived") => void; + pros?: string | null; + cons?: string | null; } export function CandidateCard({ @@ -33,6 +35,8 @@ export function CandidateCard({ isActive, status, onStatusChange, + pros, + cons, }: CandidateCardProps) { const unit = useWeightUnit(); const currency = useCurrency(); @@ -174,6 +178,11 @@ export function CandidateCard({ {categoryName} + {(pros || cons) && ( + + +/- Notes + + )} diff --git a/src/client/components/CandidateForm.tsx b/src/client/components/CandidateForm.tsx index a96077f..8aeb1eb 100644 --- a/src/client/components/CandidateForm.tsx +++ b/src/client/components/CandidateForm.tsx @@ -19,6 +19,8 @@ interface FormData { notes: string; productUrl: string; imageFilename: string | null; + pros: string; + cons: string; } const INITIAL_FORM: FormData = { @@ -29,6 +31,8 @@ const INITIAL_FORM: FormData = { notes: "", productUrl: "", imageFilename: null, + pros: "", + cons: "", }; export function CandidateForm({ @@ -61,6 +65,8 @@ export function CandidateForm({ notes: candidate.notes ?? "", productUrl: candidate.productUrl ?? "", imageFilename: candidate.imageFilename, + pros: candidate.pros ?? "", + cons: candidate.cons ?? "", }); } } else if (mode === "add") { @@ -110,6 +116,8 @@ export function CandidateForm({ notes: form.notes.trim() || undefined, productUrl: form.productUrl.trim() || undefined, imageFilename: form.imageFilename ?? undefined, + pros: form.pros.trim() || undefined, + cons: form.cons.trim() || undefined, }; if (mode === "add") { @@ -239,6 +247,42 @@ export function CandidateForm({ /> + {/* Pros */} +
+ +