Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

#170947552, #170947556 User can request a one-way trip #26

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

Baraka-Mugisha
Copy link
Collaborator

@Baraka-Mugisha Baraka-Mugisha commented Feb 19, 2020

What does this PR do?

  • Adds a User can request trip feature

Description of Task to be completed?

  • add requests table
  • add requests controller and route
  • add a sample requests test
  • document the feature

How should this be manually tested?

  • clone the repo
  • run npm install to install all dependencies
  • log in as a requester
  • run the server and go to api/v1/request/one-way-trip route in POSTMAN and request a trip

Any background context you want to provide?

  • N/A

What are the relevant pivotal tracker stories?

Screenshots (if appropriate)

Screen Shot 2020-02-20 at 18 34 32

Screen Shot 2020-02-20 at 18 34 43

@Baraka-Mugisha Baraka-Mugisha added the in progress it is not yet done label Feb 19, 2020
@Baraka-Mugisha Baraka-Mugisha force-pushed the ft-one-way-trip-170947552 branch 5 times, most recently from 702695e to 293ca02 Compare February 19, 2020 20:44
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 19, 2020 20:44 Inactive
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 09:18 Inactive
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 09:23 Inactive
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 09:27 Inactive
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 10:12 Inactive
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 10:32 Inactive
@Baraka-Mugisha Baraka-Mugisha added Review Required This PR is waiting to be reviewed and removed in progress it is not yet done labels Feb 20, 2020
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 10:55 Inactive
src/index.js Outdated Show resolved Hide resolved
src/services/localesServices/locales/en.json Show resolved Hide resolved
src/tests/request.test.js Outdated Show resolved Hide resolved
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 11:15 Inactive
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 13:25 Inactive
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 16:18 Inactive
@Mnickii
Copy link
Contributor

Mnickii commented Feb 20, 2020

@Baraka-Mugisha let's make the return date a required field. I'm seeing on the screenshot that a trip request can be created with a null return date

@Baraka-Mugisha
Copy link
Collaborator Author

@Baraka-Mugisha let's make the return date a required field. I'm seeing on the screenshot that a trip request can be created with a null return date

I guess that it should be required while making a round trip not one-way.

@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 17:26 Inactive
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 17:38 Inactive
@Mnickii
Copy link
Contributor

Mnickii commented Feb 20, 2020

Fix failing tests so we can merge this

@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 18:28 Inactive
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 18:58 Inactive
@Baraka-Mugisha Baraka-Mugisha added ready for review and removed in progress it is not yet done labels Feb 20, 2020
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 19:36 Inactive
izzett222
izzett222 previously approved these changes Feb 20, 2020
Mnickii
Mnickii previously approved these changes Feb 20, 2020
- add edit profile route
- add view profile route
- add edit profile route
- add upload profile picture route
- add edit profile funciton
- add view profile function
- add upload image function
- add the feature's tests and documentation
[Finishes #170947551]
@Ntare22 Ntare22 temporarily deployed to devrepublic-ft-one-way-yykzcvf February 20, 2020 19:45 Inactive
@Mnickii Mnickii merged commit f5ba9d7 into develop Feb 20, 2020
Mnickii pushed a commit that referenced this pull request Feb 20, 2020
* chore(setup unit testing): (#2)

install express
install chai, mocha, body-parser, @babel, nodemon, and nyc
setup babel for the project
start server in index.js file
made a test directory
write a sample test

[ Finishes #170947538 ]

* chore(HoundCI): added Hound Integration (#5)

added .hound.yml file
added a hound ReadMe badge
[Maintains #170947536]

* chore(EslintConfiguration): Added Eslint (#4)

installed eslint
configured eslintrc file
[Maintains #170947535]

* #170947543 setup heroku (#6)

* ch(setup heroku):

add node version that heroku will be running
add app.json file to create deploy button
add heroku button to README.md

[ Finishes #170947543 ]

* removed deploy button
added newline in app.json

* added heroku site to README.md

* adjusted start stript in package.json

* moved babel from devDependencies to dependencies

* adjusted my start script

* add Procfile
set 2 start scripts for development and production

* ch(database): set-up postgres, sequelize and dotenv (#1)

- install pg and pg-hstore dependencies
- install sequelize, sequelize-cli, and dotenv dependencies
- add  sequelizelrc file
- add config file  with environment variables
- add dummy data for keeping track of migrations
- add drop, create and seed scripts

[Maintains #170947533, #170947539, #170947534]

mend

 fix hound check
 add eslintignore file
 add migrations and seeder to eslintignore
 add more eslint configurations

* #170947537 Travis Integration (#7)

* chore(TravisIntegration): added travis integration
added travis yaml file
added travis badge on readme
[Maintains #170947537]

* mend

Co-authored-by: Mnickii <caroline.nkirote@andela.com>

* chore(coverage): Added coverage integration (#8)

installed coveralls
added a coveralls badge on readme
added a .coveralls.yml
[Maintains #170947540]

* bug(coverage): Fix Coveralls Integration (#11)

add a script in travis.yml for running coveralls

* #170947542 setup docker (#9)

* ch(setup docker):

add Dockerfile
add dockerignore file to ignore .dockerignore

[ Finishes #170947542 ]

* add docker-compose file
remove .dockerignore file

* add docker-compose file
remove .dockerignore file

* setup up docker ofr postgres

* correct hound error

Co-authored-by: Mnickii <caroline.nkirote@andela.com>

* #170947541 setup swagger documentation (#12)

* ch(swagger-documentation): add swagger documentation
- install dependencies
- creates swagger folder
- set up index.js file in swagger folder

[Maintains #170947541]

* ch(setup swagger):

setup swagger document in swagger directory
set up test routes

[ Finishes #170947541 ]

* fixed minor error

* fixed swagger to display

* fixed hound error

* fixed heroku issues

* fix heroku deploy

* removed comments

* fix heroku

* added message on the terminal to see what port is running

added to environment variable examples to .env.example file

Co-authored-by: Mnickii <caroline.nkirote@andela.com>

* Update README.md

* ft(signup): add signup functionality (#14)

- add signup route
- add auth controller
- add register user function
- add search in database function
- add provide token function
- add response handler functions
- add new babel config
- change start script for heroku
- add documentation
- add seed script for development

[Finishes #170947544]

* feat(i18n): Internationalization (#17)

install i18n
configure i18n
add i18n locales
[Finishes #171204720]

* #170947545 signup verification with sendgrid  (#18)

* ft(signup): add signup functionality

- add signup route
- add auth controller
- add register user function
- add search in database function
- add provide token function
- add response handler functions
- add new babel config
- change start script for heroku

[Finishes #170947544]

* ft(sign verification with SendGrid):

Create a devrepublic gmail account
Create a sendGrid account with the devrepublic gmail account
Create a Sendgrid API key
Create a email verification controller and verify Account method
Create file import SendGrid API key and send automatic email to new user

[ Finishes #170947545 ]

* change token to include id and boolean value for verification status of the user
fix bugs with updating the verication status of the user

[ Finishes #170947545 ]

* fix npm start

* feat(login): Adds login feature (#15)

add login tests
add login controller
write bcrypt handler
write a token encoder
create a login route
[Maintains #170947547]

* #171281019 create email verification tests  (#21)

* add a verification test

* ch(create email verification-tests):

adjusted token to accept email, id, and isVerified fields
adjusted verification controller to do away with checking the verification table
deleted the verification table
created a new file in validations with validateParams calls to validate the token in verification
created email verification tests

[ #Finishes #171281019 ]

* fix hound error

* added swagger documentation

* ft(logout): add log out functionality (#20)

- add a log-out route
- add a logout function
- add logout tests
- change authController to userController
- change authRoute to userRoutes

[Finishes #170947550]

* feat(userRoles): User Roles Settings (#24)

add roles field in the user database
added internationalized messages
seeded a default admin
add the update roles controller and routes
add the feature's tests and documentation
[Finishes #170947557]

* feature(reset): reset password feature (#23)

- add the forgot password endpoint
- add the reset password endpoint
- configured sendGrid to send email
- add the verify token function
- add the send email function

[finishes #170947549]

* #170947548 Login with Facebook and Google (#22)

* ft(Login with Facebook and Google):

Install passport, passport-facebook, and passport-google-oauth
Setup apps on google developer console and facebook facebook developer
Write passport configuration file with facebook and google
create a getProfile callback function.
Setup routes for google and facebook redirecting
Initialise passport in index.js

[ #170947548 in progress]

* minor changes to the facebook oauth

* fixed facebook

* fixed tests

* fixed some bugs in the controller
wrote tests for the controller

[ Finishes #170947548 ]

 Please enter the commit message for your changes. Lines starting

* ft(profile): add profile settings functionalities (#25)

- add edit profile route
- add view profile route
- add edit profile route
- add upload profile picture route
- add edit profile funciton
- add view profile function
- add upload image function
- add the feature's tests and documentation
[Finishes #170947551]

* ft(create accommodation facilities): (#28)

setup table with sequelize
create routes to the controller
create controller for adding facilities and rooms
write tests for the controllers

[ Finishes #170947569 ]

* ft(profile): add profile settings functionalities (#25) (#26)

- add edit profile route
- add view profile route
- add edit profile route
- add upload profile picture route
- add edit profile funciton
- add view profile function
- add upload image function
- add the feature's tests and documentation
[Finishes #170947551]

Co-authored-by: bbaime98 <52517921+bbaime98@users.noreply.github.com>

* feature(trip): request return trip (#29)

- add the request return trip controller and route
- added test for the feature
- add the protect routes middleware
- changed the reset route to follow conventions
- modified the reset feature swagger documentation

[Maintains #170947553]

Co-authored-by: Jim Ntare <jim.ntare@andela.com>
Co-authored-by: Baraka <41383503+Baraka-Mugisha@users.noreply.github.com>
Co-authored-by: bbaime98 <52517921+bbaime98@users.noreply.github.com>
Co-authored-by: ISHIMWE Steven <steven.ishimwe@andela.com>
Co-authored-by: izzett222 <51261911+izzett222@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants