Giter Club home page Giter Club logo

gomobilect's People

Contributors

codybarr avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

matenwego

gomobilect's Issues

Create Admin Section

Create an admin page for editing / adding locations and events

  • Move Add Location Page

Implement Validation on Forms

Locations:

  • Name, Address, Description shouldn't be empty

Events:

  • Location and Dates shouldn't be empty
  • Start DateTime needs to be before End DateTime

Refactor Code

I want to separate the react code from the express code.

Currently all the react stuff is in /src/js/** and the express stuff is in /src/app.js.

Maybe we could put the react stuff in /react/** and the express stuff in /server/**. Waiting for @matenwego to weigh in.

Add User Administration and Roles

Admins should be able to add/update/delete events and locations, but the superadmin should have access to an additional administrative view that allows him to add/update/delete registered users and change their roles, etc.

Enhance Admin/Events Page

After the site accumulates a lot of events we'll want to be able to do a few things like:

  • Toggle Sorting by clicking on column headers
  • Add pager to tab through events
  • Multi-select (checkboxes - with a select all header checkbox) to delete multiple events

Create a Calendar View

In addition to a map view there should also be a calendar view (so clients who are only available on certain days can see where the van will be in an efficient way).

Get Google Map to display

Initially it could just center based on all of the added locations.

Maybe we could implement visitor geolocation to center wherever they are.

Have to transpile js manually when testing Express

Right now we develop using webpack-dev-server, but when you Ctrl+C out and run gulp to start using express none of the javascript assets are up to date. You have to manually run webpack to transpile the assets then run gulp again to test express.

Suggested Fix:

Going to try and get this all into gulp (see: https://webpack.github.io/docs/usage-with-gulp.html).

In the end we should be able to run gulp to start the express server and webpack in watch mode simultaneously!

Deploy to AWS

Update express, webpack config, and mongodb files to account for production environment and deploy test site to AWS.

Axios

See if we can switch out all of the Jquery on the site and just use axios for the ajax calls.

Client Side Validation

  • To not intentionally add a way for people to DDoS the site....client side validation should be added to the forms (specifically location).
  • Make sure both location and events validate on both the client and server.

Edit:
@matenwego I remember what the issue was last time. It's when editing an existing event I only get one error in the response (regardless of how many there actually are.

Normal err objects will look like this:

{
  "errors": {
    "message": "Event validation failed",
    "name": "ValidationError",
    "errors": {
      "endDateTime": {
        "message": "End Date / Time is required",
        "name": "ValidatorError",
        "properties": {
          "type": "required",
          "message": "End Date / Time is required",
          "path": "endDateTime"
        },
        "kind": "required",
        "path": "endDateTime"
      },
      "startDateTime": {
        "message": "Start Date / Time is required",
        "name": "ValidatorError",
        "properties": {
          "type": "required",
          "message": "Start Date / Time is required",
          "path": "startDateTime"
        },
        "kind": "required",
        "path": "startDateTime"
      },
      "location": {
        "message": "Location is required",
        "name": "ValidatorError",
        "properties": {
          "type": "required",
          "message": "Location is required",
          "path": "location"
        },
        "kind": "required",
        "path": "location"
      }
    }
  }
}

But the error is coming out like this when editing an event:

{
  "errors": {
    "message": "Cast to date failed for value \"I am not a date\" at path \"startDateTime\"",
    "name": "CastError",
    "kind": "date",
    "value": "I am not a date",
    "path": "startDateTime"
  }
}

I suspect because an exception error is occurring.

Make Location Form Dry

Currently the add location and edit location forms are being duplicated. Refactor into one component like Events.

AuthStore authenticated 'state' doesn't sync with JWT expiration

In authentication.js the JWT tokens are set to expire in 10080 seconds (2.8 hours?). But the token stored in LocalStorage client-side doesn't know when this has expired.

So if you attempt to access a route that requires authentication you'll get a 401 error in the console (even though the view and AuthStore reflect that you're logged in - like the navbar);

Create Event schema

Get some basic events loaded using the seed file and get them to display on the location page.

Make Location View Full Width

Map should fill up entire height and width, except the navbar; remove scroll inhibitor; info windows with schedule should appear in tooltip when clicking the location marker.

Load in Map markers on Map component

Should hit API and load the locations when they get back. Should allow the Component to load regardless if the data is there or not. Don't affect performance please.

Update Event Model - Days of Week

Dates should no longer be specific to calendar date and time; instead since the Mobile Unit will have a mostly set weekly schedule there should be 'weekday' and 'start/end time' properties for each event document, rather than start/end datetime properties.

Calendar view needs to be updated so there's no navigation between weeks.

Event form needs to be updated to have a drop down box just for the days of the week.

Seed file should be updated to account for event model changes.

Optimize Locations Page by querying the events api only once on initial render.

Currently when you click a marker icon on the main locations page map a new api query is called to retrieve all the current events for that location.

We could optimize this by having one query to obtain the locations and another for all the current events, then only on the initial mount of the component we could update the location state object to include all of the associated events.

Then whenever the client clicks a map marker it'll simply render those events in the info window rather than fire another api call every time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.