feat(tasks): add optional "none" priority level for tasks without urgency

New tasks default to "none" priority instead of "medium". Tasks with no
priority hide the badge in list and dashboard views, reducing visual noise
for routine items. Includes DB migration v4 and i18n keys (de, en, it).

Closes #15
This commit is contained in:
Ulas
2026-04-04 22:13:51 +02:00
parent 2508473265
commit 2c36fa0307
11 changed files with 64 additions and 11 deletions
+3 -3
View File
@@ -18,7 +18,7 @@ const router = express.Router();
// Konstanten
// --------------------------------------------------------
const VALID_PRIORITIES = ['low', 'medium', 'high', 'urgent'];
const VALID_PRIORITIES = ['none', 'low', 'medium', 'high', 'urgent'];
const VALID_STATUSES = ['open', 'in_progress', 'done'];
const VALID_CATEGORIES = ['Haushalt', 'Schule', 'Einkauf', 'Reparatur',
'Gesundheit', 'Finanzen', 'Freizeit', 'Sonstiges'];
@@ -96,7 +96,7 @@ router.get('/', (req, res) => {
ORDER BY
CASE t.status WHEN 'done' THEN 1 ELSE 0 END,
CASE t.priority WHEN 'urgent' THEN 0 WHEN 'high' THEN 1
WHEN 'medium' THEN 2 ELSE 3 END,
WHEN 'medium' THEN 2 WHEN 'low' THEN 3 ELSE 4 END,
t.due_date ASC NULLS LAST,
t.created_at DESC
`;
@@ -148,7 +148,7 @@ router.post('/', (req, res) => {
title,
description = null,
category = 'Sonstiges',
priority = 'medium',
priority = 'none',
due_date = null,
due_time = null,
assigned_to = null,