Implement proof of payment download routes
Added two download routes for proof of payment files: 1. Combined route: /share/proof-of-payment/combined/[id]/ - Downloads location-level proof of payment for all utilities - Queries utilBillsProofOfPayment from location - Optimized projection for efficient data transfer 2. Per-bill route: /share/proof-of-payment/per-bill/[id]/ - Downloads proof of payment for individual bills - Parses composite ID format: locationID-billID - Finds specific bill in location's bills array - Returns bill.proofOfPayment Both routes: - Return PDF files with proper Content-Type and headers - Handle 404 for missing locations/bills/proofs - Use Base64 to binary conversion for file delivery - Include Last-Modified header for caching - Use optimized database projections 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col items-center justify-center p-6 bg-base-300">
|
||||
<h2 className="text-2xl font-bold">Proof of payment not found</h2>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user