From 5a488ae86e7eb1817fe2202326e7cd280508e983 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sat, 30 May 2026 17:38:34 -0400 Subject: [PATCH] feat(fusion_clock): always-available kiosk photo action + compact manager PIN pad MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NFC kiosk: - Add "📷 Photo" action to every Manage-page employee row and to the post-enroll result card, so a manager can set/replace a profile photo at any time (previously only surfaced when the employee had no image). - Slim the Manager PIN pad: dedicated --pin panel variant (max-width 360px, reduced padding) with a tighter numpad, removing the oversized whitespace. Deployed live to entech (LXC 111) as 19.0.3.11.0. Co-Authored-By: Claude Opus 4.8 --- fusion_clock/__manifest__.py | 2 +- fusion_clock/static/src/js/fusion_clock_nfc_kiosk.js | 9 ++++++--- fusion_clock/static/src/scss/nfc_kiosk.scss | 11 +++++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/fusion_clock/__manifest__.py b/fusion_clock/__manifest__.py index 0fb2291b..ec715827 100644 --- a/fusion_clock/__manifest__.py +++ b/fusion_clock/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Fusion Clock', - 'version': '19.0.3.10.0', + 'version': '19.0.3.11.0', 'category': 'Human Resources/Attendances', 'summary': 'Complete Employee T&A with Geofencing, Shifts, Penalties, Overtime, Kiosk, Dashboard & Payroll Export', 'description': """ diff --git a/fusion_clock/static/src/js/fusion_clock_nfc_kiosk.js b/fusion_clock/static/src/js/fusion_clock_nfc_kiosk.js index 86ec5b67..8c2a2e5d 100644 --- a/fusion_clock/static/src/js/fusion_clock_nfc_kiosk.js +++ b/fusion_clock/static/src/js/fusion_clock_nfc_kiosk.js @@ -306,7 +306,7 @@ let pin = ""; stateContainer.innerHTML = `
-
+

${escapeHtml(opts.title || "Enter PIN")}

@@ -415,6 +415,7 @@ ? ` ` : ` + ${e.card_uid ? `` : ""} `; return `
@@ -430,6 +431,8 @@ enrollSelectedEmployee = { id, name: btn.dataset.name }; pendingEnrollUid = null; renderEnroll({ phase: "tap" }); + } else if (act === "photo") { + openPhotoCapture(id, btn.dataset.name, () => renderEnroll({ phase: "manager" })); } else if (act === "clear") { try { await postJson("/fusion_clock/kiosk/nfc/clear_tag", { employee_id: id, enroll_password: enrollPassword }); } catch (e) {} refresh(); @@ -566,14 +569,14 @@

${msg}

- ${ok && payload.needs_photo && payload.employee_id ? `` : ""} + ${ok && payload.employee_id ? `` : ""}
`; - if (ok && payload.needs_photo && payload.employee_id) { + if (ok && payload.employee_id) { document.getElementById("enroll_photo").addEventListener("click", () => { openPhotoCapture(payload.employee_id, payload.employee_name, () => { if (enrollPassword) renderEnroll({ phase: "manager" }); else exitEnrollMode(); diff --git a/fusion_clock/static/src/scss/nfc_kiosk.scss b/fusion_clock/static/src/scss/nfc_kiosk.scss index f9e7c2a0..2c8421ff 100644 --- a/fusion_clock/static/src/scss/nfc_kiosk.scss +++ b/fusion_clock/static/src/scss/nfc_kiosk.scss @@ -512,6 +512,9 @@ html:has(#nfc_kiosk_root) { max-height: 92vh; overflow-y: auto; + // Compact PIN-pad variant — narrower + tighter than the wide list panels + &--pin { width: auto; max-width: 360px; padding: 1.5rem 1.5rem 1.25rem; } + h2 { font-size: 1.5rem; margin: 0 0 1.5rem; @@ -522,12 +525,12 @@ html:has(#nfc_kiosk_root) { .numpad { display: grid; grid-template-columns: repeat(3, 1fr); - gap: 0.75rem; - margin: 1rem 0; + gap: 0.5rem; + margin: 0.5rem 0 0.75rem; button { - font-size: 1.7rem; - padding: 1.1rem 0; + font-size: 1.45rem; + padding: 0.7rem 0; background: rgba(255,255,255,0.05); color: var(--nfc-text); border: 1px solid rgba(255,255,255,0.1);