aaredb/backend/app/data/slots_data.py
GotthardG 27d2717a05 Refactor slot UI and backend refill logic.
Updated slot styling for improved user feedback and responsiveness. Simplified LN2 representation with a new level bar and adjusted refill logic to a 48-hour interval. Removed unused functions for cleaner backend code.
2024-12-20 13:20:45 +01:00

68 lines
1.2 KiB
Python

from app.models import Slot
slotQRCodes = [
"A1-X06SA",
"A2-X06SA",
"A3-X06SA",
"A4-X06SA",
"A5-X06SA",
"B1-X06SA",
"B2-X06SA",
"B3-X06SA",
"B4-X06SA",
"B5-X06SA",
"C1-X06SA",
"C2-X06SA",
"C3-X06SA",
"C4-X06SA",
"C5-X06SA",
"D1-X06SA",
"D2-X06SA",
"D3-X06SA",
"D4-X06SA",
"D5-X06SA",
"A1-X10SA",
"A2-X10SA",
"A3-X10SA",
"A4-X10SA",
"A5-X10SA",
"B1-X10SA",
"B2-X10SA",
"B3-X10SA",
"B4-X10SA",
"B5-X10SA",
"C1-X10SA",
"C2-X10SA",
"C3-X10SA",
"C4-X10SA",
"C5-X10SA",
"D1-X10SA",
"D2-X10SA",
"D3-X10SA",
"D4-X10SA",
"D5-X10SA",
"NB1",
"NB2",
"NB3",
"NB4",
"NB5",
"NB6",
"X10SA-Beamline",
"X06SA-Beamline",
"X06DA-Beamline",
"Outgoing X10SA",
"Outgoing X06SA",
]
slots = [
Slot(
id=str(i + 1), # Convert id to string to match your schema
qr_code=qrcode,
label=qrcode.split("-")[0],
qr_base=qrcode.split("-")[1] if "-" in qrcode else "",
occupied=False,
needs_refill=False,
)
for i, qrcode in enumerate(slotQRCodes)
]