Skip to content

Commit

Permalink
TIQR-481: Rename 'eHerkenning' to 'eIDAS'
Browse files Browse the repository at this point in the history
  • Loading branch information
dzolnai committed Nov 15, 2024
1 parent 82961fb commit ef654d6
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/src/main/kotlin/nl/eduid/di/model/EduIdModels.kt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ data class ExternalLinkedAccount(
@JsonClass(generateAdapter = true)
data class ExternalLinkedAccountIssuer(
val id: String,
val name: String
val name: String?
) : Parcelable

@Parcelize
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/kotlin/nl/eduid/di/model/ModelToState.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package nl.eduid.di.model

import com.squareup.moshi.Moshi
import kotlinx.collections.immutable.toImmutableList
import nl.eduid.screens.personalinfo.PersonalInfo
import java.net.URLEncoder
import java.time.Instant
import java.time.LocalDate
import java.time.ZoneId
import java.time.ZoneOffset

fun LinkedAccount.mapToInstitutionAccount(): PersonalInfo.InstitutionAccount? =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import nl.eduid.ui.VerifiedInfoField
import nl.eduid.ui.getShortDateString
import nl.eduid.ui.theme.ColorScale_Gray_200
import nl.eduid.ui.theme.EduidAppAndroidTheme
import nl.eduid.util.normalizedIssuerName

@Composable
fun VerifiedPersonalInfoRoute(
Expand Down Expand Up @@ -171,7 +172,7 @@ fun VerifiedPersonalInfoScreen(
color = MaterialTheme.colorScheme.onSecondary
), text = stringResource(
R.string.YourVerifiedInformation_FromInstitution_COPY,
account.institution
account.institution.normalizedIssuerName()
), modifier = Modifier.fillMaxWidth()
)
Spacer(Modifier.size(12.dp))
Expand Down Expand Up @@ -217,7 +218,7 @@ fun VerifiedPersonalInfoScreen(
VerifiedInfoField(
title = it, subtitle = stringResource(
id = R.string.YourVerifiedInformation_AtInstitution_COPY,
account.institution
account.institution.normalizedIssuerName()
)
)
Spacer(Modifier.size(24.dp))
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/kotlin/nl/eduid/ui/ConnectionCard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import nl.eduid.ui.theme.ColorAlertRed
import nl.eduid.ui.theme.ColorScale_Gray_500
import nl.eduid.ui.theme.ColorSupport_Blue_100
import nl.eduid.ui.theme.EduidAppAndroidTheme
import nl.eduid.util.normalizedIssuerName
import java.util.Locale

@Composable
Expand Down Expand Up @@ -103,7 +104,7 @@ fun ConnectionCard(
Text(
text = stringResource(
id = R.string.Profile_VerifiedBy_COPY,
confirmedByInstitution.institution
confirmedByInstitution.institution.normalizedIssuerName()
),
style = MaterialTheme.typography.bodyLarge.copy(fontWeight = FontWeight.SemiBold),
)
Expand Down Expand Up @@ -243,7 +244,7 @@ private fun InstitutionInfoBlock(
Modifier.fillMaxWidth()
) {
InfoRowOld(
label = stringResource(R.string.Profile_VerifiedBy_COPY, institutionInfo.institution)
label = stringResource(R.string.Profile_VerifiedBy_COPY, institutionInfo.institution.normalizedIssuerName())
+ stringResource(
R.string.Profile_VerifiedOn_COPY, institutionInfo.createdStamp.getShortDateString()
)
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/kotlin/nl/eduid/ui/InfoField.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import nl.eduid.ui.theme.BlueButton
import nl.eduid.ui.theme.ColorScale_Gray_500
import nl.eduid.ui.theme.ColorSupport_Blue_100
import nl.eduid.ui.theme.EduidAppAndroidTheme
import nl.eduid.util.normalizedIssuerName
import java.util.Locale

@Composable
Expand Down Expand Up @@ -339,7 +340,7 @@ fun ExpandableVerifiedInfoField(
Text(
text = stringResource(
id = R.string.Profile_VerifiedBy_COPY,
confirmedByInstitution.institution
confirmedByInstitution.institution.normalizedIssuerName()
),
style = MaterialTheme.typography.bodyLarge.copy(fontWeight = FontWeight.SemiBold),
)
Expand Down
18 changes: 18 additions & 0 deletions app/src/main/kotlin/nl/eduid/util/Extensions.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package nl.eduid.util

import androidx.compose.runtime.Composable
import androidx.compose.ui.res.stringResource
import nl.eduid.R
import nl.eduid.di.model.ExternalLinkedAccountIssuer
import nl.eduid.di.model.IdpScoping

@Composable
fun String.normalizedIssuerName(): String {
if (this == IdpScoping.EHERKENNING.toString()) {
return stringResource(R.string.ReferenceNames_Eherkenning_COPY)
} else if (this == IdpScoping.IDIN.toString()) {
return stringResource(R.string.ReferenceNames_Idin_COPY)
} else {
return this
}
}

0 comments on commit ef654d6

Please sign in to comment.