**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

View File

@ -12,6 +12,7 @@ import DewarDetails from './DewarDetails';
const MAX_COMMENTS_LENGTH = 200;
interface ShipmentDetailsProps {
activePgroup: string;
isCreatingShipment: boolean;
sx?: SxProps;
selectedShipment: Shipment | null;
@ -23,6 +24,7 @@ interface ShipmentDetailsProps {
}
const ShipmentDetails: React.FC<ShipmentDetailsProps> = ({
activePgroup,
sx,
selectedShipment,
setSelectedDewar,
@ -34,6 +36,8 @@ const ShipmentDetails: React.FC<ShipmentDetailsProps> = ({
const [comments, setComments] = useState<string>(selectedShipment?.comments || '');
const [initialComments, setInitialComments] = useState<string>(selectedShipment?.comments || '');
console.log('Active Pgroup:', activePgroup); // Debugging or use it where required
const initialNewDewarState: Partial<Dewar> = {
dewar_name: '',
tracking_number: '',