Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Admin/User.vue
Show First 20 Lines • Show All 376 Lines • ▼ Show 20 Lines | export default { | ||||
} | } | ||||
}, | }, | ||||
submitDiscount() { | submitDiscount() { | ||||
let dialog = $('#discount-dialog').modal('hide') | let dialog = $('#discount-dialog').modal('hide') | ||||
axios.put('/api/v4/wallets/' + this.user.wallets[0].id, { discount: this.wallet_discount_id }) | axios.put('/api/v4/wallets/' + this.user.wallets[0].id, { discount: this.wallet_discount_id }) | ||||
.then(response => { | .then(response => { | ||||
if (response.data.status == 'success') { | if (response.data.status == 'success') { | ||||
this.$toastr('success', response.data.message) | this.$toast.success(response.data.message) | ||||
this.wallet_discount = response.data.discount | this.wallet_discount = response.data.discount | ||||
this.wallet_discount_id = response.data.discount_id || '' | this.wallet_discount_id = response.data.discount_id || '' | ||||
this.wallet_discount_description = response.data.discount_description | this.wallet_discount_description = response.data.discount_description | ||||
// Update prices in Subscriptions tab | // Update prices in Subscriptions tab | ||||
if (this.user.wallet.id == response.data.id) { | if (this.user.wallet.id == response.data.id) { | ||||
this.discount = this.wallet_discount | this.discount = this.wallet_discount | ||||
this.discount_description = this.wallet_discount_description | this.discount_description = this.wallet_discount_description | ||||
Show All 11 Lines |