Their three commits (730d0bd,5a9b543,387edfb) reached production by push and auto-deployed.387edfbexpects a users.username column that the live database does not have, so POST /api/v1/auth/login was returning HTTP 500. Their schema changes never applied either (projects still has only id, name, description, start_date, pm_user_id, created_at), so nothing depends on the reverted code. This commit sets the tree back to exactlya02b3ea— verified with git diff against it — while keeping history linear: the work itself is preserved on 'pm' at387edfb.
50 lines
1.5 KiB
TypeScript
50 lines
1.5 KiB
TypeScript
import { Inbox } from "lucide-react";
|
|
import type { Quote, Store } from "../../lib/types";
|
|
import { QuoteCard } from "./QuoteCard";
|
|
import { EmptyState } from "../../components/EmptyState";
|
|
|
|
export interface LedgerTableProps {
|
|
store: Store;
|
|
quotes: Quote[];
|
|
expanded: Set<string>;
|
|
onToggleExpand: (id: string) => void;
|
|
onAccept: (id: string) => void;
|
|
onEdit: (id: string) => void;
|
|
}
|
|
|
|
// دفتر پیشنهادها — فهرست کارتها (واکنشگرا و بهینه برای موبایل)
|
|
export function LedgerTable({
|
|
store,
|
|
quotes,
|
|
expanded,
|
|
onToggleExpand,
|
|
onAccept,
|
|
onEdit,
|
|
}: LedgerTableProps) {
|
|
if (!quotes.length) {
|
|
return (
|
|
<div className="rounded-xl border border-line bg-panel p-2 sm:rounded-lg">
|
|
<EmptyState icon={Inbox} text="پیشنهادی مطابق فیلترها یافت نشد" />
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<div className="flex flex-col gap-2.5 sm:gap-3">
|
|
{quotes.map((q) => (
|
|
<QuoteCard
|
|
key={q.id}
|
|
store={store}
|
|
q={q}
|
|
expanded={expanded.has(q.id)}
|
|
onToggleExpand={() => onToggleExpand(q.id)}
|
|
onAccept={() => onAccept(q.id)}
|
|
onEdit={() => onEdit(q.id)}
|
|
/>
|
|
))}
|
|
<div className="px-2 py-3 text-center text-[10.5px] leading-5 text-muted sm:py-1 sm:text-[11px]">
|
|
هشدار «منقضی» = قیمت پیشنهادی از تاریخ انقضا گذشته؛ برای پیشبینی قیمت، شمارش نمیشود.
|
|
</div>
|
|
</div>
|
|
);
|
|
} |