Merge pull request #1222 from josepfo/feat/tc-photo-toggle-button

feat: tc photo toggle button
This commit is contained in:
Rafael Taranto 2022-05-16 17:32:22 +01:00 committed by GitHub
commit b973d59db2
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) ? ({ const createTerms = terms => (terms.active && terms.text) ? ({
delay: terms.delay, delay: terms.delay,
active: terms.active, active: terms.active,
tcPhoto: terms.tcPhoto,
title: terms.title, title: terms.title,
text: nmd(terms.text), text: nmd(terms.text),
accept: terms.acceptButtonText, accept: terms.acceptButtonText,

View file

@ -104,6 +104,7 @@ const TermsConditions = () => {
const formData = termsAndConditions ?? {} const formData = termsAndConditions ?? {}
const showOnScreen = termsAndConditions?.active ?? false const showOnScreen = termsAndConditions?.active ?? false
const addDelayOnScreen = termsAndConditions?.delay ?? false const addDelayOnScreen = termsAndConditions?.delay ?? false
const tcPhoto = termsAndConditions?.tcPhoto ?? false
const save = it => const save = it =>
saveConfig({ saveConfig({
@ -183,6 +184,23 @@ const TermsConditions = () => {
<Label2>{showOnScreen ? 'Yes' : 'No'}</Label2> <Label2>{showOnScreen ? 'Yes' : 'No'}</Label2>
</div> </div>
</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}> <div className={classes.switchRow}>
<P>Add 7 seconds delay on screen</P> <P>Add 7 seconds delay on screen</P>
<div className={classes.switch}> <div className={classes.switch}>