fix(web): repair EFT receipt download and add EFT payment filter
The receipt link read payment.receiptUrl, but the API returns the column as eftReceiptUrl — so the download button never rendered (dead feature). Use eftReceiptUrl. Also add the missing "EFT" option to the method filter; EFT is a live method with rows and receipts but couldn't be filtered. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@ interface Payment {
|
||||
method: "stripe" | "eft";
|
||||
status: "completed" | "pending" | "failed" | "refunded";
|
||||
planName?: string;
|
||||
receiptUrl?: string;
|
||||
eftReceiptUrl?: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ function BillingPage() {
|
||||
|
||||
{/* Method Filter */}
|
||||
<div className="flex gap-1">
|
||||
{["all", "stripe"].map((method) => (
|
||||
{["all", "stripe", "eft"].map((method) => (
|
||||
<Button
|
||||
key={method}
|
||||
variant={methodFilter === method ? "default" : "outline"}
|
||||
@@ -163,10 +163,10 @@ function BillingPage() {
|
||||
|
||||
{/* Actions */}
|
||||
<div className="text-right">
|
||||
{payment.method === "eft" && payment.receiptUrl && (
|
||||
{payment.eftReceiptUrl && (
|
||||
<Button variant="ghost" size="sm" asChild>
|
||||
<a
|
||||
href={payment.receiptUrl}
|
||||
href={payment.eftReceiptUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
download
|
||||
|
||||
Reference in New Issue
Block a user