diff --git a/package.json b/package.json index da04e067..aa643413 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "drama-queen-container", "private": true, - "version": "1.1.1", + "version": "1.1.2", "workspaces": [ "drama-queen", "queen-v2", diff --git a/queen-v2/package.json b/queen-v2/package.json index a3aca816..37637f55 100644 --- a/queen-v2/package.json +++ b/queen-v2/package.json @@ -1,6 +1,6 @@ { "name": "queen-v2", - "version": "1.0.1", + "version": "1.0.2", "description": "Web application for the management of questionnaires powered by Lunatic", "repository": { "type": "git", diff --git a/queen-v2/src/components/lightOrchestrator/buttons/continue/index.js b/queen-v2/src/components/lightOrchestrator/buttons/continue/index.js index c403500f..06dcfbce 100644 --- a/queen-v2/src/components/lightOrchestrator/buttons/continue/index.js +++ b/queen-v2/src/components/lightOrchestrator/buttons/continue/index.js @@ -2,9 +2,9 @@ import { ArrowRightAlt, SkipNext } from '@material-ui/icons'; import { Button } from 'components/designSystem'; import D from 'i18n'; -import KeyboardEventHandler from 'react-keyboard-event-handler'; import PropTypes from 'prop-types'; import React from 'react'; +import KeyboardEventHandler from 'react-keyboard-event-handler'; import { SHORTCUT_FAST_FORWARD } from 'utils/constants'; import { useStyles } from './continue.style'; @@ -19,12 +19,14 @@ const ButtonContinue = ({ isLastReachedPage, componentHasResponse, isLastPage, + loopVariables = [], page, }) => { const classes = useStyles(); const localPageFastForward = () => goToLastReachedPage(); - const shouldFastForward = !readonly && rereading && !isLastReachedPage; + const shouldFastForward = + loopVariables.length === 0 && !readonly && rereading && !isLastReachedPage; const shouldQuit = isLastPage && readonly; const shouldSaveAndQuit = isLastPage && !readonly; const shouldContinue = !shouldFastForward && componentHasResponse && !rereading; @@ -50,7 +52,7 @@ const ButtonContinue = ({ const keyboardShortcut = (key, e) => { e.preventDefault(); - if (key === SHORTCUT_FAST_FORWARD) localPageFastForward(); + if (key === SHORTCUT_FAST_FORWARD && shouldFastForward) localPageFastForward(); }; const geLabelToDisplay = () => { @@ -71,6 +73,7 @@ const ButtonContinue = ({ const onClickFunction = () => { if (shouldFastForward) return goToLastReachedPage; if (shouldContinue) return pageNextFunction; + if (shouldSaveAndQuit) return localFinalQuit; }; const helpLabel = shouldFastForward ? D.ctrlEnd : D.ctrlEnter; diff --git a/queen-v2/src/components/lightOrchestrator/lightOrchestrator.js b/queen-v2/src/components/lightOrchestrator/lightOrchestrator.js index 5fb98969..48d8619b 100644 --- a/queen-v2/src/components/lightOrchestrator/lightOrchestrator.js +++ b/queen-v2/src/components/lightOrchestrator/lightOrchestrator.js @@ -122,6 +122,7 @@ function LightOrchestrator({ overview = [], // waiting, pager, + // getErrors, // getModalErrors, getCurrentErrors, @@ -276,6 +277,7 @@ function LightOrchestrator({ isLastReachedPage={isLastReachedPage} componentHasResponse={hasResponse} goToLastReachedPage={goToLastReachedPage} + loopVariables={loopVariables} > ({ marginTop: '1em', fontWeight: 'normal', fontSize: '92%', - '&.declaration-help': { + '&.declaration-help, &.HELP': { color: theme.palette.declarations.help, }, display: 'table', @@ -182,21 +182,29 @@ export const useCustomLunaticStyles = makeStyles(theme => ({ '& .lunatic-icon': { display: 'none', }, - '& > .lunatic-input-checkbox': { - display: 'inline-flex', + display: 'block', + alignItems: 'center', + // padding: '0.5em 0.5em 0.5em 0.6em', + position: 'relative', + // right: '1.3em', + // width: '92%', + }, + + '& > .lunatic-input-radio': { + display: 'block', alignItems: 'center', // padding: '0.5em 0.5em 0.5em 0.6em', position: 'relative', // right: '1.3em', // width: '92%', - [theme.breakpoints.down('md')]: { - width: '85%', - }, }, '&:hover span': { color: `${modalityLabelColorChecked}`, fontWeight: 'bold', + '& *': { + fontWeight: 'bold', + }, // TODO code-modality not provided (yet?) in lunatic-v2 '& .code-modality': { color: `${modalityCodeBackgroundColor}`, @@ -215,6 +223,9 @@ export const useCustomLunaticStyles = makeStyles(theme => ({ '& span': { color: `${modalityLabelColorChecked}`, fontWeight: 'bold', + '& *': { + fontWeight: 'bold', + }, // TODO code-modality not provided (yet?) in lunatic-v2 '& .code-modality': { color: `${modalityCodeBackgroundColor}`,