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.
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
from datetime import timedelta
|
||||
from app.models import Slot
|
||||
|
||||
slotQRCodes = [
|
||||
@ -55,14 +54,6 @@ slotQRCodes = [
|
||||
"Outgoing X06SA",
|
||||
]
|
||||
|
||||
|
||||
def timedelta_to_str(td: timedelta) -> str:
|
||||
days, seconds = td.days, td.seconds
|
||||
hours = days * 24 + seconds // 3600
|
||||
minutes = (seconds % 172800) // 60
|
||||
return f"PT{hours}H{minutes}M"
|
||||
|
||||
|
||||
slots = [
|
||||
Slot(
|
||||
id=str(i + 1), # Convert id to string to match your schema
|
||||
|
Reference in New Issue
Block a user