Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
jakdan99 committed Sep 30, 2024
1 parent 13b9303 commit 2f21b0d
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 51 deletions.
27 changes: 0 additions & 27 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/pages/Deployment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import StudyPageLayout from "@Components/Layout/StudyPageLayout";
import StudyHeader from "@Components/StudyHeader";
import BasicInfo from "./BasicInfo";
import Participants from "./Participants";
import Devices from "./Devices";

const Deployment = () => {
const sectionName = ["Deployments", "Deployment"];
Expand All @@ -13,7 +12,6 @@ const Deployment = () => {
<StudyHeader path={sectionName} description={description} />
<BasicInfo />
<Participants />
<Devices />
{/* <InformedConsent /> */}
</StudyPageLayout>
);
Expand Down
48 changes: 33 additions & 15 deletions src/pages/StudyOverview/Overview/DeploymentsInProgress/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from "@mui/material";
import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
import { useEffect, useState } from "react";
import { useParams } from "react-router-dom";
import { useNavigate, useParams } from "react-router-dom";
import { Stack } from "@mui/system";
import LoadingSkeleton from "../LoadingSkeleton";
import {
Expand All @@ -29,6 +29,7 @@ import TooltipContent from "./TooltipContent";

const DeploymentsInProgress = () => {
const { id: studyId } = useParams();
const navigate = useNavigate();
const {
data: deploymentsAccountAndStatus,
isLoading: isDeploymentsAccountAndStatusLoading,
Expand Down Expand Up @@ -116,25 +117,42 @@ const DeploymentsInProgress = () => {
{deploymentProgress.map((g) => (
<StyledTableRow key={g.deploymentId}>
<StyledTableCell align="center">
<SecondaryCellText variant="h5">
<SecondaryCellText
variant="h5"
onClick={() =>
navigate(
`/studies/${studyId}/participants/deployments/${g.deploymentId}`,
)
}
sx={{
"&:hover": {
backgroundColor: "#EDEDED",
transition: "background-color 0.2s ease-in-out",
cursor: "pointer",
borderRadius: "16px",
},
}}
>
{`... ${g.deploymentId.slice(-4)}`}
</SecondaryCellText>
</StyledTableCell>
<StyledTableCell>
<SecondaryCellText variant="h5" noWrap>
{g.devices.map((d) => (
<Stack
direction="row"
spacing={0.5}
alignItems="center"
key={d.device}
>
<StyledStatusDot status={d.__type.split(".").pop()} />
<Typography variant="h6">
{d.device.roleName}
</Typography>
</Stack>
))}
<Stack direction="row" spacing="16px">
{g.devices.map((d) => (
<Stack
direction="row"
spacing={0.5}
alignItems="center"
key={d.device}
>
<StyledStatusDot status={d.__type.split(".").pop()} />
<Typography variant="h6">
{d.device.roleName}
</Typography>
</Stack>
))}
</Stack>
</SecondaryCellText>
</StyledTableCell>
</StyledTableRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ export const HeaderText = styled(Typography)(({ theme }) => ({

export const StyledTableRow = styled(TableRow)({
paddingLeft: 0,
"&:hover": {
backgroundColor: "#F5F5F5",
transition: "background-color 0.2s ease-in-out",
cursor: "pointer",
},
});

export const StyledTableCell = styled(TableCell)({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const InactiveDeployments = () => {
<StyledTableRow
onClick={() =>
navigate(
`/studies/${studyId}/participants/deployments/${participant.deploymentId}/participants/${participant.participantId}`,
`/studies/${studyId}/participants/deployments/${participant.deploymentId}`,
)
}
key={participant.deploymentId as unknown as string}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ export const HeaderText = styled(Typography)(({ theme }) => ({
export const StyledTableRow = styled(TableRow)({
paddingLeft: 0,
"&:hover": {
backgroundColor: "#F5F5F5",
backgroundColor: "#EDEDED",
transition: "background-color 0.2s ease-in-out",
cursor: "pointer",
borderRadius: "16px",
},
});

Expand Down

0 comments on commit 2f21b0d

Please sign in to comment.