osb/spark/resources/assets/js/mixin.js

31 lines
641 B
JavaScript
Raw Normal View History

2017-11-03 05:26:07 +00:00
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;
}
}
};