This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
site-base/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;
}
}
};