discourse-subscriptions/assets/javascripts/discourse/components/payment-plan.js

26 lines
513 B
JavaScript
Raw Normal View History

import Component from "@ember/component";
import discourseComputed from "discourse-common/utils/decorators";
const RECURRING = "recurring";
export default Component.extend({
tagName: "",
@discourseComputed("selectedPlan")
selectedClass(planId) {
return planId === this.plan.id ? "btn-primary" : "";
},
@discourseComputed("plan.type")
recurringPlan(type) {
return type === RECURRING;
},
actions: {
planClick() {
this.clickPlan(this.plan);
return false;
2020-09-16 10:53:50 -04:00
},
},
});