diff --git a/src/components/pages/donation_form/AddressFormErrorSummaries.vue b/src/components/pages/donation_form/AddressFormErrorSummaries.vue index 31d3940ed..f7c382361 100644 --- a/src/components/pages/donation_form/AddressFormErrorSummaries.vue +++ b/src/components/pages/donation_form/AddressFormErrorSummaries.vue @@ -4,10 +4,10 @@ :is-visible="showErrorSummary" :items="[ { - validity: store.getters[ 'bankdata/bankDataIsInvalid' ] ? Validity.INVALID : Validity.VALID, + validity: bankDataValidity, message: $t( 'donation_form_payment_bankdata_error' ), focusElement: 'account-number', - scrollElement: 'iban-scroll-target' + scrollElement: 'account-number-scroll-target' }, { validity: store.state.address.validity.addressType, @@ -70,10 +70,10 @@ :is-visible="showErrorSummary" :items="[ { - validity: store.getters[ 'bankdata/bankDataIsInvalid' ] ? Validity.INVALID : Validity.VALID, + validity: bankDataValidity, message: $t( 'donation_form_payment_bankdata_error' ), focusElement: 'account-number', - scrollElement: 'iban-scroll-target' + scrollElement: 'account-number-scroll-target' }, { validity: store.state.address.validity.companyName, @@ -118,10 +118,10 @@ :is-visible="showErrorSummary" :items="[ { - validity: store.getters[ 'bankdata/bankDataIsInvalid' ] ? Validity.INVALID : Validity.VALID, + validity: bankDataValidity, message: $t( 'donation_form_payment_bankdata_error' ), focusElement: 'account-number', - scrollElement: 'iban-scroll-target' + scrollElement: 'account-number-scroll-target' }, { validity: store.state.address.validity.firstName, @@ -151,6 +151,7 @@ import ErrorSummary from '@src/components/shared/validation_summary/ErrorSummary import { useStore } from 'vuex'; import { AddressTypeModel } from '@src/view_models/AddressTypeModel'; import { Validity } from '@src/view_models/Validity'; +import { computed } from 'vue'; interface Props { showErrorSummary: boolean; @@ -159,5 +160,6 @@ interface Props { defineProps(); const store = useStore(); +const bankDataValidity = computed( () => store.getters[ 'bankdata/bankDataIsInvalid' ] ? Validity.INVALID : Validity.VALID ); diff --git a/src/components/pages/donation_form/DonationReceipt/AddressFieldsStreetAutocomplete.vue b/src/components/pages/donation_form/DonationReceipt/AddressFieldsStreetAutocomplete.vue new file mode 100644 index 000000000..f39106a43 --- /dev/null +++ b/src/components/pages/donation_form/DonationReceipt/AddressFieldsStreetAutocomplete.vue @@ -0,0 +1,150 @@ + + + + + diff --git a/src/components/pages/donation_form/DonationReceipt/AddressFormErrorSummaries.vue b/src/components/pages/donation_form/DonationReceipt/AddressFormErrorSummaries.vue index 94ab3b18e..d55e2ec16 100644 --- a/src/components/pages/donation_form/DonationReceipt/AddressFormErrorSummaries.vue +++ b/src/components/pages/donation_form/DonationReceipt/AddressFormErrorSummaries.vue @@ -1,13 +1,13 @@ + + diff --git a/src/components/pages/donation_form/StreetAutocomplete/AddressFormErrorSummaries.vue b/src/components/pages/donation_form/StreetAutocomplete/AddressFormErrorSummaries.vue index 4d0b6fa44..fbc5b46bc 100644 --- a/src/components/pages/donation_form/StreetAutocomplete/AddressFormErrorSummaries.vue +++ b/src/components/pages/donation_form/StreetAutocomplete/AddressFormErrorSummaries.vue @@ -4,10 +4,10 @@ :is-visible="showErrorSummary" :items="[ { - validity: store.state.bankdata.validity.bankdata, + validity: bankDataValidity, message: $t( 'donation_form_payment_bankdata_error' ), - focusElement: 'iban', - scrollElement: 'iban-scroll-target' + focusElement: 'account-number', + scrollElement: 'account-number-scroll-target' }, { validity: store.state.address.validity.addressType, @@ -70,10 +70,10 @@ :is-visible="showErrorSummary" :items="[ { - validity: store.state.bankdata.validity.bankdata, + validity: bankDataValidity, message: $t( 'donation_form_payment_bankdata_error' ), - focusElement: 'iban', - scrollElement: 'iban-scroll-target' + focusElement: 'account-number', + scrollElement: 'account-number-scroll-target' }, { validity: store.state.address.validity.companyName, @@ -117,6 +117,12 @@ v-if="addressType === AddressTypeModel.EMAIL" :is-visible="showErrorSummary" :items="[ + { + validity: bankDataValidity, + message: $t( 'donation_form_payment_bankdata_error' ), + focusElement: 'account-number', + scrollElement: 'account-number-scroll-target' + }, { validity: store.state.address.validity.salutation, message: $t( 'donation_form_salutation_error' ), @@ -150,6 +156,8 @@ import ErrorSummary from '@src/components/shared/validation_summary/ErrorSummary.vue'; import { useStore } from 'vuex'; import { AddressTypeModel } from '@src/view_models/AddressTypeModel'; +import { computed } from 'vue'; +import { Validity } from '@src/view_models/Validity'; interface Props { showErrorSummary: boolean; @@ -158,5 +166,6 @@ interface Props { defineProps(); const store = useStore(); +const bankDataValidity = computed( () => store.getters[ 'bankdata/bankDataIsInvalid' ] ? Validity.INVALID : Validity.VALID ); diff --git a/src/components/pages/donation_form/subpages/AddressPageDonationReceipt.vue b/src/components/pages/donation_form/subpages/AddressPageDonationReceipt.vue index 9edb5feb9..7aff71de4 100644 --- a/src/components/pages/donation_form/subpages/AddressPageDonationReceipt.vue +++ b/src/components/pages/donation_form/subpages/AddressPageDonationReceipt.vue @@ -72,23 +72,45 @@ - + + - + + - +