Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/responsive #216

Merged
merged 4 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions src/app/ui/pages/projects/project.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client'
import { React,useEffect, useState } from "react";
import { Radio, Box, Grid, Typography, ThemeProvider } from "@mui/material";
import { useTheme } from '@mui/material/styles';
import RadioGroup from "@mui/material/RadioGroup";
import FormControlLabel from "@mui/material/FormControlLabel";
import FormControl from "@mui/material/FormControl";
Expand All @@ -19,9 +20,12 @@ export default function ProjectList({data}) {
/* eslint-disable react-hooks/exhaustive-deps */
/* eslint-disable-next-line react/jsx-key */


const dispatch = useDispatch();
const [radiobutton, setRadiobutton] = useState(true);
console.log(data);
const theme = useTheme();


// const [loading, setLoading] = useState(true);
const [selectedFilters, setsSelectedFilters] = useState({
Expand Down Expand Up @@ -63,10 +67,10 @@ console.log(data?.length,"hel");
<ThemeProvider theme={themeDefault}>
{apiLoading ? <Spinner /> :
<>
{/* <Grid container direction="row" columnSpacing={3} rowSpacing={2} sx={{ position: "static", bottom: "-51px", left: "20px" }} > */}
<Grid container className="root">
<Grid item style={{ flexGrow: "0" }}>
<Typography variant="h6" sx={{ paddingBottom: "7px" }}>
<Grid container className="root" >

<Grid item style={{ flexGrow: "0" }} >
<Typography variant="h6" sx={{ paddingBottom: "7px" ,paddingLeft: "15px"}}>
View :{" "}
</Typography>
</Grid>
Expand Down Expand Up @@ -94,13 +98,22 @@ console.log(data?.length,"hel");
</FormControl>
</Grid>

<Grid xs={3} item className="fixedWidthContainer">
<Search />
</Grid>
</Grid>
<Grid
item
xs={12}
sm={6}
md={3}
className="fixedWidthContainer"
sx={{
paddingX: { xs: 2, sm: 3, md: 0 },
}}
>
<Search />
</Grid>
</Grid>

<Box>
<Box sx={{ marginTop: "20px" }}>
<Box sx={{ margin: "20px" }}>
{radiobutton ? (
<ProjectCardList
projectData={displayedProjects}
Expand Down
60 changes: 48 additions & 12 deletions src/app/ui/pages/projects/projectDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ import {
direction="row"
justifyContent="center"
alignItems="center"
sx={{
padding: { xs: 2, sm: 3, md: 5 },
}}
>
<Card
sx={{
Expand All @@ -419,21 +422,47 @@ import {
direction="row"
justifyContent="center"
alignItems="center"
sx={{ mb: 3 }}
sx={{ mb: { xs: 2, md: 3 } }}
>
<Grid item xs={12} sm={12} md={loggedInUserData?.role && (userRole.WorkspaceManager === loggedInUserData.role || userRole.OrganizationOwner === loggedInUserData.role || userRole.Admin === loggedInUserData.role) ? 10 : 12} lg={loggedInUserData?.role && (userRole.WorkspaceManager === loggedInUserData.role || userRole.OrganizationOwner === loggedInUserData.role || userRole.Admin === loggedInUserData.role) ? 10 : 12} xl={loggedInUserData?.role && (userRole.WorkspaceManager === loggedInUserData.role || userRole.OrganizationOwner === loggedInUserData.role || userRole.Admin === loggedInUserData.role) ? 10 : 12}>
<Typography variant="h3">{ProjectDetails.title}</Typography>
<Grid
item
xs={12}
md={
loggedInUserData?.role &&
(userRole.WorkspaceManager === loggedInUserData.role ||
userRole.OrganizationOwner === loggedInUserData.role ||
userRole.Admin === loggedInUserData.role)
? 10
: 12
}
sx={{
textAlign: { xs: "center", md: "left" },
mb: { xs: 2, md: 0 },
}}
>
<Typography
variant="h5"
sx={{ fontSize: { xs: "1.5rem", md: "2rem" } }}
>
{ProjectDetails.title}
</Typography>
</Grid>

{(userRole.WorkspaceManager === loggedInUserData?.role ||
userRole.OrganizationOwner === loggedInUserData?.role ||
userRole.Admin === loggedInUserData?.role) && (
<Grid item xs={12} sm={12} md={2} lg={2} xl={2}>
userRole.OrganizationOwner === loggedInUserData?.role ||
userRole.Admin === loggedInUserData?.role) && (
<Grid
item
xs={12}
md={2}
sx={{
display: "flex",
justifyContent: { xs: "center", md: "flex-end" },
mt: { xs: 2, md: 0 },
}}
>
<Tooltip title={translate("label.showProjectSettings")}>
<IconButton
onClick={handleOpenSettings}
sx={{ marginLeft: "140px" }}
>
<IconButton onClick={handleOpenSettings}>
<SettingsOutlinedIcon
color="primary.dark"
fontSize="large"
Expand All @@ -442,8 +471,15 @@ import {
</Tooltip>
</Grid>
)}
</Grid>
<Grid item xs={12} sm={12} md={12} lg={12} xl={12} sx={{ mb: 2 }}>
</Grid>

<Grid
item
xs={12}
sx={{
mb: { xs: 2, md: 3 },
}}
>
<Grid container spacing={2}>
{projectFilterData?.map((des, i) => (
<Grid key={i} item xs={isSuperChecker?3:4} sm={isSuperChecker?3:4} md={isSuperChecker?3:4} lg={isSuperChecker?3:4} xl={isSuperChecker?3:4}>
Expand Down
17 changes: 17 additions & 0 deletions src/app/ui/pages/workspace/DetailsViewPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {
Menu,
MenuItem,
} from "@mui/material";
import { useMediaQuery } from "@mui/material";
import { useTheme } from "@mui/material/styles";
import { Link, useNavigate, useParams } from "react-router-dom";
import { useDispatch, useSelector } from "react-redux";
import React, { useState, useEffect } from "react";
Expand Down Expand Up @@ -258,6 +260,10 @@ const DetailsViewPage = (props) => {
setbtn(null);
setUserType(Object.keys(UserRolesList)[0]);
};

const theme = useTheme();
const isSmallScreen = useMediaQuery(theme.breakpoints.down("md"));

return (
<ThemeProvider theme={themeDefault}>
{apiLoading ? (
Expand Down Expand Up @@ -340,6 +346,7 @@ const DetailsViewPage = (props) => {
TabIndicatorProps={{
style: { display: "none" },
}}
orientation={isSmallScreen ? "vertical" : "horizontal"}
>
{pageType === componentType.Type_Workspace && (
<Tab
Expand All @@ -349,6 +356,7 @@ const DetailsViewPage = (props) => {
fontWeight: "700",
bgcolor: value === 0 ? "#d3d3d3" : "#F5F5F5",
color: value === 0 ? "black" : "text.primary",
margin: isSmallScreen ? "0 0 1rem 0" : "0 1rem 0 0",
borderRadius: 1,
"&:hover": {
bgcolor: "#e0e0e0",
Expand All @@ -364,6 +372,7 @@ const DetailsViewPage = (props) => {
fontWeight: "700",
bgcolor: value === 0 ? "#d3d3d3" : "#F5F5F5",
color: value === 0 ? "black" : "text.primary",
margin: isSmallScreen ? "0 0 1rem 0" : "0 1rem 0 0",
borderRadius: 1,
"&:hover": {
bgcolor: "#e0e0e0",
Expand All @@ -380,6 +389,7 @@ const DetailsViewPage = (props) => {
fontWeight: "700",
bgcolor: value === 1 ? "#d3d3d3" : "#F5F5F5",
color: value === 1 ? "black" : "text.primary",
margin: isSmallScreen ? "0 0 1rem 0" : "0 1rem 0 0",
borderRadius: 1,
"&:hover": {
bgcolor: "#e0e0e0",
Expand All @@ -395,6 +405,7 @@ const DetailsViewPage = (props) => {
fontWeight: "700",
bgcolor: value === 1 ? "#d3d3d3" : "#F5F5F5",
color: value === 1 ? "black" : "text.primary",
margin: isSmallScreen ? "0 0 1rem 0" : "0 1rem 0 0",
borderRadius: 1,
"&:hover": {
bgcolor: "#e0e0e0",
Expand All @@ -411,6 +422,7 @@ const DetailsViewPage = (props) => {
fontWeight: "700",
bgcolor: value === 2 ? "#d3d3d3" : "#F5F5F5",
color: value === 2 ? "black" : "text.primary",
margin: isSmallScreen ? "0 0 1rem 0" : "0 1rem 0 0",
borderRadius: 1,
"&:hover": {
bgcolor: "#e0e0e0",
Expand All @@ -426,6 +438,7 @@ const DetailsViewPage = (props) => {
fontWeight: "700",
bgcolor: value === 2 ? "#d3d3d3" : "#F5F5F5",
color: value === 2 ? "black" : "text.primary",
margin: isSmallScreen ? "0 0 1rem 0" : "0 1rem 0 0",
borderRadius: 1,
"&:hover": {
bgcolor: "#e0e0e0",
Expand All @@ -442,6 +455,7 @@ const DetailsViewPage = (props) => {
fontWeight: "700",
bgcolor: value === 3 ? "#d3d3d3" : "#F5F5F5",
color: value === 3 ? "black" : "text.primary",
margin: isSmallScreen ? "0 0 1rem 0" : "0 1rem 0 0",
borderRadius: 1,
"&:hover": {
bgcolor: "#e0e0e0",
Expand All @@ -457,6 +471,7 @@ const DetailsViewPage = (props) => {
fontWeight: "700",
bgcolor: value === 3 ? "#d3d3d3" : "#F5F5F5",
color: value === 3 ? "black" : "text.primary",
margin: isSmallScreen ? "0 0 1rem 0" : "0 1rem 0 0",
borderRadius: 1,
"&:hover": {
bgcolor: "#e0e0e0",
Expand Down Expand Up @@ -484,6 +499,7 @@ const DetailsViewPage = (props) => {
fontWeight: "700",
bgcolor: value === 4 ? "#d3d3d3" : "#F5F5F5",
color: value === 4 ? "black" : "text.primary",
margin: isSmallScreen ? "0 0 1rem 0" : "0 1rem 0 0",
borderRadius: 1,
"&:hover": {
bgcolor: "#e0e0e0",
Expand All @@ -500,6 +516,7 @@ const DetailsViewPage = (props) => {
fontWeight: "700",
bgcolor: value === 4 ? "#d3d3d3" : "#F5F5F5",
color: value === 4 ? "black" : "text.primary",
margin: isSmallScreen ? "0 0 1rem 0" : "0 1rem 0 0",
borderRadius: 1,
"&:hover": {
bgcolor: "#e0e0e0",
Expand Down
98 changes: 59 additions & 39 deletions src/components/Project/ProjectSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,45 +53,65 @@ const ProjectSetting = () => {
}, [])
return (
<Card
sx={{
// width: window.innerWidth * 0.8,
width: "100%",
minHeight: 500,
padding: 5
}}
>

<Box >
<Grid
item
xs={12}
sm={12}
md={12}
lg={12}
xl={12}
sx={{mb:3,}}
>
<Typography variant="h3" gutterBottom component="div"sx={{fontWeight: '1.6875rem'}}>
Project Settings
</Typography>
</Grid>
<Box sx={{mb:2,}} >
<Tabs value={tabValue} onChange={handleTabChange} aria-label="user-tabs">
<Tab label="Basic " sx={{ fontSize: 17, fontWeight: '700', marginRight: '28px !important' }} />
<Tab label=" Advanced " sx={{ fontSize: 17, fontWeight: '700' }} />
<Tab label=" Read-only " sx={{ fontSize: 17, fontWeight: '700' }} />
<Tab label=" Logs " sx={{ fontSize: 17, fontWeight: '700' }} />
</Tabs>
</Box>
<Divider/>
<Box sx={{ p: 1 }}>
<TabPanel value={tabValue} index={0}>
<BasicSettings ProjectDetails={ProjectDetails}/>
</TabPanel>
<TabPanel value={tabValue} index={1}>
<AdvancedOperation />
</TabPanel>
<TabPanel value={tabValue} index={2}>
sx={{
width: "100%",
minHeight: 500,
padding: 5,
'@media (max-width: 600px)': {
padding: 2,
},
}}
>
<Box>
<Grid
item
xs={12}
sx={{
mb: 3,
textAlign: {
xs: "center",
sm: "left",
},
}}
>
<Typography
variant="h3"
gutterBottom
component="div"
sx={{
fontWeight: 500,
fontSize: {
xs: "1.5rem",
sm: "1.6875rem",
},
}}
>
Project Settings
</Typography>
</Grid>
<Box sx={{ mb: 2 }}>
<Tabs
value={tabValue}
onChange={handleTabChange}
aria-label="user-tabs"
variant="scrollable"
scrollButtons="auto"
>
<Tab label="Basic" sx={{ fontSize: 15, fontWeight: 700, marginRight: 1 }} />
<Tab label="Advanced" sx={{ fontSize: 15, fontWeight: 700, marginRight: 1 }} />
<Tab label="Read-only" sx={{ fontSize: 15, fontWeight: 700, marginRight: 1 }} />
<Tab label="Logs" sx={{ fontSize: 15, fontWeight: 700 }} />
</Tabs>
</Box>
<Divider />
<Box sx={{ p: 1 }}>
<TabPanel value={tabValue} index={0}>
<BasicSettings ProjectDetails={ProjectDetails} />
</TabPanel>
<TabPanel value={tabValue} index={1}>
<AdvancedOperation />
</TabPanel>
<TabPanel value={tabValue} index={2}>
<ReadonlyConfigurations />
</TabPanel>
<TabPanel value={tabValue} index={3}>
Expand Down
Loading