This commit is contained in:
jeremygan2021
2026-01-09 21:36:50 +08:00
parent eb44d68050
commit 1899ca0b9d
3 changed files with 34 additions and 2 deletions

Binary file not shown.

View File

@@ -53,10 +53,10 @@ def get_db_connection():
def assign_seat(cur, user_industry: str) -> str: def assign_seat(cur, user_industry: str) -> str:
""" """
Allocate a seat based on: Allocate a seat based on:
1. Even distribution (13 tables, max 12 per table) 1. Even distribution (11 tables, max 12 per table)
2. Mix industries (try to put user in a table where their industry is least represented) 2. Mix industries (try to put user in a table where their industry is least represented)
""" """
TOTAL_TABLES = 13 TOTAL_TABLES = 11
MAX_PER_TABLE = 12 MAX_PER_TABLE = 12
# Initialize table stats # Initialize table stats

View File

@@ -442,6 +442,27 @@
line-height: 1.5; line-height: 1.5;
} }
.important-warning {
color: #ff3333 !important;
font-size: 1.3rem !important;
font-weight: 900 !important;
margin-top: 20px;
text-align: center;
background: rgba(255, 0, 0, 0.2) !important;
padding: 25px !important;
border-radius: 12px !important;
border: 2px solid #ff0000 !important;
box-shadow: 0 0 20px rgba(255, 0, 0, 0.4) !important;
animation: pulse-red 2s infinite;
text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
@keyframes pulse-red {
0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); }
70% { box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}
</style> </style>
</head> </head>
<body> <body>
@@ -616,6 +637,7 @@
// Reset UI // Reset UI
errorDiv.classList.add('hidden'); errorDiv.classList.add('hidden');
errorDiv.classList.remove('important-warning');
listDiv.classList.add('hidden'); listDiv.classList.add('hidden');
listDiv.innerHTML = ''; listDiv.innerHTML = '';
btn.disabled = true; btn.disabled = true;
@@ -671,6 +693,16 @@
} }
function selectUser(user) { function selectUser(user) {
// Check if fee is 0 (unpaid)
if (user.fee == 0) {
const errorDiv = document.getElementById('search-error');
errorDiv.textContent = "⚠️ 无法签到请先前往签到处付费26元";
errorDiv.classList.remove('hidden');
errorDiv.classList.add('important-warning');
errorDiv.scrollIntoView({ behavior: 'smooth', block: 'center' });
return;
}
currentUser = user; currentUser = user;
// Populate form // Populate form