Chapter 12 - Implement updating an invoice
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
} from '@heroicons/react/24/outline';
|
||||
import Link from 'next/link';
|
||||
import { Button } from '@/app/ui/button';
|
||||
import { updateInvoice } from '@/app/lib/actions';
|
||||
|
||||
export default function EditInvoiceForm({
|
||||
invoice,
|
||||
@@ -17,8 +18,10 @@ export default function EditInvoiceForm({
|
||||
invoice: InvoiceForm;
|
||||
customers: CustomerField[];
|
||||
}) {
|
||||
|
||||
const updateInvoiceWithId = updateInvoice.bind(null, invoice.id);
|
||||
return (
|
||||
<form>
|
||||
<form action={updateInvoiceWithId}>
|
||||
<div className="rounded-md bg-gray-50 p-4 md:p-6">
|
||||
{/* Customer Name */}
|
||||
<div className="mb-4">
|
||||
|
||||
Reference in New Issue
Block a user