From 2a27b61a1fba21f9dd0e2fd4993e3badd954f233 Mon Sep 17 00:00:00 2001 From: GotthardG <51994228+GotthardG@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:29:10 +0100 Subject: [PATCH] https and ssl integration on the backend, frontend and started integration of logistics app as a separate frontend --- backend/app/routers/dewar.py | 1 - frontend/src/components/DewarDetails.tsx | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/app/routers/dewar.py b/backend/app/routers/dewar.py index 372840d..1dda86b 100644 --- a/backend/app/routers/dewar.py +++ b/backend/app/routers/dewar.py @@ -121,7 +121,6 @@ async def generate_dewar_qrcode(dewar_id: int, db: Session = Depends(get_db)): return {"message": "QR Code generated", "qrcode": dewar.unique_id} - def generate_label(dewar): buffer = BytesIO() # Set page orientation to landscape diff --git a/frontend/src/components/DewarDetails.tsx b/frontend/src/components/DewarDetails.tsx index 69f881d..ff20885 100644 --- a/frontend/src/components/DewarDetails.tsx +++ b/frontend/src/components/DewarDetails.tsx @@ -390,11 +390,12 @@ const DewarDetails: React.FC = ({ setChangesMade(true); }; - const handleGenerateQRCode = () => { + const handleGenerateQRCode = async () => { if (!dewar) return; try { - const newQrCodeValue = dewar.unique_id; // Using unique_id directly for QR code value + const response = await DewarsService.generateDewarQrcodeDewarsDewarIdGenerateQrcodePost(dewar.id); + const newQrCodeValue = response.unique_id; setQrCodeValue(newQrCodeValue); setIsQRCodeGenerated(true); setFeedbackMessage("QR Code generated successfully"); @@ -406,6 +407,7 @@ const DewarDetails: React.FC = ({ } }; + const handleDownloadLabel = async () => { if (!dewar) return;