All checks were successful
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 41s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m16s
Test Suite / pytest-backend (pull_request) Successful in 36s
Test Suite / lint-backend (pull_request) Successful in 0s
Test Suite / build-frontend (pull_request) Successful in 13s
Test Suite / k6 /health Baseline (pull_request) Successful in 34s
Test Suite / playwright-tests (pull_request) Successful in 1m13s
- Updated PlanningLayout to conditionally render the PlanningRouteNav based on the current path, improving navigation for planning unit editors. - Enhanced TrainingUnitEditPage with unsaved changes detection, integrating a prompt for users to confirm before leaving the page with unsaved changes. - Introduced utility functions for creating a stable snapshot of form data to facilitate dirty-checking, ensuring better user experience during form editing. - Added tests for the new utility functions to validate their behavior in various scenarios.
19 lines
619 B
JavaScript
19 lines
619 B
JavaScript
import { Outlet, useLocation } from 'react-router-dom'
|
|
import PlanningRouteNav from '../components/planning/PlanningRouteNav'
|
|
import { isPlanningUnitEditorPath } from '../utils/planningUnitRoutes'
|
|
|
|
/** Gemeinsame Hülle für Planung, Rahmenprogramme, Module und Vorlagen. */
|
|
export default function PlanningLayout() {
|
|
const { pathname } = useLocation()
|
|
const hideRouteNav = isPlanningUnitEditorPath(pathname)
|
|
|
|
return (
|
|
<div className="app-page planning-layout">
|
|
{!hideRouteNav ? <PlanningRouteNav /> : null}
|
|
<div className="planning-layout__main">
|
|
<Outlet />
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|