From 684215fc4613eb9e24f98775bc713eef916529d5 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 9 Sep 2024 09:59:22 +0200 Subject: [PATCH 1/2] feat(AccountBasicData): add twoFactorFk --- src/pages/Account/Card/AccountBasicData.vue | 9 ++++++++- src/pages/Account/locale/en.yml | 1 + src/pages/Account/locale/es.yml | 1 + test/cypress/integration/outLogin/twoFactor.spec.js | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/pages/Account/Card/AccountBasicData.vue b/src/pages/Account/Card/AccountBasicData.vue index f38299f9e..b223c4bc0 100644 --- a/src/pages/Account/Card/AccountBasicData.vue +++ b/src/pages/Account/Card/AccountBasicData.vue @@ -24,7 +24,7 @@ watch( diff --git a/src/pages/Account/locale/en.yml b/src/pages/Account/locale/en.yml index 3cf861fb2..fe8707eb8 100644 --- a/src/pages/Account/locale/en.yml +++ b/src/pages/Account/locale/en.yml @@ -35,6 +35,7 @@ account: willDeactivated: User will be deactivated activated: User activated! deactivated: User deactivated! + twoFactor: Two factor actions: setPassword: Set password disableAccount: diff --git a/src/pages/Account/locale/es.yml b/src/pages/Account/locale/es.yml index b53a0153c..112ffe9cc 100644 --- a/src/pages/Account/locale/es.yml +++ b/src/pages/Account/locale/es.yml @@ -32,6 +32,7 @@ account: activated: ¡Usuario activado! deactivated: ¡Usuario desactivado! newUser: Nuevo usuario + twoFactor: Doble factor privileges: delegate: Puede delegar privilegios actions: diff --git a/test/cypress/integration/outLogin/twoFactor.spec.js b/test/cypress/integration/outLogin/twoFactor.spec.js index 4d8561f0f..259ddfc0f 100755 --- a/test/cypress/integration/outLogin/twoFactor.spec.js +++ b/test/cypress/integration/outLogin/twoFactor.spec.js @@ -12,7 +12,7 @@ describe('Two Factor', () => { cy.request( 'PATCH', `http://localhost:3000/api/VnUsers/${userId}/update-user?access_token=DEFAULT_TOKEN`, - { twoFactor: 'email' } + { twoFactorFk: 'email' } ); }); From 21a7fafba5c63a3238b248a5b1b6832ba32b5bb3 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 18 Sep 2024 09:57:21 +0200 Subject: [PATCH 2/2] feat: create VnSelectEnum and add in AccountBasicData and ClaimBasicData --- src/components/common/VnSelectEnum.vue | 52 ++++++++++++++ src/pages/Account/Card/AccountBasicData.vue | 9 ++- src/pages/Claim/Card/ClaimBasicData.vue | 72 ++++--------------- .../integration/outLogin/twoFactor.spec.js | 2 +- 4 files changed, 71 insertions(+), 64 deletions(-) create mode 100644 src/components/common/VnSelectEnum.vue diff --git a/src/components/common/VnSelectEnum.vue b/src/components/common/VnSelectEnum.vue new file mode 100644 index 000000000..b9db67c37 --- /dev/null +++ b/src/components/common/VnSelectEnum.vue @@ -0,0 +1,52 @@ + + + diff --git a/src/pages/Account/Card/AccountBasicData.vue b/src/pages/Account/Card/AccountBasicData.vue index b223c4bc0..f1cdaf9df 100644 --- a/src/pages/Account/Card/AccountBasicData.vue +++ b/src/pages/Account/Card/AccountBasicData.vue @@ -2,6 +2,7 @@ import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import VnSelect from 'src/components/common/VnSelect.vue'; +import VnSelectEnum from 'src/components/common/VnSelectEnum.vue'; import FormModel from 'components/FormModel.vue'; import VnInput from 'src/components/common/VnInput.vue'; import { ref, watch } from 'vue'; @@ -43,9 +44,11 @@ watch( option-value="code" option-label="code" /> - { - const search = value.toLowerCase(); - - if (value === '') return claimStatesCopy.value; - - return options.value.filter((row) => { - const description = row.description.toLowerCase(); - - return description.indexOf(search) > -1; - }); - }, -};