From b93885ac4ea92d5326c182a14a7daa17c7351a29 Mon Sep 17 00:00:00 2001 From: Lera24 Date: Wed, 1 May 2024 17:50:34 +0300 Subject: [PATCH 1/2] fix: add hint and fix validation for password input[WTEL-4344] --- src/app/components/utils/generate-password-input.vue | 5 ++++- src/app/locale/en/en.js | 1 + src/app/locale/ru/ru.js | 1 + src/app/locale/ua/ua.js | 1 + .../eleven-labs/opened-cognitive-profile-eleven-labs.vue | 1 + .../microsoft/opened-cognitive-profile-microsoft.vue | 1 + .../components/opened-cognitive-profile.vue | 2 +- .../components/opened-email-profile-general.vue | 1 + .../modules/storage/components/opened-storage-s3.vue | 1 + .../modules/storage/components/opened-storage.vue | 4 ++-- .../components/opened-register-sip-gateway-general.vue | 1 + .../modules/gateways/components/opened-sip-gateway.vue | 4 ++-- 12 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/app/components/utils/generate-password-input.vue b/src/app/components/utils/generate-password-input.vue index be1c00ec5..fbb98fe49 100644 --- a/src/app/components/utils/generate-password-input.vue +++ b/src/app/components/utils/generate-password-input.vue @@ -3,7 +3,7 @@ diff --git a/src/modules/integrations/modules/cognitive-profiles/components/microsoft/opened-cognitive-profile-microsoft.vue b/src/modules/integrations/modules/cognitive-profiles/components/microsoft/opened-cognitive-profile-microsoft.vue index f50993d94..c1404776d 100644 --- a/src/modules/integrations/modules/cognitive-profiles/components/microsoft/opened-cognitive-profile-microsoft.vue +++ b/src/modules/integrations/modules/cognitive-profiles/components/microsoft/opened-cognitive-profile-microsoft.vue @@ -37,6 +37,7 @@ !!this.id) }, region: { required }, }, }, diff --git a/src/modules/integrations/modules/email-profiles/components/opened-email-profile-general.vue b/src/modules/integrations/modules/email-profiles/components/opened-email-profile-general.vue index c7fd91301..fcf51a553 100644 --- a/src/modules/integrations/modules/email-profiles/components/opened-email-profile-general.vue +++ b/src/modules/integrations/modules/email-profiles/components/opened-email-profile-general.vue @@ -152,6 +152,7 @@ v-if="isPlainAuthType" :value="itemInstance.password" :disabled="disableUserInput" + :hint="$t('objects.integrations.emailProfiles.passwordInfo')" @input="setItemProp({ prop: 'password', value: $event })" /> diff --git a/src/modules/integrations/modules/storage/components/opened-storage-s3.vue b/src/modules/integrations/modules/storage/components/opened-storage-s3.vue index 5f97fc426..40632c57e 100644 --- a/src/modules/integrations/modules/storage/components/opened-storage-s3.vue +++ b/src/modules/integrations/modules/storage/components/opened-storage-s3.vue @@ -17,6 +17,7 @@ import { useVuelidate } from '@vuelidate/core'; -import { minValue, required } from '@vuelidate/validators'; +import { minValue, required, requiredUnless } from '@vuelidate/validators'; import openedObjectMixin from '../../../../../app/mixins/objectPagesMixins/openedObjectMixin/openedObjectMixin'; import storageMixin from '../mixins/storageMixin'; import Storage from '../store/_internals/enums/Storage.enum'; @@ -84,7 +84,7 @@ export default { itemInstance: { properties: { keyId: { required }, - accessKey: { required }, + accessKey: { required: requiredUnless(() => !!this.id) }, bucketName: { required }, region: { required }, endpoint: { required }, diff --git a/src/modules/routing/modules/gateways/components/opened-register-sip-gateway-general.vue b/src/modules/routing/modules/gateways/components/opened-register-sip-gateway-general.vue index 92d35a331..64c832a95 100644 --- a/src/modules/routing/modules/gateways/components/opened-register-sip-gateway-general.vue +++ b/src/modules/routing/modules/gateways/components/opened-register-sip-gateway-general.vue @@ -36,6 +36,7 @@ import { useVuelidate } from '@vuelidate/core'; -import { helpers, maxValue, minValue, numeric, required } from '@vuelidate/validators'; +import { helpers, maxValue, minValue, numeric, required, requiredUnless } from '@vuelidate/validators'; import { mapActions } from 'vuex'; import openedObjectMixin from '../../../../../app/mixins/objectPagesMixins/openedObjectMixin/openedObjectMixin'; import { gatewayHostValidator, ipValidator, sipAccountValidator } from '../../../../../app/utils/validators'; @@ -67,7 +67,7 @@ export default { itemInstance: { account: { sipAccountValidator, required }, proxy: { gatewayHostValidator, required }, - password: { required }, + password: { required: requiredUnless(() => !!this.id) }, expires: { numeric, minValue: minValue(32), From d35dcf058df1b24677fa9caa4342d35df718aaf3 Mon Sep 17 00:00:00 2001 From: Lera24 Date: Wed, 8 May 2024 15:12:05 +0300 Subject: [PATCH 2/2] fix: add changed locales[WTEL-4344] --- src/app/components/utils/generate-password-input.vue | 5 +---- src/app/locale/en/en.js | 3 +-- src/app/locale/kz/kz.js | 1 - src/app/locale/ru/ru.js | 3 +-- src/app/locale/ua/ua.js | 3 +-- .../eleven-labs/opened-cognitive-profile-eleven-labs.vue | 2 +- .../microsoft/opened-cognitive-profile-microsoft.vue | 2 +- .../components/opened-email-profile-general.vue | 1 - .../modules/storage/components/opened-storage-s3.vue | 2 +- .../components/opened-register-sip-gateway-general.vue | 1 - 10 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/app/components/utils/generate-password-input.vue b/src/app/components/utils/generate-password-input.vue index fbb98fe49..be1c00ec5 100644 --- a/src/app/components/utils/generate-password-input.vue +++ b/src/app/components/utils/generate-password-input.vue @@ -3,7 +3,7 @@ diff --git a/src/modules/integrations/modules/cognitive-profiles/components/microsoft/opened-cognitive-profile-microsoft.vue b/src/modules/integrations/modules/cognitive-profiles/components/microsoft/opened-cognitive-profile-microsoft.vue index c1404776d..ae0c968b1 100644 --- a/src/modules/integrations/modules/cognitive-profiles/components/microsoft/opened-cognitive-profile-microsoft.vue +++ b/src/modules/integrations/modules/cognitive-profiles/components/microsoft/opened-cognitive-profile-microsoft.vue @@ -37,7 +37,7 @@ diff --git a/src/modules/integrations/modules/storage/components/opened-storage-s3.vue b/src/modules/integrations/modules/storage/components/opened-storage-s3.vue index 40632c57e..229d44933 100644 --- a/src/modules/integrations/modules/storage/components/opened-storage-s3.vue +++ b/src/modules/integrations/modules/storage/components/opened-storage-s3.vue @@ -17,7 +17,7 @@