Replace printed/unprinted tabs with unified list and inline filters

- All checks shown in one table by default (load all, no server-side printed filter)
- Add payee search, date-from/to, and status filter controls to toolbar
- Filtering is client-side; no extra API calls on filter changes
- All checks get Edit/Delete buttons regardless of printed status
- All checks get checkboxes for PDF selection
- Remove separate Reprint button and reprintCheck function
- Remove printed guard from PUT and DELETE endpoints
This commit is contained in:
2026-03-12 21:12:08 -06:00
parent f827de9b1a
commit 667ec146cc
3 changed files with 46 additions and 51 deletions
-8
View File
@@ -86,10 +86,6 @@ router.put('/:id', (req, res) => {
const check = db.prepare('SELECT * FROM checks WHERE id = ?').get(req.params.id);
if (!check) return res.status(404).json({ error: 'Check not found' });
if (check.printed) {
return res.status(409).json({ error: 'Cannot edit a check that has been printed.' });
}
const { payee, amount, check_date, memo, note1, note2,
payee_address1, payee_address2, payee_address3, payee_address4 } = req.body;
@@ -120,10 +116,6 @@ router.delete('/:id', (req, res) => {
const check = db.prepare('SELECT * FROM checks WHERE id = ?').get(req.params.id);
if (!check) return res.status(404).json({ error: 'Check not found' });
if (check.printed) {
return res.status(409).json({ error: 'Cannot delete a check that has been printed.' });
}
db.prepare('DELETE FROM checks WHERE id = ?').run(req.params.id);
res.status(204).send();
});