-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from jadmsaadaot/SUBMIT-task#64
Integrate project resource with front end projects page
- Loading branch information
Showing
18 changed files
with
247 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
import { Box, Button, Divider, Paper, styled, Typography } from "@mui/material"; | ||
import { BCDesignTokens } from "epic.theme"; | ||
import AddIcon from "@mui/icons-material/Add"; | ||
import { ProjectStatus } from "../registration/addProjects/ProjectStatus"; | ||
import { PROJECT_STATUS } from "../registration/addProjects/ProjectCard/constants"; | ||
import SubmissionTable from "./SubmissionTable"; | ||
import { defaultPlans } from "./constants"; | ||
import { AccountProject } from "@/models/Project"; | ||
|
||
const HEADER_HEIGHT = 54; | ||
|
||
const CardInnerBox = styled(Box)({ | ||
display: "flex", | ||
alignItems: "flex-start", | ||
justifyContent: "center", | ||
flexDirection: "column", | ||
height: "100%", | ||
padding: "0 12px", | ||
}); | ||
|
||
type ProjectParam = { | ||
accountProject: AccountProject; | ||
}; | ||
|
||
export const Project = ({ accountProject }: ProjectParam) => { | ||
const plans = defaultPlans; | ||
return ( | ||
<Paper | ||
sx={{ | ||
width: "90%", | ||
height: "100%", | ||
borderRadius: "6px", | ||
}} | ||
elevation={2} | ||
> | ||
<Box | ||
bgcolor={BCDesignTokens.themeBlue10} | ||
sx={{ | ||
display: "flex", | ||
alignItems: "center", | ||
justifyContent: "space-between", | ||
borderRadius: "3px 3px 0 0", | ||
}} | ||
height={HEADER_HEIGHT} | ||
> | ||
<Typography | ||
variant="h3" | ||
fontWeight={600} | ||
px={2} | ||
color={BCDesignTokens.typographyColorPrimary} | ||
> | ||
{accountProject.project.name} | ||
</Typography> | ||
<Typography | ||
variant="h4" | ||
color={BCDesignTokens.themeGray70} | ||
sx={{ | ||
mr: 2, | ||
fontWeight: 400, | ||
}} | ||
> | ||
EAC #1234567 | ||
</Typography> | ||
</Box> | ||
|
||
<Box | ||
sx={{ | ||
padding: "36px 12px 12px 12px", | ||
}} | ||
> | ||
<Box | ||
sx={{ | ||
borderRadius: "3px", | ||
border: `1px solid #F2F2F2`, | ||
boxShadow: "0px 1px 2px rgba(0, 0, 0, 0.1)", | ||
}} | ||
> | ||
<Box | ||
display={"flex"} | ||
justifyContent={"space-between"} | ||
sx={{ py: BCDesignTokens.layoutPaddingXlarge }} | ||
> | ||
<CardInnerBox> | ||
<Typography variant="h4" fontWeight={400}> | ||
Management Plans | ||
</Typography> | ||
<ProjectStatus bold status={PROJECT_STATUS.POST_DECISION} /> | ||
</CardInnerBox> | ||
<CardInnerBox> | ||
<Button> | ||
<AddIcon sx={{ p: 0, mr: 0.5 }} /> | ||
New Submission | ||
</Button> | ||
</CardInnerBox> | ||
</Box> | ||
<Box height={"100%"} px={BCDesignTokens.layoutPaddingXsmall}> | ||
<Divider sx={{ mb: 0.5 }} /> | ||
<Typography | ||
variant="body1" | ||
sx={{ | ||
fontWeight: "bold", | ||
backgroundColor: BCDesignTokens.themeGold10, | ||
}} | ||
> | ||
Active Submissions | ||
</Typography> | ||
<CardInnerBox sx={{ height: "100%", py: 2 }}> | ||
<SubmissionTable plans={plans} /> | ||
</CardInnerBox> | ||
<Divider sx={{ mb: 0.5 }} /> | ||
<Typography | ||
variant="body1" | ||
sx={{ | ||
fontWeight: "bold", | ||
backgroundColor: BCDesignTokens.themeGold10, | ||
}} | ||
> | ||
Past Submissions | ||
</Typography> | ||
<CardInnerBox sx={{ height: "100%", my: 2 }}> | ||
<SubmissionTable headless plans={plans} /> | ||
</CardInnerBox> | ||
</Box> | ||
</Box> | ||
</Box> | ||
</Paper> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { AccountProject } from "@/models/Project"; | ||
import { Skeleton, Stack } from "@mui/material"; | ||
import { Project } from "./Project"; | ||
|
||
type ProjectsParams = { | ||
accountProjects: AccountProject[]; | ||
}; | ||
export const Projects = ({ accountProjects }: ProjectsParams) => { | ||
return ( | ||
<Stack spacing={2} direction={"column"}> | ||
{accountProjects.map((accountProject) => ( | ||
<Project key={accountProject.id} accountProject={accountProject} /> | ||
))} | ||
</Stack> | ||
); | ||
}; | ||
|
||
export const ProjectsSkeleton = () => { | ||
return ( | ||
<Stack spacing={2} direction={"column"}> | ||
<Skeleton variant="rectangular" height={690} width={1334} /> | ||
<Skeleton variant="rectangular" height={690} width={1334} /> | ||
<Skeleton variant="rectangular" height={690} width={1334} /> | ||
</Stack> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.