diff --git a/ui/.prettierrc b/ui/.prettierrc index ae60a8e98..f829f0a09 100644 --- a/ui/.prettierrc +++ b/ui/.prettierrc @@ -1,8 +1,8 @@ { - "semi": true, - "tabWidth": 2, - "printWidth": 100, - "singleQuote": true, - "trailingComma": "none", - "jsxBracketSameLine": true -} \ No newline at end of file + "semi": true, + "tabWidth": 2, + "printWidth": 100, + "singleQuote": true, + "trailingComma": "none", + "jsxBracketSameLine": true +} diff --git a/ui/packaga-lock.json b/ui/packaga-lock.json index 402152c46..ba1efe929 100644 --- a/ui/packaga-lock.json +++ b/ui/packaga-lock.json @@ -6905,9 +6905,7 @@ "version": "0.0.8", "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", - "engines": [ - "node >= 0.8.0" - ], + "engines": ["node >= 0.8.0"], "bin": { "ansi-html": "bin/ansi-html" } @@ -11330,9 +11328,7 @@ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "hasInstallScript": true, "optional": true, - "os": [ - "darwin" - ], + "os": ["darwin"], "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } diff --git a/ui/src/components/Card/index.tsx b/ui/src/components/Card/index.tsx index 07a7a9276..4c33db929 100644 --- a/ui/src/components/Card/index.tsx +++ b/ui/src/components/Card/index.tsx @@ -44,12 +44,6 @@ const CardList = ({ project }: ProjectType) => { Project Status {project?.status} -
- Current Status - - Validation Failed - -
diff --git a/ui/src/components/DestinationStack/Actions/LoadStacks.tsx b/ui/src/components/DestinationStack/Actions/LoadStacks.tsx index 69e5831f4..1f8573402 100644 --- a/ui/src/components/DestinationStack/Actions/LoadStacks.tsx +++ b/ui/src/components/DestinationStack/Actions/LoadStacks.tsx @@ -3,7 +3,7 @@ import { Icon, Select, cbModal } from '@contentstack/venus-components'; import { AppContext } from '../../../context/app/app.context'; import { DEFAULT_DROPDOWN, IDropDown, INewMigration } from '../../../context/app/app.interface'; -import { isEmptyString, validateArray } from '../../../utilities/functions'; +import { isEmptyString, validateArray, validateObject } from '../../../utilities/functions'; import { createStacksInOrg, getAllStacksInOrg } from '../../../services/api/stacks.service'; import { getAllLocales } from '../../../services/api/user.service'; import { StackResponse } from '../../../services/api/service.interface'; @@ -44,7 +44,7 @@ const LoadStacks = (props: LoadFileFormatProps) => { } ]; const [allStack, setAllStack] = useState(loadingOption); - const [allLocales] = useState([]); + const [allLocales, setAllLocales] = useState([]); const [isSaving, setIsSaving] = useState(false); @@ -143,19 +143,18 @@ const LoadStacks = (props: LoadFileFormatProps) => { //fetch all locales const response = await getAllLocales(newMigrationData?.destination_stack?.selectedOrg?.value); //org id will always be there - - // const rawMappedLocalesMapped = - // validateObject(response?.data) && response?.data?.locales - // ? Object.keys(data?.locales)?.map((key) => ({ - // uid: key, - // label: data?.locales[key], - // value: key, - // locale: key, - // created_at: key - // })) - // : []; - - // setAllLocales(rawMappedLocalesMapped); + const rawMappedLocalesMapped = + validateObject(response?.data) && response?.data?.locales + ? Object?.keys(response?.data?.locales)?.map((key) => ({ + uid: key, + label: response?.data?.locales[key], + value: key, + locale: key, + created_at: key + })) + : []; + + setAllLocales(rawMappedLocalesMapped); const stackArray = validateArray(stackData?.data?.stacks) ? stackData?.data?.stacks?.map((stack: StackResponse) => ({ @@ -194,7 +193,6 @@ const LoadStacks = (props: LoadFileFormatProps) => { updateNewMigrationData(newMigrationDataObj); }; - const handleCreateNewStack = () => { cbModal({ component: (props: LoadFileFormatProps) => ( @@ -218,7 +216,6 @@ const LoadStacks = (props: LoadFileFormatProps) => { } }); }; - /**** ALL USEEffects HERE ****/ useEffect(() => { diff --git a/ui/src/components/LegacyCms/Actions/LoadFileFormat.tsx b/ui/src/components/LegacyCms/Actions/LoadFileFormat.tsx index 7a863c849..176f6b056 100644 --- a/ui/src/components/LegacyCms/Actions/LoadFileFormat.tsx +++ b/ui/src/components/LegacyCms/Actions/LoadFileFormat.tsx @@ -48,7 +48,7 @@ const LoadFileFormat = (props: LoadFileFormatProps) => { const handleBtnClick = (e: MouseEvent) => { e.preventDefault(); - if (!isEmptyString(selectedCard.fileformat_id) && isCheckedBoxChecked) { + if (!isEmptyString(selectedCard?.fileformat_id) && isCheckedBoxChecked) { updateNewMigrationData({ ...newMigrationData, legacy_cms: { @@ -64,7 +64,7 @@ const LoadFileFormat = (props: LoadFileFormatProps) => { }); //call for Step Change - props.handleStepChange(props.currentStep); + props.handleStepChange(props?.currentStep); } }; @@ -116,7 +116,7 @@ const LoadFileFormat = (props: LoadFileFormatProps) => { {validateArray(allowed_file_formats) ? ( allowed_file_formats?.map((data: ICardType, index: number) => ( { )}
-
+
diff --git a/ui/src/components/LegacyCms/Actions/LoadPrefix.tsx b/ui/src/components/LegacyCms/Actions/LoadPrefix.tsx index 4d924ce34..2d1addbec 100644 --- a/ui/src/components/LegacyCms/Actions/LoadPrefix.tsx +++ b/ui/src/components/LegacyCms/Actions/LoadPrefix.tsx @@ -60,7 +60,7 @@ const LoadPreFix = (props: LoadSelectCmsProps) => { setIsError(false); //API call for saving Affix - updateAffixData(selectedOrganisation.value, projectId, { affix: prefix }); + updateAffixData(selectedOrganisation?.value, projectId, { affix: prefix }); affixConfirmation(selectedOrganisation?.value, projectId, { affix_confirmation: isCheckedBoxChecked }); @@ -129,7 +129,7 @@ const LoadPreFix = (props: LoadSelectCmsProps) => { error={isError} />
-
+
diff --git a/ui/src/components/LegacyCms/Summary/PreFixSummary.tsx b/ui/src/components/LegacyCms/Summary/PreFixSummary.tsx index b4ba67693..3cef529d2 100644 --- a/ui/src/components/LegacyCms/Summary/PreFixSummary.tsx +++ b/ui/src/components/LegacyCms/Summary/PreFixSummary.tsx @@ -27,7 +27,7 @@ const PreFixSummary = (props: PreFixSummaryProps): JSX.Element => { {!isEmptyString(newMigrationData?.legacy_cms?.affix) ? (
- {newMigrationData?.legacy_cms?.affix || ''} + {newMigrationData?.legacy_cms?.affix || ''}
) : ( diff --git a/ui/src/components/LegacyCms/Summary/summary.scss b/ui/src/components/LegacyCms/Summary/summary.scss index 7146ae1a3..20a1bbe4c 100644 --- a/ui/src/components/LegacyCms/Summary/summary.scss +++ b/ui/src/components/LegacyCms/Summary/summary.scss @@ -13,12 +13,19 @@ .Checkbox input:disabled ~ .Checkbox__label { opacity: 1; } - +.Checkbox.Checkbox--state-checked { + display: flex; +} +.Checkbox .Checkbox__tick svg { + display: block; +} .Checkbox.Checkbox--state-checked.Checkbox--state-disabled { color: #212121; opacity: 1; } - +.Checkbox-wrapper .Checkbox { + display: flex; +} .Checkbox input:disabled:checked ~ .Checkbox__label, .Checkbox input:disabled:indeterminate ~ .Checkbox__label { color: #212121; diff --git a/ui/src/components/LegacyCms/index.tsx b/ui/src/components/LegacyCms/index.tsx index c6f3568ce..b9f724a8e 100644 --- a/ui/src/components/LegacyCms/index.tsx +++ b/ui/src/components/LegacyCms/index.tsx @@ -224,7 +224,7 @@ const LegacyCMSComponent = ({ legacyCMSData, projectData }: LegacyCMSComponentPr steps={getLegacyCMSSteps( isCompleted, isMigrationLocked, - migrationData?.legacyCMSData.all_steps + migrationData?.legacyCMSData?.all_steps )} isEdit={!isMigrationLocked} handleOnAllStepsComplete={handleOnAllStepsComplete} diff --git a/uplaode-api/src/config/index.ts b/uplaode-api/src/config/index.ts index deec1e754..f165e024e 100644 --- a/uplaode-api/src/config/index.ts +++ b/uplaode-api/src/config/index.ts @@ -9,5 +9,5 @@ export default { bucketName: 'migartion-test', buketKey: 'project/package 45.zip' }, - localPath: '/Users/aishwarya.dani/Desktop/contentful.json' + localPath: '/Users/snehal.pimple/Desktop/contentful.json' };