mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
ensure that change isn't there
This commit is contained in:
parent
03502aed90
commit
2f1bb127b9
1 changed files with 83 additions and 0 deletions
|
|
@ -0,0 +1,83 @@
|
|||
"use client";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
import { HelpCircle } from "lucide-react";
|
||||
import { Card, CardContent } from "@/app/shadcn_components/ui/card";
|
||||
import type { ClassifiedDeal } from "./types";
|
||||
|
||||
const QUERIES_COLUMNS: (keyof ClassifiedDeal)[] = [
|
||||
"dealname",
|
||||
"landlordPropertyId",
|
||||
"outcome",
|
||||
"outcomeNotes",
|
||||
"coordinationStatus",
|
||||
];
|
||||
const QUERIES_LABELS: Partial<Record<keyof ClassifiedDeal, string>> = {
|
||||
dealname: "Address",
|
||||
landlordPropertyId: "Ref",
|
||||
outcome: "Outcome",
|
||||
outcomeNotes: "Notes",
|
||||
coordinationStatus: "Coordination Status",
|
||||
};
|
||||
|
||||
interface QueriesReviewPanelProps {
|
||||
deals: ClassifiedDeal[];
|
||||
onOpenTable: (
|
||||
stage: string,
|
||||
deals: ClassifiedDeal[],
|
||||
columns?: (keyof ClassifiedDeal)[],
|
||||
columnLabels?: Partial<Record<keyof ClassifiedDeal, string>>,
|
||||
breakdown?: Record<string, ClassifiedDeal[]>,
|
||||
) => void;
|
||||
}
|
||||
|
||||
export default function QueriesReviewPanel({
|
||||
deals,
|
||||
onOpenTable,
|
||||
}: QueriesReviewPanelProps) {
|
||||
const queriesDeals = deals.filter((d) => d.displayStage === "Queries");
|
||||
|
||||
if (queriesDeals.length === 0) return null;
|
||||
|
||||
return (
|
||||
<Card className="border border-amber-200 shadow-sm">
|
||||
<CardContent className="p-6">
|
||||
<div className="flex items-center gap-2 mb-1">
|
||||
<HelpCircle className="h-4 w-4 text-amber-500" />
|
||||
<h3 className="text-base font-semibold text-amber-700">
|
||||
Queries / Review with Landlord
|
||||
</h3>
|
||||
</div>
|
||||
<p className="text-sm text-gray-500 mb-5">
|
||||
Properties still in the programme but parked pending manual review or
|
||||
landlord input — not counted in the pipeline stages above.
|
||||
</p>
|
||||
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
||||
<motion.button
|
||||
whileHover={{ scale: 1.02 }}
|
||||
onClick={() =>
|
||||
onOpenTable(
|
||||
"Queries / Review with Landlord",
|
||||
queriesDeals,
|
||||
QUERIES_COLUMNS,
|
||||
QUERIES_LABELS,
|
||||
)
|
||||
}
|
||||
className="group text-left rounded-xl border border-amber-200 bg-gradient-to-br from-amber-50 to-white p-4 hover:border-amber-300 hover:shadow-md transition-all duration-200"
|
||||
>
|
||||
<p className="text-xs font-semibold text-amber-600 uppercase tracking-wide mb-2 leading-tight">
|
||||
Queries / Review
|
||||
</p>
|
||||
<p className="text-2xl font-bold text-amber-800">
|
||||
{queriesDeals.length}
|
||||
</p>
|
||||
<p className="text-xs text-amber-600/80 mt-0.5">
|
||||
Needs manual review or landlord support before progressing
|
||||
</p>
|
||||
</motion.button>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue