feat(fusion_clock): NFC kiosk attendance fields + activity-log selections

- Add 'nfc_kiosk' to x_fclk_clock_source selection on hr.attendance
- Add x_fclk_check_in_photo and x_fclk_check_out_photo Binary fields (attachment=True)
- Add 'card_enrollment' and 'unknown_card_tap' to activity log log_type selection
- Add 'nfc_kiosk' to activity log source selection
- Add TestNfcAttendanceFields test class (3 tests); all 6 fusion_clock tests pass

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-05-14 00:24:35 -04:00
parent 65a1c4b17e
commit 50c209b8d3
3 changed files with 65 additions and 0 deletions

View File

@@ -34,6 +34,8 @@ class FusionClockActivityLog(models.Model):
('correction_request', 'Correction Request'),
('ip_fallback', 'IP Fallback Used'),
('streak_milestone', 'Streak Milestone'),
('card_enrollment', 'Card Enrollment'),
('unknown_card_tap', 'Unknown Card Tap'),
],
string='Log Type',
required=True,
@@ -72,6 +74,7 @@ class FusionClockActivityLog(models.Model):
('backend_fab', 'Backend FAB'),
('kiosk', 'Kiosk'),
('system', 'System (Cron)'),
('nfc_kiosk', 'NFC Kiosk'),
],
string='Source',
)

View File

@@ -130,6 +130,7 @@ class HrAttendance(models.Model):
('systray', 'Systray'),
('backend_fab', 'Backend FAB'),
('kiosk', 'Kiosk'),
('nfc_kiosk', 'NFC Kiosk'),
('manual', 'Manual'),
('auto', 'Auto Clock-Out'),
],
@@ -147,6 +148,16 @@ class HrAttendance(models.Model):
digits=(10, 2),
help="Distance from location center at clock-out, in meters.",
)
x_fclk_check_in_photo = fields.Binary(
string='Check-In Photo',
attachment=True,
help="Front-camera photo captured at NFC kiosk clock-in.",
)
x_fclk_check_out_photo = fields.Binary(
string='Check-Out Photo',
attachment=True,
help="Front-camera photo captured at NFC kiosk clock-out.",
)
x_fclk_break_minutes = fields.Float(
string='Break (min)',
default=0.0,