Files
next-learn/dashboard/15-final/app/lib/actions.ts
Stephanie Dietz 7e4b69351e Add database (#153)
* add database to project. Seed data. Update customerId to customer_id

* seed customers table data

* use database everywhere

* refactor

* fix ts lint errors

* add type to invoice edit page

* remove fetch-data file and fetch data directly in components

* update lates invoices to use sql

* in invoice table,  search the database here with SQL

* rename tsx files to ts and add node script to seed data

* address rest of PR comments

* move all data fetches to own file

* add types to filter invoices function

* remove unused param

* prettier

* update function names
2023-09-13 12:16:09 -05:00

12 lines
282 B
TypeScript

'use server';
export async function deleteInvoice(id: number) {
// TO DO: Add delete invoice logic
console.log('Delete invoice', id);
}
export async function addOrUpdateInvoice(formData: FormData) {
// TO DO: Add create/update invoice logic
console.log('Edit Invoice');
}