mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-19 13:21:46 +00:00
feat: bag tracking with weight distribution, packing UX overhaul — closes #13
- Bag tracking: optional admin setting under Packing addon, weight per item, bag assignment with inline creation, iOS-style weight sidebar + mobile modal - Admin: merged Categories + Packing Templates into "Configuration" tab - Packing UI: category-first workflow, mobile-friendly action buttons, stable category ordering, responsive button labels
This commit is contained in:
@@ -266,6 +266,19 @@ router.delete('/invites/:id', (_req: Request, res: Response) => {
|
||||
res.json({ success: true });
|
||||
});
|
||||
|
||||
// ── Bag Tracking Setting ────────────────────────────────────────────────────
|
||||
|
||||
router.get('/bag-tracking', (_req: Request, res: Response) => {
|
||||
const row = db.prepare("SELECT value FROM app_settings WHERE key = 'bag_tracking_enabled'").get() as { value: string } | undefined;
|
||||
res.json({ enabled: row?.value === 'true' });
|
||||
});
|
||||
|
||||
router.put('/bag-tracking', (req: Request, res: Response) => {
|
||||
const { enabled } = req.body;
|
||||
db.prepare("INSERT OR REPLACE INTO app_settings (key, value) VALUES ('bag_tracking_enabled', ?)").run(enabled ? 'true' : 'false');
|
||||
res.json({ enabled: !!enabled });
|
||||
});
|
||||
|
||||
// ── Packing Templates ───────────────────────────────────────────────────────
|
||||
|
||||
router.get('/packing-templates', (_req: Request, res: Response) => {
|
||||
|
||||
Reference in New Issue
Block a user