@@ -47,6 +47,8 @@ import {
4747 Typography ,
4848} from '@mui/material' ;
4949
50+ import { DragHandle } from '@src/components/DragAndDrop/SortableItem' ;
51+ import { CategorizedCheckboxIcon } from '@src/components/icons/CategorizedCheckboxIcon' ;
5052import { useClipboard } from '@src/stores/ClipboardContext' ;
5153import { useToasts } from '@src/stores/ToastContext' ;
5254import { useTranslations } from '@src/stores/TranslationContext' ;
@@ -63,6 +65,7 @@ import React, {
6365} from 'react' ;
6466import ConfirmDialog from '../../ConfirmDialog' ;
6567import EditAttachmentSection from '../EditAttachmentSection' ;
68+ import EditCategorizedCheckBoxQuestion from '../EditCategorizedCheckBoxQuestion/EditCategorizedCheckBoxQuestion' ;
6669import EditCheckBoxQuestion from '../EditCheckBoxQuestion' ;
6770import EditDocumentSection from '../EditDocumentSection' ;
6871import EditFreeTextQuestion from '../EditFreeTextQuestion' ;
@@ -72,15 +75,12 @@ import EditMapQuestion from '../EditMapQuestion';
7275import EditMatrixQuestion from '../EditMatrixQuestion' ;
7376import { EditMultiMatrixQuestion } from '../EditMultiMatrixQuestion' ;
7477import EditNumericQuestion from '../EditNumericQuestion' ;
78+ import { EditPersonalInfoQuestion } from '../EditPersonalInfoQuestion' ;
7579import EditRadioQuestion from '../EditRadioQuestion' ;
7680import EditSliderQuestion from '../EditSliderQuestion' ;
7781import EditSortingQuestion from '../EditSortingQuestion' ;
7882import EditTextSection from '../EditTextSection' ;
7983import { SectionDetails } from './SectionDetails' ;
80- import { DragHandle } from '@src/components/DragAndDrop/SortableItem' ;
81- import { EditPersonalInfoQuestion } from '../EditPersonalInfoQuestion' ;
82- import EditCategorizedCheckBoxQuestion from '../EditCategorizedCheckBoxQuestion/EditCategorizedCheckBoxQuestion' ;
83- import { CategorizedCheckboxIcon } from '@src/components/icons/CategorizedCheckboxIcon' ;
8484
8585const styles = {
8686 accordion : {
@@ -108,6 +108,11 @@ const styles = {
108108 } ,
109109} ;
110110
111+ interface CopyingSettings {
112+ copyingDisabled ?: boolean ;
113+ disabledTooltip ?: string ;
114+ }
115+
111116interface Props {
112117 index : number ;
113118 section : SurveyPageSection ;
@@ -118,7 +123,7 @@ interface Props {
118123 name : string ;
119124 onEdit : ( index : number , section : SurveyPageSection ) => void ;
120125 onDelete : ( index : number ) => void ;
121- disableSectionCopying ?: boolean ;
126+ copyingSettings ?: CopyingSettings ;
122127 pageId ?: number ;
123128 isDragging ?: boolean ;
124129 sx ?: SxProps ;
@@ -357,7 +362,13 @@ export default function SurveySectionAccordion(props: Props) {
357362 < em > { tr . EditSurveyPage . untitledSection } </ em >
358363 ) }
359364 </ Typography >
360- { ! props . disableSectionCopying && (
365+ { props . copyingSettings . copyingDisabled &&
366+ props . copyingSettings . disabledTooltip && (
367+ < Tooltip title = { props . copyingSettings . disabledTooltip } >
368+ < ContentCopy htmlColor = { 'disabled' } />
369+ </ Tooltip >
370+ ) }
371+ { ! props . copyingSettings . copyingDisabled && (
361372 < IconButton
362373 onClick = { async ( event ) => {
363374 event . stopPropagation ( ) ;
0 commit comments