Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/User/Info.vue
<template> | <template> | ||||
<div class="container"> | <div class="container"> | ||||
<status-component v-if="user_id !== 'new'" :status="status" @status-update="statusUpdate"></status-component> | <status-component v-if="user_id !== 'new'" :status="status" @status-update="statusUpdate"></status-component> | ||||
<div class="card" id="user-info"> | <div class="card" id="user-info"> | ||||
<div class="card-body"> | <div class="card-body"> | ||||
<div class="card-title" v-if="user_id !== 'new'">{{ $t('user.title') }} | <div class="card-title" v-if="user_id === 'new'">{{ $t('user.new') }}</div> | ||||
<btn icon="trash-can" class="btn-outline-danger button-delete float-end" @click="showDeleteConfirmation()"> | <div class="card-title" v-else>{{ $t($route.name == 'settings' ? 'dashboard.myaccount' : 'user.title') }} | ||||
{{ $t('user.delete') }} | <btn v-if="isController" icon="trash-can" class="btn-outline-danger button-delete float-end" @click="$refs.deleteWarning.show()"> | ||||
{{ $t(isSelf ? 'user.profile-delete' : 'user.delete') }} | |||||
</btn> | </btn> | ||||
</div> | </div> | ||||
<div class="card-title" v-if="user_id === 'new'">{{ $t('user.new') }}</div> | |||||
<div class="card-text"> | <div class="card-text"> | ||||
<tabs class="mt-3" :tabs="user_id === 'new' ? ['form.general'] : ['form.general','form.settings']"></tabs> | <tabs class="mt-3" :tabs="tabs"></tabs> | ||||
<div class="tab-content"> | <div class="tab-content"> | ||||
<div class="tab-pane show active" id="general" role="tabpanel" aria-labelledby="tab-general"> | <div class="tab-pane active" id="general" role="tabpanel" aria-labelledby="tab-general"> | ||||
<form @submit.prevent="submit" class="card-body"> | <form @submit.prevent="submit" class="card-body"> | ||||
<div v-if="user_id !== 'new'" class="row plaintext mb-3"> | <div v-if="user_id !== 'new' && isController" class="row plaintext mb-3"> | ||||
<label for="status" class="col-sm-4 col-form-label">{{ $t('form.status') }}</label> | <label for="status" class="col-sm-4 col-form-label"> | ||||
<span>{{ $t('form.status') }}</span> | |||||
<span v-if="$route.name === 'settings'"> ({{ $t('user.custno') }})</span> | |||||
</label> | |||||
<div class="col-sm-8"> | <div class="col-sm-8"> | ||||
<span :class="$root.statusClass(user) + ' form-control-plaintext'" id="status">{{ $root.statusText(user) }}</span> | <span class="form-control-plaintext"> | ||||
<span id="status" :class="$root.statusClass(user)">{{ $root.statusText(user) }}</span> | |||||
<span id="userid" v-if="$route.name === 'settings'"> ({{ user_id }})</span> | |||||
</span> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="row mb-3"> | <div class="row mb-3" v-if="user_id === 'new'"> | ||||
<label for="first_name" class="col-sm-4 col-form-label">{{ $t('form.firstname') }}</label> | <label for="first_name" class="col-sm-4 col-form-label">{{ $t('form.firstname') }}</label> | ||||
<div class="col-sm-8"> | <div class="col-sm-8"> | ||||
<input type="text" class="form-control" id="first_name" v-model="user.first_name"> | <input type="text" class="form-control" id="first_name" v-model="user.first_name"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="row mb-3"> | <div class="row mb-3" v-if="user_id === 'new'"> | ||||
<label for="last_name" class="col-sm-4 col-form-label">{{ $t('form.lastname') }}</label> | <label for="last_name" class="col-sm-4 col-form-label">{{ $t('form.lastname') }}</label> | ||||
<div class="col-sm-8"> | <div class="col-sm-8"> | ||||
<input type="text" class="form-control" id="last_name" v-model="user.last_name"> | <input type="text" class="form-control" id="last_name" v-model="user.last_name"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="row mb-3"> | <div class="row mb-3" v-if="user_id === 'new'"> | ||||
<label for="organization" class="col-sm-4 col-form-label">{{ $t('user.org') }}</label> | <label for="organization" class="col-sm-4 col-form-label">{{ $t('user.org') }}</label> | ||||
<div class="col-sm-8"> | <div class="col-sm-8"> | ||||
<input type="text" class="form-control" id="organization" v-model="user.organization"> | <input type="text" class="form-control" id="organization" v-model="user.organization"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="row mb-3"> | <div class="row mb-3"> | ||||
<label for="email" class="col-sm-4 col-form-label">{{ $t('form.email') }}</label> | <label for="email" class="col-sm-4 col-form-label">{{ $t('form.email') }}</label> | ||||
<div class="col-sm-8"> | <div class="col-sm-8"> | ||||
<input type="text" class="form-control" id="email" :disabled="user_id !== 'new'" required v-model="user.email"> | <input type="text" class="form-control" id="email" :disabled="user_id !== 'new'" required v-model="user.email"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="row mb-3"> | <div class="row mb-3" v-if="isController"> | ||||
<label for="aliases-input" class="col-sm-4 col-form-label">{{ $t('user.email-aliases') }}</label> | <label for="aliases-input" class="col-sm-4 col-form-label">{{ $t('user.email-aliases') }}</label> | ||||
<div class="col-sm-8"> | <div class="col-sm-8"> | ||||
<list-input id="aliases" :list="user.aliases"></list-input> | <list-input id="aliases" :list="user.aliases"></list-input> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="row mb-3"> | <div class="row mb-3"> | ||||
<label for="password" class="col-sm-4 col-form-label">{{ $t('form.password') }}</label> | <label for="password" class="col-sm-4 col-form-label">{{ $t('form.password') }}</label> | ||||
<div class="col-sm-8"> | <div class="col-sm-8"> | ||||
<div v-if="!isSelf" class="btn-group w-100" role="group"> | <div v-if="!isSelf" class="btn-group w-100" role="group"> | ||||
<input type="checkbox" id="pass-mode-input" value="input" class="btn-check" @change="setPasswordMode" :checked="passwordMode == 'input'"> | <input type="checkbox" id="pass-mode-input" value="input" class="btn-check" @change="setPasswordMode" :checked="passwordMode == 'input'"> | ||||
<label class="btn btn-outline-secondary" for="pass-mode-input">{{ $t('user.pass-input') }}</label> | <label class="btn btn-outline-secondary" for="pass-mode-input">{{ $t('user.pass-input') }}</label> | ||||
<input type="checkbox" id="pass-mode-link" value="link" class="btn-check" @change="setPasswordMode"> | <input type="checkbox" id="pass-mode-link" value="link" class="btn-check" @change="setPasswordMode"> | ||||
<label class="btn btn-outline-secondary" for="pass-mode-link">{{ $t('user.pass-link') }}</label> | <label class="btn btn-outline-secondary" for="pass-mode-link">{{ $t('user.pass-link') }}</label> | ||||
</div> | </div> | ||||
<password-input v-if="passwordMode == 'input'" :class="isSelf ? '' : 'mt-2'" v-model="user"></password-input> | <password-input v-if="passwordMode == 'input'" :class="isSelf ? '' : 'mt-2'" v-model="user"></password-input> | ||||
<div id="password-link" v-if="passwordMode == 'link' || user.passwordLinkCode" class="mt-2"> | <div id="password-link" v-if="isController && (passwordMode == 'link' || user.passwordLinkCode)" class="mt-2"> | ||||
<span>{{ $t('user.pass-link-label') }}</span> <code>{{ passwordLink }}</code> | <span>{{ $t('user.pass-link-label') }}</span> <code>{{ passwordLink }}</code> | ||||
<span class="d-inline-block"> | <span class="d-inline-block"> | ||||
<btn class="btn-link p-1" :icon="['far', 'clipboard']" :title="$t('btn.copy')" @click="passwordLinkCopy"></btn> | <btn class="btn-link p-1" :icon="['far', 'clipboard']" :title="$t('btn.copy')" @click="passwordLinkCopy"></btn> | ||||
<btn v-if="user.passwordLinkCode" class="btn-link text-danger p-1" icon="trash-can" :title="$t('btn.delete')" @click="passwordLinkDelete"></btn> | <btn v-if="user.passwordLinkCode" class="btn-link text-danger p-1" icon="trash-can" :title="$t('btn.delete')" @click="passwordLinkDelete"></btn> | ||||
</span> | </span> | ||||
<div v-if="!user.passwordLinkCode" class="form-text m-0">{{ $t('user.pass-link-hint') }}</div> | <div v-if="!user.passwordLinkCode" class="form-text m-0">{{ $t('user.pass-link-hint') }}</div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div v-if="user_id === 'new'" id="user-packages" class="row mb-3"> | <div v-if="user_id === 'new'" id="user-packages" class="row mb-3"> | ||||
<label class="col-sm-4 col-form-label">{{ $t('user.package') }}</label> | <label class="col-sm-4 col-form-label">{{ $t('user.package') }}</label> | ||||
<package-select class="col-sm-8 pt-sm-1"></package-select> | <package-select class="col-sm-8 pt-sm-1"></package-select> | ||||
</div> | </div> | ||||
<div v-if="user_id !== 'new'" id="user-skus" class="row mb-3"> | <div v-if="user_id !== 'new' && isController" id="user-skus" class="row mb-3"> | ||||
<label class="col-sm-4 col-form-label">{{ $t('form.subscriptions') }}</label> | <label class="col-sm-4 col-form-label">{{ $t('form.subscriptions') }}</label> | ||||
<subscription-select v-if="user.id" class="col-sm-8 pt-sm-1" :object="user" ref="skus"></subscription-select> | <subscription-select v-if="user.id" class="col-sm-8 pt-sm-1" :object="user" ref="skus"></subscription-select> | ||||
</div> | </div> | ||||
<btn class="btn-primary" type="submit" icon="check">{{ $t('btn.submit') }}</btn> | <btn class="btn-primary" type="submit" icon="check">{{ $t('btn.submit') }}</btn> | ||||
</form> | </form> | ||||
</div> | </div> | ||||
<div class="tab-pane" id="settings" role="tabpanel" aria-labelledby="tab-settings"> | <div v-if="isController" class="tab-pane" id="settings" role="tabpanel" aria-labelledby="tab-settings"> | ||||
<form @submit.prevent="submitSettings" class="card-body"> | <form @submit.prevent="submitSettings" class="card-body"> | ||||
<div class="row checkbox mb-3"> | <div class="row checkbox mb-3"> | ||||
<label for="greylist_enabled" class="col-sm-4 col-form-label">{{ $t('user.greylisting') }}</label> | <label for="greylist_enabled" class="col-sm-4 col-form-label">{{ $t('user.greylisting') }}</label> | ||||
<div class="col-sm-8 pt-2"> | <div class="col-sm-8 pt-2"> | ||||
<input type="checkbox" id="greylist_enabled" name="greylist_enabled" value="1" class="form-check-input d-block mb-2" :checked="user.config.greylist_enabled"> | <input type="checkbox" id="greylist_enabled" name="greylist_enabled" value="1" class="form-check-input d-block mb-2" :checked="user.config.greylist_enabled"> | ||||
<small id="greylisting-hint" class="text-muted"> | <small id="greylisting-hint" class="text-muted"> | ||||
{{ $t('user.greylisting-text') }} | {{ $t('user.greylisting-text') }} | ||||
</small> | </small> | ||||
Show All 21 Lines | <div class="container"> | ||||
<small id="geolimit-hint" class="text-muted"> | <small id="geolimit-hint" class="text-muted"> | ||||
{{ $t('user.geolimit-text') }} | {{ $t('user.geolimit-text') }} | ||||
</small> | </small> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<btn class="btn-primary" type="submit" icon="check">{{ $t('btn.submit') }}</btn> | <btn class="btn-primary" type="submit" icon="check">{{ $t('btn.submit') }}</btn> | ||||
</form> | </form> | ||||
</div> | </div> | ||||
<div class="tab-pane" id="personal" role="tabpanel" aria-labelledby="tab-personal"> | |||||
<form @submit.prevent="submitPersonalSettings" class="card-body"> | |||||
<div class="row mb-3"> | |||||
<label for="first_name" class="col-sm-4 col-form-label">{{ $t('form.firstname') }}</label> | |||||
<div class="col-sm-8"> | |||||
<input type="text" class="form-control" id="first_name" v-model="user.first_name"> | |||||
</div> | |||||
</div> | |||||
<div class="row mb-3"> | |||||
<label for="last_name" class="col-sm-4 col-form-label">{{ $t('form.lastname') }}</label> | |||||
<div class="col-sm-8"> | |||||
<input type="text" class="form-control" id="last_name" v-model="user.last_name"> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="row mb-3"> | |||||
<label for="organization" class="col-sm-4 col-form-label">{{ $t('user.org') }}</label> | |||||
<div class="col-sm-8"> | |||||
<input type="text" class="form-control" id="organization" v-model="user.organization"> | |||||
</div> | |||||
</div> | |||||
<div class="row mb-3"> | |||||
<label for="phone" class="col-sm-4 col-form-label">{{ $t('form.phone') }}</label> | |||||
<div class="col-sm-8"> | |||||
<input type="text" class="form-control" id="phone" v-model="user.phone"> | |||||
</div> | |||||
</div> | |||||
<div class="row mb-3"> | |||||
<label for="external_email" class="col-sm-4 col-form-label">{{ $t('user.ext-email') }}</label> | |||||
<div class="col-sm-8"> | |||||
<input type="text" class="form-control" id="external_email" v-model="user.external_email"> | |||||
</div> | |||||
</div> | |||||
<div class="row mb-3"> | |||||
<label for="billing_address" class="col-sm-4 col-form-label">{{ $t('user.address') }}</label> | |||||
<div class="col-sm-8"> | |||||
<textarea class="form-control" id="billing_address" rows="3" v-model="user.billing_address"></textarea> | |||||
</div> | |||||
</div> | |||||
<div class="row mb-3"> | |||||
<label for="country" class="col-sm-4 col-form-label">{{ $t('user.country') }}</label> | |||||
<div class="col-sm-8"> | |||||
<select class="form-select" id="country" v-model="user.country"> | |||||
<option value="">-</option> | |||||
<option v-for="(item, code) in countries" :value="code" :key="code">{{ item[1] }}</option> | |||||
</select> | |||||
</div> | |||||
</div> | |||||
<btn class="btn-primary button-submit mt-2" type="submit" icon="check">{{ $t('btn.submit') }}</btn> | |||||
</form> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<modal-dialog id="delete-warning" ref="deleteWarning" :buttons="['delete']" :cancel-focus="true" @click="deleteUser()" | </div> | ||||
:title="$t('user.delete-email', { email: user.email })" | </div> | ||||
</div> | |||||
<modal-dialog id="delete-warning" ref="deleteWarning" :buttons="[deleteButton]" :cancel-focus="true" @click="deleteUser()" | |||||
:title="$t(isSelf ? 'user.profile-delete-title' : 'user.delete-email', { email: user.email })" | |||||
> | > | ||||
<p>{{ $t('user.delete-text') }}</p> | <div v-if="isSelf"> | ||||
<p>{{ $t('user.profile-delete-text1') }} <strong>{{ $t('user.profile-delete-warning') }}</strong>.</p> | |||||
<p>{{ $t('user.profile-delete-text2') }}</p> | |||||
<p v-if="supportEmail" v-html="$t('user.profile-delete-support', { href: 'mailto:' + supportEmail, email: supportEmail })"></p> | |||||
<p>{{ $t('user.profile-delete-contact', { app: $root.appName }) }}</p> | |||||
</div> | |||||
<p v-else>{{ $t('user.delete-text') }}</p> | |||||
</modal-dialog> | </modal-dialog> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import CountrySelect from '../Widgets/CountrySelect' | import CountrySelect from '../Widgets/CountrySelect' | ||||
import ListInput from '../Widgets/ListInput' | import ListInput from '../Widgets/ListInput' | ||||
import ModalDialog from '../Widgets/ModalDialog' | import ModalDialog from '../Widgets/ModalDialog' | ||||
Show All 15 Lines | export default { | ||||
ModalDialog, | ModalDialog, | ||||
PackageSelect, | PackageSelect, | ||||
PasswordInput, | PasswordInput, | ||||
StatusComponent, | StatusComponent, | ||||
SubscriptionSelect | SubscriptionSelect | ||||
}, | }, | ||||
data() { | data() { | ||||
return { | return { | ||||
countries: window.config.countries, | |||||
isSelf: false, | |||||
passwordLinkCode: '', | passwordLinkCode: '', | ||||
passwordMode: '', | passwordMode: '', | ||||
user_id: null, | user_id: null, | ||||
user: { aliases: [], config: [] }, | user: { aliases: [], config: [] }, | ||||
status: {} | supportEmail: window.config['app.support_email'], | ||||
status: {}, | |||||
successRoute: { name: 'users' } | |||||
} | } | ||||
}, | }, | ||||
computed: { | computed: { | ||||
isSelf: function () { | deleteButton: function () { | ||||
return this.user_id == this.$root.authInfo.id | return { | ||||
className: 'btn-danger modal-action', | |||||
dismiss: 'modal', | |||||
label: this.isSelf ? 'user.profile-delete' : 'btn.delete', | |||||
icon: 'trash-can' | |||||
} | |||||
}, | |||||
isController: function () { | |||||
return this.$root.hasPermission('users') | |||||
}, | }, | ||||
passwordLink: function () { | passwordLink: function () { | ||||
return this.$root.appUrl + '/password-reset/' + this.passwordLinkCode | return this.$root.appUrl + '/password-reset/' + this.passwordLinkCode | ||||
}, | |||||
tabs: function () { | |||||
let tabs = ['form.general'] | |||||
if (this.user_id === 'new') { | |||||
return tabs | |||||
} | |||||
if (this.isController) { | |||||
tabs.push('form.settings') | |||||
} | |||||
tabs.push('form.personal') | |||||
return tabs | |||||
} | } | ||||
}, | }, | ||||
created() { | created() { | ||||
if (this.$route.name === 'settings') { | |||||
this.user_id = this.$root.authInfo.id | |||||
this.successRoute = null | |||||
} else { | |||||
this.user_id = this.$route.params.user | this.user_id = this.$route.params.user | ||||
} | |||||
this.isSelf = this.user_id == this.$root.authInfo.id | |||||
if (this.user_id !== 'new') { | if (this.user_id !== 'new') { | ||||
axios.get('/api/v4/users/' + this.user_id, { loader: true }) | axios.get('/api/v4/users/' + this.user_id, { loader: true }) | ||||
.then(response => { | .then(response => { | ||||
this.user = response.data | this.user = { ...response.data, ...response.data.settings } | ||||
this.user.first_name = response.data.settings.first_name | |||||
this.user.last_name = response.data.settings.last_name | |||||
this.user.organization = response.data.settings.organization | |||||
this.status = response.data.statusInfo | this.status = response.data.statusInfo | ||||
this.passwordLinkCode = this.user.passwordLinkCode | this.passwordLinkCode = this.user.passwordLinkCode | ||||
}) | }) | ||||
.catch(this.$root.errorHandler) | .catch(this.$root.errorHandler) | ||||
if (this.isSelf) { | if (this.isSelf) { | ||||
this.passwordMode = 'input' | this.passwordMode = 'input' | ||||
} | } | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | export default { | ||||
} else if (mode == 'input') { | } else if (mode == 'input') { | ||||
$('#password').focus(); | $('#password').focus(); | ||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
submit() { | submit() { | ||||
this.$root.clearFormValidation($('#general form')) | this.$root.clearFormValidation($('#general form')) | ||||
let props = this.isController ? ['aliases'] : [] | |||||
if (this.user_id === 'new') { | |||||
props = props.concat(['email', 'first_name', 'last_name', 'organization']) | |||||
} | |||||
let method = 'post' | let method = 'post' | ||||
let location = '/api/v4/users' | let location = '/api/v4/users' | ||||
let post = this.$root.pick(this.user, ['aliases', 'email', 'first_name', 'last_name', 'organization']) | let post = this.$root.pick(this.user, props) | ||||
if (this.user_id !== 'new') { | if (this.user_id !== 'new') { | ||||
method = 'put' | method = 'put' | ||||
location += '/' + this.user_id | location += '/' + this.user_id | ||||
if (this.$refs.skus) { | |||||
post.skus = this.$refs.skus.getSkus() | post.skus = this.$refs.skus.getSkus() | ||||
} | |||||
} else { | } else { | ||||
post.package = $('#user-packages input:checked').val() | post.package = $('#user-packages input:checked').val() | ||||
} | } | ||||
if (this.passwordMode == 'link' && this.passwordLinkCode) { | if (this.passwordMode == 'link' && this.passwordLinkCode) { | ||||
post.passwordLinkCode = this.passwordLinkCode | post.passwordLinkCode = this.passwordLinkCode | ||||
} else if (this.passwordMode == 'input') { | } else if (this.passwordMode == 'input') { | ||||
post.password = this.user.password | post.password = this.user.password | ||||
post.password_confirmation = this.user.password_confirmation | post.password_confirmation = this.user.password_confirmation | ||||
} | } | ||||
axios[method](location, post) | axios[method](location, post) | ||||
.then(response => { | .then(response => { | ||||
if (response.data.statusInfo) { | if (response.data.statusInfo) { | ||||
this.$root.authInfo.statusInfo = response.data.statusInfo | this.$root.authInfo.statusInfo = response.data.statusInfo | ||||
} | } | ||||
this.$toast.success(response.data.message) | this.$toast.success(response.data.message) | ||||
this.$router.push({ name: 'users' }) | if (this.successRoute) { | ||||
this.$router.push(this.successRoute) | |||||
} | |||||
}) | |||||
}, | |||||
submitPersonalSettings() { | |||||
this.$root.clearFormValidation($('#personal form')) | |||||
let post = this.$root.pick(this.user, ['first_name', 'last_name', 'organization', 'phone', | |||||
'country', 'external_email', 'billing_address']) | |||||
axios.put('/api/v4/users' + '/' + this.user_id, post) | |||||
.then(response => { | |||||
if (response.data.statusInfo) { | |||||
this.$root.authInfo.statusInfo = response.data.statusInfo | |||||
} | |||||
this.$toast.success(response.data.message) | |||||
if (this.successRoute) { | |||||
this.$router.push(this.successRoute) | |||||
} | |||||
}) | }) | ||||
}, | }, | ||||
submitSettings() { | submitSettings() { | ||||
this.$root.clearFormValidation($('#settings form')) | this.$root.clearFormValidation($('#settings form')) | ||||
let post = this.$root.pick(this.user.config, ['limit_geo']) | let post = this.$root.pick(this.user.config, ['limit_geo']) | ||||
const checklist = ['greylist_enabled', 'guam_enabled'] | const checklist = ['greylist_enabled', 'guam_enabled'] | ||||
Show All 12 Lines | export default { | ||||
this.user = Object.assign({}, this.user, user) | this.user = Object.assign({}, this.user, user) | ||||
}, | }, | ||||
deleteUser() { | deleteUser() { | ||||
// Delete the user from the confirm dialog | // Delete the user from the confirm dialog | ||||
axios.delete('/api/v4/users/' + this.user_id) | axios.delete('/api/v4/users/' + this.user_id) | ||||
.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) | ||||
this.$router.push({ name: 'users' }) | |||||
} | if (this.isSelf) { | ||||
}) | this.$root.logoutUser() | ||||
}, | |||||
showDeleteConfirmation() { | |||||
if (this.user_id == this.$root.authInfo.id) { | |||||
// Deleting self, redirect to /profile/delete page | |||||
this.$router.push({ name: 'profile-delete' }) | |||||
} else { | } else { | ||||
// Display the warning | this.$router.push(this.successRoute) | ||||
this.$refs.deleteWarning.show() | |||||
} | } | ||||
} | } | ||||
}) | |||||
} | |||||
} | } | ||||
} | } | ||||
</script> | </script> |