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/settings/payment-method-stripe.js

44 lines
784 B
JavaScript
Raw Normal View History

2017-11-03 05:26:07 +00:00
module.exports = {
props: ['user', 'team', 'billableType'],
/**
* Load mixins for the component.
*/
mixins: [
require('./../mixins/discounts')
],
/**
* The componetn's data.
*/
data() {
return {
currentDiscount: null,
loadingCurrentDiscount: false
};
},
/**
* The component has been created by Vue.
*/
created() {
var self = this;
this.$on('updateDiscount', function(){
self.getCurrentDiscountForBillable(self.billableType, self.billable);
return true;
})
},
/**
* Prepare the component.
*/
mounted() {
this.getCurrentDiscountForBillable(this.billableType, this.billable);
},
};