**Commit Message:**

Enhance app with active pgroup handling and token updates

Added active pgroup state management across the app for user-specific settings. Improved token handling with decoding, saving user data, and setting OpenAPI authorization. Updated components, API calls, and forms to support dynamic pgroup selection and user-specific features.
This commit is contained in:
GotthardG
2025-01-22 13:55:26 +01:00
parent 4630bcfac5
commit 6cde57f783
23 changed files with 806 additions and 250 deletions
+16
View File
@@ -0,0 +1,16 @@
import {OpenAPI} from "../../openapi";
export const setUpToken = (): void => {
const token = localStorage.getItem('token');
if (token) {
OpenAPI.TOKEN = token; // Assign the token to OpenAPI client
} else {
console.warn("No token found in localStorage.");
}
};
export const clearToken = (): void => {
localStorage.removeItem('token');
OpenAPI.TOKEN = ''; // Clear the token from the OpenAPI client
console.log("Token cleared from OpenAPI and localStorage.");
};