Uusi TODO-moduuli: Tehtävät + Kehitysehdotukset + Ajanseuranta

Talon sisäinen tehtävienhallinta kahdella alatabilla:

Tehtävät (admin luo):
- Prioriteetti (normaali/tärkeä/kiireellinen), status, deadline
- Vastuuhenkilö-osoitus, inline-muokkaus lukunäkymässä
- Aikakirjaukset: pvm, tunnit, kuvaus - kaikki voivat kirjata
- Myöhästyneet = punainen reunus, lähestyvät = keltainen
- Kommentointi kaikille käyttäjille

Kehitysehdotukset (kaikki voivat luoda):
- Status: ehdotettu → harkinnassa → toteutettu/hylätty (admin muuttaa)
- Kommentointi kaikille
- Ehdottaja voi muokata omia

Tietokanta: 3 taulua (todos, todo_comments, todo_time_entries)
API: 10 endpointtia oikeustarkistuksineen
Frontend: Sub-tab navigointi, kortti-grid, 3-näkymämalli per alatabi

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 13:14:53 +02:00
parent ec86263c5c
commit 4a1dccb6ff
5 changed files with 958 additions and 2 deletions

View File

@@ -1124,6 +1124,30 @@ span.empty {
.guide-img { max-width:400px; border-radius:8px; margin:0.75rem 0; cursor:zoom-in; transition:box-shadow 0.15s; border:1px solid #e0e0e0; display:block; }
.guide-img:hover { box-shadow:0 4px 20px rgba(0,0,0,0.18); border-color:#bbb; }
/* Todo-moduuli */
.todo-card { background:#fff; border-radius:12px; padding:1.25rem; box-shadow:0 1px 4px rgba(0,0,0,0.06); cursor:pointer; transition:transform 0.15s, box-shadow 0.15s; border:2px solid transparent; display:flex; flex-direction:column; }
.todo-card:hover { transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,0.1); border-color:var(--primary-color); }
.todo-card.overdue { border-color:#e74c3c; }
.todo-card.deadline-soon { border-color:#f39c12; }
.priority-badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:0.72rem; font-weight:600; }
.priority-normaali { background:#e8ebf0; color:#555; }
.priority-tarkea { background:#fff3cd; color:#856404; }
.priority-kiireellinen { background:#fde8e8; color:#dc2626; }
.todo-status { display:inline-block; padding:2px 8px; border-radius:10px; font-size:0.72rem; font-weight:600; }
.status-avoin { background:#e3f2fd; color:#1565c0; }
.status-kaynnissa { background:#e8f5e9; color:#2e7d32; }
.status-odottaa { background:#fff8e1; color:#f57f17; }
.status-valmis { background:#f5f5f5; color:#888; }
.status-ehdotettu { background:#e3f2fd; color:#1565c0; }
.status-harkinnassa { background:#fff8e1; color:#f57f17; }
.status-toteutettu { background:#e8f5e9; color:#2e7d32; }
.status-hylatty { background:#fde8e8; color:#dc2626; }
.time-entries-table { width:100%; border-collapse:collapse; font-size:0.88rem; }
.time-entries-table th, .time-entries-table td { padding:0.5rem 0.75rem; text-align:left; border-bottom:1px solid #f0f2f5; }
.time-entries-table th { font-weight:600; color:#888; font-size:0.78rem; text-transform:uppercase; }
.todo-comment { padding:0.75rem; margin-bottom:0.5rem; background:#fafbfc; border-radius:8px; border-left:3px solid var(--primary-color); }
.todo-comment-meta { font-size:0.78rem; color:#888; margin-bottom:0.25rem; }
/* Role badge */
.role-badge {
display: inline-block;