Skip to content

Commit

Permalink
Merge pull request #339 from hackforla/318-add-note-to-applicant-defi…
Browse files Browse the repository at this point in the history
…ned-strategy

Add note to applicant defined strategy
  • Loading branch information
entrotech authored Apr 12, 2020
2 parents 3f58a08 + 066ac60 commit 5502d42
Show file tree
Hide file tree
Showing 12 changed files with 245 additions and 65 deletions.
41 changes: 20 additions & 21 deletions .grenrc.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
{
"username": "hackforla",
"repo": "tdm-calculator",
"tags": "all",
"dataSource": "issues",
"ignoreLabels": [
"closed","documentation","duplicate","question"
],
"ignoreIssuesWith": [
"closed","documentation","duplicate","question"
],
"prefix": "v",
"override": true,
"onlyMilestones": false,
"groupBy": {
"Enhancements:": ["enhancement"],
"Bug Fixes:": ["bug"]
},
"template": {
"issue": "- {{name}} [{{text}}]({{url}})"
},
"changelogFilename": "CHANGELOG.md"
"username": "hackforla",
"repo": "tdm-calculator",
"tags": "all",
"dataSource": "issues",
"ignoreLabels": ["closed", "documentation", "duplicate", "question"],
"ignoreIssuesWith": ["closed", "documentation", "duplicate", "question"],
"ignoreTagsWith": [],
"prefix": "v",
"override": true,
"onlyMilestones": false,
"groupBy": {
"System Updates:": ["refactor", "system update"],
"UI/UX Enhancements:": ["enhancement"],
"Error Corrections:": ["bug"]
},
"template": {
"issue": "- {{name}} [{{text}}]({{url}})"
},
"generate": true,
"changelogFilename": "CHANGELOG.md"
}
115 changes: 115 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Changelog

## v0.2.4 (31/03/2020)

#### System Updates:

- Refactoring Web API code [#288](https://github.com/hackforla/tdm-calculator/issues/288)
- Refactor Wizard to use react-router to render steps [#232](https://github.com/hackforla/tdm-calculator/issues/232)
- Create staging database [#228](https://github.com/hackforla/tdm-calculator/issues/228)

#### UI/UX Enhancements:

- Change Labels associated with the Education, Marketing and Outreach Strategies [#320](https://github.com/hackforla/tdm-calculator/issues/320)
- Change Wizard Page 3 Heading and remove parking space info [#319](https://github.com/hackforla/tdm-calculator/issues/319)
- Transportation Demand Strategies: Display only strategies applicable to selected land uses [#285](https://github.com/hackforla/tdm-calculator/issues/285)
- New data fields: City Planning Case Number and LADOT Case Number [#280](https://github.com/hackforla/tdm-calculator/issues/280)
- Create an admin screen for security admin to grant-revoke admin and/or security admin roles [#276](https://github.com/hackforla/tdm-calculator/issues/276)
- Add basic responsiveness to the sidebar & horizontal resizing [#258](https://github.com/hackforla/tdm-calculator/issues/258)
- Update About button and login/logout on Navbar [#257](https://github.com/hackforla/tdm-calculator/issues/257)
- Implement Required Field Validation [#224](https://github.com/hackforla/tdm-calculator/issues/224)
- Combine "Education, Marketing, and Outreach" and "Voluntary Behavior Change Program" strategies [#221](https://github.com/hackforla/tdm-calculator/issues/221)
- Add Sorting and Filtering to the the Projects Page [#179](https://github.com/hackforla/tdm-calculator/issues/179)
- Revise Detailed Project Level Calculation per Rosemary's Input. [#160](https://github.com/hackforla/tdm-calculator/issues/160)
- Add Saving Function [#111](https://github.com/hackforla/tdm-calculator/issues/111)
- Auto-calculate project TDM Level based on entered project land use. [#93](https://github.com/hackforla/tdm-calculator/issues/93)

#### Error Corrections:

- Adjust target point calculation to fix Honda test case bug [#282](https://github.com/hackforla/tdm-calculator/issues/282)
- Fix Select Residential Package button [#271](https://github.com/hackforla/tdm-calculator/issues/271)
- Fix all current code style and lint errors [#262](https://github.com/hackforla/tdm-calculator/issues/262)
- Fix validation issues that are keeping projects from saving. [#218](https://github.com/hackforla/tdm-calculator/issues/218)
- User Registration: Need prompt to check email [#174](https://github.com/hackforla/tdm-calculator/issues/174)

---

## v0.2.2 (16/02/2020)

#### UI/UX Enhancements:

- UI/UIX Wireframe: Target Point Calculation Page [#142](https://github.com/hackforla/tdm-calculator/issues/142)

---

## v0.2.1 (30/01/2020)

_No changelog for this release._

---

## v0.2.0 (30/01/2020)

#### UI/UX Enhancements:

- Allow for Calculation Inputs to be rendered as a TextArea [#191](https://github.com/hackforla/tdm-calculator/issues/191)
- Update Project Name/Information page: Add input fields for Version #, Project description, and required fields [#183](https://github.com/hackforla/tdm-calculator/issues/183)
- Wizard Project Parameters Page: Add Uncheck All feature [#181](https://github.com/hackforla/tdm-calculator/issues/181)
- Wizard Strategies Page: Add Uncheck All feature [#180](https://github.com/hackforla/tdm-calculator/issues/180)
- Cleanup CSS and set project standards [#157](https://github.com/hackforla/tdm-calculator/issues/157)
- Implement Client-Side Validation for Rules with numeric inputs or measures [#116](https://github.com/hackforla/tdm-calculator/issues/116)

#### Error Corrections:

- New Project link doesn't work within a project [#201](https://github.com/hackforla/tdm-calculator/issues/201)

---

## v0.1.3 (14/01/2020)

_No changelog for this release._

---

## v0.1.0 (14/01/2020)

_No changelog for this release._

---

## v0.1.2 (14/01/2020)

_No changelog for this release._

---

## v0.1.1 (14/01/2020)

#### UI/UX Enhancements:

- Calculation Wizard: Re-arrange Summary Page per Rosemary's Direction [#143](https://github.com/hackforla/tdm-calculator/issues/143)
- Create input for Condos - Direct entry of # spaces [#139](https://github.com/hackforla/tdm-calculator/issues/139)
- Add another colum to strategy inputs containing a range of possible points. [#138](https://github.com/hackforla/tdm-calculator/issues/138)
- Add User Notification capabiltiy to TDM like "Toasts" [#123](https://github.com/hackforla/tdm-calculator/issues/123)
- Calculate Intersection Improvement Strategy Per Rules [#115](https://github.com/hackforla/tdm-calculator/issues/115)
- Calculate Shared Parking Strategy per rules [#113](https://github.com/hackforla/tdm-calculator/issues/113)
- Rule for Guest Rooms should be a single input [#112](https://github.com/hackforla/tdm-calculator/issues/112)
- User interface improvements: Calculations page [#108](https://github.com/hackforla/tdm-calculator/issues/108)
- Start TMO: Change description to "Start a new TMO" and update points awarded to 3 points [#107](https://github.com/hackforla/tdm-calculator/issues/107)
- Add School Safety Campaign to TDM Strategies under Information section (worth 4 points) [#106](https://github.com/hackforla/tdm-calculator/issues/106)
- Remove Distribution of Metro TAP card from TDM Strategies [#105](https://github.com/hackforla/tdm-calculator/issues/105)
- Wayfinding: update points awarded to 1 point [#104](https://github.com/hackforla/tdm-calculator/issues/104)
- Add Child Care to Strategies menu [#103](https://github.com/hackforla/tdm-calculator/issues/103)
- Implement Bicycle Facilities Bonus scoring [#102](https://github.com/hackforla/tdm-calculator/issues/102)
- Changing and Shower Facilities: update points awarded to 2 points [#101](https://github.com/hackforla/tdm-calculator/issues/101)
- Bicycle Parking: update points awarded to 2 points [#100](https://github.com/hackforla/tdm-calculator/issues/100)
- Bike Share Membership: update points awarded to 5 points [#99](https://github.com/hackforla/tdm-calculator/issues/99)
- Bike Share Station: update points awarded to 5 points [#98](https://github.com/hackforla/tdm-calculator/issues/98)
- Locate Near Bike Share: update points awarded to 2 points [#97](https://github.com/hackforla/tdm-calculator/issues/97)
- Display points for each strategy next to the strategy [#95](https://github.com/hackforla/tdm-calculator/issues/95)

#### Error Corrections:

- For Restaurant input, combine Restaurant and Small Restaurant into single input with tiered calculation. [#144](https://github.com/hackforla/tdm-calculator/issues/144)
- Calculation: When inputs are hidden, set their values to 0 [#133](https://github.com/hackforla/tdm-calculator/issues/133)
- Correct Substandard Infrastructure: user enters points [#96](https://github.com/hackforla/tdm-calculator/issues/96)
3 changes: 2 additions & 1 deletion Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ git commit -m "Bumped version number to 1.0.1"
git checkout master
git pull origin master
git merge --no-ff release-1.0.0
git tag -a v1.0.1 -m "Release version 1.0.1"
git tag -a 1.0.1 -m "Release version 1.0.1"
git push origin HEAD
git push origin 1.0.1
```

At present, Heroku is configured to detect the commit to _master_ and automatically deploy the application to production. You should navigate to <a href="https://tdm-calc.herokuapp.com"> https://tdm-calc.herokuapp.com</a> after giving Heroku time to deploy and verify that the application runs, and any visible release # has been incremented.
Expand Down
2 changes: 1 addition & 1 deletion client/package-lock.json

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

45 changes: 39 additions & 6 deletions client/src/components/ProjectWizard/RuleStrategy/RuleStrategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ const useStyles = createUseStyles({
backgroundColor: "#f0e300"
}
},
commentContainer: {
minWidth: "60vw",
margin: "0.2em",
paddingRight: "1em"
},
strategyName: {
flexGrow: "1",
flexShrink: "1"
Expand Down Expand Up @@ -53,6 +58,9 @@ const useStyles = createUseStyles({
flexBasis: "10%",
flexGrow: "0",
flexShrink: "1"
},
commentTextarea: {
marginTop: "4px"
}
});

Expand All @@ -68,12 +76,19 @@ const RuleStrategy = ({
calcValue,
calcUnits,
calcMinValue,
calcMaxValue
calcMaxValue,
displayComment,
comment
},
onInputChange
onInputChange,
onCommentChange
}) => {
const classes = useStyles();

if (comment) {
console.log(comment);
}

const possibleAndEarnedPointsContainers = () => {
const calculationUnits = calcUnits ? calcUnits : "";

Expand All @@ -83,10 +98,10 @@ const RuleStrategy = ({
{calcMinValue === calcMaxValue
? `${Math.round(calcMinValue).toString()} ${calculationUnits}`
: calcMinValue < calcMaxValue
? `${Math.round(calcMinValue).toString()}-${Math.round(
? `${Math.round(calcMinValue).toString()}-${Math.round(
calcMaxValue
).toString()} ${calculationUnits}`
: null}
: null}
</div>
<div className={classes.points}>
{`${
Expand Down Expand Up @@ -185,6 +200,21 @@ const RuleStrategy = ({
{possibleAndEarnedPointsContainers()}
</div>
)}
{displayComment ? (
<div className={classes.commentContainer}>
<div>{`If applicable, please input the details about ${name}.`}</div>
<div>
<textarea
type="textarea"
value={comment || ""}
onChange={onCommentChange}
name={code}
id={comment}
className={classes.commentTextarea}
/>
</div>
</div>
) : null}
</React.Fragment>
);
};
Expand All @@ -211,9 +241,12 @@ RuleStrategy.propTypes = {
calcValue: PropTypes.number,
calcUnits: PropTypes.string,
calcMinValue: PropTypes.number,
calcMaxValue: PropTypes.number
calcMaxValue: PropTypes.number,
displayComment: PropTypes.bool,
comment: PropTypes.string
}),
onInputChange: PropTypes.func
onInputChange: PropTypes.func,
onCommentChange: PropTypes.func
};

export default RuleStrategy;
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,25 @@ const RuleStrategyList = props => {
return (
<div className={classes.root}>
{rules && rules.length > 0
? rules.map(rule => (
<RuleStrategy
key={rule.id}
rule={rule}
onInputChange={props.onInputChange}
/>
))
? rules.map(rule => {
return (
<RuleStrategy
key={rule.id}
rule={rule}
onInputChange={props.onInputChange}
onCommentChange={props.onCommentChange}
/>
);
})
: null}
</div>
);
};

RuleStrategyList.propTypes = {
rules: PropTypes.array.isRequired,
onInputChange: PropTypes.func.isRequired
onInputChange: PropTypes.func.isRequired,
onCommentChange: PropTypes.func.isRequired
};

export default RuleStrategyList;
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const RuleStrategyPanels = props => {
key={rules[0].calculationPanelId}
rules={rules}
onInputChange={props.onInputChange}
onCommentChange={props.onCommentChange}
/>
</div>
))}
Expand All @@ -96,7 +97,8 @@ RuleStrategyPanels.propTypes = {
})
).isRequired,
suppressHeader: PropTypes.bool,
onInputChange: PropTypes.func.isRequired
onInputChange: PropTypes.func.isRequired,
onCommentChange: PropTypes.func.isRequired
};

export default RuleStrategyPanels;
3 changes: 3 additions & 0 deletions client/src/components/ProjectWizard/TdmCalculationWizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const TdmCalculationWizard = props => {
const {
rules,
onInputChange,
onCommentChange,
onUncheckAll,
filters,
onPkgSelect,
Expand Down Expand Up @@ -170,6 +171,7 @@ const TdmCalculationWizard = props => {
rules={strategyRules}
landUseRules={landUseRules}
onInputChange={onInputChange}
onCommentChange={onCommentChange}
classes={classes}
onPkgSelect={onPkgSelect}
uncheckAll={() => onUncheckAll(filters.strategyRules)}
Expand Down Expand Up @@ -316,6 +318,7 @@ TdmCalculationWizard.propTypes = {
push: PropTypes.func.isRequired
}),
onInputChange: PropTypes.func.isRequired,
onCommentChange: PropTypes.func,
onPkgSelect: PropTypes.func.isRequired,
onUncheckAll: PropTypes.func.isRequired,
filters: PropTypes.object.isRequired,
Expand Down
Loading

0 comments on commit 5502d42

Please sign in to comment.