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

Feature/153009051/implement route to retrieve a user book history #32

Conversation

benfluleck
Copy link
Owner

This PR implements Loan History, Loan and Return Book

Description

Loan history - A tab displays a table with information showing the users book loans and return history.
Loan book - The user clicks on a book and now has the option to Loan it.
Return book- Any books loaned can be returned by the user.

Screenshots (if appropriate):

screen shot 2017-11-22 at 7 43 55 pm

screen shot 2017-11-22 at 7 44 37 pm

screen shot 2017-11-22 at 7 46 37 pm

Any background context you want to provide?

What are the relevant pivotal tracker stories?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • New chore (expected functionality to be implemented)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Benny Ogidan added 3 commits November 20, 2017 12:36
…the landing page

fix(borrowedbooks logic):
- Borrowed books logic removed from landing page
- Readme updated from previous feedback

- Reducer logic refactored adopting proper naming conventions

- Loan history feature implemented

- Return book logic implemented

- Modified pagination component to suit web app

- Implemented loan history route

[Finishes #152996631, #152996515, #152838221, #153009051]
};

const mapStateToProps = state => ({
bookOperations : state.bookReducer.bookOperations

Choose a reason for hiding this comment

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

Extra space after key 'bookOperations' key-spacing
Trailing spaces not allowed no-trailing-spaces

bookOperations: null
};

const mapStateToProps = state => ({

Choose a reason for hiding this comment

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

Trailing spaces not allowed no-trailing-spaces



LoanHistory.defaultProps = {
bookOperations: null

Choose a reason for hiding this comment

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

Expected indentation of 2 spaces but found 3 indent


LoanHistory.PropTypes = {
bookOperations: PropTypes.array

Choose a reason for hiding this comment

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

Trailing spaces not allowed no-trailing-spaces

}


LoanHistory.PropTypes = {

Choose a reason for hiding this comment

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

Typo in static class property declaration react/no-typos

const config = { items: pagination.pageCount,
activePage: pagination.page
};
return(

Choose a reason for hiding this comment

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

Expected space(s) after "return" keyword-spacing

const { pagination } = this.props.bookOperations;
const config = { items: pagination.pageCount,
activePage: pagination.page
};

Choose a reason for hiding this comment

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

Expected indentation of 4 spaces but found 18 indent

}
const { pagination } = this.props.bookOperations;
const config = { items: pagination.pageCount,
activePage: pagination.page

Choose a reason for hiding this comment

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

Expected indentation of 6 spaces but found 20 indent

return <Preloader size="big" className="center-align" />;
}
const { pagination } = this.props.bookOperations;
const config = { items: pagination.pageCount,

Choose a reason for hiding this comment

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

Expected a line break after this opening brace object-curly-newline
Trailing spaces not allowed no-trailing-spaces

if (!this.props.bookOperations) {
return <Preloader size="big" className="center-align" />;
}
const { pagination } = this.props.bookOperations;

Choose a reason for hiding this comment

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

'bookOperations.pagination' is missing in props validation react/prop-types

@benfluleck benfluleck merged commit 7783e22 into development Nov 22, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.9%) to 90.657% when pulling 1770292 on feature/153009051/Implement-route-to-retrieve-a-user-book-history into 7f24ca7 on development.

@benfluleck benfluleck deleted the feature/153009051/Implement-route-to-retrieve-a-user-book-history branch December 13, 2017 12:37
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.

None yet

3 participants