Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Reseller/Invitations.vue
Show First 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | export default { | ||||
resendInvite(id) { | resendInvite(id) { | ||||
axios.post('/api/v4/invitations/' + id + '/resend') | axios.post('/api/v4/invitations/' + id + '/resend') | ||||
.then(response => { | .then(response => { | ||||
if (response.data.status == 'success') { | if (response.data.status == 'success') { | ||||
this.$toast.success(response.data.message) | this.$toast.success(response.data.message) | ||||
// Update the invitation record | // Update the invitation record | ||||
const index = this.invitations.findIndex(item => item.id == id) | const index = this.invitations.findIndex(item => item.id == id) | ||||
this.invitations.splice(index, 1) | if (index > -1) { | ||||
this.$set(this.invitations, index, response.data.invitation) | this.$set(this.invitations, index, response.data.invitation) | ||||
} | } | ||||
} | |||||
}) | }) | ||||
}, | }, | ||||
searchInvitations() { | searchInvitations() { | ||||
this.loadInvitations({ reset: true, search: this.search }) | this.loadInvitations({ reset: true, search: this.search }) | ||||
}, | }, | ||||
statusClass(invitation) { | statusClass(invitation) { | ||||
if (invitation.isCompleted) { | if (invitation.isCompleted) { | ||||
return 'text-success' | return 'text-success' | ||||
Show All 30 Lines |