feat: hide logout button when admin is not logged in
- Add conditional rendering for "Abmelden" button based on isAdminLoggedIn state - Button only appears when localStorage contains "isAdminLoggedIn": "true" - Improves UI cleanliness by hiding unnecessary logout option for regular users - Maintains existing admin warning banner and logout functionality when needed
This commit is contained in:
@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=false
|
NEXT_PUBLIC_EXPORT_STATIC=false
|
||||||
NEXT_PUBLIC_USE_CGI=false
|
NEXT_PUBLIC_USE_CGI=false
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.669
|
NEXT_PUBLIC_APP_VERSION=1.6.670
|
||||||
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=true
|
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||||
NEXT_PUBLIC_USE_CGI=true
|
NEXT_PUBLIC_USE_CGI=true
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.669
|
NEXT_PUBLIC_APP_VERSION=1.6.670
|
||||||
NEXT_PUBLIC_CPL_MODE=production
|
NEXT_PUBLIC_CPL_MODE=production
|
||||||
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,3 +1,25 @@
|
|||||||
|
## [1.6.670] – 2025-07-31
|
||||||
|
|
||||||
|
- feat: implement modal chart system with conditional UI and message filtering
|
||||||
|
|
||||||
|
- Add automatic data loading on IsoChartView modal open with timeout to prevent infinite loops
|
||||||
|
- Implement conditional UI visibility in IsoChartActionBar using CSS visibility property
|
||||||
|
- Create stable layout where controls reserve space when hidden (DatePicker, DIA dropdown, "Daten laden" button)
|
||||||
|
- Add Report.tsx component with precise CableLine filtering using exact string matching
|
||||||
|
- Enhance message filtering with debug logging and fallback identifier support
|
||||||
|
- Integrate chartTitle state management for seamless switching between "Messkurve" and "Meldungen"
|
||||||
|
- Add useIsoDataLoader hook for automatic chart data loading without user interaction
|
||||||
|
- Implement enhanced filtering logic to prevent false matches (CableLine1 vs CableLine16)
|
||||||
|
- Style Report component with consistent table layout matching MeldungenView design
|
||||||
|
- Add visual filter indicators and improved error messaging for better UX
|
||||||
|
|
||||||
|
Technical improvements:
|
||||||
|
- Replace conditional rendering with visibility control to maintain layout stability
|
||||||
|
- Add comprehensive logging for debugging message source filtering
|
||||||
|
- Implement proper cleanup for timeouts to prevent memory leaks
|
||||||
|
- Use exact string matching and prefix validation for precise slot identification
|
||||||
|
|
||||||
|
---
|
||||||
## [1.6.669] – 2025-07-31
|
## [1.6.669] – 2025-07-31
|
||||||
|
|
||||||
- feat: Meldungen in in Iso Chart
|
- feat: Meldungen in in Iso Chart
|
||||||
|
|||||||
@@ -110,16 +110,17 @@ function Header() {
|
|||||||
*/}
|
*/}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Logout-Button */}
|
{/* Logout-Button - nur anzeigen wenn Admin eingeloggt ist */}
|
||||||
|
{isAdminLoggedIn && (
|
||||||
<div className="flex items-center justify-end w-1/4 space-x-1">
|
<div className="flex items-center justify-end w-1/4 space-x-1">
|
||||||
<button
|
<button
|
||||||
onClick={handleLogout}
|
onClick={handleLogout}
|
||||||
className="bg-littwin-blue text-white px-4 py-2 rounded"
|
className="bg-littwin-blue text-white px-4 py-2 rounded"
|
||||||
>
|
>
|
||||||
Abmelden
|
Abmelden
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Warnhinweis, wenn der Admin angemeldet ist */}
|
{/* Warnhinweis, wenn der Admin angemeldet ist */}
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.669",
|
"version": "1.6.670",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.669",
|
"version": "1.6.670",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/roboto": "^5.1.0",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
"@headlessui/react": "^2.2.4",
|
"@headlessui/react": "^2.2.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.669",
|
"version": "1.6.670",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user