Add New SweetAlert & Notification Components

This commit is contained in:
Aman Upadhyay
2021-04-09 12:35:50 +00:00
committed by Mohit Panjwani
parent 3f7db2793f
commit c3d3e5e35f
78 changed files with 2295 additions and 984 deletions

View File

@ -45,9 +45,8 @@
</template>
<script type="text/babel">
import { async } from 'q'
const { required, email } = require('vuelidate/lib/validators')
import { mapActions } from 'vuex'
export default {
data() {
return {
@ -67,6 +66,7 @@ export default {
},
},
methods: {
...mapActions('notification', ['showNotification']),
async validateBeforeSubmit(e) {
this.$v.formData.$touch()
if (!this.$v.formData.$invalid) {
@ -78,7 +78,10 @@ export default {
)
if (res.data) {
toastr['success']('Mail sent successfuly!', 'Success')
this.showNotification({
type: 'success',
message: 'Mail sent successfuly!',
})
}
this.isSent = true