diff --git a/app/src/main/java/it/ministerodellasalute/immuni/api/services/ConfigurationSettingsService.kt b/app/src/main/java/it/ministerodellasalute/immuni/api/services/ConfigurationSettingsService.kt index 5bf5ae9f..969bd856 100644 --- a/app/src/main/java/it/ministerodellasalute/immuni/api/services/ConfigurationSettingsService.kt +++ b/app/src/main/java/it/ministerodellasalute/immuni/api/services/ConfigurationSettingsService.kt @@ -192,7 +192,8 @@ private fun eudccMap(): Map> { "vaccine_first_dose" to "Certificazione valida fino alla prossima dose", "vaccine_fully_completed" to "Certificazione valida 365 giorni (12 mesi) dalla data dell'ultima somministrazione", "healing_certificate" to "Certificazione valida in Unione Europea fino alla data di fine validità e valida solo in Italia fino a 6 mesi dalla data di inizio validità", - "vaccine_booster" to "Certificazione valida 180 giorni (6 mesi) dalla data dell'ultima somministrazione, salvo modifiche normative" + "vaccine_booster" to "Certificazione valida 180 giorni (6 mesi) dalla data dell'ultima somministrazione, salvo modifiche normative", + "cbis" to "Certificazione valida in Unione Europea fino alla data di fine validità e valida in Italia 540 giorni (18 mesi) dalla data di inizio validità, salvo modifiche normative" ), "de" to mapOf( "molecular_test" to "Bescheinigung gültig für 72 Stunden ab dem Zeitpunkt der Abholung", @@ -200,7 +201,8 @@ private fun eudccMap(): Map> { "vaccine_first_dose" to "Zertifizierung gültig bis zur nächsten Dosis", "vaccine_fully_completed" to "Zertifizierung gültig für 365 Tage (12 Monate) ab dem Datum der letzten Verabreichung", "healing_certificate" to "Zertifizierung gültig in der Europäischen Union bis zum Gültigkeitsende und nur in Italien bis zu 6 Monate ab Gültigkeitsbeginn gültig", - "vaccine_booster" to "Zertifizierung gültig für 180 Tage (6 Monate) ab dem Datum der letzten Verabreichung, vorbehaltlich behördlicher Änderungen" + "vaccine_booster" to "Zertifizierung gültig für 180 Tage (6 Monate) ab dem Datum der letzten Verabreichung, vorbehaltlich behördlicher Änderungen", + "cbis" to "Zertifizierung gültig in der Europäischen Union bis Gültigkeitsende und gültig in Italien 540 Tage (18 Monate) ab Gültigkeitsbeginn, vorbehaltlich behördlicher Änderungen" ), "en" to mapOf( "molecular_test" to "Certification valid for 72 hours from the time of collection", @@ -208,7 +210,8 @@ private fun eudccMap(): Map> { "vaccine_first_dose" to "Certification valid until next dose", "vaccine_fully_completed" to "Certification valid for 365 days (12 months) from the date of the last administration", "healing_certificate" to "Certification valid in the European Union until the end of validity date and valid only in Italy up to 6 months from the start of validity date", - "vaccine_booster" to "Certification valid for 180 days (6 months) from the date of the last administration, subject to regulatory changes" + "vaccine_booster" to "Certification valid for 180 days (6 months) from the date of the last administration, subject to regulatory changes", + "cbis" to "Certification valid in the European Union until the end of validity date and valid in Italy 540 days (18 months) from the start of validity date, subject to regulatory changes" ), "es" to mapOf( "molecular_test" to "Certificación válida por 72 horas desde el momento de la recogida.", @@ -216,7 +219,8 @@ private fun eudccMap(): Map> { "vaccine_first_dose" to "Certificación válida hasta la próxima dosis", "vaccine_fully_completed" to "Certificación válida por 365 días (12 meses) a partir de la fecha de la última administración.", "healing_certificate" to "Certificación válida en la Unión Europea hasta el final de la fecha de validez y válida solo en Italia hasta 6 meses desde el inicio de la fecha de validez", - "vaccine_booster" to "Certificación válida por 180 días (6 meses) a partir de la fecha de la última administración, sujeta a cambios regulatorios" + "vaccine_booster" to "Certificación válida por 180 días (6 meses) a partir de la fecha de la última administración, sujeta a cambios regulatorios", + "cbis" to "Certificación válida en la Unión Europea hasta el final de la fecha de validez y válida en Italia 540 días (18 meses) desde el inicio de la fecha de validez, sujeta a cambios regulatorios" ), "fr" to mapOf( "molecular_test" to "Attestation valable 72h à compter de la collecte", @@ -224,7 +228,8 @@ private fun eudccMap(): Map> { "vaccine_first_dose" to "Certification valable jusqu'à la prochaine dose", "vaccine_fully_completed" to "Certification valable 365 jours (12 mois) à compter de la date de la dernière administration", "healing_certificate" to "Certification valable dans l'Union européenne jusqu'à la date de fin de validité et valable uniquement en Italie jusqu'à 6 mois à compter de la date de début de validité", - "vaccine_booster" to "Certification valable 180 jours (6 mois) à compter de la date de la dernière administration, sous réserve de modifications réglementaires" + "vaccine_booster" to "Certification valable 180 jours (6 mois) à compter de la date de la dernière administration, sous réserve de modifications réglementaires", + "cbis" to "Certification valable dans l'Union européenne jusqu'à la date de fin de validité et valable en Italie 540 jours (18 mois) à compter de la date de début de validité, sous réserve de modifications réglementaires" ) ) } diff --git a/app/src/main/java/it/ministerodellasalute/immuni/api/services/DCCService.kt b/app/src/main/java/it/ministerodellasalute/immuni/api/services/DCCService.kt index fee614d9..2a75d63f 100644 --- a/app/src/main/java/it/ministerodellasalute/immuni/api/services/DCCService.kt +++ b/app/src/main/java/it/ministerodellasalute/immuni/api/services/DCCService.kt @@ -36,7 +36,7 @@ interface DCCService { ) : RequestWithPadding @JsonClass(generateAdapter = true) - data class GreenCardResponse(val qrcode: String) + data class GreenCardResponse(val qrcode: String, val fglTipoDgc: String?) @POST("v1/ingestion/get-dgc") suspend fun getGreenCard( diff --git a/app/src/main/java/it/ministerodellasalute/immuni/logic/exposure/models/GreenPassToken.kt b/app/src/main/java/it/ministerodellasalute/immuni/logic/exposure/models/GreenPassToken.kt index db1a3150..eca451f1 100644 --- a/app/src/main/java/it/ministerodellasalute/immuni/logic/exposure/models/GreenPassToken.kt +++ b/app/src/main/java/it/ministerodellasalute/immuni/logic/exposure/models/GreenPassToken.kt @@ -17,7 +17,7 @@ package it.ministerodellasalute.immuni.logic.exposure.models import java.util.* -data class GreenPassToken(val greenPass: String?, val serverDate: Date?) +data class GreenPassToken(val greenPass: String?, val fglTipoDgc: String?, val serverDate: Date?) sealed class GreenPassValidationResult { data class Success(val greenpass: GreenPassToken) : GreenPassValidationResult() diff --git a/app/src/main/java/it/ministerodellasalute/immuni/logic/exposure/repositories/GCDRepository.kt b/app/src/main/java/it/ministerodellasalute/immuni/logic/exposure/repositories/GCDRepository.kt index eecc743f..e61c411b 100644 --- a/app/src/main/java/it/ministerodellasalute/immuni/logic/exposure/repositories/GCDRepository.kt +++ b/app/src/main/java/it/ministerodellasalute/immuni/logic/exposure/repositories/GCDRepository.kt @@ -50,7 +50,7 @@ class GCDRepository( } return when (response) { is NetworkResource.Success -> GreenPassValidationResult.Success( - GreenPassToken(response.data?.qrcode, response.serverDate!!) + GreenPassToken(response.data?.qrcode, response.data?.fglTipoDgc, response.serverDate!!) ) is NetworkResource.Error -> { val errorResponse = response.error diff --git a/app/src/main/java/it/ministerodellasalute/immuni/logic/user/models/GreenCertificateUser.kt b/app/src/main/java/it/ministerodellasalute/immuni/logic/user/models/GreenCertificateUser.kt index 0bc496cc..bac97b4b 100644 --- a/app/src/main/java/it/ministerodellasalute/immuni/logic/user/models/GreenCertificateUser.kt +++ b/app/src/main/java/it/ministerodellasalute/immuni/logic/user/models/GreenCertificateUser.kt @@ -10,5 +10,6 @@ import kotlinx.android.parcel.Parcelize @JsonClass(generateAdapter = true) data class GreenCertificateUser( @field:Json(name = "base64") val base64: String, - @field:Json(name = "greenCertificate") val data: GreenCertificate? + @field:Json(name = "greenCertificate") val data: GreenCertificate?, + @field:Json(name = "fglTipoDgc") val fglTipoDgc: String? = null ) : Parcelable diff --git a/app/src/main/java/it/ministerodellasalute/immuni/ui/greencertificate/GreenCertificateViewModel.kt b/app/src/main/java/it/ministerodellasalute/immuni/ui/greencertificate/GreenCertificateViewModel.kt index 53bcecfd..c49907ac 100644 --- a/app/src/main/java/it/ministerodellasalute/immuni/ui/greencertificate/GreenCertificateViewModel.kt +++ b/app/src/main/java/it/ministerodellasalute/immuni/ui/greencertificate/GreenCertificateViewModel.kt @@ -103,7 +103,8 @@ class GreenCertificateViewModel( user.value?.greenPass!!.add( GreenCertificateUser( base64 = result.greenpass.greenPass.toString(), - data = greenCertificate + data = greenCertificate, + fglTipoDgc = result.greenpass.fglTipoDgc ) ) userManager.save( diff --git a/app/src/main/java/it/ministerodellasalute/immuni/ui/greencertificate/MoreDetailGreenCertificate.kt b/app/src/main/java/it/ministerodellasalute/immuni/ui/greencertificate/MoreDetailGreenCertificate.kt index 4a2534b9..a6789a5f 100644 --- a/app/src/main/java/it/ministerodellasalute/immuni/ui/greencertificate/MoreDetailGreenCertificate.kt +++ b/app/src/main/java/it/ministerodellasalute/immuni/ui/greencertificate/MoreDetailGreenCertificate.kt @@ -68,17 +68,20 @@ class MoreDetailGreenCertificate : PopupDialogFragment(), KoinComponent { val molecularTest = settingsManager.settings.value.eudcc_expiration[Locale.getDefault().language]!!["molecular_test"] val healingCertificate = settingsManager.settings.value.eudcc_expiration[Locale.getDefault().language]!!["healing_certificate"] val vaccineBooster = settingsManager.settings.value.eudcc_expiration[Locale.getDefault().language]!!["vaccine_booster"] + val cbis = settingsManager.settings.value.eudcc_expiration[Locale.getDefault().language]!!["cbis"] + setUI( vaccineFullyCompleted, vaccineFirstDose, molecularTest, rapidTest, healingCertificate, - vaccineBooster + vaccineBooster, + cbis ) } - private fun setUI(validUntilCompleteVaccine: String?, validUntilnotCompleteVaccine: String?, validUntilMolecularTest: String?, validUntilQuickTest: String?, healingCertificate: String?, vaccineBooster: String?) { + private fun setUI(validUntilCompleteVaccine: String?, validUntilnotCompleteVaccine: String?, validUntilMolecularTest: String?, validUntilQuickTest: String?, healingCertificate: String?, vaccineBooster: String?, cbis: String?) { var isExemption = false when (true) { greenCertificateDetail.data?.vaccinations != null -> { @@ -208,7 +211,10 @@ class MoreDetailGreenCertificate : PopupDialogFragment(), KoinComponent { certificateIssuerLabelEng.visibility = View.GONE certificateIssuerLabel.visibility = View.GONE entityIssuedCertificate.visibility = View.GONE - validityHealing.text = healingCertificate ?: getString(R.string.green_certificate_validity_healing) + validityHealing.text = when (greenCertificateDetail.fglTipoDgc) { + "cbis" -> cbis ?: getString(R.string.green_certificate_validity_healing_cbis) + else -> healingCertificate ?: getString(R.string.green_certificate_validity_healing) + } certificateIssuerLabelExemption.visibility = View.GONE } greenCertificateDetail.data?.exemptions != null -> { diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index b56c4483..7340ff1f 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -511,4 +511,5 @@ Betriebssystem: iOS 13.5.1; Modell: iPhone XS; Expositionsmeldungen: Aktiv; [wei Diese Zertifizierung ist nur in Italien gültig und kann verwendet werden, um die grüne COVID-19-Zertifizierung für die Durchführung von Aktivitäten und die Nutzung von Dienstleistungen gemäß der geltenden nationalen Gesetzgebung zu ersetzen Zertifizierung gültig für 180 Tage (6 Monate) ab dem Datum der letzten Verabreichung, vorbehaltlich behördlicher Änderungen Quarantäne und Isolation + Zertifizierung gültig in der Europäischen Union bis Gültigkeitsende und gültig in Italien 540 Tage (18 Monate) ab Gültigkeitsbeginn, vorbehaltlich behördlicher Änderungen diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 31ad0576..41b17707 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -514,4 +514,5 @@ Sistema operativo: iOS 13.5.1; modelo: iPhone XS; notificaciones de exposición: Sujeto que emitió el certificado de exención digital Certificación válida por 180 días (6 meses) a partir de la fecha de la última administración, sujeta a cambios regulatorios Cuarentena y aislamiento + Certificación válida en la Unión Europea hasta el final de la fecha de validez y válida en Italia 540 días (18 meses) desde el inicio de la fecha de validez, sujeta a cambios regulatorios diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index dc70725b..83df9bd8 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -513,5 +513,6 @@ Système d\'exploitation : iOS 13.5.1; Modèle iPhone XS ; Notifications de risq Sujet qui a délivré le certificat d\'exemption numérique Certification valable 180 jours (6 mois) à compter de la date de la dernière administration, sous réserve de modifications réglementaires Quarantaine et isolement + Certification valable dans l\'Union européenne jusqu\'à la date de fin de validité et valable en Italie 540 jours (18 mois) à compter de la date de début de validité, sous réserve de modifications réglementaires diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 539f5969..5d39b514 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -513,5 +513,6 @@ Sistema operativo: iOS 13.5.1; Modello iPhone XS; Notifiche di esposizione: Atti Soggetto che ha rilasciato la certificazione digitale di esenzione Certificazione valida 180 giorni (6 mesi) dalla data dell\'ultima somministrazione, salvo modifiche normative Quarantena e isolamento + Certificazione valida in Unione Europea fino alla data di fine validità e valida in Italia 540 giorni (18 mesi) dalla data di inizio validità, salvo modifiche normative diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2f8fedcb..1e947846 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -596,4 +596,5 @@ Operating system: iOS 13.5.1; Model: iPhone XS; Exposure notifications: Active; Certification valid for 180 days (6 months) from the date of the last administration, subject to regulatory changes https://www.salute.gov.it/portale/nuovocoronavirus/dettaglioFaqNuovoCoronavirus.jsp?lingua=italiano&id=244#19 Quarantine and isolation + Certification valid in the European Union until the end of validity date and valid in Italy 540 days (18 months) from the start of validity date, subject to regulatory changes