-
Notifications
You must be signed in to change notification settings - Fork 3
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
adds substantial completion date tooltip #1454
Open
tillyw
wants to merge
11
commits into
19257_show_substantial_completion_date_plus_advanced_search
Choose a base branch
from
19259_substantial_completion_date_tooltip
base: 19257_show_substantial_completion_date_plus_advanced_search
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+91
−12
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
cc84c9e
adds tooltip for substantial completion date
tillyw 208c442
add substantial completion date component
chiaberry 5308934
update capitalization
tillyw 9ad33e1
add tooltip text
chiaberry 2bcc6ad
pass along the completion date
chiaberry b2f635e
format date type
chiaberry 012d956
make spacing same on funding table as summary
chiaberry f2e013b
simplify logic for rendering date
chiaberry d244067
refetch completion date after submitting updates
chiaberry a60747a
make tooltip text constant into its own variable
chiaberry 72dc635
Merge branch '19258-completion-date' into 19259_substantial_completio…
tillyw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export const substantialCompletionDateTooltipText = | ||
"The earliest confirmed start date of a project phase that has a simple phase name of Complete (Complete or Post-construction)"; |
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
17 changes: 10 additions & 7 deletions
17
moped-editor/src/views/projects/projectView/ProjectPhaseToolbar.js
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
48 changes: 48 additions & 0 deletions
48
moped-editor/src/views/projects/projectView/ProjectSubstantialCompletionDate.js
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,48 @@ | ||
import { Box, Typography, Tooltip } from "@mui/material"; | ||
import makeStyles from "@mui/styles/makeStyles"; | ||
import { formatDateType } from "src/utils/dateAndTime"; | ||
import { substantialCompletionDateTooltipText } from "src/constants/projects"; | ||
|
||
const useStyles = makeStyles((theme) => ({ | ||
fieldLabel: { | ||
width: "100%", | ||
color: theme.palette.text.secondary, | ||
fontSize: ".8rem", | ||
}, | ||
fieldBox: { | ||
maxWidth: "10rem", | ||
}, | ||
fieldLabelText: { | ||
width: "calc(100% - 2rem)", | ||
}, | ||
})); | ||
|
||
const ProjectSubstantialCompletionDate = ({ completionDate }) => { | ||
const classes = useStyles(); | ||
return ( | ||
<> | ||
<Typography className={classes.fieldLabel}> | ||
Substantial completion date | ||
</Typography> | ||
<Box | ||
display="flex" | ||
justifyContent="flex-start" | ||
className={classes.fieldBox} | ||
> | ||
<Tooltip | ||
placement="bottom-start" | ||
title={substantialCompletionDateTooltipText} | ||
> | ||
<Typography className={classes.fieldLabelText} component="span"> | ||
{ | ||
// If there is no input, render a "-" | ||
completionDate ? formatDateType(completionDate) : "-" | ||
} | ||
</Typography> | ||
</Tooltip> | ||
</Box> | ||
</> | ||
); | ||
}; | ||
|
||
export default ProjectSubstantialCompletionDate; |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌 @chiaberry @tillyw Could y'all coordinate for someone to make this description into a variable to hold this string so we can reference it in this PR and in #1456? We may end up adding this in the Data Dictionary too so it could help us update the definition if we ever need to in the future.
I looked in the codebase, and maybe we could add a new file in
src/constants
to hold tooltip text. What do y'all think?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add this to my branch, trying to decide what to name the file,
projects.js
sound okay?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did it here: a60747a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, @chiaberry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chiaberry sorry i merged your entire branch into this one when i should have just merged this one commit! i'll just make sure to merge this one last out of the substantial completion date PRs