discourse-subscriptions/assets/javascripts/discourse/components/payment-options.js.es6

22 lines
492 B
JavaScript

import { equal } from "@ember/object/computed";
export default Ember.Component.extend({
planButtonSelected: equal("planTypeIsSelected", true),
paymentButtonSelected: equal("planTypeIsSelected", false),
actions: {
selectPlans() {
this.set("planTypeIsSelected", true);
},
selectPayments() {
this.set("planTypeIsSelected", false);
},
clickPlan(plan) {
this.plans.map(p => p.set("selected", false));
plan.set("selected", true);
}
}
});