feat: tc photo toggle button

This commit is contained in:
José Oliveira 2022-05-16 16:34:52 +01:00
parent e94f1ff223
commit 44cd957c6d
2 changed files with 19 additions and 0 deletions

View file

@ -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,

View file

@ -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 = () => {
<Label2>{showOnScreen ? 'Yes' : 'No'}</Label2>
</div>
</div>
<div className={classes.switchRow}>
<P>
Capture customer photo on acceptance <br /> of Terms & Conditions
screen
</P>
<div className={classes.switch}>
<Switch
checked={tcPhoto}
onChange={event =>
save({
tcPhoto: event.target.checked
})
}
/>
<Label2>{tcPhoto ? 'Yes' : 'No'}</Label2>
</div>
</div>
<div className={classes.switchRow}>
<P>Add 7 seconds delay on screen</P>
<div className={classes.switch}>