This commit is contained in:
Julien Nahum 2024-01-24 16:47:09 +01:00
commit ed17b0e985
7 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@
:data="countries" :data="countries"
:disabled="(disabled || countries.length===1)?true:null" :searchable="true" :search-keys="['name']" :option-key="'code'" :color="color" :disabled="(disabled || countries.length===1)?true:null" :searchable="true" :search-keys="['name']" :option-key="'code'" :color="color"
:has-error="hasValidation && form.errors.has(name)" :has-error="hasValidation && form.errors.has(name)"
:placeholder="'Select a country'" :uppercase-labels="true" :theme="theme" @change="onChangeCountryCode" :placeholder="'Select a country'" :uppercase-labels="true" :theme="theme" @update:model-value="onChangeCountryCode"
> >
<template #option="props"> <template #option="props">
<div class="flex items-center space-x-2 hover:text-white"> <div class="flex items-center space-x-2 hover:text-white">
@ -46,7 +46,7 @@
<script> <script>
import { inputProps, useFormInput } from './useFormInput.js' import { inputProps, useFormInput } from './useFormInput.js'
import InputWrapper from './components/InputWrapper.vue' import InputWrapper from './components/InputWrapper.vue'
import countryCodes from '../../../data/country_codes.json' import countryCodes from '~/data/country_codes.json'
import CountryFlag from 'vue-country-flag-next' import CountryFlag from 'vue-country-flag-next'
import parsePhoneNumber from 'libphonenumber-js' import parsePhoneNumber from 'libphonenumber-js'

View File

@ -59,7 +59,7 @@ export default {
this.useAlert.error('Something went wrong!') this.useAlert.error('Something went wrong!')
} }
}).catch((error) => { }).catch((error) => {
this.useAlert.error(error.response.data.message) this.useAlert.error(error.data.message)
}) })
} }
} }

View File

@ -145,7 +145,7 @@ export default {
this.fetchGeneratedForm(generationId) this.fetchGeneratedForm(generationId)
} }
}).catch(error => { }).catch(error => {
this.useAlert.error(error.response.data.message) this.useAlert.error(error.data.message)
this.state = 'default' this.state = 'default'
this.loading = false this.loading = false
}) })

View File

@ -83,7 +83,7 @@ export default {
opnFetch('/subscription/new/' + this.plan + '/' + (!this.yearly ? 'monthly' : 'yearly') + '/checkout/with-trial').then((data) => { opnFetch('/subscription/new/' + this.plan + '/' + (!this.yearly ? 'monthly' : 'yearly') + '/checkout/with-trial').then((data) => {
window.location = data.checkout_url window.location = data.checkout_url
}).catch((error) => { }).catch((error) => {
useAlert().error(error.response.data.message) useAlert().error(error.data.message)
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false
this.close() this.close()

View File

@ -41,7 +41,7 @@ const deleteAccount = () => {
// Redirect to login. // Redirect to login.
router.push({ name: 'login' }) router.push({ name: 'login' })
}).catch((error) => { }).catch((error) => {
useAlert().error(error.response.data.message) useAlert().error(error.data.message)
loading = false loading = false
}) })
} }

View File

@ -76,7 +76,7 @@ const impersonate = () => {
router.push({ name: 'home' }) router.push({ name: 'home' })
}).catch((error) => { }).catch((error) => {
console.error(error) console.error(error)
useAlert().error(error.response.data.message) useAlert().error(error.data.message)
loading.value = false loading.value = false
}) })
} }

View File

@ -41,7 +41,7 @@ const openBillingDashboard = () => {
const url = data.portal_url const url = data.portal_url
window.location = url window.location = url
}).catch((error) => { }).catch((error) => {
useAlert().error(error.response.data.message) useAlert().error(error.data.message)
}).finally(() => { }).finally(() => {
billingLoading = false billingLoading = false
}) })