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

implement seed logic to populate we application #36

Conversation

benfluleck
Copy link
Owner

@benfluleck benfluleck commented Nov 29, 2017

Seed logic to populate the database and app

Description

Implementation of seeding files to populate the models for the application
Seed files implemented for:

  • Adding admin user
  • Adding User levels
  • Adding Books
  • Adding Categories
  • Adding test user

To run the seeds from the command line.
npm run start seed:all
npm run start undo:seed

What are the relevant pivotal tracker stories?

https://www.pivotaltracker.com/story/show/153214589

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:

  • [x ] 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 2 commits November 28, 2017 16:47
- seed data implemented for books, user levels, users and books
- Refactor code to get rid of eslint issues

- Seed application with the aid of seedlogic.

[Finishes #153214589]

- Refactored Upload Modal
@@ -1,12 +1,12 @@
import {connect} from 'react-redux';
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

@@ -1,4 +1,4 @@
import React, { Component } from 'react';
import React from 'react';

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' import/no-unresolved
Missing file extension for "react" import/extensions

import { PropTypes } from 'prop-types';
import { Preloader, Row } from 'react-materialize';
import Book from '../../presentation/common/book/DisplayBook.jsx';
import { fetchAllRecentBooks } from '../../../actions/fetchbooks';

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/fetchbooks' import/no-unresolved
Missing file extension for "../../../actions/fetchbooks" import/extensions

import { connect } from 'react-redux';
import { PropTypes } from 'prop-types';
import { Preloader, Row } from 'react-materialize';
import Book from '../../presentation/common/book/DisplayBook.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/book/DisplayBook.jsx' import/no-unresolved
Unexpected use of file extension "jsx" for "../../presentation/common/book/DisplayBook.jsx" import/extensions

import React from 'react';
import { connect } from 'react-redux';
import { PropTypes } from 'prop-types';
import { Preloader, Row } 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

{
return {
...state,
error

Choose a reason for hiding this comment

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

'error' is not defined no-undef

import 'redux-notifications/lib/styles.css';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import Root from './components/Root.jsx';
import Root from './components/Root.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 './components/Root.jsx' import/no-unresolved
Unexpected use of file extension "jsx" for "./components/Root.jsx" import/extensions

@@ -1,40 +1,31 @@
import React, { Component } from 'react';
import React from 'react';

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' import/no-unresolved
Missing file extension for "react" import/extensions

@@ -419,6 +421,12 @@ footer {
}
}

@media screen and (max-width: 979px) {
.overlay-main {

Choose a reason for hiding this comment

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

Line should be indented with spaces, not tabs

}
.overlay-main {
margin-top: -51vh;
padding: 14px !important;

Choose a reason for hiding this comment

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

!important should not be used

@media screen and (max-width: 776px) {
.landing-page-image .card {
max-width: 73% !important;
margin-left: 10px;
}
.overlay-main {
margin-top: -51vh;
padding: 14px !important;

Choose a reason for hiding this comment

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

!important should not be used

.modal-image{
max-width : 90%;
.modal-image {
max-width: 90%;

Choose a reason for hiding this comment

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

Line should be indented with spaces, not tabs


this.setState({ isLoading: true });
if (this.state.filename) {
console.log('I am here', this.props.secureUrl);

Choose a reason for hiding this comment

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

Unexpected console statement no-console

}

onClick(event){
/**

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 0 indent

import ShowProgressBar from '../Preloader/ShowProgressBar.jsx'
import { connect } from 'react-redux';
import { imageUploadToCloud } from '../../../../actions/uploadImage';
import ShowProgressBar from '../Preloader/ShowProgressBar.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 '../Preloader/ShowProgressBar.jsx' import/no-unresolved
Unexpected use of file extension "jsx" for "../Preloader/ShowProgressBar.jsx" import/extensions

import { imageUploadToCloud, imageUploadToDb } from '../../../../actions/uploadImage';
import ShowProgressBar from '../Preloader/ShowProgressBar.jsx'
import { connect } from 'react-redux';
import { imageUploadToCloud } from '../../../../actions/uploadImage';

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/uploadImage' import/no-unresolved
Missing file extension for "../../../../actions/uploadImage" import/extensions

import {connect} from 'react-redux';
import { imageUploadToCloud, imageUploadToDb } from '../../../../actions/uploadImage';
import ShowProgressBar from '../Preloader/ShowProgressBar.jsx'
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.

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

import {PropTypes} from 'prop-types';
import { NavLink } from 'react-router-dom';
import { Navbar } from 'react-materialize';
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

import {Navbar} from 'react-materialize';
import {PropTypes} from 'prop-types';
import { NavLink } from 'react-router-dom';
import { Navbar } 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 {NavLink} from 'react-router-dom';
import {Navbar} from 'react-materialize';
import {PropTypes} from 'prop-types';
import { NavLink } from 'react-router-dom';

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-router-dom' import/no-unresolved
Missing file extension for "react-router-dom" import/extensions

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.08%) to 93.173% when pulling 0d74d46 on chore/153214589/implement-seed-logic-to-populate-we-application into 3b5ceec on development.

@benfluleck benfluleck merged commit da0988c into development Nov 29, 2017
@benfluleck benfluleck deleted the chore/153214589/implement-seed-logic-to-populate-we-application 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