From 44cd957c6d003756c526dc6b0b1ede77162ea2a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Oliveira?= Date: Mon, 16 May 2022 16:34:52 +0100 Subject: [PATCH] feat: tc photo toggle button --- lib/routes/termsAndConditionsRoutes.js | 1 + .../src/pages/OperatorInfo/TermsConditions.js | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/lib/routes/termsAndConditionsRoutes.js b/lib/routes/termsAndConditionsRoutes.js index 77ba6b47..5becd362 100644 --- a/lib/routes/termsAndConditionsRoutes.js +++ b/lib/routes/termsAndConditionsRoutes.js @@ -9,6 +9,7 @@ const plugins = require('../plugins') const createTerms = terms => (terms.active && terms.text) ? ({ delay: terms.delay, active: terms.active, + tcPhoto: terms.tcPhoto, title: terms.title, text: nmd(terms.text), accept: terms.acceptButtonText, diff --git a/new-lamassu-admin/src/pages/OperatorInfo/TermsConditions.js b/new-lamassu-admin/src/pages/OperatorInfo/TermsConditions.js index 1aa58da8..de911e18 100644 --- a/new-lamassu-admin/src/pages/OperatorInfo/TermsConditions.js +++ b/new-lamassu-admin/src/pages/OperatorInfo/TermsConditions.js @@ -104,6 +104,7 @@ const TermsConditions = () => { const formData = termsAndConditions ?? {} const showOnScreen = termsAndConditions?.active ?? false const addDelayOnScreen = termsAndConditions?.delay ?? false + const tcPhoto = termsAndConditions?.tcPhoto ?? false const save = it => saveConfig({ @@ -183,6 +184,23 @@ const TermsConditions = () => { {showOnScreen ? 'Yes' : 'No'} +
+

+ Capture customer photo on acceptance
of Terms & Conditions + screen +

+
+ + save({ + tcPhoto: event.target.checked + }) + } + /> + {tcPhoto ? 'Yes' : 'No'} +
+

Add 7 seconds delay on screen