edit customer save button should return to customer list
This commit is contained in:
@@ -91,6 +91,13 @@ scripts/backup.ts # nightly SQLite backup via better-sqlite3's backup API
|
||||
rather than a plain 3xx, since HTMX needs that header to force a full-page
|
||||
navigation after an XHR delete.
|
||||
|
||||
## Verifying UI changes
|
||||
|
||||
Don't spin up Playwright/chromium-cli/headless-browser automation to verify
|
||||
frontend changes in this repo. Make the code change, explain what you did and
|
||||
why it should work, and ask the user (Dad's the only one who runs this app)
|
||||
to check it in their own browser.
|
||||
|
||||
## Data model notes worth remembering
|
||||
|
||||
- `order_number` starts at 8247, is allocated via `MAX(order_number) + 1` in
|
||||
|
||||
@@ -164,6 +164,7 @@ input:focus, select:focus, textarea:focus {
|
||||
button, .button-link {
|
||||
font-family: var(--font-body);
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.4;
|
||||
background: var(--color-wood-mid);
|
||||
color: var(--color-text-on-dark);
|
||||
border: none;
|
||||
|
||||
@@ -55,7 +55,7 @@ router.post('/:id/edit', (req, res) => {
|
||||
|
||||
if (info.changes === 0) return res.status(404).send('Customer not found');
|
||||
|
||||
res.redirect(303, `/customers/${req.params.id}/edit`);
|
||||
res.redirect(303, '/customers');
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user