Conversation
Conflicts: app/router.js app/templates/team-nav.hbs
|
@idelahoz I merged all of my stuff, so I also merged development into your branch to catch it up with the current state of the repo. You'll notice there's a new route - Keep in mind, I made my route only available to team owners. I'm guessing you'll want to do the same, but I'm not sure. |
app/controllers/team/settings.js
Outdated
There was a problem hiding this comment.
Would this work here?
return new Ember.RSVP.Promise(function(resolve) {
Stripe.card.createToken($form, function(status, response) {
controller.set('cardToken', response.id);
resolve();
});
});Then in the createPlan action, you could have
this.createStripeToken().then(this.requestPlanChange)or
var controller = this;
controller.createStripeToken().then(function() {
this.requestPlanChange
});, whichever works.
Also, if you move the form and related logic to a component, I think it would be more nicely abstracted, though I think something like that is big enough for a refactor task of it's own.
app/controllers/team/manage.js
Outdated
There was a problem hiding this comment.
Let us stay away from using bind. It makes the code more confusing. Also I don't think phantomjs supports it.
There was a problem hiding this comment.
This doesn't follow the what do I want principle because you just want to be able to call requestPlanChange directly.
Conflicts: config/environment.js
|
@idelahoz I merged my stuff and then merged development in to here to get it up to date and modified some tests to make them pass. Only slight problem - there's a console warning that |
Conflicts: app/templates/team/manage.hbs
This PR adds a settings page for the team, Right now the settings page only has an option for changing a team's plan.
Asana task: https://app.asana.com/0/30343922347920/33619659511433
The page has a credit card form, is the user changes to a paid plan a no credit card is entered, an error will be returned.