feat: add debriefing functionality and enhance training unit filtering
Deploy Development / deploy (push) Successful in 36s
Test Suite / pytest-backend (push) Successful in 6s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Successful in 23s
Deploy Development / deploy (push) Successful in 36s
Test Suite / pytest-backend (push) Successful in 6s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Successful in 23s
- Introduced a new filter option for listing training units to show only those with pending debriefs. - Updated the dashboard to reflect changes in training unit statuses, renaming components for clarity. - Enhanced the Training Planning Page to manage debrief completion status, including UI elements for user interaction. - Improved API utility to support new filtering criteria for training units, ensuring accurate data retrieval.
This commit is contained in:
1 parent
40a3b4b8e6
commit
ff8fd78a31
5 files changed
+127
-15
No files matched your search
@@ -42,7 +42,7 @@ function Dashboard() {
|
||||
setTrainingHomeErr(null)
|
||||
try {
|
||||
const today = new Date().toISOString().slice(0, 10)
|
||||
const [upcomingRaw, recentRaw, plannedPool] = await Promise.all([
|
||||
const [upcomingRaw, reviewPendingRaw, plannedPool] = await Promise.all([
|
||||
api.listTrainingUnits({
|
||||
assigned_to_me: true,
|
||||
status: 'planned',
|
||||
@@ -52,9 +52,9 @@ function Dashboard() {
|
||||
}),
|
||||
api.listTrainingUnits({
|
||||
assigned_to_me: true,
|
||||
status: 'completed',
|
||||
debrief_pending: true,
|
||||
sort: 'desc',
|
||||
limit: 6,
|
||||
limit: 8,
|
||||
}),
|
||||
api.listTrainingUnits({
|
||||
assigned_to_me: true,
|
||||
@@ -72,7 +72,7 @@ function Dashboard() {
|
||||
if (!cancelled) {
|
||||
setTrainingHome({
|
||||
upcoming: Array.isArray(upcomingRaw) ? upcomingRaw : [],
|
||||
recent: Array.isArray(recentRaw) ? recentRaw : [],
|
||||
reviewPending: Array.isArray(reviewPendingRaw) ? reviewPendingRaw : [],
|
||||
plannedWithNotes: noteHits,
|
||||
})
|
||||
}
|
||||
@@ -315,14 +315,14 @@ function Dashboard() {
|
||||
</div>
|
||||
|
||||
<div className="card dashboard-preview-card">
|
||||
<h3 className="dashboard-preview-card__title">Rückschau</h3>
|
||||
<h3 className="dashboard-preview-card__title">Offene Rückschau</h3>
|
||||
{trainingHomeErr ? (
|
||||
<p className="dashboard-preview-card__err">{trainingHomeErr}</p>
|
||||
) : trainingHome?.recent?.length ? (
|
||||
) : trainingHome?.reviewPending?.length ? (
|
||||
<ul className="dashboard-preview-card__list">
|
||||
{trainingHome.recent.map((u) => (
|
||||
{trainingHome.reviewPending.map((u) => (
|
||||
<li key={`r-${u.id}`}>
|
||||
<Link to={`/planning/run/${u.id}`} className="dashboard-preview-card__link">
|
||||
<Link to={`/planning?unit=${u.id}`} className="dashboard-preview-card__link">
|
||||
{(u.actual_date || u.planned_date || '').toString().slice(0, 10) || 'Datum'}
|
||||
</Link>
|
||||
{u.group_name ? (
|
||||
@@ -332,7 +332,10 @@ function Dashboard() {
|
||||
))}
|
||||
</ul>
|
||||
) : (
|
||||
<p className="dashboard-preview-card__empty">Noch keine Einträge in der Kurzliste.</p>
|
||||
<p className="dashboard-preview-card__empty">
|
||||
Keine durchgeführten Trainings mit offener Nachbereitung. Zum Abschluss der Rückschau in der
|
||||
Planung „Rückschau erledigt“ aktivieren.
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user