osb/spark/resources/assets/js/mixin.js
2017-11-03 16:26:07 +11:00

31 lines
641 B
JavaScript
Vendored

module.exports = {
computed: {
/**
* Get the billable entity.
*/
billable() {
if (this.billableType) {
return this.billableType == 'user' ? this.user : this.team;
} else {
return this.user;
}
},
/**
* Determine if the current billable entity is a user.
*/
billingUser() {
return this.billableType && this.billableType == 'user';
},
/**
* Access the global Spark object.
*/
spark() {
return window.Spark;
}
}
};