This commit is contained in:
@@ -101,6 +101,41 @@
|
||||
></v-select>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-text-field
|
||||
name="username"
|
||||
id="username"
|
||||
v-model="login"
|
||||
:readonly="formState.readOnly"
|
||||
prepend-icon="fa-user"
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
spellcheck="false"
|
||||
:label="$ay.t('NewLogin')"
|
||||
:error-messages="form().serverErrors(this, 'login')"
|
||||
ref="login"
|
||||
@input="fieldValueChanged('login')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-text-field
|
||||
name="password"
|
||||
id="password"
|
||||
v-model="password"
|
||||
:readonly="formState.readOnly"
|
||||
:append-outer-icon="reveal ? 'fa-eye' : 'fa-eye-slash'"
|
||||
prepend-icon="fa-key"
|
||||
:label="$ay.t('NewPassword')"
|
||||
:type="reveal ? 'text' : 'password'"
|
||||
:error-messages="form().serverErrors(this, 'password')"
|
||||
ref="password"
|
||||
@input="fieldValueChanged('password')"
|
||||
@click:append-outer="reveal = !reveal"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
|
||||
<v-textarea
|
||||
v-model="obj.notes"
|
||||
@@ -267,6 +302,9 @@ export default {
|
||||
tags: [],
|
||||
lastLogin: null
|
||||
},
|
||||
login: null,
|
||||
password: null,
|
||||
reveal: true,
|
||||
formState: {
|
||||
ready: false,
|
||||
dirty: false,
|
||||
@@ -389,12 +427,22 @@ export default {
|
||||
let vm = this;
|
||||
if (vm.canSave) {
|
||||
vm.formState.loading = true;
|
||||
let url = API_BASE_URL; // + vm.$route.params.recordid;
|
||||
let url = API_BASE_URL;
|
||||
|
||||
try {
|
||||
//clear any errors vm might be around from previous submit
|
||||
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
||||
let res = await window.$gz.api.upsert(url, vm.obj);
|
||||
|
||||
//add in password and login if changed
|
||||
let submitObject = vm.obj;
|
||||
if (vm.password != null && vm.password != "") {
|
||||
submitObject.password = vm.password;
|
||||
}
|
||||
if (vm.login != null && vm.login != "") {
|
||||
submitObject.login = vm.login;
|
||||
}
|
||||
|
||||
let res = await window.$gz.api.upsert(url, submitObject);
|
||||
vm.formState.loading = false;
|
||||
if (res.error) {
|
||||
vm.formState.serverError = res.error;
|
||||
@@ -654,6 +702,8 @@ async function fetchTranslatedText(vm) {
|
||||
"User",
|
||||
"Name",
|
||||
"UserEmployeeNumber",
|
||||
"NewLogin",
|
||||
"NewPassword",
|
||||
"AuthorizationRoles",
|
||||
"UserNotes",
|
||||
"UserType",
|
||||
|
||||
Reference in New Issue
Block a user