Sep 15 - Reverse the check-in pages, set type of work Regular as default

This commit is contained in:
2026-09-15 11:44:05 -04:00
parent 4fc500707b
commit 23bd3a897b
4 changed files with 13 additions and 87 deletions
+1 -12
View File
@@ -743,19 +743,8 @@ def qr_checkin(qr_url):
# The employee enters a numeric ID and picks a work type; the code is
# appended to the ID so the stored value keeps the existing storage
# format ("1234SP") that every calculator and export already parses.
# The dropdown has no default: 'R' = Regular (ID stored unchanged),
# and an empty value means the employee did not choose — rejected.
# Empty selection = Regular work — the ID is stored unchanged.
work_type = request.form.get('work_type', '').strip().upper()
if not work_type:
logger_handler.logger.warning(
f"Check-in rejected: no type of work selected for employee {employee_id}"
)
return jsonify({
'success': False,
'message': 'Please select the Type of Work. / Por favor seleccione el Tipo de Trabajo.'
}), 400
if work_type == 'R':
work_type = '' # Regular — no code appended
if work_type and work_type not in VALID_CHECKIN_WORK_TYPES:
logger_handler.logger.warning(
f"Check-in rejected: invalid work type '{work_type}' for employee {employee_id}"