Changeset 057453c for src/sections/invoice/invoice-details.tsx
- Timestamp:
- 02/26/25 10:05:32 (5 weeks ago)
- Branches:
- main
- Children:
- 299af01
- Parents:
- 5d6f37a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sections/invoice/invoice-details.tsx
r5d6f37a r057453c 18 18 import { fCurrency } from 'src/utils/format-number'; 19 19 // types 20 import { Invoice } from ' mvpmasters-shared';20 import { Invoice } from 'src/schemas'; 21 21 // components 22 22 import Label from 'src/components/label'; … … 28 28 import { getQuantityType } from 'src/utils/get-invoice-quantity-type'; 29 29 import InvoiceToolbar from './invoice-toolbar'; 30 import { updateInvoice } from 'src/api/invoice'; 30 31 31 32 // ---------------------------------------------------------------------- … … 59 60 const handleChangeStatus = useCallback( 60 61 async (event: React.ChangeEvent<HTMLInputElement>) => { 61 await updateDocument(collections.invoice, invoice.id, { status: event.target.value }); 62 // await updateDocument(collections.invoice, invoice.id, { status: event.target.value }); 63 await updateInvoice(invoice.id, { 64 status: event.target.value as 'draft' | 'processing' | 'pending' | 'overdue' | 'paid', 65 }); 62 66 mutate([collections.invoice, invoice.id]); 63 67 }, … … 240 244 {invoice.invoiceTo.name} 241 245 <br /> 242 {!!invoice.invoiceTo.company Id&& (246 {!!invoice.invoiceTo.companyNumber && ( 243 247 <> 244 Company ID: {invoice.invoiceTo.company Id}248 Company ID: {invoice.invoiceTo.companyNumber} 245 249 <br /> 246 250 </> … … 257 261 Date Issued 258 262 </Typography> 259 {fDate(invoice.createDate .toDate())}263 {fDate(invoice.createDate)} 260 264 </Stack> 261 265 … … 264 268 Due Date 265 269 </Typography> 266 {fDate(invoice.dueDate .toDate())}270 {fDate(invoice.dueDate)} 267 271 </Stack> 268 272 </Box>
Note:
See TracChangeset
for help on using the changeset viewer.