diff --git a/src/Assets/CSS/common.css b/src/Assets/CSS/common.css index 396072bae..66fcc4a83 100644 --- a/src/Assets/CSS/common.css +++ b/src/Assets/CSS/common.css @@ -999,6 +999,10 @@ button.disbalesubmitbtndept { margin-top: 0px !important; } +.dataset_selector_in_integration .ant-segmented-item-selected { + margin-bottom: 0px !important; +} + .dataset_selector_in_integration .MuiCollapse-entered { background: #FFFFFF !important; box-shadow: 0px 20px 40px -4px rgb(145 158 171 / 16%) !important; @@ -1055,6 +1059,8 @@ button.disbalesubmitbtndept { color: red !important; } + + .deleteicon:hover .mainBoxInIntegration { border: 1px solid red !important; } @@ -1110,12 +1116,17 @@ html { width: 368px; height: 178px; margin: 30px 15px 15px 15px; - border: 1px solid #C0C7D1; + border: 1px solid #FFDB64; + outline: none; + } .connectorCard:hover { - border: 1px solid #c09507; + box-shadow: 0px 4px 20px rgba(216, 175, 40, 0.28); + /* border: 1px solid red; */ + border: 1px solid #FFDB64; cursor: pointer; + } .dataset_selector_in_integration .backButtonMainDiv .MuiSvgIcon-root { @@ -1124,4 +1135,8 @@ html { .dataset_selector_in_integration .Mui-focused { /* border: 1px solid #ab8405 !important; */ +} + +.ant-segmented-group label { + margin-bottom: 0px !important; } \ No newline at end of file diff --git a/src/Assets/Img/analytics.png b/src/Assets/Img/analytics.png new file mode 100644 index 000000000..f8bb577f3 Binary files /dev/null and b/src/Assets/Img/analytics.png differ diff --git a/src/Assets/Img/dashboard-growth.png b/src/Assets/Img/dashboard-growth.png new file mode 100644 index 000000000..b418992ca Binary files /dev/null and b/src/Assets/Img/dashboard-growth.png differ diff --git a/src/Components/AdminDatasetConnection/AddDataset.jsx b/src/Components/AdminDatasetConnection/AddDataset.jsx index c39e7f3b7..319b0f894 100644 --- a/src/Components/AdminDatasetConnection/AddDataset.jsx +++ b/src/Components/AdminDatasetConnection/AddDataset.jsx @@ -957,6 +957,7 @@ const AddDataset = (props) => { }, []) + return ( {isLoading ? : ""} @@ -1097,6 +1098,7 @@ const AddDataset = (props) => { { activeStep == 2 ? { Finish Later : " "} - {activeStep != 0 && !isSubmitted ? : ""} + {!onBoardingPage && activeStep != 0 && !isSubmitted ? : ""} {/* {(isStepOptional(activeStep) && (localUploaded.length > 0 || mysqlFileList.length > 0 || postgresFileList.length > 0)) && ( - - - - - } + + } + + : + + + + } + + + {value == "Join by" ? : } + + + ) } diff --git a/src/Components/Datasets/IntegrationDatasets/Join/utils.js b/src/Components/Datasets/IntegrationDatasets/Join/utils.js new file mode 100644 index 000000000..c011aa90b --- /dev/null +++ b/src/Components/Datasets/IntegrationDatasets/Join/utils.js @@ -0,0 +1,23 @@ +const converter = require('json-2-csv') + +//Download functionality +export const downloadDocument = (dataToDownload) => { // dataToDownload is the parsed array of object + converter.json2csv(dataToDownload, async (err, csv) => { + if (err) { + throw err + } + // print CSV string + download(csv) + }) +} +const download = (data) => { + const blob = new Blob([data], { type: 'text/csv' }) + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.setAttribute('hidden', '') + a.setAttribute('href', url) + a.setAttribute('download', "Dataset.csv"); + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); +} diff --git a/src/Components/Datasets/IntegrationDatasets/Preview/Preview.jsx b/src/Components/Datasets/IntegrationDatasets/Preview/Preview.jsx index 03a94f802..56c2c9e00 100644 --- a/src/Components/Datasets/IntegrationDatasets/Preview/Preview.jsx +++ b/src/Components/Datasets/IntegrationDatasets/Preview/Preview.jsx @@ -73,7 +73,7 @@ const Preview = (props) => { - Preview + Final preview @@ -151,7 +151,7 @@ const Preview = (props) => { }} className={styles.save_btn}>Save connector} {/* */} {/* */} - {true && + {isEditModeOn && {isLoader ? : ""} - + {"List of Connectors"} - + diff --git a/src/Components/IntegrationConnectors/cards.css b/src/Components/IntegrationConnectors/cards.css new file mode 100644 index 000000000..9d907ff3e --- /dev/null +++ b/src/Components/IntegrationConnectors/cards.css @@ -0,0 +1,34 @@ +/* CSS */ +.button-87 { + /* margin: 10px; */ + padding: 10px 30px; + text-align: center; + transition: 0.5s; + background-size: 200% auto; + color: #534104; + border-radius: 10px; + display: block; + border: 0px; + font-weight: 700; + box-shadow: 0px 0px 14px -7px #d69437e9; + background-image: linear-gradient(45deg, #FFDB64 0%, #d69437e9 51%, #FFDB64 100%); + cursor: pointer; + user-select: none; + -webkit-user-select: none; + touch-action: manipulation; + text-transform: capitalize; + width: 200px; + height: 50px; + font-size: 16px; +} + +.button-87:hover { + background-position: right center; + /* change the direction of the change here */ + color: #fff; + text-decoration: none; +} + +.button-87:active { + transform: scale(0.95); +} \ No newline at end of file diff --git a/src/Components/Participants/ParticipantsCards.js b/src/Components/Participants/ParticipantsCards.js index c781d8878..1dce18a40 100644 --- a/src/Components/Participants/ParticipantsCards.js +++ b/src/Components/Participants/ParticipantsCards.js @@ -17,6 +17,7 @@ import THEME_COLORS from "../../Constants/ColorConstants"; import UrlConstants from "../../Constants/UrlConstants"; import { useHistory } from "react-router-dom"; import { Tooltip, Zoom } from "@mui/material"; +import "./participantsCards.css" const useStyles = { btncolor: { @@ -107,6 +108,7 @@ export default function ParticipantsCards(props) { >
{ const [errorMessages, setErrorMessage] = useState(""); const [saveButtonEnabled, setSaveButtonEnabled] = useState(false) const [editCategoryTitle, setEditCategoryTitle] = useState([]) - const [datapointNameError,setDatapointNameError] = useState("") - const [accordionDatapointNameError,setAccordionDatapointNameError] = useState([]) + const [datapointNameError, setDatapointNameError] = useState("") + const [accordionDatapointNameError, setAccordionDatapointNameError] = useState([]) const history = useHistory(); @@ -54,16 +54,16 @@ const StandardizationInOnbord = (props) => { console.log("all datapoints", allDatapoints); - const handleDatapointCategoryName = (e) =>{ + const handleDatapointCategoryName = (e) => { setDatapointNameError("") - if(e.target.value.length<51 && e.target.value.match(RegexConstants.NEW_NAME_REGEX)) setDatapointName(e.target.value) + if (e.target.value.length < 51) setDatapointName(e.target.value) } - const handleDatapointCategoryDescription = (e) =>{ + const handleDatapointCategoryDescription = (e) => { + + if (e.target.value.length < 251) setDatapointDes(e.target.value) - if(e.target.value.length<251) setDatapointDes(e.target.value) - } const handleNameField = (e) => { @@ -78,25 +78,25 @@ const StandardizationInOnbord = (props) => { }; const handleAddDatapoint = () => { - if(!datapointName || !datapointDes ){ + if (!datapointName || !datapointDes) { + return + } + setSaveButtonEnabled(true) + let tmpAllDatapoints = [...allDatapoints]; + let newDatapoint = { + datapoint_category: datapointName, + datapoint_description: datapointDes, + }; + // Check if category name already exist or not + let returnFromFuntion = false + tmpAllDatapoints.forEach((category, index) => { + if (category.datapoint_category === datapointName) { + setDatapointNameError("Category already exists!") + returnFromFuntion = true; return } - setSaveButtonEnabled(true) - let tmpAllDatapoints = [...allDatapoints]; - let newDatapoint = { - datapoint_category: datapointName, - datapoint_description: datapointDes, - }; - // Check if category name already exist or not - let returnFromFuntion = false - tmpAllDatapoints.forEach((category,index)=>{ - if(category.datapoint_category === datapointName) { - setDatapointNameError("Category already exists!") - returnFromFuntion = true; - return - } - }) - if(returnFromFuntion) return + }) + if (returnFromFuntion) return let tmpAllAttributes = { ...allAttributes }; @@ -113,57 +113,61 @@ const StandardizationInOnbord = (props) => { setAllAttributes({ ...tmpAllAttributes }); setAllAttributesDes({ ...tmpAllAttributesDes }); - console.log('tmpAllDatapoints in add',tmpAllDatapoints) + console.log('tmpAllDatapoints in add', tmpAllDatapoints) tmpAllDatapoints.push(newDatapoint); setAllDataPoints(tmpAllDatapoints); setDatapointName(""); setDatapointDes(""); }; - const handleUpdateCategoryName = (index,newValue) =>{ + const handleUpdateCategoryName = (index, newValue) => { setSaveButtonEnabled(true) let tmpAllDatapoints = [...allDatapoints]; console.log('error array', accordionDatapointNameError) - //Check if category name already exist or not - // let returnFromFuntion = false - // tmpAllDatapoints.forEach((category)=>{ - // if(category.datapoint_category === newValue) { - // let tmpDatapointNameError = [...accordionDatapointNameError] - //tmpDatapointNameError[index] = ` ${newValue} Category already exists!` - // setAccordionDatapointNameError(tmpDatapointNameError) - // returnFromFuntion = true; - // return - // } - // }) - // if(returnFromFuntion) return - // let tmpDatapointNameError = [...accordionDatapointNameError] - // tmpDatapointNameError[index] = "" - // setAccordionDatapointNameError(tmpDatapointNameError) - - tmpAllDatapoints[index].datapoint_category = newValue; - setAllDataPoints(tmpAllDatapoints); + //Check if category name already exist or not + // let returnFromFuntion = false + // tmpAllDatapoints.forEach((category)=>{ + // if(category.datapoint_category === newValue) { + // let tmpDatapointNameError = [...accordionDatapointNameError] + //tmpDatapointNameError[index] = ` ${newValue} Category already exists!` + // setAccordionDatapointNameError(tmpDatapointNameError) + // returnFromFuntion = true; + // return + // } + // }) + // if(returnFromFuntion) return + // let tmpDatapointNameError = [...accordionDatapointNameError] + // tmpDatapointNameError[index] = "" + // setAccordionDatapointNameError(tmpDatapointNameError) + if (newValue.length < 51) { + tmpAllDatapoints[index].datapoint_category = newValue; + setAllDataPoints(tmpAllDatapoints); + } else { + return + } + } const handleNameExistsUpdate = (index, newValue) => { let tmpAllDatapoints = [...allDatapoints]; let newCategoryName = newValue.trim(); - + // Check if category name already exists or not let categoryAlreadyExists = tmpAllDatapoints.some((category, i) => { return i !== index && category.datapoint_category === newCategoryName; }); - + if (categoryAlreadyExists) { let errorofnewValue = [...accordionDatapointNameError]; errorofnewValue[index] = `"${newCategoryName}" is already taken. Please choose a different name.`; setAccordionDatapointNameError(errorofnewValue); - - }else if (newCategoryName === ""){ + + } else if (newCategoryName === "") { let errorofnewValue = [...accordionDatapointNameError] errorofnewValue[index] = "This field may not be blank" setAccordionDatapointNameError(errorofnewValue) - + } else { let tmpDatapointNameError = [...accordionDatapointNameError]; tmpDatapointNameError[index] = ""; @@ -176,15 +180,15 @@ const StandardizationInOnbord = (props) => { } }; - + const hanldeAttributeInputChange = ( index, allAttributesArrIndex, newValue ) => { - - if(newValue.length>=251 || !newValue.match(RegexConstants.DATAPOINT_ATTRIBUTE_REGEX)){ + + if (newValue.length >= 251) { return } setSaveButtonEnabled(true) @@ -201,10 +205,10 @@ const StandardizationInOnbord = (props) => { newValue ) => { - if(newValue.length>=251){ + if (newValue.length >= 251) { return } - if(newValue == " "){ + if (newValue == " ") { newValue.replace("") } setSaveButtonEnabled(true) @@ -219,8 +223,8 @@ const StandardizationInOnbord = (props) => { const handleAddDatapointAttribute = (index) => { - if(!allAttributes[index][0] || !allAttributesDes[index][0]){ - return + if (!allAttributes[index][0] || !allAttributesDes[index][0]) { + return } setSaveButtonEnabled(true) @@ -252,8 +256,8 @@ const StandardizationInOnbord = (props) => { let tmpAllDatapoints = [...allDatapoints]; tmpAllDatapoints.splice(index, 1); setAllDataPoints(tmpAllDatapoints); - - let tmpAllAttributes = {...allAttributes}; + + let tmpAllAttributes = { ...allAttributes }; tmpAllAttributes[index] = [] setAllAttributes(tmpAllAttributes) success("Category deleted successfully.", "success"); @@ -281,8 +285,8 @@ const StandardizationInOnbord = (props) => { let url = isOnborading ? UrlConstant.base_url + UrlConstant.standardization_post_data : inSettings - ? UrlConstant.base_url + UrlConstant.standardization_update_data - : UrlConstant.base_url + UrlConstant.standardization_post_data; + ? UrlConstant.base_url + UrlConstant.standardization_update_data + : UrlConstant.base_url + UrlConstant.standardization_post_data; setIsLoading(true); HTTPService(method, url, payload, false, true, isOnborading ? isaccesstoken : false) @@ -303,7 +307,7 @@ const StandardizationInOnbord = (props) => { showBrandingScreen(); } else if (inSettings) { - getStandardiziedTemplate() + getStandardiziedTemplate() } } }) @@ -358,7 +362,7 @@ const StandardizationInOnbord = (props) => { }); setAllAttributes(tmp); setAllAttributesDes(tmpDes); - console.log("tmp in get call attributes", tmp,tmpDes, allAttributes); + console.log("tmp in get call attributes", tmp, tmpDes, allAttributes); } }) .catch((e) => { @@ -400,9 +404,9 @@ const StandardizationInOnbord = (props) => { .then((response) => { setIsLoading(false); console.log("response", response); - let tmpAllAttributes = {...allAttributes}; - tmpAllAttributes[index] = [] - setAllAttributes(tmpAllAttributes) + let tmpAllAttributes = { ...allAttributes }; + tmpAllAttributes[index] = [] + setAllAttributes(tmpAllAttributes) success("Category deleted successfully.", "success"); let tmpAllDatapoints = [...allDatapoints]; @@ -477,7 +481,7 @@ const StandardizationInOnbord = (props) => {
handleDatapointCategoryName(e)} onKeyDown={handleNameField} @@ -486,11 +490,11 @@ const StandardizationInOnbord = (props) => { id="datapoint-name-input-box-id" label="Datapoint category name" variant="outlined" - error={datapointNameError ? datapointNameError : "" } - helperText={datapointNameError ? datapointNameError : "" } + error={datapointNameError ? datapointNameError : ""} + helperText={datapointNameError ? datapointNameError : ""} /> handleDatapointCategoryDescription(e)} onKeyDown={handledescriptionKeydowndes} @@ -509,7 +513,7 @@ const StandardizationInOnbord = (props) => { className="datapoint-add-button" id="add-datapoint-button" onClick={handleAddDatapoint} - disabled={!datapointName || !datapointDes } + disabled={!datapointName || !datapointDes} > Add @@ -537,55 +541,55 @@ const StandardizationInOnbord = (props) => { */} { - editCategoryTitle[index] ? - handleUpdateCategoryName(index,e.target.value,e)} - inputProps={{ maxLength: 250 }} - className="datapoint-name-input-box" - id="datapoint-name-input-box-id" - label="Datapoint category name" - variant="outlined" - helperText={accordionDatapointNameError[index] ? accordionDatapointNameError[index] : accordionDatapointNameError[index]} - error={accordionDatapointNameError[index] ? accordionDatapointNameError[index] : accordionDatapointNameError[index]} + editCategoryTitle[index] ? + handleUpdateCategoryName(index, e.target.value, e)} + inputProps={{ maxLength: 250 }} + className="datapoint-name-input-box" + id="datapoint-name-input-box-id" + label="Datapoint category name" + variant="outlined" + helperText={accordionDatapointNameError[index] ? accordionDatapointNameError[index] : accordionDatapointNameError[index]} + error={accordionDatapointNameError[index] ? accordionDatapointNameError[index] : accordionDatapointNameError[index]} /> - : -
+ : +
- - {item.datapoint_category} - -
+ + {item.datapoint_category} + +
}{ - editCategoryTitle[index] ? - - - - : - null + editCategoryTitle[index] ? + + + + : + null } {/*
*/} { - // this funtion will make a particular index of editCategoryTitle array true - e.stopPropagation(); - let tmp = [...editCategoryTitle] - tmp[index] = true - console.log('edit title', tmp, editCategoryTitle) - setEditCategoryTitle(tmp) + // this funtion will make a particular index of editCategoryTitle array true + e.stopPropagation(); + let tmp = [...editCategoryTitle] + tmp[index] = true + console.log('edit title', tmp, editCategoryTitle) + setEditCategoryTitle(tmp) }}> - + - { + { handleDatapointCategoryDelete(index) e.stopPropagation(); - }} - > - - + }} + > + + {/*
*/} @@ -594,7 +598,7 @@ const StandardizationInOnbord = (props) => {

{item.datapoint_description}

{ inputProps={{ maxLength: 250 }} /> { fill="white" stroke="#D5DADE" /> - + {/* {
{allAttributes?.[index]?.map((inputValue, arrIndex) => { - console.log('in category map ',allAttributesDes?.[index]?.[arrIndex], allAttributesDes?.[index]) + console.log('in category map ', allAttributesDes?.[index]?.[arrIndex], allAttributesDes?.[index]) return ( <> {arrIndex != 0 ? ( @@ -669,20 +673,20 @@ const StandardizationInOnbord = (props) => { InputProps={{ endAdornment: ( <> - - - - + + + + handleDatapointAtticuteDelete( - index, - arrIndex - ) - } - > - - - + index, + arrIndex + ) + } + > + + + // ), }} @@ -691,9 +695,9 @@ const StandardizationInOnbord = (props) => { label="Datapoint attributes" variant="outlined" value={inputValue} - // onChange={(e) => - // // hanldeAttributeInputChange(index, 0, e.target.value) - // } + // onChange={(e) => + // // hanldeAttributeInputChange(index, 0, e.target.value) + // } /> ) : ( "" diff --git a/src/Constants/RegexConstants.js b/src/Constants/RegexConstants.js index ed1b5dcb2..ad5fa4f4d 100644 --- a/src/Constants/RegexConstants.js +++ b/src/Constants/RegexConstants.js @@ -23,7 +23,7 @@ const RegexConstants = { city_name: /^$|^[a-zA-Z][a-zA-Z ]*$/, address: /^$|^[a-zA-Z0-9#,][a-zA-Z0-9#, ]*$/, NEW_NAME_REGEX: /^([a-zA-Z0-9]+\s?)*$/, //allows only one space and no spl characters allowed - DATAPOINT_ATTRIBUTE_REGEX: /^([a-zA-Z0-9_]+)*$/ // accepts only 1 spl charecter "_" and no spl characters and no space + DATAPOINT_ATTRIBUTE_REGEX: /^$|^[a-zA-Z0-9][a-zA-Z0-9_ ]*$/,// accepts only 1 spl charecter "_" and no spl characters and no space }; export default RegexConstants;