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

CRDCDH-579 Removed Error Count and Widgets for MVP2-M2 #201

Merged
merged 4 commits into from
Nov 8, 2023
Merged
Changes from 2 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
123 changes: 2 additions & 121 deletions src/content/dataSubmissions/DataSubmission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,11 @@ import {
} from "../../graphql";
import DataSubmissionSummary from "../../components/DataSubmissions/DataSubmissionSummary";
import GenericAlert, { AlertState } from "../../components/GenericAlert";
import PieChart from "../../components/DataSubmissions/PieChart";
import DataSubmissionBatchTable, { Column, FetchListing, TableMethods } from "../../components/DataSubmissions/DataSubmissionBatchTable";
import { FormatDate } from "../../utils";
import DataSubmissionActions from "./DataSubmissionActions";
import QualityControl from "./QualityControl";

const dummyChartData = [
{ label: 'Group A', value: 12, color: "#DFC798" },
{ label: 'Group B', value: 28, color: "#137E87" },
{ label: 'Group C', value: 30, color: "#99A4E4" },
{ label: 'Group D', value: 30, color: "#CB2809" },
];

const StyledBanner = styled("div")(({ bannerSrc }: { bannerSrc: string }) => ({
background: `url(${bannerSrc})`,
backgroundBlendMode: "luminosity, normal",
Expand Down Expand Up @@ -165,16 +157,6 @@ const StyledRejectedStatus = styled("div")(() => ({
fontWeight: 600
}));

const StyledErrorCount = styled("div")(() => ({
color: "#0D78C5",
fontFamily: "Inter",
fontSize: "16px",
fontStyle: "normal",
fontWeight: 600,
lineHeight: "25px",
textDecorationLine: "underline",
}));

const columns: Column<Batch>[] = [
{
label: "Upload Type",
Expand Down Expand Up @@ -203,15 +185,7 @@ const columns: Column<Batch>[] = [
default: true,
minWidth: "240px"
},
{
label: "Error Count",
value: (data) => (
<StyledErrorCount>
{data.errors?.length > 0 ? `${data.errors.length} ${data.errors.length === 1 ? "Error" : "Errors"}` : ""}
</StyledErrorCount>
),
field: "errors",
},
/* TODO: Error Count removed for MVP2-M2. Will be re-added in the future */
];

const URLTabs = {
Expand Down Expand Up @@ -371,100 +345,7 @@ const DataSubmission = () => {
)}
<DataSubmissionSummary dataSubmission={dataSubmission} />
<StyledChartArea>
<Stack direction="row" justifyContent="center" sx={{ width: "960px", textAlign: "center" }}>
<PieChart
label="Study"
series={[
{
innerRadius: 40,
outerRadius: 55,
data: [{ label: "inner", value: 1, color: "#9FD1D6" }],
},
{
innerRadius: 55,
outerRadius: 75,
data: dummyChartData,
highlighted: { additionalRadius: 5 },
highlightScope: { faded: 'none', highlighted: 'item' },
},
]}
margin={{ right: 5 }}
width={150}
height={150}
legend={{ hidden: true }}
tooltip={{ trigger: 'none' }}
sx={{ rotate: "270deg", overflow: "visible" }}
/>
<PieChart
label="Study"
series={[
{
innerRadius: 40,
outerRadius: 55,
data: [{ label: "inner", value: 1, color: "#9FD1D6" }],
},
{
innerRadius: 55,
outerRadius: 75,
data: dummyChartData,
highlighted: { additionalRadius: 5 },
highlightScope: { faded: 'none', highlighted: 'item' },
},
]}
margin={{ right: 5 }}
width={150}
height={150}
legend={{ hidden: true }}
tooltip={{ trigger: 'none' }}
sx={{ rotate: "270deg", overflow: "visible" }}
/>
<PieChart
label="Study"
series={[
{
innerRadius: 40,
outerRadius: 55,
data: [{ label: "inner", value: 1, color: "#9FD1D6" }],
},
{
innerRadius: 55,
outerRadius: 75,
data: dummyChartData,
highlighted: { additionalRadius: 5 },
highlightScope: { faded: 'none', highlighted: 'item' },
},
]}
margin={{ right: 5 }}
width={150}
height={150}
legend={{ hidden: true }}
tooltip={{ trigger: 'none' }}
sx={{ rotate: "270deg", overflow: "visible" }}
/>
<PieChart
label="Study"
series={[
{
innerRadius: 40,
outerRadius: 55,
data: [{ label: "inner", value: 1, color: "#9FD1D6" }],
},
{
innerRadius: 55,
outerRadius: 75,
data: dummyChartData,
highlighted: { additionalRadius: 5 },
highlightScope: { faded: 'none', highlighted: 'item' },
},
]}
margin={{ right: 5 }}
width={150}
height={150}
legend={{ hidden: true }}
tooltip={{ trigger: 'none' }}
sx={{ rotate: "270deg", overflow: "visible" }}
/>
</Stack>
{/* TODO: Widgets removed for MVP2-M2. Will be re-added in the future */}
</StyledChartArea>

<StyledTabs value={isValidTab ? tab : URLTabs.DATA_UPLOAD}>
Expand Down