Commit c96de40a authored by adamrusly's avatar adamrusly

new: insert feedback

parent 4888cdae
...@@ -56,11 +56,33 @@ export default { ...@@ -56,11 +56,33 @@ export default {
}, },
methods: { methods: {
onSubmit: function (event) { onSubmit: function (event) {
this.$q.notify({ const dataFeedback = {
message: 'Your feedback was successfully submitted.', NAMA:this.name,
icon: 'check', EMAIL:this.email,
color: 'green' FEEDBACK:this.feedbackinput
}) }
this.$axios.post('wils/feedback', dataFeedback).then((response) => {
// this.userUpdate.token = response.token
// this.updateUser(this.userUpdate)
this.$q.loading.hide()
if (response.data.err){
this.$q.notify({
message: 'Your feedback was not successfully submitted.',
icon: 'error',
color: 'red'
})
}
else {
this.$q.notify({
message: 'Your feedback was successfully submitted.',
icon: 'check',
color: 'green'
})
}
}).catch((err) => {
console.log(err)
this.$q.loading.hide()
})
}, },
onReset: function (event) { onReset: function (event) {
this.email = '' this.email = ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment