Skip to content

Commit

Permalink
feat(IT Wallet): [SIW-681] Health card issuance (#5315)
Browse files Browse the repository at this point in the history
## Short description
This PR introduces the health card issuance issuance.

Note: there's an issue with the place of birth claim which is going to
addressed in a separate issue
([SIW-681](https://pagopa.atlassian.net/jira/software/projects/SIW/boards/222?selectedIssue=SIW-740)).
Since the component which renders the claims list needs a substantial
refactor I decided to leave it out of the scope of this PR. See #5321.

## List of changes proposed in this pull request
- Updates the mock data required to obtain a display the credential;
- Rename the card front asset according to the name of the credential.

## How to test
With an valid wallet test the health card issuance flow.


[SIW-681]:
https://pagopa.atlassian.net/browse/SIW-681?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
  • Loading branch information
LazyAfternoons committed Dec 14, 2023
1 parent 2a94254 commit 7366196
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions ts/features/it-wallet/utils/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const CREDENTIAL_ISSUER = "eFarma";
* Credential types mocks.
*/
export enum CredentialType {
HEALTH_CARD = "HealthCard",
EUROPEAN_HEALTH_INSURANCE_CARD = "EuropeanHealthInsuranceCard",
EUROPEAN_DISABILITY_CARD = "EuropeanDisabilityCard",
DRIVING_LICENSE = "DrivingLicense",
PID = "PID"
Expand Down Expand Up @@ -101,12 +101,27 @@ export const getCredentialsCatalog = (): Array<CredentialCatalogItem> => [
]
},
{
incoming: true,
type: CredentialType.EUROPEAN_HEALTH_INSURANCE_CARD,
issuerUrl: "https://api.eudi-wallet-it-issuer.it/rp",
incoming: false,
title: I18n.t("features.itWallet.verifiableCredentials.type.healthCard"),
icon: "healthCard",
textColor: "black",
firstLine: [],
secondLine: []
firstLine: ["given_name", "family_name"],
secondLine: ["fiscal_code"],
order: [
"given_name",
"family_name",
"birthdate",
"place_of_birth",
"sex",
"fiscal_code",
"expiry_date",
"province",
"nation",
"institution_number_team",
"document_number_team"
]
},
{
title: I18n.t(
Expand All @@ -129,6 +144,8 @@ export const getImageFromCredentialType = (type: string) => {
switch (type) {
case CredentialType.EUROPEAN_DISABILITY_CARD:
return require("../assets/img/credentials/cards/europeanDisabilityCardFront.png");
case CredentialType.EUROPEAN_HEALTH_INSURANCE_CARD:
return require("../assets/img/credentials/cards/europeanHealthInsuranceCardFront.png");
case CredentialType.PID:
return require("../assets/img/credentials/cards/pidFront.png");
default:
Expand Down

0 comments on commit 7366196

Please sign in to comment.