bfg-common 1.4.320 → 1.4.321
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePassword.vue
CHANGED
|
@@ -44,13 +44,19 @@ const form = ref<UI_I_ChangePasswordForm>({
|
|
|
44
44
|
confirm_password: '',
|
|
45
45
|
})
|
|
46
46
|
const onChangePassword = async (): Promise<void> => {
|
|
47
|
-
const {
|
|
47
|
+
const { current_password, new_password } = form.value
|
|
48
48
|
|
|
49
|
+
|
|
50
|
+
console.log(33333333);
|
|
51
|
+
const asd = true
|
|
52
|
+
if(asd) {
|
|
53
|
+
return
|
|
54
|
+
}
|
|
49
55
|
onHideModal()
|
|
50
56
|
|
|
51
57
|
const sendData: UI_I_ChangePasswordBodyRequest = {
|
|
52
|
-
current_password
|
|
53
|
-
new_password
|
|
58
|
+
current_password,
|
|
59
|
+
new_password,
|
|
54
60
|
}
|
|
55
61
|
|
|
56
62
|
let url = ''
|
|
@@ -69,13 +75,15 @@ const onChangePassword = async (): Promise<void> => {
|
|
|
69
75
|
})
|
|
70
76
|
|
|
71
77
|
if (error.value?.data && error.value.data.error_code !== 0) {
|
|
78
|
+
const errorText = error.value.data?.error_message || error.value.data
|
|
79
|
+
|
|
72
80
|
$store.dispatch('main/A_SHOW_NOTIFICATION', {
|
|
73
81
|
status: 'error',
|
|
74
82
|
headline: localization.value.common.operationFailed,
|
|
75
83
|
messages: [
|
|
76
84
|
{
|
|
77
|
-
title:
|
|
78
|
-
descriptions: [
|
|
85
|
+
title: localization.value.common.error,
|
|
86
|
+
descriptions: [errorText],
|
|
79
87
|
},
|
|
80
88
|
],
|
|
81
89
|
})
|
package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePasswordNew.vue
CHANGED
|
@@ -78,7 +78,6 @@ const modelLocal = defineModel<UI_I_ChangePasswordForm>({ required: true })
|
|
|
78
78
|
|
|
79
79
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
80
80
|
|
|
81
|
-
|
|
82
81
|
const alertErrorText = ref<string>('')
|
|
83
82
|
const initValidationFields = ref<UI_I_InitialValidationFields>({
|
|
84
83
|
currentPassword: false,
|
|
@@ -142,11 +141,7 @@ const onSubmit = (): void => {
|
|
|
142
141
|
)
|
|
143
142
|
}
|
|
144
143
|
|
|
145
|
-
|
|
146
|
-
if (notReady) {
|
|
147
|
-
return
|
|
148
|
-
}
|
|
149
|
-
emits('change-password')
|
|
144
|
+
!isFieldValid && !alertErrorText.value && emits('change-password')
|
|
150
145
|
}
|
|
151
146
|
const onHideModal = (): void => {
|
|
152
147
|
emits('hide')
|