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

23 lines
528 B
Plaintext
Raw Normal View History

import { equal } from "@ember/object/computed";
import Component from "@ember/component";
export default 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
}
}
});