mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-15 19:27:53 +02:00
Feat: Ajout de l'icône de priorité pour les tâches
Implémente un système de marquage de priorité pour les tâches avec une icône étoile cliquable. Fonctionnalités ajoutées : - Champ priority (BOOLEAN) ajouté aux tables global_todos et note_todos - Migration automatique avec script add-priority-field.js - Route API PATCH /api/todos/:id/priority pour basculer la priorité - Icône étoile (Star) dans l'interface frontend - Tri automatique : tâches prioritaires en premier - Index PostgreSQL pour optimiser les performances Comportement de l'icône : - Toujours visible et jaune quand la tâche est prioritaire - Visible au survol (hover) quand la tâche n'est pas prioritaire - Un clic bascule l'état prioritaire/non prioritaire - Affichage discret (opacity 50%) pour les tâches complétées Scripts npm ajoutés : - npm run db:migrate:priority - Exécuter la migration Routes API mises à jour : - GET /api/todos - Inclut le champ priority, tri par priorité - POST /api/todos - Accepte le champ priority - PUT /api/todos/:id - Accepte le champ priority - PATCH /api/todos/:id/priority - Bascule la priorité (nouveau) UI améliorée : - Icône étoile jaune pour les tâches prioritaires - Animation au survol pour les interactions - Tooltip explicatif au survol - Onglets "Actives" et "Complétées" mis à jour
This commit is contained in:
6 files changed
+160
-8
No files matched your search
@@ -74,6 +74,7 @@ async function initDatabase() {
|
||||
text TEXT NOT NULL,
|
||||
completed BOOLEAN DEFAULT FALSE,
|
||||
completed_at TIMESTAMP,
|
||||
priority BOOLEAN DEFAULT FALSE,
|
||||
position INTEGER DEFAULT 0,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
)
|
||||
@@ -87,6 +88,7 @@ async function initDatabase() {
|
||||
text TEXT NOT NULL,
|
||||
completed BOOLEAN DEFAULT FALSE,
|
||||
completed_at TIMESTAMP,
|
||||
priority BOOLEAN DEFAULT FALSE,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
)
|
||||
`);
|
||||
|
||||
Reference in new issue
Block a user