Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #194 from admin-ch/bugfix/date-of-birth-parsing
Browse files Browse the repository at this point in the history
Date of Birth Parsing
  • Loading branch information
M-Wong authored Jul 8, 2021
2 parents 5b7ea58 + a190b4d commit a91aea7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class VerificationFragment : Fragment() {

binding.verificationFamilyName.text = personName.familyName
binding.verificationGivenName.text = personName.givenName
binding.verificationBirthdate.text = certificateHolder.getDateOfBirth().format(DEFAULT_DISPLAY_DATE_FORMATTER)
binding.verificationBirthdate.text = certificateHolder.getFormattedDateOfBirth()
binding.verificationStandardizedNameLabel.text = "${personName.standardizedFamilyName}<<${personName.standardizedGivenName}"

binding.verificationFooterButton.setOnClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ class CertificateAddFragment : Fragment() {
val personName = certificateHolder.certificate.getPersonName()
val name = "${personName.familyName} ${personName.givenName}"
binding.certificateAddName.text = name
val dateOfBirth = certificateHolder.certificate.getDateOfBirth().format(DEFAULT_DISPLAY_DATE_FORMATTER)
binding.certificateAddBirthdate.text = dateOfBirth
binding.certificateAddBirthdate.text = certificateHolder.certificate.getFormattedDateOfBirth()

val detailItems = CertificateDetailItemListBuilder(recyclerView.context, certificateHolder, showEnglishVersion = false).buildAll()
adapter.setItems(detailItems)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ class CertificateDetailFragment : Fragment() {
val personName = certificateHolder.certificate.getPersonName()
val name = "${personName.familyName} ${personName.givenName}"
binding.certificateDetailName.text = name
val dateOfBirth = certificateHolder.certificate.getDateOfBirth().format(DEFAULT_DISPLAY_DATE_FORMATTER)
binding.certificateDetailBirthdate.text = dateOfBirth
binding.certificateDetailBirthdate.text = certificateHolder.certificate.getFormattedDateOfBirth()

binding.certificateDetailInfo.setText(R.string.verifier_verify_success_info)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ class CertificatePagerFragment : Fragment() {

val name = certificateHolder?.certificate?.getPersonName()?.let { "${it.familyName} ${it.givenName}" }
binding.certificatePageName.text = name
val dateOfBirth = certificateHolder?.certificate?.getDateOfBirth()?.format(DEFAULT_DISPLAY_DATE_FORMATTER)
binding.certificatePageBirthdate.text = dateOfBirth
binding.certificatePageBirthdate.text = certificateHolder?.certificate?.getFormattedDateOfBirth()
binding.certificatePageCard.setCutOutCardBackground()
updateTitle()
setupStatusInfo()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ class CertificateLightPagerFragment : Fragment(R.layout.fragment_certificate_lig
private fun displayCertificateDetails() {
val name = certificateHolder.certificate.getPersonName().let { "${it.familyName} ${it.givenName}" }
binding.certificatePageName.text = name
val dateOfBirth = certificateHolder.certificate.getDateOfBirth().format(DEFAULT_DISPLAY_DATE_FORMATTER)
binding.certificatePageBirthdate.text = dateOfBirth
binding.certificatePageBirthdate.text = certificateHolder.certificate.getFormattedDateOfBirth()
}

@SuppressLint("SetTextI18n")
Expand Down

0 comments on commit a91aea7

Please sign in to comment.