@airlst/les-landingpage-vue-plugin
v0.0.10
Published
LES Vue Plugin Boilerplate
Readme
AirLSTLandingpageVuePlugin
Your plugin description...
Installation
1. Install
yarn add @airlst/les-landingpage-vue-plugin2. Plug-in
import AirLSTLandingpageVuePlugin from 'airlst-landingpage-vue-plugin'
Vue.use(AirLSTLandingpageVuePlugin, {
compandUid: '',
guestlistUid: '' // Optional paramter, not can be set on runtime too
})
new Vue()3. Use in your components
<template>
<div>
Your component
</div>
</template>
<script>
export default {
async created() {
console.log(this.$$airlst);
},
data() {
return {
guestlistUid: '',
rsvpCode: '',
rsvpData: '',
guestlistData: '',
lastException: null,
submitting: false,
representativeData: {
contact: {},
rsvp: {}
}
}
},
methods: {
async getGuestlistData() {
this.lastException = null
this.$airlst.guestlistUid = this.guestlistUid
try {
this.guestlistData = await this.$airlst.retrieveGuestlistInformation()
} catch(e) {
this.lastException = e
}
},
async getRsvpData() {
this.lastException = null
this.$airlst.guestlistUid = this.guestlistUid
try {
this.rsvpData = await this.$airlst.retrieveRsvpInformation(this.rsvpCode)
} catch(e) {
this.lastException = e
}
},
async cancelRsvp() {
this.lastException = null
this.$airlst.guestlistUid = this.guestlistUid
this.submitting = true
try {
await this.$airlst.cancelRsvp(this.rsvpCode, this.rsvpData)
await this.getRsvpData()
} catch(e) {
this.lastException = e
}
this.submitting = false
},
async confirmRsvp() {
this.lastException = null
this.$airlst.guestlistUid = this.guestlistUid
this.submitting = true
try {
await this.$airlst.confirmRsvp(this.rsvpCode, this.rsvpData)
await this.getRsvpData()
} catch(e) {
this.lastException = e
}
this.submitting = false
},
async updateRsvpWithCustomStatus(status, guestStatus) {
this.lastException = null
this.$airlst.guestlistUid = this.guestlistUid
this.submitting = true
try {
await this.$airlst.updateRsvpByCodeAndStatus(this.rsvpCode, status, this.rsvpData, guestStatus)
await this.getRsvpData()
} catch(e) {
this.lastException = e
}
this.submitting = false
},
async updateRsvpByCode() {
this.lastException = null
this.$airlst.guestlistUid = this.guestlistUid
this.submitting = true
try {
await this.$airlst.updateRsvpByCodeAndStatus(this.rsvpCode, this.rsvpData)
await this.getRsvpData()
} catch(e) {
this.lastException = e
}
this.submitting = false
},
async submitRepresentativeForRsvpByCode() {
this.lastException = null
this.$airlst.guestlistUid = this.guestlistUid
this.submitting = true
try {
await this.$airlst.submitRepresentativeForRsvpByCode(this.rsvpCode, this.representativeData)
await this.getRsvpData()
} catch(e) {
this.lastException = e
}
this.submitting = false
},
async submitOpenRegistration() {
this.lastException = null
this.$airlst.guestlistUid = this.guestlistUid
this.submitting = true
try {
await this.$airlst.submitOpenRequest(this.rsvpData)
await this.getRsvpData()
} catch(e) {
this.lastException = e
}
this.submitting = false
}
}
};
</script>License
MIT
