From 211d835a0ddbf46779009d0715c4f8787fbb9230 Mon Sep 17 00:00:00 2001 From: Sayali Joshi Date: Wed, 26 Jun 2024 18:54:18 +0530 Subject: [PATCH 1/3] [CMG-181] - Legacy Cms | Enter Affix -> When entered restricted keyword 'api_key', it shows message saying 'Affix should not be more than 5 chars' which is incorrect --- .../LegacyCms/Actions/LoadPrefix.tsx | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/ui/src/components/LegacyCms/Actions/LoadPrefix.tsx b/ui/src/components/LegacyCms/Actions/LoadPrefix.tsx index 562e3357..7947473a 100644 --- a/ui/src/components/LegacyCms/Actions/LoadPrefix.tsx +++ b/ui/src/components/LegacyCms/Actions/LoadPrefix.tsx @@ -15,7 +15,7 @@ import { DEFAULT_URL_TYPE, INewMigration } from '../../../context/app/app.interf // Style import '../legacyCms.scss'; -import { Icon, TextInput } from '@contentstack/venus-components'; +import { TextInput } from '@contentstack/venus-components'; import { useDebouncer } from '../../../hooks'; import { RootState } from '../../../store'; import { updateNewMigrationData } from '../../../store/slice/migrationDataSlice'; @@ -89,8 +89,17 @@ const LoadPreFix = (props: LoadSelectCmsProps) => { e.preventDefault(); const value = e.target.value; - if (!isEmptyString(value) && isValidPrefix(value) ) { - if(! idArray?.includes(value)){ + if (!isEmptyString(value)) { + if (idArray?.includes(value)) { + setIsError(true); + setErrorMessage('Affix should be valid and not a restricted keyword'); + setIsRestrictedKey(true); + return; + } else if (!isValidPrefix(value)) { + setIsRestrictedKey(false); + setIsError(true); + setErrorMessage('Affix should not be more than 5 chars'); + } else { setPrefix(value); setIsError(false); setErrorMessage(''); @@ -98,7 +107,7 @@ const LoadPreFix = (props: LoadSelectCmsProps) => { const newMigrationDataObj: INewMigration = { ...newMigrationData, legacy_cms: { - ...newMigrationData.legacy_cms, + ...newMigrationData?.legacy_cms, affix: value, isRestictedKeywordCheckboxChecked: isCheckedBoxChecked } @@ -115,19 +124,13 @@ const LoadPreFix = (props: LoadSelectCmsProps) => { }); //call for Step Change - props.handleStepChange(props?.currentStep); - return; - - } - else{ - setIsError(true); - setErrorMessage('Affix should be valid and not a restricted keyword'); - setIsRestrictedKey(true); + props?.handleStepChange(props?.currentStep); return; } + } else { + setIsError(true); + setErrorMessage('Please enter Affix'); } - setIsError(true); - setErrorMessage('Affix should not be more than 5 chars'); }); // Toggles checkbox selection From 5163f39537e879a893088f1036625d36b3a8b84b Mon Sep 17 00:00:00 2001 From: Sayali Joshi Date: Wed, 26 Jun 2024 19:27:52 +0530 Subject: [PATCH 2/3] [CMG-181] - Legacy Cms | Enter Affix -> When entered restricted keyword 'api_key', it shows message saying 'Affix should not be more than 5 chars' which is incorrect --- .../LegacyCms/restrictedKeywords.json | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/ui/src/components/LegacyCms/restrictedKeywords.json b/ui/src/components/LegacyCms/restrictedKeywords.json index ea368cb4..4299ad34 100644 --- a/ui/src/components/LegacyCms/restrictedKeywords.json +++ b/ui/src/components/LegacyCms/restrictedKeywords.json @@ -42,6 +42,28 @@ "_version", "__v", "locale", - "publish_details" + "publish_details", + "_ids", + "_publish_locales", + "contentstackFilters", + "dimension", + "embedded_items", + "org_uid", + "shard_account", + "sys_asset", + "sys_assets", + "sys_metadata", + "taxonomies", + "built_io_application_user", + "built_io_application_user_role", + "built_io_audit_log", + "built_io_environment", + "built_io_extensions", + "built_io_installation_data", + "built_io_label", + "built_io_language", + "built_io_publish_queue", + "built_io_release", + "cs_branches" ] } \ No newline at end of file From f84cb33155f8ed13ba1fb38a632b951fda77754f Mon Sep 17 00:00:00 2001 From: Sayali Joshi Date: Tue, 2 Jul 2024 15:37:13 +0530 Subject: [PATCH 3/3] [CMG-174] - Frontend for Content Mapping Status and Filter functionality --- .../advanceProperties.interface.ts | 22 +- ui/src/components/AdvancePropertise/index.tsx | 26 +- .../Common/AddStack/addStack.interface.ts | 37 +++ .../components/Common/AddStack/addStack.tsx | 57 ++--- .../ContentMapper/contentMapper.interface.ts | 16 +- ui/src/components/ContentMapper/index.scss | 61 +++++ ui/src/components/ContentMapper/index.tsx | 224 +++++++++--------- .../DestinationStack/Actions/LoadStacks.tsx | 11 +- .../LegacyCms/Actions/LoadUploadFile.tsx | 2 +- ui/src/utilities/constants.ts | 13 + 10 files changed, 303 insertions(+), 166 deletions(-) diff --git a/ui/src/components/AdvancePropertise/advanceProperties.interface.ts b/ui/src/components/AdvancePropertise/advanceProperties.interface.ts index 8f0c0bf4..6ce7ae7f 100644 --- a/ui/src/components/AdvancePropertise/advanceProperties.interface.ts +++ b/ui/src/components/AdvancePropertise/advanceProperties.interface.ts @@ -1,16 +1,32 @@ -import { FieldMapType } from '../ContentMapper/contentMapper.interface'; +import { Advanced, FieldMapType } from '../ContentMapper/contentMapper.interface'; export interface SchemaProps { fieldtype: string; - value: any; + value: UpdatedSettings; rowId: string; - updateFieldSettings: (rowId: string, value: any, checkBoxChanged: boolean) => void; + updateFieldSettings: (rowId: string, value: Advanced, checkBoxChanged: boolean) => void; isLocalised: boolean; closeModal: () => void; data: FieldMapType; projectId?: string; } +export interface UpdatedSettings { + MinChars?: string; + MaxChars?: number; + MinRange?: number; + MaxRange?: number; + minSize?: string; + maxSize?: number; + DefaultValue?: string; + ValidationRegex?: string; + title?: string; + url?: string; + Mandatory?: boolean; + AllowImagesOnly?: boolean; + NonLocalizable?: boolean; +} + export interface Props { data: SchemaProps; states?: StateType; diff --git a/ui/src/components/AdvancePropertise/index.tsx b/ui/src/components/AdvancePropertise/index.tsx index dbf0e5b8..373737a5 100644 --- a/ui/src/components/AdvancePropertise/index.tsx +++ b/ui/src/components/AdvancePropertise/index.tsx @@ -42,7 +42,7 @@ const AdvancePropertise = (props: SchemaProps) => { }); const [contentTypes, setContentTypes] = useState([]); - const [CTValue, setCTValue] = useState(null); + const [ctValue, setCTValue] = useState(null); useEffect(() => { fetchContentTypes(''); @@ -50,7 +50,7 @@ const AdvancePropertise = (props: SchemaProps) => { // Fetch content types list const fetchContentTypes = async (searchText: string) => { - const { data } = await getContentTypes(props?.projectId || '', 0, 10, searchText || ''); //org id will always present + const { data } = await getContentTypes(props?.projectId ?? '', 0, 10, searchText || ''); //org id will always present setContentTypes(data?.contentTypes); }; @@ -63,7 +63,15 @@ const AdvancePropertise = (props: SchemaProps) => { props?.updateFieldSettings( props?.rowId, - { [field?.charAt(0)?.toUpperCase() + field?.slice(1)]: (event.target as HTMLInputElement)?.value }, + { + [field?.charAt(0)?.toUpperCase() + field?.slice(1)]: (event.target as HTMLInputElement)?.value, + validationRegex: '', + Mandatory: false, + Multiple: false, + Unique: false, + NonLocalizable: false, + EmbedObject: false + }, checkBoxChanged ); }; @@ -76,7 +84,15 @@ const AdvancePropertise = (props: SchemaProps) => { props?.updateFieldSettings( props?.rowId, - { [field?.charAt(0)?.toUpperCase() + field?.slice(1)]: value }, + { + [field?.charAt(0)?.toUpperCase() + field?.slice(1)]: value, + validationRegex: '', + Mandatory: false, + Multiple: false, + Unique: false, + NonLocalizable: false, + EmbedObject: false + }, checkBoxChanged ); }; @@ -282,7 +298,7 @@ const AdvancePropertise = (props: SchemaProps) => { {toggleStates?.embedObject && ( { + onChange={(event: React.ChangeEvent) => { input?.onChange(event); }} name="locale" @@ -253,7 +254,7 @@ const AddStack = (props: any): JSX.Element => { version="v2" testId="cs-cancel-create-stack" buttonType="tertiary" - onClick={(): any => { + onClick={() => { props?.closeModal(); }} > diff --git a/ui/src/components/ContentMapper/contentMapper.interface.ts b/ui/src/components/ContentMapper/contentMapper.interface.ts index 7f07c28b..c81eba9f 100644 --- a/ui/src/components/ContentMapper/contentMapper.interface.ts +++ b/ui/src/components/ContentMapper/contentMapper.interface.ts @@ -44,6 +44,7 @@ export interface ContentType { otherCmsUid: string; updateAt: string; id?: string; + status: string; } export interface FieldMapType { @@ -58,19 +59,16 @@ export interface FieldMapType { uid: string; id: string; _canSelect?: boolean; - advanced: Advanced; + advanced?: Advanced; contentstackUid: string; } export interface Advanced { - ValidationRegex?: string; - Basic?: boolean; - Advanced?: boolean; - Custom?: boolean; - Mandatory?: boolean; - Multiple?: boolean; - Unique?: boolean; - NonLocalizable?: boolean; + validationRegex: string; + Mandatory: boolean; + Multiple: boolean; + Unique: boolean; + NonLocalizable: boolean; EmbedObject?: boolean; } diff --git a/ui/src/components/ContentMapper/index.scss b/ui/src/components/ContentMapper/index.scss index e3593fe9..5ba1fef7 100644 --- a/ui/src/components/ContentMapper/index.scss +++ b/ui/src/components/ContentMapper/index.scss @@ -26,8 +26,11 @@ } } .ct-search-wrapper { + align-items: center; border-bottom: 1px solid $color-brand-secondary-lightest; + display: flex; padding: $px-8 $px-12; + position: relative; .Search__v2 { background-color: $color-brand-white-base; height: 2.5rem; @@ -36,6 +39,20 @@ width: 100%!important; } } + svg { + margin-left: $px-12; + } + .Button { + padding: 0; + &:hover { + background-color: transparent; + } + &:focus { + border: 0 none; + box-shadow: none; + outline: 0; + } + } } .ct-list-wrapper { height: calc(100vh - 375px); @@ -62,6 +79,15 @@ border: 1px solid $color-brand-primary-base; color: $color-brand-primary-base; } + .cms-title { + margin-right: 12px; + max-width: 123px; + overflow: hidden; + text-overflow: ellipsis; + } + .ct-options { + min-width: 150px; + } } } .dropdown-align { @@ -148,3 +174,38 @@ div .table-row { align-items: center; flex: 1; } +.status-wrapper { + align-items: center; + border: 1px solid $color-stepper-title; + border-radius: $px-8; + color: $color-stepper-title; + display: flex; + font-size: $size-font-large; + padding: $px-4 $px-8; + svg { + margin-right: 5px; + } +} +.filter-wrapper { + background-color: $color-brand-white-base; + border-radius: $px-4; + box-shadow: 0 4px 30px rgba(0,0,0,.25); + position: absolute; + right: $px-12; + top: $px-50; + z-index: 1; + li { + cursor: pointer; + font-size: $size-font-medium; + padding: $px-8 $px-12; + &:hover { + background-color: $color-base-white-10; + color: $color-brand-primary-base; + } + &.active-filter { + color: $color-brand-primary-base; + cursor: text; + font-weight: $font-weight-bold; + } + } +} diff --git a/ui/src/components/ContentMapper/index.tsx b/ui/src/components/ContentMapper/index.tsx index 56008774..e72a6339 100644 --- a/ui/src/components/ContentMapper/index.tsx +++ b/ui/src/components/ContentMapper/index.tsx @@ -1,11 +1,10 @@ // Libraries -import { useEffect, useState } from 'react'; +import { useEffect, useState, useRef } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import { useNavigate, useParams } from 'react-router-dom'; +import { useParams } from 'react-router-dom'; import { InfiniteScrollTable, Select, - ButtonGroup, Button, Search, Icon, @@ -13,9 +12,6 @@ import { Notification, cbModal, InstructionText, - ModalHeader, - ModalBody, - ModalFooter, Dropdown } from '@contentstack/venus-components'; @@ -36,7 +32,7 @@ import { RootState } from '../../store'; import { updateMigrationData, updateNewMigrationData } from '../../store/slice/migrationDataSlice'; // Utilities -import { CS_ENTRIES } from '../../utilities/constants'; +import { CS_ENTRIES, CONTENT_MAPPING_STATUS, STATUS_ICON_Mapping } from '../../utilities/constants'; import { validateArray } from '../../utilities/functions'; // Interface @@ -57,6 +53,7 @@ import { } from './contentMapper.interface'; import { ItemStatusMapProp } from '@contentstack/venus-components/build/components/Table/types'; import { ModalObj } from '../Modal/modal.interface'; +import { UpdatedSettings } from '../AdvancePropertise/advanceProperties.interface'; // Components import SchemaModal from '../SchemaModal'; @@ -102,11 +99,6 @@ const Fields: Mapping = { CheckBox: 'Select', global_field: 'Global' }; -interface ModalProps { - e: React.MouseEvent; - newIndex: number; - closeModal: () => void; -} const ContentMapper = () => { /** ALL CONTEXT HERE */ @@ -120,9 +112,6 @@ const ContentMapper = () => { const { contentMappingData: { content_types_heading: contentTypesHeading, - description, - // action_cta: actionCta, - // cta, search_placeholder: searchPlaceholder, table_search_placeholder: tableSearchPlaceholder }= {} @@ -144,7 +133,6 @@ const ContentMapper = () => { const [selectedContentType, setSelectedContentType] = useState(); const [exstingField, setexsitingField] = useState({}); const [selectedOptions, setSelectedOptions] = useState([]); - const [isButtonLoading, setisButtonLoading] = useState(false); const [isDropDownChanged, setisDropDownCHanged] = useState(false); const [contentTypeMapped, setcontentTypeMapped] = useState( newMigrationData?.content_mapping?.content_type_mapping || {} @@ -174,10 +162,13 @@ const ContentMapper = () => { const [rowIds, setRowIds] = useState({}); const [selectedEntries, setSelectedEntries] = useState([]); const [contentTypeSchema, setContentTypeSchema] = useState([]); + const [showFilter, setShowFilter] = useState(false); + const [filteredContentTypes, setFilteredContentTypes] = useState([]) /** ALL HOOKS Here */ const { projectId = '' } = useParams(); - const navigate = useNavigate(); + + const ref = useRef(null); /********** ALL USEEFFECT HERE *************/ useEffect(() => { @@ -242,11 +233,20 @@ const ContentMapper = () => { setRowIds(selectedId); }, [tableData]); + // To close the filter panel on outside click + useEffect(() => { + document.addEventListener('click', handleClickOutside, true); + return () => { + document.removeEventListener('click', handleClickOutside, true); + }; + }, []); + // Method to fetch content types const fetchContentTypes = async (searchText: string) => { const { data } = await getContentTypes(projectId || '', 0, 5000, searchContentType || ''); //org id will always present - + setContentTypes(data?.contentTypes); + setFilteredContentTypes(data?.contentTypes); setSelectedContentType(data?.contentTypes?.[0]); setTotalCounts(data?.contentTypes?.[0]?.fieldMapping?.length); setOtherCmsTitle(data?.contentTypes?.[0]?.otherCmsTitle); @@ -276,6 +276,7 @@ const ContentMapper = () => { const { data } = await getContentTypes(projectId, 0, 1000, searchCT || ''); //org id will always present setContentTypes(data?.contentTypes); + setFilteredContentTypes(data?.contentTypes); setSelectedContentType(data?.contentTypes?.[0]); setTotalCounts(data?.contentTypes?.[0]?.fieldMapping?.length); setOtherCmsTitle(data?.contentTypes?.[0]?.otherCmsTitle); @@ -348,7 +349,7 @@ const ContentMapper = () => { }; // Method to change the content type - const openContentType = (e: React.MouseEvent, i: number) => { + const openContentType = (i: number) => { setActive(i); const otherTitle = contentTypes?.[i]?.otherCmsTitle; @@ -356,65 +357,13 @@ const ContentMapper = () => { const option = contentTypeMapped?.[otherTitle] ?? 'Select Content Type'; setOtherContentType({ label: option, value: option }); - setContentTypeUid(contentTypes?.[i]?.id || ''); + setContentTypeUid(contentTypes?.[i]?.id ?? ''); setCurrentIndex(i); - fetchFields(contentTypes?.[i]?.id || '', searchText || ''); + fetchFields(contentTypes?.[i]?.id ?? '', searchText || ''); setotherCmsUid(contentTypes?.[i]?.otherCmsUid); setSelectedContentType(contentTypes?.[i]); }; - // Function to Save the Content Type - const SaveContentType = (props: ModalProps) => { - return ( - <> - - -

Hey there! You have unsaved changes on this page.

-
- - - - - - - - - ); - }; - const handleSaveContentTypeModal = (e: any, newIndex: number) => { - return cbModal({ - component: (props: ModalObj) => , - modalProps: { - shouldCloseOnOverlayClick: true, - size: 'small' - } - }); - }; - // Function to get exisiting content types list const fetchExistingContentTypes = async () => { const { data, status } = await getExistingContentTypes(projectId); @@ -423,7 +372,7 @@ const ContentMapper = () => { } }; - const updateFieldSettings = (rowId: string, updatedSettings: any, checkBoxChanged: boolean) => { + const updateFieldSettings = (rowId: string, updatedSettings: Advanced, checkBoxChanged: boolean) => { setisDropDownCHanged(checkBoxChanged); //setadvancePropertise(...updatedSettings); @@ -468,10 +417,10 @@ const ContentMapper = () => { }; // Function to handle selected fields - const handleSelectedEntries = (singleSelectedRowIds: UidMap[], selectedData: FieldMapType[]) => { + const handleSelectedEntries = (singleSelectedRowIds: string[], selectedData: FieldMapType[]) => { const selectedObj: UidMap = {}; - singleSelectedRowIds.forEach((uid: any) => { + singleSelectedRowIds.forEach((uid: string) => { selectedObj[uid] = true; }); @@ -516,7 +465,7 @@ const ContentMapper = () => { setOtherContentType(value); }; - const handleAdvancedSetting = (fieldtype: string, fieldvalue: Advanced, rowId: string, data: FieldMapType) => { + const handleAdvancedSetting = (fieldtype: string, fieldvalue: UpdatedSettings, rowId: string, data: FieldMapType) => { return cbModal({ component: (props: ModalObj) => ( { const fieldLabel = data?.ContentstackFieldType === 'url' || data?.ContentstackFieldType === 'group' ? data?.ContentstackFieldType : option?.[0]?.label - + return (
@@ -580,7 +529,7 @@ const ContentMapper = () => { icon="Setting" size="small" onClick={() => - handleAdvancedSetting(fieldLabel, data?.advanced, data?.uid, data) + handleAdvancedSetting(fieldLabel, advancePropertise, data?.uid, data) } /> @@ -942,10 +891,6 @@ const ContentMapper = () => { default: false }); } - const nextButtonLabel = - currentIndex < contentTypes?.length - 1 ? contentTypes[currentIndex + 1]?.otherCmsTitle : ''; - - const prevButtonLabel = currentIndex > 0 ? contentTypes[currentIndex - 1]?.otherCmsTitle : ''; const options = contentTypesList?.map((item) => ({ label: item?.title, @@ -954,11 +899,38 @@ const ContentMapper = () => { isDisabled: false })); - const adjustedOption = options?.map((option: any) => ({ + const adjustedOption = options?.map((option) => ({ ...option, isDisabled: contentTypeMapped && Object.values(contentTypeMapped).includes(option?.label) })); + // Function to toggle filter panel + const handleFilter = (e: React.MouseEvent) => { + e.stopPropagation(); + setShowFilter(!showFilter) + } + + // Function to filter content types as per the status + const handleContentTypeFilter = (e: React.MouseEvent) => { + const li_list = document.querySelectorAll('.filter-wrapper li'); + if(li_list) { + li_list.forEach((ele) => { + ele?.classList?.remove('active-filter'); + }) + } + (e?.target as HTMLElement) ?.classList?.add('active-filter'); + const filterVal = (e?.target as HTMLElement)?.innerText; + const filteredCT = contentTypes?.filter((ct) => CONTENT_MAPPING_STATUS[ct?.status] === filterVal) + setFilteredContentTypes(filteredCT); + } + + // Function to close filter panel on click outside + const handleClickOutside = (evt: MouseEvent) => { + if (!ref.current?.contains(evt.target as Node)) { + setShowFilter(false); + } + }; + const calcHeight = () => { // Get the viewport height in pixels const viewportHeight = window.innerHeight; @@ -968,7 +940,6 @@ const ContentMapper = () => { return result; } - const tableHeight = calcHeight(); return ( @@ -990,48 +961,65 @@ const ContentMapper = () => { value={searchContentType} debounceSearch={true} /> + + + {showFilter && ( +
+
    + {Object.keys(CONTENT_MAPPING_STATUS).map((key, keyInd) => ( +
  • handleContentTypeFilter(e)}>{CONTENT_MAPPING_STATUS[key]}
  • + ))} +
+
+ )}
- {contentTypes && validateArray(contentTypes) && ( + {filteredContentTypes && validateArray(filteredContentTypes) && (
    - {contentTypes?.map((content: ContentType, index: number) => ( + {filteredContentTypes?.map((content: ContentType, index: number) => { + const statusText = CONTENT_MAPPING_STATUS[content?.status]; + const icon = STATUS_ICON_Mapping[content?.status] || ''; + return (
  • openContentType(e, index)} + onClick={() => openContentType(index)} + onKeyDown={() => openContentType(index)} > - {content?.otherCmsTitle} - - {active == index && ( - - - - - /* - handleOnClick(content?.otherCmsTitle)} - /> - */ - )} + {content?.otherCmsTitle} + +
    + + {icon && } + {statusText} + + + {active == index && ( + + + + + )} +
  • - ))} + ) +})}
)} diff --git a/ui/src/components/DestinationStack/Actions/LoadStacks.tsx b/ui/src/components/DestinationStack/Actions/LoadStacks.tsx index 4bc2c279..5e3a3850 100644 --- a/ui/src/components/DestinationStack/Actions/LoadStacks.tsx +++ b/ui/src/components/DestinationStack/Actions/LoadStacks.tsx @@ -5,17 +5,21 @@ import { DEFAULT_DROPDOWN, IDropDown, INewMigration } from '../../../context/app import { isEmptyString, validateArray } from '../../../utilities/functions'; import { createStacksInOrg, getAllStacksInOrg } from '../../../services/api/stacks.service'; import { StackResponse } from '../../../services/api/service.interface'; -import AddStack, { Stack } from '../../../components/Common/AddStack/addStack'; +import AddStack from '../../Common/AddStack/addStack'; +import { Stack } from '../../Common/AddStack/addStack.interface'; import { updateDestinationStack } from '../../../services/api/migration.service'; import { Params, useParams } from 'react-router'; import { RootState } from '../../../store'; import { updateNewMigrationData } from '../../../store/slice/migrationDataSlice'; interface LoadFileFormatProps { - stepComponentProps: any; + stepComponentProps: stepComponentPropsType; currentStep: number; handleStepChange: (stepIndex: number, closeStep?: boolean) => void; } +interface stepComponentPropsType { + isSummary: boolean; +} const defaultStack = { description: 'Created from Migration Destination Stack Step', @@ -24,6 +28,9 @@ 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/LegacyCms/Actions/LoadUploadFile.tsx b/ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx index 7311d0bc..62388a1c 100644 --- a/ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx +++ b/ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx @@ -291,7 +291,7 @@ const LoadUploadFile = (props: LoadUploadFileProps) => { ) : } {showMessage && - () + () }
diff --git a/ui/src/utilities/constants.ts b/ui/src/utilities/constants.ts index b41d375b..ff817367 100644 --- a/ui/src/utilities/constants.ts +++ b/ui/src/utilities/constants.ts @@ -86,3 +86,16 @@ export const NEW_PROJECT_STATUS: ObjectType = { export const isOfflineCMSDataRequired = process.env.REACT_APP_OFFLINE_CMS ? process.env.REACT_APP_OFFLINE_CMS : true; + +export const CONTENT_MAPPING_STATUS: ObjectType = { + '1': 'Auto-Mapped', + '2': 'Verified', + '3': 'Mapping Failed' + // '4': 'Auto-Dump' +} +export const STATUS_ICON_Mapping: { [key: string]: string } = { + '1': 'Information', + '2': 'CheckCircleDark', + '3': 'Warning', + '4': 'completed' +}; \ No newline at end of file