-
Notifications
You must be signed in to change notification settings - Fork 43
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
315 phase 4 status report #368
Conversation
backoffice/index.js
Outdated
}) | ||
.then(users => { | ||
const userIds = users.map(user => user.id) | ||
return knex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be moved to /database/queries.js
@@ -2,6 +2,7 @@ require('../environment') | |||
const { IDMClient } = require('./idm') | |||
const { EchoClient } = require('./echo') | |||
const hubspot = require('./hubspot') | |||
const knex = require('../database/knex') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this and all the changes to this file. i dont think we need them
const setStatus = ({user_id, status}) => | ||
logStatusUpdate({user_id, status}) | ||
.then(() => { | ||
const insert = knex('phase_4_status').insert({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good. We really need an upsert
knex helper function. we have this complexity at least twice now
@@ -0,0 +1,11 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra space
table.string('status').notNullable() | ||
table.timestamp('updated_at') | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one newline please
@@ -1,4 +1,14 @@ | |||
.users | |||
&-status > * | |||
display: inline-block |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you trying to run things inline horizontally? consider flexbox?
textarea(name='status' rows='6' cols='70') | ||
button.btn.btn-default(type='submit') Update | ||
h3 Phase #{phase.number} Status Reports | ||
+usersList(users.filter(u => u.phase === 4)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do this phase 4 filter in the route and remove the mixin in favor of just for user in users
make these changes and then resubmit a PR. Also don't forget to rebase your other branch off the new version of this branch |
issue: https://github.com/LearnersGuild/curriculum/issues/315