From 970a8272252c0062cc20a6a04f090de5e996f249 Mon Sep 17 00:00:00 2001 From: Ken Rickard Date: Thu, 15 Jul 2021 16:32:06 -0400 Subject: [PATCH 1/4] Adds an evaluator field. --- components/SnowflakeApp.js | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/components/SnowflakeApp.js b/components/SnowflakeApp.js index 7b9a8b17..e1161f9a 100644 --- a/components/SnowflakeApp.js +++ b/components/SnowflakeApp.js @@ -54,6 +54,7 @@ const coerceMilestone = (value: number): Milestone => { const emptyState = (): SnowflakeAppState => { return { name: '', + evaluator: '', cohort: '', title: '', level: 0, @@ -80,6 +81,7 @@ const emptyState = (): SnowflakeAppState => { const defaultState = (): SnowflakeAppState => { return { name: 'Palantiri Name', + evaluator: 'Evaluator Name', cohort: 'Project Management', title: 'Project Manager, III', level: 1, @@ -176,7 +178,17 @@ class SnowflakeApp extends React.Component { margin-right: 50px; padding: .25em .125em; } - .name-input:hover, .name-input:focus, .name-input:active { + .evaluator-input { + border: 0; + background: transparent; + display: inline-block; + margin-right: 10px; + color: #fff; + font-size: 16px; + line-height: 20px; + padding: 1em .125em; + } + .name-input:hover, .name-input:focus, .name-input:active, .evaluator-input:hover, .evaluator-input:focus, .evaluator-input:active { border-color: #11a9a1; background-color: rgba(17, 169, 161, .125); outline: 0; @@ -201,6 +213,12 @@ class SnowflakeApp extends React.Component { background-color: rgba(17, 169, 161, .125); cursor: pointer; } + .input-wrapper { + display: inline-block; + height: 3em; + border-bottom: 2px solid #7e97a0; + margin-right: 10px; + } a { color: #109C95; text-decoration: none; @@ -249,6 +267,18 @@ class SnowflakeApp extends React.Component { onChange={e => this.setState({name: e.target.value})} placeholder="Name" /> +
+ + + this.setState({evaluator: e.target.value})} + placeholder="Evaluator" + /> + +
From f1705f29f980a072a8c350354fe7fb3e6446bc2d Mon Sep 17 00:00:00 2001 From: Ken Rickard Date: Thu, 15 Jul 2021 16:39:21 -0400 Subject: [PATCH 2/4] Adds the evaluator field to the URL. --- components/SnowflakeApp.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/components/SnowflakeApp.js b/components/SnowflakeApp.js index e1161f9a..5f5b3716 100644 --- a/components/SnowflakeApp.js +++ b/components/SnowflakeApp.js @@ -18,6 +18,7 @@ import LevelSelector from '../components/LevelSelector' type SnowflakeAppState = { milestoneByTrack: MilestoneMap, name: string, + evaluator: string, title: string, level: number, focusedTrackId: TrackId, @@ -34,7 +35,7 @@ const hashToState = (hash: String): ?SnowflakeAppState => { if (hashValues[13]) result.level = decodeURI(hashValues[13]) if (hashValues[14]) result.name = decodeURI(hashValues[14]) if (hashValues[15]) result.cohort = decodeURI(hashValues[15]) - //if (hashValues[16]) result.title = decodeURI(hashValues[16]) + if (hashValues[16]) result.evaluator = decodeURI(hashValues[16]) return result } @@ -74,14 +75,14 @@ const emptyState = (): SnowflakeAppState => { 'BIZDEV': 0, }, focusedTrackId: 'HEADER_ONE', - version: "2.0.4" + version: "2.0.5" } } const defaultState = (): SnowflakeAppState => { return { name: 'Palantiri Name', - evaluator: 'Evaluator Name', + evaluator: 'Evaluator Name/Team', cohort: 'Project Management', title: 'Project Manager, III', level: 1, @@ -106,7 +107,7 @@ const defaultState = (): SnowflakeAppState => { const stateToHash = (state: SnowflakeAppState) => { if (!state || !state.milestoneByTrack) return null - const values = trackIds.map(trackId => state.milestoneByTrack[trackId]).concat(encodeURI(state.level), encodeURI(state.name), encodeURI(state.cohort)) + const values = trackIds.map(trackId => state.milestoneByTrack[trackId]).concat(encodeURI(state.level), encodeURI(state.name), encodeURI(state.cohort), encodeURI(state.evaluator)) return values.join(',') } @@ -395,6 +396,10 @@ class SnowflakeApp extends React.Component { this.setState({ title }) } + setEvaluator(evaluator: string) { + this.setState({ evaluator }) + } + setLevel(level: number) { this.setState({ level }) } From cd691d919950ca5803857c951804972a194588e5 Mon Sep 17 00:00:00 2001 From: Ken Rickard Date: Thu, 15 Jul 2021 17:02:57 -0400 Subject: [PATCH 3/4] Set level 16 to 500 points. --- constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constants.js b/constants.js index e719ac0c..33a1b8bf 100644 --- a/constants.js +++ b/constants.js @@ -93,7 +93,7 @@ export const pointsToLevels = { '300': '13', '330': '14', '360': '15', - '10000' : '16', + '500': '16', } export const maxLevel = 360 From be75b2e773d3b70e4d2ce9163763e04b675b8dbb Mon Sep 17 00:00:00 2001 From: Ken Rickard Date: Thu, 15 Jul 2021 17:20:22 -0400 Subject: [PATCH 4/4] Fixes the table 15/16 column issue. --- components/PointSummaries.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/PointSummaries.js b/components/PointSummaries.js index 76adbdb5..3fd3cee9 100644 --- a/components/PointSummaries.js +++ b/components/PointSummaries.js @@ -315,9 +315,9 @@ class PointSummaries extends React.Component { Milestone {tier} )} - {/* Level numbers */} + {/* Level numbers up to 15 */} - {Object.entries(pointsToLevels).map((points, level) => + {Object.entries(pointsToLevels).slice(0, 15).map((points, level) => {level + 1} )}