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/153569529/admin users should be able to change users current level #40

Conversation

benfluleck
Copy link
Owner

Description

  • Higher order component for Admin routes defined for the app.
  • Admin Dashboard completed for the Admin user route
  • Admin user can edit books
  • Admin user can update category
  • Admin user can add a new category
  • Admin user can delete a category
  • Admin user can view a user list
  • Admin user can change user level

What does this PR do?

Description of Task to be completed?

Screenshots (if appropriate):

screen shot 2017-12-13 at 1 46 29 pm

screen shot 2017-12-13 at 1 46 39 pm

screen shot 2017-12-13 at 1 49 46 pm

screen shot 2017-12-13 at 1 50 03 pm

screen shot 2017-12-13 at 1 50 19 pm

screen shot 2017-12-13 at 1 50 39 pm

Any background context you want to provide?

  • Sweet alert used in modal display

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 14 commits December 4, 2017 21:50
- Administrator can log on to a seperate interface to serve the admin routes.
- Higher order component for Admin defined
…web application

- Implemented higher order component for admin route
- Implemented new Dashboard for admin interface
- Implementation of admin interface to create a book
- This interface serves the create book route to create additional books
- Errors returned to the app using the notfier in the reducer
- Changed css styling for images
[Finishes #153214779]
- Modal for edit book implemented
- Category wrapper implemented to wrap any functionality with category logic
- Naming convention for book changed so as to adopt better naming convention
…tegories on the client side.

- Implemented higher ordder component for category lists
- Implemented additional Jsdocs
- Implemented functionality for Delete books
Delete category implemented
[Finishes #153507675, ##153563061, #153507675, ##153561900, #153561888]
- Constructed a materialize table to accept user values and display them to the admin user

[Finishes #153569529]
- Implemented change user level modal
- Implemented a new route to fetch new user details
- Implemented a new route to get a user level list
*
*/
render() {
const { users } = this.props;

Choose a reason for hiding this comment

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

'users' is assigned a value but never used no-unused-vars

import { Row, Button } from 'react-materialize';
import { connect } from 'react-redux';
import ChangeUserLvlModal from '../../presentation/common/modal/ChangeUserLvlModal.jsx';
import { getSelectedUser } from '../../../actions/admin/getSelectedUser';

Choose a reason for hiding this comment

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

Unable to resolve path to module '../../../actions/admin/getSelectedUser' import/no-unresolved
Missing file extension for "../../../actions/admin/getSelectedUser" import/extensions

import PropTypes from 'prop-types';
import { Row, Button } from 'react-materialize';
import { connect } from 'react-redux';
import ChangeUserLvlModal from '../../presentation/common/modal/ChangeUserLvlModal.jsx';

Choose a reason for hiding this comment

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

Unable to resolve path to module '../../presentation/common/modal/ChangeUserLvlModal.jsx' import/no-unresolved
Unexpected use of file extension "jsx" for "../../presentation/common/modal/ChangeUserLvlModal.jsx" import/extensions

import React from 'react';
import PropTypes from 'prop-types';
import { Row, Button } from 'react-materialize';
import { connect } from 'react-redux';

Choose a reason for hiding this comment

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

Unable to resolve path to module 'react-redux' import/no-unresolved
Missing file extension for "react-redux" import/extensions

@@ -0,0 +1,91 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Row, Button } from 'react-materialize';

Choose a reason for hiding this comment

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

Unable to resolve path to module 'react-materialize' import/no-unresolved
Missing file extension for "react-materialize" import/extensions

import { fetchBook } from '../../../../actions/fetchbooks';


import { deleteBookAction } from '../../../../actions/admin/books';

Choose a reason for hiding this comment

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

Missing file extension for "../../../../actions/admin/books" import/extensions
Unable to resolve path to module '../../../../actions/admin/books' import/no-unresolved

import { connect } from 'react-redux';
import PropTypes from 'prop-types';

Choose a reason for hiding this comment

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

Unable to resolve path to module 'prop-types' import/no-unresolved
Missing file extension for "prop-types" import/extensions

@@ -1,9 +1,11 @@
import React from 'react';
import ReactTooltip from 'react-tooltip';
import swal from 'sweetalert2';
import { Button } from 'react-materialize';

Choose a reason for hiding this comment

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

Missing file extension for "react-materialize" import/extensions
Unable to resolve path to module 'react-materialize' import/no-unresolved

@@ -1,9 +1,11 @@
import React from 'react';
import ReactTooltip from 'react-tooltip';
import swal from 'sweetalert2';

Choose a reason for hiding this comment

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

Unable to resolve path to module 'sweetalert2' import/no-unresolved
Missing file extension for "sweetalert2" import/extensions

<div className="book-modal modal-title">Title: {this.props.books.title} </div>
<hr />
<div className="book-modal">Author: {this.props.books.author}</div>
<div className="book-modal">Description: {this.props.books.description}<span id="bookDescription" /></div>
<div className="book-modal">Description: {this.props.books.description}</div>

Choose a reason for hiding this comment

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

'books.description' is missing in props validation react/prop-types

@benfluleck benfluleck merged commit 863b522 into development Dec 13, 2017
@benfluleck benfluleck deleted the feature/153569529/admin-users-should-be-able-to-change-users-current-level branch December 13, 2017 12:55
@coveralls
Copy link

Coverage Status

Coverage decreased (-2.0%) to 91.179% when pulling 0d8df84 on feature/153569529/admin-users-should-be-able-to-change-users-current-level into 8dcd2a1 on development.

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