Skip to content
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

#170180280 Manager get all and specific user booking Requests #48

Merged

Conversation

william000000
Copy link
Collaborator

@william000000 william000000 commented Dec 10, 2019

What does this PR do?

Manager get specific or all booking accommodation requests

Description of Task to be completed?

  • Get specific booking accommodation requests
  • Get all users' booking requests
  • Fix the issue about the user who made the trip to be the one to book an accommodation
  • Add tests
  • Add new fields in booking tables userId
  • Swagger documentation

How should this be manually tested?

  • You have to clone the repo git clone https://github.com/andela/team-odd-bn-backend.git
  • Then After the repo cloned cd project-folder and run npm i to install all dependencies
  • Go to my branch git checkout ft-get-all-and-specific-booking-request-170180280
  • Insert the data by npx sequelize-cli db:seed:all
  • Run app by npm run dev-start

Any background context you want to provide?

N/A

What are the relevant pivotal tracker stories?

#170180280

Screenshots (if appropriate)

Get all users' booking requests

image

Get specific user booking requests

image

Questions:

N/A

@william000000 william000000 force-pushed the ft-get-all-and-specific-booking-request-170180280 branch 4 times, most recently from 8c086d8 to 677ad56 Compare December 11, 2019 09:30
@william000000 william000000 changed the title #170180280 Manager get all booking an accommodation Re… #170180280 Manager get all and specific booking an accommodation Re… Dec 11, 2019
@william000000 william000000 changed the title #170180280 Manager get all and specific booking an accommodation Re… #170180280 Manager get all and specific user booking Requests Dec 11, 2019
Copy link
Contributor

@NiyoEric NiyoEric left a comment

Choose a reason for hiding this comment

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

Well done @william000000. I liked how you made it so simple to display all bookings. I request you add more test.

src/services/BookingService.js Outdated Show resolved Hide resolved
Comment on lines +164 to +166
res.should.have.status(404);
res.body.should.be.an('object');
Copy link
Contributor

Choose a reason for hiding this comment

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

Add more test.

Comment on lines +136 to +134
res.should.have.status(200);
res.body.should.be.an('object');
Copy link
Contributor

@NiyoEric NiyoEric Dec 11, 2019

Choose a reason for hiding this comment

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

Please add more test.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you @NiyoEric, I have already implemented

@william000000 william000000 force-pushed the ft-get-all-and-specific-booking-request-170180280 branch from 677ad56 to bc6f186 Compare December 11, 2019 14:56
Copy link
Collaborator

@victkarangwa victkarangwa left a comment

Choose a reason for hiding this comment

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

Nice job @william000000
Just have a look at some feedback I left

src/controllers/BookingController.js Outdated Show resolved Hide resolved
src/routes/api/bookingRoute.js Outdated Show resolved Hide resolved
src/routes/api/bookingRoute.js Outdated Show resolved Hide resolved
@william000000 william000000 force-pushed the ft-get-all-and-specific-booking-request-170180280 branch from bc6f186 to fbc29ab Compare December 11, 2019 22:59
Copy link
Collaborator

@hezronkimutai hezronkimutai left a comment

Choose a reason for hiding this comment

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

Nice work @william000000 .

Copy link
Collaborator

@hezronkimutai hezronkimutai left a comment

Choose a reason for hiding this comment

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

Hi @william000000 , nice job.

Copy link
Contributor

@nziokaivy nziokaivy left a comment

Choose a reason for hiding this comment

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

Great job @william000000 Looks good to me!

…quest made

- Get specific booking an accommodation request
- Fix the issue where user was able to book an accommodation facility that s/he is not the owner
- Test for get user booking request
- Add swagger documentation
[Finishes #170180280]
@william000000 william000000 force-pushed the ft-get-all-and-specific-booking-request-170180280 branch from fbc29ab to e7dbed9 Compare December 12, 2019 12:17
@julietezekwe julietezekwe merged commit 7d8e209 into develop Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants