From 38e423dce73fa38a85e58695db4447ac4d078fb9 Mon Sep 17 00:00:00 2001 From: "Francis X. Clampazzo" Date: Fri, 16 Oct 2026 10:34:14 -0400 Subject: [PATCH] Make Date in editable on the order summary form The Date in field on the order detail page was a disabled text input. Now a date input posted with the summary form, and POST /orders/:id persists date_in like the other date fields. --- src/routes/orders.ts | 3 ++- src/views/orders/_order_summary.njk | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/orders.ts b/src/routes/orders.ts index 9cb608f..39c3b7e 100644 --- a/src/routes/orders.ts +++ b/src/routes/orders.ts @@ -233,12 +233,13 @@ router.post('/orders/:id', (req, res) => { db.prepare( `UPDATE service_orders SET job_type = ?, status = ?, - date_out = ?, due_date = ?, terms = ?, internal_note = ?, + date_in = ?, date_out = ?, due_date = ?, terms = ?, internal_note = ?, tax = ?, shipping = ?, pickup_delivery = ?, service_call = ?, disposal = ?, amount_paid = ? WHERE id = ?` ).run( b.job_type || null, STATUSES.includes(b.status) ? b.status : 'OPEN', + b.date_in || null, b.date_out || null, b.due_date || null, b.terms || null, diff --git a/src/views/orders/_order_summary.njk b/src/views/orders/_order_summary.njk index 4a82a32..fca84c9 100644 --- a/src/views/orders/_order_summary.njk +++ b/src/views/orders/_order_summary.njk @@ -19,7 +19,7 @@ {% endfor %} - +