Skip to content

Commit

Permalink
exposed additional data on the card
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmanos committed Oct 9, 2024
1 parent 16ccc0f commit 634c17d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,16 @@ export class EdiplomasBlueprintSdJwtVCDM implements VCDMSupportedCredentialProto
{ name: "Grade", value: diplomaEntry.grade },
{ name: "Graduation Date", value: formatDateDDMMYYYY(diplomaEntry.graduation_date) },
{ name: "Blueprint ID", value: "#" + diplomaEntry.blueprint_id },
{ name: "Expiry Date", value: formatDateDDMMYYYY(diplomaEntry.expiry_date) },
];
const rowsObject: CategorizedRawCredentialView = { rows };

const pathsWithValues = [
{ path: "given_name", value: diplomaEntry.given_name },
{ path: "family_name", value: diplomaEntry.family_name },
{ path: "Title", value: diplomaEntry.title },
{ path: "Grade", value: diplomaEntry.grade },
{ path: "title", value: diplomaEntry.title },
{ path: "graduation_date", value: formatDateDDMMYYYY(diplomaEntry.graduation_date) },
{ path: "expiry_date", value: formatDateDDMMYYYY(diplomaEntry.expiry_date) },
];
const dataUri = generateDataUriFromSvg(svgText, pathsWithValues);

Expand Down Expand Up @@ -176,9 +178,11 @@ export class EdiplomasBlueprintSdJwtVCDM implements VCDMSupportedCredentialProto
"background_color": "#12107c",
"text_color": "#FFFFFF"
},
"svg_templates": {
"uri": config.url + "/images/diplomaTemplate.svg",
},
"svg_templates": [
{
"uri": config.url + "/images/diplomaTemplate.svg",
}
],
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class EHICSupportedCredentialSdJwtVCDM implements VCDMSupportedCredential
return null;
}

const ehics = users.filter((ehic) =>
const ehics = users.filter((ehic) =>
ehic.family_name == userSession.family_name &&
ehic.given_name == userSession.given_name &&
new Date(ehic.birth_date).toISOString() == new Date(userSession.birth_date as string).toISOString()
Expand Down Expand Up @@ -120,7 +120,7 @@ export class EHICSupportedCredentialSdJwtVCDM implements VCDMSupportedCredential
throw new Error("Not the correct credential");
}

const ehicEntry = users.filter((ehic) =>
const ehicEntry = users.filter((ehic) =>
ehic.family_name == userSession.family_name &&
ehic.given_name == userSession.given_name &&
new Date(ehic.birth_date).toISOString() == new Date(userSession.birth_date as string).toISOString()
Expand Down Expand Up @@ -187,9 +187,11 @@ export class EHICSupportedCredentialSdJwtVCDM implements VCDMSupportedCredential
"background_color": "#12107c",
"text_color": "#FFFFFF"
},
"svg_templates": {
"uri": config.url + "/images/ehicTemplate.svg",
},
"svg_templates": [
{
"uri": config.url + "/images/ehicTemplate.svg",
}
],
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export class VIDSupportedCredentialSdJwtVCDM implements VCDMSupportedCredentialP

const pathsWithValues = [
{ path: "family_name", value: vid.family_name },
{ path: "given_name", value: vid.given_name},
{ path: "document_number", value: vid.document_number},
{ path: "given_name", value: vid.given_name },
{ path: "document_number", value: vid.document_number },
{ path: "birth_date", value: formatDateDDMMYYYY(vid.birth_date) },
{ path: "expiry_date", value: formatDateDDMMYYYY(vid.expiry_date) }
];
Expand Down Expand Up @@ -173,9 +173,11 @@ export class VIDSupportedCredentialSdJwtVCDM implements VCDMSupportedCredentialP
"background_color": "#12107c",
"text_color": "#FFFFFF"
},
"svg_templates": {
"uri": config.url + "/images/idTemplate.svg",
},
"svg_templates": [
{
"uri": config.url + "/images/idTemplate.svg",
}
],
}
}
}
Expand Down

0 comments on commit 634c17d

Please sign in to comment.