This commit is contained in:
parent
6983245d7d
commit
e90b78c4c5
|
@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
import useNotify from 'src/composables/useNotify';
|
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import CustomerChangePassword from 'src/pages/Customer/components/CustomerChangePassword.vue';
|
import CustomerChangePassword from 'src/pages/Customer/components/CustomerChangePassword.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
|
@ -13,7 +12,6 @@ const { t } = useI18n();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const canChangePassword = ref(0);
|
const canChangePassword = ref(0);
|
||||||
const { notify } = useNotify();
|
|
||||||
|
|
||||||
const filter = computed(() => {
|
const filter = computed(() => {
|
||||||
return {
|
return {
|
||||||
|
@ -32,13 +30,8 @@ const showChangePasswordDialog = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
async function hasCustomerRole() {
|
async function hasCustomerRole() {
|
||||||
try {
|
const { data } = await axios(`Clients/${route.params.id}/hasCustomerRole`);
|
||||||
canChangePassword.value = (
|
canChangePassword.value = data;
|
||||||
await axios(`Clients/${route.params.id}/hasCustomerRole`)
|
|
||||||
).data;
|
|
||||||
} catch (e) {
|
|
||||||
notify('errors.writeRequest', 'negative');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue