diff --git a/ui/src/components/ContentMapper/index.tsx b/ui/src/components/ContentMapper/index.tsx index 58e295454..00b098b69 100644 --- a/ui/src/components/ContentMapper/index.tsx +++ b/ui/src/components/ContentMapper/index.tsx @@ -176,21 +176,21 @@ const Fields: MappingFields = { options: { 'Dropdown':'dropdown' }, - type: 'dropdown', + type: '', }, 'radio': { - label :'Select', + label :'Radio', options: { - 'Select':'select' + 'Radio':'radio' }, - type: 'radio', + type: '', }, 'checkbox': { - label:'Select', + label:'Checkbox', options: { - 'Select':'checkbox' + 'Checkbox':'checkbox' }, - type:'checkbox' + type:'' }, 'global_field':{ label : 'Global', @@ -1532,7 +1532,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R isDisabled: true } : (OptionsForRow?.length === 0 || (OptionsForRow?.length > 0 && OptionsForRow?.every((item)=>item?.isDisabled) - && (!existingField[data?.uid]?.label || ! updatedExstingField[data?.uid]?.label ) ) || (OptionsForRow?.length > 0 && data?.contentstackFieldType === "dropdown")) + && (!existingField[data?.uid]?.label || ! updatedExstingField[data?.uid]?.label ) )) ? { label: Fields[data?.contentstackFieldType]?.label ?? 'No Option', value: Fields[data?.contentstackFieldType]?.label ?? 'No Option', @@ -1541,7 +1541,6 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R data?.contentstackFieldType === 'url' || data?.backupFieldType === "reference" || data?.contentstackFieldType === "global_field" || - data?.contentstackFieldType === "dropdown" || data?.otherCmsType === undefined || data?.backupFieldType === 'app' || data?.backupFieldType === 'extension' diff --git a/ui/src/components/DestinationStack/Actions/LoadStacks.tsx b/ui/src/components/DestinationStack/Actions/LoadStacks.tsx index 4f45110e5..9ac1c3eae 100644 --- a/ui/src/components/DestinationStack/Actions/LoadStacks.tsx +++ b/ui/src/components/DestinationStack/Actions/LoadStacks.tsx @@ -84,12 +84,22 @@ const LoadStacks = (props: LoadFileFormatProps) => { const [isError, setIsError] = useState(false); const [errorMessage, setErrorMessage] = useState(''); const [placeholder] = useState('Select a stack'); + const [localePlaceholder, setlocalePlaceholder ] = useState('Master Locale will be set after stack selection'); const newMigrationDataRef = useRef(newMigrationData); useEffect(() => { newMigrationDataRef.current = newMigrationData; }, [newMigrationData]); + useEffect(()=>{ + if(selectedStack?.value !== undefined && selectedStack?.master_locale){ + setlocalePlaceholder('') + } + else{ + setlocalePlaceholder('Master Locale will be set after stack selection'); + } + },[selectedStack]) + useEffect(() => { if (!isEmptyString(newMigrationData?.destination_stack?.selectedStack?.value)) { setSelectedStack(newMigrationData?.destination_stack?.selectedStack); @@ -336,12 +346,8 @@ const LoadStacks = (props: LoadFileFormatProps) => { id="master_locale" aria-label="master_locale" version={'v2'} - placeholder={ - selectedStack?.master_locale - ? '' - : 'Master Locale will be set after stack selection' - } - value={selectedStack?.master_locale} + placeholder={localePlaceholder} + value={selectedStack?.value !== undefined ? selectedStack?.master_locale : ''} width="600px" className="orgInput" isReadOnly diff --git a/upload-api/migration-sitecore/libs/contenttypes.js b/upload-api/migration-sitecore/libs/contenttypes.js index 3fa2e954b..f03747176 100644 --- a/upload-api/migration-sitecore/libs/contenttypes.js +++ b/upload-api/migration-sitecore/libs/contenttypes.js @@ -372,7 +372,8 @@ const groupFlat = (data, item) => { contentstackField: item?.meta?.name, contentstackFieldUid: uidCorrector({ uid: item?.meta?.key }), contentstackFieldType: 'group', - backupFieldType: 'group' + backupFieldType: 'group', + backupFieldUid: uidCorrector({ uid: item?.meta?.key }) }; flat?.push(group); data?.schema?.forEach((element) => {