Skip to content

Conversation

@RohitGarudadri
Copy link
Contributor

@RohitGarudadri RohitGarudadri commented Dec 1, 2019

Description

Updated the application page by refactoring the hacker model for the front and backend by grouping together similar properties. Also changed certain fields (i.e. major -> fieldOfStudy) and added new question to essay section.

Fixes # (124)

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • NPM run tests all passed and manually tested

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@pierreTklein
Copy link
Member

Congrats on your first PR! Seems like a your PR involves a lot of formatting changes. Please make sure that this isn't the case-- it's basically impossible to tell what logic changes are being made here otherwise! Thanks :).

fieldLocation,
fieldname,
"invalid string"
"Invalid String"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Maybe change others as well to capitalize, or leave them all uncapitalized?

VALIDATOR.stringValidator("body", "degree", false),
VALIDATOR.stringValidator("body", "gender", false),
VALIDATOR.booleanValidator("body", "needsBus", false),
VALIDATOR.stringValidator("body", "application.general.school", false),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does application need to be validated as an object before this?

!app.portfolioURL.personal ||
typeof app.portfolioURL.personal === "string";
!app.general.URL.personal ||
typeof app.general.URL.personal === "string";
Copy link

@printharsh printharsh Dec 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should stringValidator be used for these fields now instead, like application.general.url.personal in updateHackerValidator?

return done(error);
}
let app = TeamHacker0.application;
app.other.gender = "Other";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Maybe send application: {other: {gender: "Other"}}} ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. We shouldn't mutate the test data.

Copy link

@printharsh printharsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I think just one test is failing for number of female hackers in search

Copy link
Member

@loreina loreina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing: needsBus should be renamed travel under the accommodation section and take in an integer from 0-100

dietaryRestrictions was moved to account creation/profile

package.json Outdated
"memory-cache": "^0.2.0",
"mongoose": "^5.7.5",
"multer": "^1.4.2",
"nvm": "0.0.4",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm should be installed on your system, not in the repo

package.json Outdated
"handlebars": "^4.4.3",
"handlebars": "^4.5.3",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.15",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need lodash?

package.json Outdated
"handlebars": "^4.5.3",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.15",
"lodash.clonedeep": "^4.5.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

const Hacker = require("../models/hacker.model");
const fs = require("fs");
const path = require("path");
// const cloneDeep = require("lodash/clonedeep");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this commented out for future use?

Copy link
Member

@loreina loreina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@RohitGarudadri RohitGarudadri merged commit 0cd9f2a into develop Dec 11, 2019
@RohitGarudadri RohitGarudadri deleted the feature/124-update-application-page branch December 11, 2019 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants