This commit is contained in:
@@ -852,7 +852,25 @@ export default {
|
||||
window.$gz.errorHandler.handleFormError(error, vm);
|
||||
}
|
||||
}
|
||||
},
|
||||
async sendResetCode() {
|
||||
let vm = this;
|
||||
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
||||
try {
|
||||
let res = await window.$gz.api.post(
|
||||
`auth/request-reset-password/${vm.obj.id}`,
|
||||
null
|
||||
);
|
||||
if (res.error) {
|
||||
vm.formState.serverError = res.error;
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
}
|
||||
} catch (error) {
|
||||
window.$gz.errorHandler.handleFormError(error, vm);
|
||||
}
|
||||
}
|
||||
|
||||
//------more above here
|
||||
}
|
||||
};
|
||||
|
||||
@@ -920,6 +938,9 @@ async function clickHandler(menuItem) {
|
||||
});
|
||||
}
|
||||
break;
|
||||
case "sendreset":
|
||||
m.vm.sendResetCode();
|
||||
break;
|
||||
default:
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
@@ -1003,13 +1024,23 @@ function generateMenu(vm) {
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
if (vm.$route.params.recordid != 0) {
|
||||
menuOptions.menuItems.push({
|
||||
title: "DirectNotification",
|
||||
icon: "$ayiCommentAlt",
|
||||
key: FORM_KEY + ":directnotify",
|
||||
vm: vm
|
||||
});
|
||||
|
||||
menuOptions.menuItems.push({
|
||||
title: "DirectNotification",
|
||||
icon: "$ayiCommentAlt",
|
||||
key: FORM_KEY + ":directnotify",
|
||||
vm: vm
|
||||
});
|
||||
if (vm.rights.change) {
|
||||
menuOptions.menuItems.push({
|
||||
title: "SendPasswordResetCode",
|
||||
icon: null,
|
||||
key: FORM_KEY + ":sendreset",
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
}
|
||||
@@ -1069,7 +1100,8 @@ async function fetchTranslatedText(vm) {
|
||||
"MapUrlTemplate",
|
||||
"UserPhone1",
|
||||
"UserPhone2",
|
||||
"UserPageAddress"
|
||||
"UserPageAddress",
|
||||
"SendPasswordResetCode"
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1105,7 +1105,8 @@ async function fetchTranslatedText(vm) {
|
||||
"MapUrlTemplate",
|
||||
"UserPhone1",
|
||||
"UserPhone2",
|
||||
"UserPageAddress"
|
||||
"UserPageAddress",
|
||||
"SendPasswordResetCode"
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<v-form ref="form">
|
||||
{{ formState }}
|
||||
<v-row v-if="formState.ready">
|
||||
<v-col cols="12">
|
||||
<v-text-field
|
||||
|
||||
Reference in New Issue
Block a user