diff --git a/ui/src/components/ContentMapper/contentMapper.interface.ts b/ui/src/components/ContentMapper/contentMapper.interface.ts index c81eba9f..993c32d5 100644 --- a/ui/src/components/ContentMapper/contentMapper.interface.ts +++ b/ui/src/components/ContentMapper/contentMapper.interface.ts @@ -26,6 +26,7 @@ export interface FieldTypes { label: string; value: any; id?: string; + isDisabled?: boolean; } export interface TableTypes { sortBy: any; diff --git a/ui/src/components/ContentMapper/index.tsx b/ui/src/components/ContentMapper/index.tsx index e72a6339..a6acc213 100644 --- a/ui/src/components/ContentMapper/index.tsx +++ b/ui/src/components/ContentMapper/index.tsx @@ -694,7 +694,13 @@ const ContentMapper = () => { const OptionValue: FieldTypes = OptionsForRow?.length === 0 - ? { label: 'No matches found', value: 'No matches found' } + ? { + label: data?.ContentstackFieldType, + value: data?.ContentstackFieldType, + isDisabled: data?.ContentstackFieldType === 'group' || + data?.ContentstackFieldType === 'text' || + data?.ContentstackFieldType === 'url' + } : { label: `${selectedOption} matches`, value: `${selectedOption} matches` }; const adjustedOptions = OptionsForRow.map((option: optionsType) => ({ @@ -713,23 +719,28 @@ const ContentMapper = () => { maxWidth="290px" isClearable={false} options={adjustedOptions} + isDisabled={ + OptionValue?.isDisabled + } /> - { - // const value = { - // ValidationRegex: data?.advanced?.ValidationRegex, - // Mandatory: data?.advanced?.mandatory, - // Multiple: data?.advanced?.multiple, - // Unique: data?.advanced?.unique, - // NonLocalizable: data?.advanced?.nonLocalizable - // }; - handleAdvancedSetting(data?.ContentstackFieldType, advancePropertise, data?.uid, data); - }} - /> + {!OptionValue?.isDisabled && ( + { + // const value = { + // ValidationRegex: data?.advanced?.ValidationRegex, + // Mandatory: data?.advanced?.mandatory, + // Multiple: data?.advanced?.multiple, + // Unique: data?.advanced?.unique, + // NonLocalizable: data?.advanced?.nonLocalizable + // }; + handleAdvancedSetting(data?.ContentstackFieldType, advancePropertise, data?.uid, data); + }} + /> + )} ); }; diff --git a/ui/src/components/DestinationStack/Actions/LoadStacks.tsx b/ui/src/components/DestinationStack/Actions/LoadStacks.tsx index 5e3a3850..cb95bfef 100644 --- a/ui/src/components/DestinationStack/Actions/LoadStacks.tsx +++ b/ui/src/components/DestinationStack/Actions/LoadStacks.tsx @@ -28,9 +28,6 @@ const defaultStack = { }; const LoadStacks = (props: LoadFileFormatProps) => { - - console.log("props", props); - /**** ALL HOOKS HERE ****/ const newMigrationData = useSelector((state:RootState)=>state?.migration?.newMigrationData); diff --git a/ui/src/components/Modal/index.tsx b/ui/src/components/Modal/index.tsx index 2f4c433b..3ec3cc86 100644 --- a/ui/src/components/Modal/index.tsx +++ b/ui/src/components/Modal/index.tsx @@ -159,7 +159,7 @@ const Modal = (props: ProjectModalProps) => {