vkoves / carpe

Scheduling for the modern age - an UNMAINTAINED indigoBox project
http://carpe-uno.herokuapp.com
0 stars 0 forks source link

Add Beta Scheduler Page & Vue Pipeline with Webpack #393

Closed vkoves closed 5 years ago

vkoves commented 5 years ago

Description

This adds the /schedule/beta route, which now shows a very basic Vue prototype that displays the current user's categories, like so:

screenshot from 2019-02-21 22-13-47

You can see this for yourself on Carpe test. This PR also adds a new /users/:id/categories route that returns the requested user's categories as a JSON, which is the nicer way to get data from RoR into JS, rather than nasty var something = <%= ruby_var %>.

Finally, this also (per Ruby's requirements for webpack) moves us away from npm and to yarn. This is generally preferred in the front-end world anyway (we recently made a similar change at work), but for more details on why Yarn is better, read here.

Also worth nothing: The overall goal of this PR is to:

  1. Prove we can use Vue in a deployed Rails environment (starting work on issue #217)
  2. Setup the starting point for working on a beta scheduler
  3. Start moving us towards JSON APIs

Type of Pull Request

Based on the contributor's guide, this PR is of type:

Requestor Checklist

Requestor: Put an x in all that apply. You can check boxes after the PR has been made.

Reviewer: If you see an item that is not checked that you believe should be, comment on that as part of your review.

How This Has Been Tested

Tested locally and on Carpe test to ensure that this can actually deploy. Also still passes CI, with some tweaks and improvements made to the CI to fix an issue where it was complaining about yarn.

vkoves commented 5 years ago

Merging with dev added ERB lint, so we'll see if that passes or if I have some fixes to do

Update: It found one tiny thing, but now we are all good :smiley:

vkoves commented 5 years ago

Since I added a new controller action and I even found a bug with it before, I've added two basic tests in commit d6ee777