Merge branch 'isRange' into dev
This commit is contained in:
commit
ee01b19354
@ -6,11 +6,11 @@ import type { QuizQuestionDate } from "@frontend/squzanswerer";
|
|||||||
type SettingsDataProps = {
|
type SettingsDataProps = {
|
||||||
questionId: string;
|
questionId: string;
|
||||||
isRequired: boolean;
|
isRequired: boolean;
|
||||||
isDateRange: boolean;
|
isRange: boolean;
|
||||||
isTime: boolean;
|
isTime: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function SettingsData({ questionId, isRequired, isDateRange, isTime }: SettingsDataProps) {
|
export default function SettingsData({ questionId, isRequired, isRange, isTime }: SettingsDataProps) {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const isMobile = useMediaQuery(theme.breakpoints.down(790));
|
const isMobile = useMediaQuery(theme.breakpoints.down(790));
|
||||||
const isTablet = useMediaQuery(theme.breakpoints.down(900));
|
const isTablet = useMediaQuery(theme.breakpoints.down(900));
|
||||||
@ -28,7 +28,7 @@ export default function SettingsData({ questionId, isRequired, isDateRange, isTi
|
|||||||
pt: isTablet ? "5px" : "0px",
|
pt: isTablet ? "5px" : "0px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* <Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
boxSizing: "border-box",
|
boxSizing: "border-box",
|
||||||
pt: "20px",
|
pt: "20px",
|
||||||
@ -53,14 +53,14 @@ export default function SettingsData({ questionId, isRequired, isDateRange, isTi
|
|||||||
dataCy="checkbox-dateRange"
|
dataCy="checkbox-dateRange"
|
||||||
sx={{ mr: isMobile ? "0px" : "16px" }}
|
sx={{ mr: isMobile ? "0px" : "16px" }}
|
||||||
label={"Выбор диапазона дат"}
|
label={"Выбор диапазона дат"}
|
||||||
checked={isDateRange}
|
checked={isRange}
|
||||||
handleChange={({ target }) => {
|
handleChange={({ target }) => {
|
||||||
updateQuestion<QuizQuestionDate>(questionId, (question) => {
|
updateQuestion<QuizQuestionDate>(questionId, (question) => {
|
||||||
question.content.dateRange = target.checked;
|
question.content.isRange = target.checked;
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<CustomCheckbox
|
{/* <CustomCheckbox
|
||||||
dataCy="checkbox-time"
|
dataCy="checkbox-time"
|
||||||
sx={{ mr: isMobile ? "0px" : "16px" }}
|
sx={{ mr: isMobile ? "0px" : "16px" }}
|
||||||
label={"Выбор времени"}
|
label={"Выбор времени"}
|
||||||
@ -70,8 +70,8 @@ export default function SettingsData({ questionId, isRequired, isDateRange, isTi
|
|||||||
question.content.time = target.checked;
|
question.content.time = target.checked;
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/> */}
|
||||||
</Box> */}
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
boxSizing: "border-box",
|
boxSizing: "border-box",
|
||||||
|
@ -14,7 +14,7 @@ export default function SwitchData({ switchState = "setting", question }: Props)
|
|||||||
<SettingDate
|
<SettingDate
|
||||||
questionId={question.id}
|
questionId={question.id}
|
||||||
isRequired={question.content.required}
|
isRequired={question.content.required}
|
||||||
isDateRange={question.content.dateRange}
|
isRange={question.content.isRange}
|
||||||
isTime={question.content.time}
|
isTime={question.content.time}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user