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

22 lines
492 B
Plaintext
Raw Normal View History

import { equal } from "@ember/object/computed";
2019-12-05 22:33:38 -05:00
export default Ember.Component.extend({
planButtonSelected: equal("planTypeIsSelected", true),
paymentButtonSelected: equal("planTypeIsSelected", false),
2019-12-05 22:33:38 -05:00
actions: {
selectPlans() {
this.set("planTypeIsSelected", true);
},
selectPayments() {
this.set("planTypeIsSelected", false);
},
2019-12-05 22:33:38 -05:00
clickPlan(plan) {
2019-12-09 18:15:30 -05:00
this.plans.map(p => p.set("selected", false));
plan.set("selected", true);
2019-12-05 22:33:38 -05:00
}
}
});