goodybag/lunchroom

[Final-Post-Launch] Admin Tweaks

cadorn opened this issue · 20 comments

$feature #1

  • Easy testing for production orders (fill automatically, send test stripe info, allow for order delete)
  • Order delete with confirm in admin
  • After having created an event, I wanted to see it again. I went back to events and it was blank. I would expect to see a list of upcoming events.
  • @cadorn , issue: jag ordered from zen japanese TODAY (sunday) from bazaarvoice-test. but, on the admin-order section, it shows that he ordered for Monday (which isn't even possible).

screen shot 2015-08-16 at 9 02 11 pm

  • Total item counts for restaurant
  • On event’s creator we need to show Pricing
  • Pull in restaurant records from cater dynamically. Setup API route on cater where I can send IDs and get data back in this format: https://github.com/goodybag/lunchroom/blob/master/server/data/data.01.js#L26 leaving for john at some point
  • Authenticate admin users
  • Better admin screen
  • Secure admin API calls

Features

  • Delete order items (check deletion of order and all items)
  • report of the orders that came through for each day on Lunchroom? any sort of format would work as long as I am able to see the Name of the person, order number, what was ordered, and cost…on a per restaurant basis. see #52

Setup clean admin (and app):

Setup github Application for Lunchroom Admin with callback url http:///cores/auth/for/passport/admin/callback/github

is this lunchroom.goodybag.com? Or do I need to use the underlying heroku app hostname?

Use the heroku hostname please.

@jpanchal13 @omflash I'll be sending you a link to the new admin skin tomorrow (friday) end of day so we can lock down the final admin views/reports for next week. Sorry for the delay. I have been doing cleaning and refactoring work which I wanted to get done before reworking the admin. Things are coming along very well.

  • Ensure orders can be viewed for various days:

when i placed my order earlier in the week, I had also ordered ahead for today. But the ordered items are not visible in Admin>Orders - http://lunchroom.goodybag.com/admin-A3C9D2B6-201C-422E-BF63-D536C480332F#Admin_Orders

@jrf0110 I need the github Application for Lunchroom Admin setup.

The callback URL should be: http://goodybag-app-preview.herokuapp.com/admin-ED56856F-CECA-42DA-854A-5BBBCB96ED22/cores/auth/for/passport/callback/github

The values will end up here: https://github.com/goodybag/lunchroom-app/blob/master/data/GB/Deployments/goodybag-app-preview.herokuapp.com/profile.ccjson#L37-L39

The configUrl is the URL of the github application configuration page.

@jpanchal13 @omflash Here is the link to the new admin skin: http://goodybag-app-preview.herokuapp.com/admin-ED56856F-CECA-42DA-854A-5BBBCB96ED22/?invite=C0570DB6-D658-4E19-B14B-D91C17389F76

Please take a look at each page and ensure all columns and actions you need are there (the events creation page will contains same functionality as now. Also, please send columns for the report you wanted. Please record changes below. I'll be hooking this admin up to the live DB on monday.

Changes:

  • Delete action for individual items in order (delete will mark order/item deleted and show in red but still show for completeness)
  • List of subscribers per company

@cadorn @omflash @jmsantha @gilliansl , I went through the admin stuff (christoph posted link above). The only thing that I found so far is that:

We need to have a column for "company" in the Orders section. For various reasons we'll need to see that info -- because we will have a single restaurant serving multiple companies on any given day.

BUT, my gut is telling me I'm missing other things as well. So can we all take a brief look and try and predict what we'll need?

@cadorn @jrf0110 @jpanchal13 Is there a way to delete events? Or will that be in the form that comes up to create/edit?

Also, in the 'Orders' section, does the red X delete the item or cancel it?

Is there a way to delete events? Or will that be in the form that comes up to create/edit?

Delete will show after selecting created event

in the 'Orders' section, does the red X delete the item or cancel it?

The X will always 'cancel'; meaning the order/item will still show but indicate that it is cancelled.

Update: I have one admin UI component securely hooked up to staging DB using clean component/template logic. Data models and a bunch of other stuff shared between app and admin are ported, cleaned and working. Hope to have complete new admin working against staging DB tomorrow.

Update: I ended up porting more backend code shared with the app and prepping things for the app as that made the most sense so admin is not done yet. My goal is to have admin working for review/testing end of day tomorrow (Fri). Will focus on porting app next week along with fixing a bunch of the little issues.

@jpanchal13 Update: I have the tables in admin pages hooked up to DB. Got delayed with hooking up filters and event creator by having to do some optimization to display many table rows (@jrf0110 using virtual-dom now) which will lead to super fast UI. I expect to wrap this up tomorrow (Monday) and will send link for new admin end of day.

Update: Just about there. Did not reach level of polish I was hoping for. Shooting for pushing admin update tomorrow (Tue) end of day now.

FYI: I ended up rolling a lot of the work I needed to do to port the app into this admin work which is why it is taking longer. Once the page(nav)/component/template logic is solid in admin now it will be straight forward to finish porting the app the users see (with proper company/Mon etc... urls).

Update: Loading data with the foreign keys was still super verbose and messy with knexjs and represented a lot of code in the app. I am now generating clean bookshelf models from one authoritative collection schema and using the bookshelf models to query data. Working nicely centralized now.

On with polishing tomorrow (Wed) and I'll hook up the new admin to the live DB so we can verify that all admin pages are sufficient now.

Update: You can take a look at a mostly functional admin: http://goodybag-app-preview.herokuapp.com/admin-ED56856F-CECA-42DA-854A-5BBBCB96ED22/

Outstanding:

  • Event creator view (need to finish hooking up)
  • Hookup to live DB (need to update DB schema in production)
  • Take github login live (need to update config)
  • Table pagination see #42

Outstanding (will do when porting app):

  • Display company in order/item tables (need better foreign key selector)
  • Filter order/item tables by company (need better foreign key filter)

My goal is to have the new admin ready over the weekend so you can use it to manage events next week.

Update: Instead of hooking up to live DB I imported the data from the live DB into the staging DB. Need to tweak some of the tables and convert pre-advance orders into the order-items format and then all should be good.

Note: The staging DB now has the data from the live DB including subscribers so please don't create any events on staging DB for bazaarvoice or everyone will get notified.

My goal is to get the admin ready on Monday and then hook it to the live DB. I am very close to have things installable for you as well which I hope to test later this week.

FYI: The admin work flushed out most issues with the new app template (which unfortunately took a while :( ) and porting the app should be relatively straight forward now.

Update: I have the new admin hooked up to live data. There are still a few table fields missing to make the order-tracking/fulfillment seamless. I will be checking over everything and will add some docs to outline what the tables show to wrap the admin up tomorrow (Tue).

the new admin is done for review; Please use it instead of the old one and compare data to old one to make sure; I went through everything in detail and it should be all good; The UI still flashes at times but it does not affect functionality and will be fixed in the coming weeks; here is the link: http://goodybag-app-preview.herokuapp.com/admin-ED56856F-CECA-42DA-854A-5BBBCB96ED22/?invite=C0570DB6-D658-4E19-B14B-D91C17389F76
reload page after loading the above URL once