Skip to content

Commit

Permalink
Merge pull request #2142 from minvws/bugfix/5016-small-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rool authored Nov 4, 2022
2 parents f5cccd0 + 6171ea9 commit 2f125d6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,14 @@ extension ListRemoteEventsViewModel {
let formattedBirthDate: String = dataRow.identity.birthDateString
.flatMap(Formatter.getDateFrom)
.map(DateFormatter.Format.dayMonthYear.string) ?? (dataRow.identity.birthDateString ?? "")

let formattedTestDate: String = Formatter.getDateFrom(dateString8601: recovery.firstPositiveTestDate)
.map(DateFormatter.Format.dayMonthYear.string) ?? recovery.firstPositiveTestDate

return ListRemoteEventsViewController.Row(
title: L.general_recoverycertificate().capitalizingFirstLetter(),
details: [
L.holder_listRemoteEvents_listElement_testDate(formattedTestDate),
L.holder_listRemoteEvents_listElement_name(dataRow.identity.fullName),
L.holder_listRemoteEvents_listElement_birthDate(formattedBirthDate)
],
Expand All @@ -460,10 +464,14 @@ extension ListRemoteEventsViewModel {
let formattedBirthDate: String = dataRow.identity.birthDateString
.flatMap(Formatter.getDateFrom)
.map(DateFormatter.Format.dayMonthYear.string) ?? (dataRow.identity.birthDateString ?? "")

let formattedTestDate: String = Formatter.getDateFrom(dateString8601: test.sampleDate)
.map(DateFormatter.Format.dayMonthYear.string) ?? test.sampleDate

return ListRemoteEventsViewController.Row(
title: L.general_testcertificate().capitalizingFirstLetter(),
details: [
L.holder_listRemoteEvents_listElement_testDate(formattedTestDate),
L.holder_listRemoteEvents_listElement_name(dataRow.identity.fullName),
L.holder_listRemoteEvents_listElement_birthDate(formattedBirthDate)
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,12 @@ class ListStoredEventsViewModel {

private func getRowFromRecoveryDCC(_ recovery: EuCredentialAttributes.RecoveryEntry, identity: EventFlow.Identity) -> ListStoredEventsViewController.Row {

let formattedVaccinationDate: String = Formatter.getDateFrom(dateString8601: recovery.firstPositiveTestDate)
let formattedTestDate: String = Formatter.getDateFrom(dateString8601: recovery.firstPositiveTestDate)
.map(DateFormatter.Format.dayMonthYear.string) ?? recovery.firstPositiveTestDate

return ListStoredEventsViewController.Row(
title: L.general_recoverycertificate().capitalizingFirstLetter(),
details: formattedVaccinationDate,
details: formattedTestDate,
action: { [weak self] in
self?.coordinator?.userWishesToSeeEventDetails(
L.general_recoverycertificate().capitalizingFirstLetter(),
Expand All @@ -265,12 +265,12 @@ class ListStoredEventsViewModel {

private func getRowFromNegativeTestDCC(_ test: EuCredentialAttributes.TestEntry, identity: EventFlow.Identity) -> ListStoredEventsViewController.Row {

let formattedVaccinationDate: String = Formatter.getDateFrom(dateString8601: test.sampleDate)
let formattedTestDate: String = Formatter.getDateFrom(dateString8601: test.sampleDate)
.map(DateFormatter.Format.dayMonthYear.string) ?? test.sampleDate

return ListStoredEventsViewController.Row(
title: L.general_negativeTest().capitalizingFirstLetter(),
details: formattedVaccinationDate,
details: formattedTestDate,
action: { [weak self] in
self?.coordinator?.userWishesToSeeEventDetails(
L.general_negativeTest().capitalizingFirstLetter(),
Expand Down

0 comments on commit 2f125d6

Please sign in to comment.