Skip to content

Commit

Permalink
Merge pull request #576 from minvws/2.2-latest-fixes
Browse files Browse the repository at this point in the history
2.2 latest fixes
  • Loading branch information
BartNijland91 authored Aug 17, 2021
2 parents f5491df + a961d4f commit 15cfbc3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class ChooseProviderFragment : DigiDFragment(R.layout.fragment_choose_provider)
.toMap(),
originType = OriginType.Test
),
toolbarTitle = getString(R.string.your_vaccination_result_toolbar_title)
toolbarTitle = getString(R.string.commercial_test_type_title)
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class GetEventsFragment: DigiDFragment(R.layout.fragment_get_events) {
.toMap(),
originType = args.originType
),
toolbarTitle = getString(R.string.your_vaccination_result_toolbar_title)
toolbarTitle = getCopyForOriginType().toolbarTitle
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,16 @@ class VaccinationInfoScreenUtilImpl(
hpkCode: AppConfig.HpkCode?,
event: RemoteEventVaccination
) =
(holderConfig.euManufacturers.firstOrNull { hpkCode?.ma == event.vaccination?.manufacturer }?.name
(holderConfig.euManufacturers.firstOrNull { it.code == event.vaccination?.manufacturer }?.name
?: holderConfig.euManufacturers.firstOrNull { it.code == hpkCode?.ma }?.name
?: event.vaccination?.manufacturer
?: "")

private fun getVaccineTypeAnswer(
hpkCode: AppConfig.HpkCode?,
event: RemoteEventVaccination
) = (holderConfig.euVaccinations.firstOrNull { hpkCode?.vp == event.vaccination?.type }?.name
?: holderConfig.euVaccinations.firstOrNull { it.code == event.vaccination?.type }?.name
) = (holderConfig.euVaccinations.firstOrNull { it.code == event.vaccination?.type }?.name
?: holderConfig.euVaccinations.firstOrNull { it.code == hpkCode?.vp }?.name
?: event.vaccination?.type
?: "")

Expand All @@ -138,8 +139,8 @@ class VaccinationInfoScreenUtilImpl(
): String {
val hpkCodeName = hpkCode?.name ?: ""
val brand =
holderConfig.euBrands.firstOrNull { hpkCode?.mp == event.vaccination?.brand }?.name
?: holderConfig.euBrands.firstOrNull { it.code == event.vaccination?.brand }?.name
holderConfig.euBrands.firstOrNull { it.code == event.vaccination?.brand }?.name
?: holderConfig.euBrands.firstOrNull { it.code == hpkCode?.mp }?.name
?: event.vaccination?.brand
?: ""
return when {
Expand Down
4 changes: 2 additions & 2 deletions holder/src/main/res/values-en/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<string name="app_setup_text">We\'re starting the app...</string>
<!-- App Status strings -->
<string name="app_status_deactivated_title">App out of order</string>
<string name="app_status_deactivated_message">The app is no longer in use. For more information, go to CoronaCheck.nl</string>
<string name="app_status_deactivated_message">The app is not in use at the moment. For more information, go to CoronaCheck.nl</string>
<string name="app_status_deactivated_action">Read more on the website</string>
<string name="app_status_update_required_title">Time for an update</string>
<string name="app_status_update_required_message">To continue, install the latest version of the app.</string>
Expand Down Expand Up @@ -362,7 +362,7 @@
<string name="your_dcc_event_description">You can create a QR code with the retrieved details. This is your certificate.</string>
<string name="your_dcc_event_toolbar_title">Retrieved details</string>
<string name="your_events_block_back_dialog_title">Are you sure you want to stop?</string>
<string name="your_events_block_back_dialog_description">You can try to add a paper certificate again later.</string>
<string name="your_events_block_back_dialog_description">You can try to add this QR code in the app again later.</string>
<string name="your_events_block_back_dialog_positive_button">Yes, stop</string>
<string name="your_events_block_back_dialog_negative_button">No, continue</string>
<string name="your_events_replace_dialog_title">Do you want to replace your certificate?</string>
Expand Down
2 changes: 1 addition & 1 deletion holder/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<string name="app_setup_text">We starten de app voor je op…</string>
<!-- App Status strings -->
<string name="app_status_deactivated_title">App buiten werking</string>
<string name="app_status_deactivated_message">De app is niet meer in gebruik. Ga voor meer informatie naar CoronaCheck.nl</string>
<string name="app_status_deactivated_message">Op dit moment is de app niet in gebruik. Ga voor meer informatie naar CoronaCheck.nl</string>
<string name="app_status_deactivated_action">Lees meer op de website</string>
<string name="app_status_update_required_title">Tijd voor een update</string>
<string name="app_status_update_required_message">Je hebt de laatste versie van de app nodig om verder te gaan.</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class VaccinationInfoScreenUtilImplTest : AutoCloseKoinTest() {
euManufacturers = listOf(
AppConfig.Code(
code = "ORG-100030215",
name = "manufacturerName"
name = "Biontech Manufacturing GmbH"
)
)
)
Expand Down Expand Up @@ -100,7 +100,7 @@ class VaccinationInfoScreenUtilImplTest : AutoCloseKoinTest() {

assertEquals("Over jouw vaccinatie", infoScreen.title)
assertEquals(
"Deze gegevens van je vaccinatie zijn opgehaald bij GGD:<br/><br/>Naam: <b>Surname</b><br/>Geboortedatum: <b>01-08-1982</b><br/><br/>Ziekteverwekker: <b>COVID-19</b><br/>Vaccin: <b>Pfizer (Comirnaty)</b><br/>Type vaccin: <b>type</b><br/>Producent: <b>manufacturer</b><br/>Dosis: <b>1 van 2</b><br/>Vaccinatiedatum: <b>1 augustus 2021</b><br/>Gevaccineerd in: <b>Nederland</b><br/>Uniek vaccinatienummer: <b>unique</b><br/>",
"Deze gegevens van je vaccinatie zijn opgehaald bij GGD:<br/><br/>Naam: <b>Surname</b><br/>Geboortedatum: <b>01-08-1982</b><br/><br/>Ziekteverwekker: <b>COVID-19</b><br/>Vaccin: <b>Pfizer (Comirnaty)</b><br/>Type vaccin: <b>type</b><br/>Producent: <b>Biontech Manufacturing GmbH</b><br/>Dosis: <b>1 van 2</b><br/>Vaccinatiedatum: <b>1 augustus 2021</b><br/>Gevaccineerd in: <b>Nederland</b><br/>Uniek vaccinatienummer: <b>unique</b><br/>",
infoScreen.description
)

Expand Down

0 comments on commit 15cfbc3

Please sign in to comment.