Add multi-line sale builder with pending-draft safeguard
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
10
src/routes/invoices/[id]/+page.server.js
Normal file
10
src/routes/invoices/[id]/+page.server.js
Normal file
@ -0,0 +1,10 @@
|
||||
import { error } from '@sveltejs/kit';
|
||||
import { getInvoice } from '$lib/server/invoices.js';
|
||||
|
||||
export function load({ params }) {
|
||||
const result = getInvoice(params.id);
|
||||
if (!result || result.invoice.status !== 'saved') {
|
||||
throw error(404, 'Invoice not found');
|
||||
}
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user