- {apiLoading ? :
+ const apiLoading = useSelector(
+ (state) => state.getLoggedInData?.data.organization === undefined,
+ );
+ const organizationDetails = useSelector(
+ (state) => state.getLoggedInData?.data.organization,
+ );
+ return (
+
+ {apiLoading ? (
+
+ ) : (
- }
-
- )
-}
+ )}
+
+ );
+};
-export default MyOrganization;
\ No newline at end of file
+export default MyOrganization;
diff --git a/src/app/ui/pages/workspace/DetailsViewPage.js b/src/app/ui/pages/workspace/DetailsViewPage.js
index 34c60ba0..c10c9a37 100644
--- a/src/app/ui/pages/workspace/DetailsViewPage.js
+++ b/src/app/ui/pages/workspace/DetailsViewPage.js
@@ -1,20 +1,20 @@
-'use client';
+"use client";
import {
- Box,
- Card,
- Grid,
- Tab,
- Tabs,
- Button,
- ThemeProvider,
- Typography,
- IconButton,
- Tooltip,
- Menu,
- MenuItem,
- } from "@mui/material";
+ Box,
+ Card,
+ Grid,
+ Tab,
+ Tabs,
+ Button,
+ ThemeProvider,
+ Typography,
+ IconButton,
+ Tooltip,
+ Menu,
+ MenuItem,
+} from "@mui/material";
import { Link, useNavigate, useParams } from "react-router-dom";
-import { useDispatch, useSelector } from 'react-redux';
+import { useDispatch, useSelector } from "react-redux";
import React, { useState, useEffect } from "react";
import themeDefault from "../../../../themes/theme";
import DatasetStyle from "../../../../styles/dataset";
@@ -33,7 +33,7 @@ import OrganizationReports from "../../../../components/Tabs/organizationReports
import WorkspaceReports from "../../../../components/common/WorkspaceReports";
import Spinner from "../../../../components/common/Spinner";
import SettingsOutlinedIcon from "@mui/icons-material/SettingsOutlined";
-import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
+import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
import AddUsersDialog from "../../../../components/common/AddUsersDialog";
import addUserTypes from "../../../../Constants/addUserTypes";
import GetWorkspacesDetailsAPI from "../../../actions/api/workspace/getWorkspaceDetails";
@@ -49,7 +49,7 @@ import TaskAnalytics from "../progress/Workspace/TaskAnalytics";
import MetaAnalytics from "../progress/Workspace/MetaAnalytics";
import ProgressList from "../progress/Workspace/ProgressAnalytics";
import PerformanceAnalytics from "../progress/Workspace/PerformanceAnalytics";
-
+
function TabPanel(props) {
const { children, value, index, ...other } = props;
return (
@@ -68,28 +68,42 @@ function TabPanel(props) {
);
}
-
+
const DetailsViewPage = (props) => {
const navigate = useNavigate();
- const CustomButton = ({ label, buttonVariant, color, disabled = false, ...rest }) => (
-
- );
- const { pageType, title, createdBy, onArchiveWorkspace,initialUserData } = props;
+ const CustomButton = ({
+ label,
+ buttonVariant,
+ color,
+ disabled = false,
+ ...rest
+ }) => (
+
+ );
+ const { pageType, title, createdBy, onArchiveWorkspace, initialUserData } =
+ props;
const [addUserDialogOpen, setAddUserDialogOpen] = useState(false);
const [csvFile, setCsvFile] = useState(null);
const [selectedUsers, setSelectedUsers] = useState([]);
const [userType, setUserType] = useState(Object.keys(UserRolesList)[0]);
const [selectedEmails, setSelectedEmails] = useState([]);
- const [btn,setbtn] = useState(null);
+ const [btn, setbtn] = useState(null);
const [snackbar, setSnackbarInfo] = useState({
open: false,
message: "",
variant: "success",
});
const { id, orgId } = useParams();
- const organisation_id = useSelector(state => state.getWorkspacesProjectData?.data?.[0]?.organization_id);
+ const organisation_id = useSelector(
+ (state) => state.getWorkspacesProjectData?.data?.[0]?.organization_id,
+ );
const handleUserDialogOpen = () => {
setAddUserDialogOpen(true);
};
@@ -100,9 +114,14 @@ const DetailsViewPage = (props) => {
const userDetails = useSelector((state) => state.getLoggedInData.data);
const dispatch = useDispatch();
const [value, setValue] = React.useState(0);
- const [user,setuser] = useState(initialUserData)
+
+ const [user, setuser] = useState(initialUserData);
const [loading, setLoading] = useState(false);
- const apiLoading = useSelector((state) => pageType === componentType.Type_Workspace && state.getWorkspaceDetails.status == "loading");
+ const apiLoading = useSelector(
+ (state) =>
+ pageType === componentType.Type_Workspace &&
+ state.getWorkspaceDetails.status == "loading",
+ );
const [addAnnotatorsDialogOpen, setAddAnnotatorsDialogOpen] =
React.useState(false);
const [addManagersDialogOpen, setAddManagersDialogOpen] =
@@ -113,9 +132,8 @@ const DetailsViewPage = (props) => {
const [selectmenu, setSelectmenu] = useState("TaskAnalytics");
const handleMenuOpen = (event) => {
setAnchorEl(event.currentTarget);
-
};
-
+
const handleMenuClose = () => {
setAnchorEl(null);
};
@@ -127,7 +145,6 @@ const DetailsViewPage = (props) => {
dispatch(fetchWorkspaceDetails(orgId));
};
-
const handleAnnotatorDialogClose = () => {
setAddAnnotatorsDialogOpen(false);
};
@@ -147,22 +164,20 @@ const DetailsViewPage = (props) => {
const handleWorkspaceDialogClose = () => {
setAddWorkspacesDialogOpen(false);
dispatch(fetchWorkspaceData());
-
};
const handleWorkspaceDialogOpen = () => {
setAddWorkspacesDialogOpen(true);
};
-
const handleOpenSettings = () => {
navigate(`/workspaces/${id}/workspacesetting`);
};
- const handleClickMenu = (data) =>{
- setSelectmenu(data)
- handleMenuClose()
- }
+ const handleClickMenu = (data) => {
+ setSelectmenu(data);
+ handleMenuClose();
+ };
const renderSnackBar = () => {
return (
@@ -177,15 +192,14 @@ const DetailsViewPage = (props) => {
/>
);
};
-
+
const addBtnClickHandler = async () => {
setLoading(true);
- if(userDetails?.role === userRole.WorkspaceManager)
- {
+ if (userDetails?.role === userRole.WorkspaceManager) {
const addUsesrsObj = new InviteManagerSuggestions(
organisation_id,
selectedUsers,
- userType
+ userType,
);
const res = await fetch(addUsesrsObj.apiEndPoint(), {
method: "POST",
@@ -201,22 +215,18 @@ const DetailsViewPage = (props) => {
});
const orgObj = new GetOragnizationUsersAPI(id);
dispatch(APITransport(orgObj));
-
- }else {
+ } else {
setSnackbarInfo({
open: true,
message: resp?.message,
variant: "error",
});
}
- }
- else
- {
-
- const addMembersObj = new InviteUsersToOrgAPI(
+ } else {
+ const addMembersObj = new InviteUsersToOrgAPI(
organisation_id,
selectedUsers,
- userType
+ userType,
);
const res = await fetch(addMembersObj.apiEndPoint(), {
method: "POST",
@@ -232,7 +242,7 @@ const DetailsViewPage = (props) => {
});
const orgObj = new GetOragnizationUsersAPI(id);
dispatch(APITransport(orgObj));
- }else {
+ } else {
setSnackbarInfo({
open: true,
message: resp?.message,
@@ -242,321 +252,445 @@ const DetailsViewPage = (props) => {
}
handleUserDialogClose();
setLoading(false);
- setSelectedUsers([ ]);
+ setSelectedUsers([]);
setSelectedEmails([]);
setCsvFile(null);
- setbtn(null)
- setUserType(Object.keys(UserRolesList)[0])
+ setbtn(null);
+ setUserType(Object.keys(UserRolesList)[0]);
};
- return (
-
- {apiLoading ? :
-
-
+ return (
+
+ {apiLoading ? (
+
+ ) : (
+
+
{pageType === componentType.Type_Organization && (
-
- { title}
+
+ {title}
- )}
+ )}
{pageType === componentType.Type_Workspace && (
-
-
+
{title}
-
-
+
+
{(userRole.Annotator !== userDetails?.role ||
userRole.Reviewer !== userDetails?.role ||
userRole.SuperChecker !== userDetails?.role) && (
-
- {/*
-
-
-
- */}
-
- {translate("label.showProjectSettings")}
-
- }
- >
-
-
-
-
-
- )}
-
+ {translate("label.showProjectSettings")}
+
+ }
+ >
+
+
+
+
+ )}
+
)}
-
- Created by : {createdBy}
+
+ Created by : {createdBy}
-
+ {pageType === componentType.Type_Workspace && (
+
+ )}
+ {pageType === componentType.Type_Organization && (
+
+ )}
+
+ {pageType === componentType.Type_Workspace && (
+
+ )}
+ {pageType === componentType.Type_Organization && (
+
+ )}
+
+ {pageType === componentType.Type_Workspace && (
+
+ )}
+ {pageType === componentType.Type_Organization && (
+
+ )}
+
+ {pageType === componentType.Type_Workspace && (
+
+ )}
+ {pageType === componentType.Type_Organization && (
+
+ )}
+
+ {pageType === componentType.Type_Workspace && (
+
+ {" "}
+ {translate("label.analytics")}{" "}
+ {" "}
+
+ }
+ aria-controls="menu"
+ aria-haspopup="true"
+ onClick={handleMenuOpen}
+ sx={{
+ fontSize: 16,
+ fontWeight: "700",
+ bgcolor: value === 4 ? "#d3d3d3" : "#F5F5F5",
+ color: value === 4 ? "black" : "text.primary",
+ borderRadius: 1,
+ "&:hover": {
+ bgcolor: "#e0e0e0",
+ },
+ }}
+ />
+ )}
+
+ {pageType === componentType.Type_Organization && (
+
+ )}
+
+
+
+
{pageType === componentType.Type_Workspace && (
-
+ <>
+
+
+
+
+
+ >
)}
{pageType === componentType.Type_Organization && (
-
+ <>
+
+
+
+ >
)}
-
+
+
{pageType === componentType.Type_Workspace && (
-
+ <>
+
+
+
+
+
+
+
+
+
+ getWorkspaceDetails()
+ }
+ />
+
+ addBtnClickHandler()}
+ loading={loading}
+ selectedEmails={selectedEmails}
+ setSelectedEmails={setSelectedEmails}
+ csvFile={csvFile}
+ setCsvFile={setCsvFile}
+ btn={btn}
+ setbtn={setbtn}
+ value={value}
+ setvalue={setValue}
+ />
+ >
)}
{pageType === componentType.Type_Organization && (
-
+ <>
+
+ >
)}
-
+
+
{pageType === componentType.Type_Workspace && (
-
+ <>
+
+
+
+ >
)}
{pageType === componentType.Type_Organization && (
-
- )}
-
- {pageType === componentType.Type_Workspace && (
-
+
)}
+
+
{pageType === componentType.Type_Organization && (
-
+
)}
-
{pageType === componentType.Type_Workspace && (
-
- {translate("label.analytics")} }
- aria-controls="menu"
- aria-haspopup="true"
- onClick={handleMenuOpen}
- sx={{ fontSize: 16, fontWeight: "700"}}
- />
-
+
)}
-
+
+
+ {pageType === componentType.Type_Workspace &&
+ selectmenu === "TaskAnalytics" && }
+ {pageType === componentType.Type_Workspace &&
+ selectmenu === "MetaAnalytics" && }
+ {pageType === componentType.Type_Workspace &&
+ selectmenu === "AdvanceAnalytics" && }
+ {pageType === componentType.Type_Workspace &&
+ selectmenu === "PerformanceAnalytics" && (
+
+ )}
{pageType === componentType.Type_Organization && (
-
-
+
)}
-
-
-
-
-
- {pageType === componentType.Type_Workspace && (
- <>
-
- {/* */}
-
-
-
- {/* */}
- {/*
-
-
-
- */}
-
- >
- )}
- {pageType === componentType.Type_Organization && (
- <>
-
-
-
- >
- )}
-
-
- {pageType === componentType.Type_Workspace && (
- <>
-
-
-
-
-
-
-
-
-
-
- getWorkspaceDetails()}
- />
-
- addBtnClickHandler()}
- loading={loading}
- selectedEmails={selectedEmails}
- setSelectedEmails={setSelectedEmails}
- csvFile={csvFile}
- setCsvFile={setCsvFile}
- btn={btn}
- setbtn={setbtn}
- value={value}
- setvalue={setValue}
- />
-
-
- >
- )}
- {pageType === componentType.Type_Organization && (
- <>
-
- >
- )}
-
-
- {pageType === componentType.Type_Workspace && (
- <>
-
-
-
- >
- )}
- {pageType === componentType.Type_Organization && (
-
- )}
-
-
- {pageType === componentType.Type_Organization && (
-
- )}
- {pageType === componentType.Type_Workspace && }
-
-
- {pageType === componentType.Type_Workspace && selectmenu=== "TaskAnalytics" && }
- {pageType === componentType.Type_Workspace && selectmenu=== "MetaAnalytics" && }
- {pageType === componentType.Type_Workspace && selectmenu=== "AdvanceAnalytics" && }
- {pageType === componentType.Type_Workspace && selectmenu=== "PerformanceAnalytics" && }
- {pageType === componentType.Type_Organization && (
-
- )}
-
-
-
- }
+
+
+
+ )}
);
};
-
-
-
-export default DetailsViewPage;
\ No newline at end of file
+export default DetailsViewPage;
diff --git a/src/styles/Dataset.css b/src/styles/Dataset.css
index 6ab861c9..3b59fc88 100644
--- a/src/styles/Dataset.css
+++ b/src/styles/Dataset.css
@@ -39,7 +39,6 @@
width: 100%;
min-height: 420px;
padding: 40px;
- justify-content: center; justify-items: center
}
.projectsettingGrid {
diff --git a/src/styles/dataset.js b/src/styles/dataset.js
index a7a1b7b1..292b3741 100644
--- a/src/styles/dataset.js
+++ b/src/styles/dataset.js
@@ -1,46 +1,41 @@
-import { makeStyles } from '@mui/styles';
+import { makeStyles } from "@mui/styles";
// #EE6633
-
const DatasetStyle = makeStyles({
-
Projectsettingtextarea: {
width: "100%",
fontSize: "1.4rem",
fontFamily: "Roboto",
fontWeight: 10,
lineHeight: 1.2,
-
},
- custombtn:{
- borderRadius:0
+ custombtn: {
+ borderRadius: 0,
},
workspaceTables: {
- marginTop: "20px"
+ marginTop: "20px",
},
projectButton: {
width: "100%",
textDecoration: "none",
},
annotatorsButton: {
- width: "100%"
+ width: "100%",
},
managersButton: {
- width: "100%"
+ width: "100%",
},
settingsButton: {
width: "100%",
- color: "#ee6633"
+ color: "#ee6633",
},
workspaceCard: {
width: "100%",
minHeight: "420px",
padding: "40px",
- justifyContent: "center", justifyItems: "center"
},
projectsettingGrid: {
margin: "20px 0px 10px 0px",
-
},
filterToolbarContainer: {
// alignItems : 'center',
@@ -51,9 +46,8 @@ const DatasetStyle = makeStyles({
justifyContent: "flex-end",
alignItems: "center",
columnGap: "10px",
-
},
-
+
clearAllBtn: {
float: "right",
margin: "9px 16px 0px auto",
@@ -112,7 +106,7 @@ const DatasetStyle = makeStyles({
},
},
projectCardContainer: {
- cursor: 'pointer'
+ cursor: "pointer",
},
modelname: {
boxSizing: "border-box",
@@ -120,7 +114,7 @@ const DatasetStyle = makeStyles({
height: "64px",
backgroundColor: "white",
maxWidth: "90%",
- minWidth: '90%',
+ minWidth: "90%",
width: "auto",
display: "flex",
alignItems: "center",
@@ -133,51 +127,50 @@ const DatasetStyle = makeStyles({
alignItems: "center",
paddingBottom: "5vh",
// justifyContent: "space-around",
- flexGrow: 0
+ flexGrow: 0,
},
projectCardContainer1: {
backgroundColor: "#EE6633",
height: "100%",
- width: "100%"
+ width: "100%",
},
projectCardContainer2: {
backgroundColor: "#66bb6a",
height: "100%",
- width: "100%"
+ width: "100%",
},
userCardContainer: {
direction: "column",
alignItems: "center",
height: "100%",
- placeContent: "center"
+ placeContent: "center",
},
dashboardContentContainer: {
alignItems: "left",
justifyContent: "space-around",
minHeight: "70vh",
- borderLeft: '1px solid lightgray',
- paddingLeft: '5%'
+ borderLeft: "1px solid lightgray",
+ paddingLeft: "5%",
},
link: {
- textDecoration: "none"
+ textDecoration: "none",
},
progress: {
- position: 'fixed',
- top: '50%',
- left: '50%',
- transform: 'translate(-50%, -50%)',
-
+ position: "fixed",
+ top: "50%",
+ left: "50%",
+ transform: "translate(-50%, -50%)",
},
progressDiv: {
- position: 'fixed',
+ position: "fixed",
// backgroundColor: 'rgba(0.5, 0, 0, 0.5)',
zIndex: 1000,
// width: '100%',
// height: '100%',
- top: '50%',
- left: '50%',
+ top: "50%",
+ left: "50%",
opacity: 1,
- pointerEvents: 'none',
+ pointerEvents: "none",
},
search: {
//position: "relative",
@@ -192,7 +185,6 @@ const DatasetStyle = makeStyles({
// position: "absolute",
// Right: "200px",
// top:"155px",
-
},
searchIcon: {
// padding: theme.spacing(0, 2),
@@ -217,14 +209,13 @@ const DatasetStyle = makeStyles({
ToolbarContainer: {
position: "absolute",
bottom: "14px",
- right: "45px"
-
+ right: "45px",
},
TotalSummarydata: {
padding: "4px 0px 0px 4px",
},
projectgrid: {
- textAlign: "start"
+ textAlign: "start",
},
// fixedWidthContainer: {
// maxWidth: "5%",
@@ -245,8 +236,7 @@ const DatasetStyle = makeStyles({
overflow: "hidden",
"@media (max-width:400px)": {
marginLeft: "-14px",
- fontSize: "12px"
-
+ fontSize: "12px",
},
},
descCardIcon: {
@@ -256,19 +246,21 @@ const DatasetStyle = makeStyles({
height: "fit-content",
},
formControl: {
- width: 300
+ width: 300,
},
AddGlossaryCard: {
width: "100%",
minHeight: "420px",
padding: "20px 40px 20px 40px",
- justifyContent: "center", justifyItems: "center"
+ justifyContent: "center",
+ justifyItems: "center",
},
SuggestAnEditCard: {
width: "100%",
minHeight: "350px",
padding: "20px 40px 20px 40px",
- justifyContent: "center", justifyItems: "center"
+ justifyContent: "center",
+ justifyItems: "center",
},
heading: {
@@ -293,23 +285,35 @@ const DatasetStyle = makeStyles({
boxShadow: "3px 0 2px -2px #00000029",
},
toolTip: {
- width: "200px", height: "180px", fontSize: "16px", backgroundColor: "white", color: "black", padding: "5px 10px 10px 10px", border: "1px solid gray"
+ width: "200px",
+ height: "180px",
+ fontSize: "16px",
+ backgroundColor: "white",
+ color: "black",
+ padding: "5px 10px 10px 10px",
+ border: "1px solid gray",
},
- toolTips: {
- width: "280px", height: "220px", fontSize: "16px", backgroundColor: "white", color: "black", padding: "5px 10px 10px 10px", border: "1px solid gray"
+ toolTips: {
+ width: "280px",
+ height: "220px",
+ fontSize: "16px",
+ backgroundColor: "white",
+ color: "black",
+ padding: "5px 10px 10px 10px",
+ border: "1px solid gray",
},
- textTransliteration:{
+ textTransliteration: {
borderRadius: "3px",
- height: "60px",
- padding: "15px 10px 10px 10px",
- resize: "none",
- margin: "7px 0px 0px 0px",
- width: "200px",fontSize:"16px"
- }
-
-})
+ height: "60px",
+ padding: "15px 10px 10px 10px",
+ resize: "none",
+ margin: "7px 0px 0px 0px",
+ width: "200px",
+ fontSize: "16px",
+ },
+});
-export default DatasetStyle
\ No newline at end of file
+export default DatasetStyle;