Unverified Commit 2b4bfc66 authored by fOppenheimer's avatar fOppenheimer Committed by GitHub
Browse files

Feat/pdf show value (#70)

* vaccination, test, recovery values are shown on the right side

* use english and french on the same page

* used interface for the params
parent 24e4cf3c
......@@ -110,5 +110,6 @@
"valid-to": "Certificate Valid To",
"first-positive-test-date": "First Positive Test Result",
"recovery-country": "Country of Test",
"cert-valid-from-to": "Certificate Valid From - To"
"cert-valid-from-to": "Certificate Valid From - To",
"pdfSurname": "Surname(s) and forename(s)"
}
\ No newline at end of file
{
"pdfSurname": "Nom(s) de famille et prénom(s)"
}
\ No newline at end of file
This diff is collapsed.
......@@ -171,19 +171,6 @@ export const ShowCertificateData = (props: any) => {
return recoveryData;
}
const convertDateToOutputFormat = (dateString: string): string => dateString ? moment(dateString, 'YYYY-MM-DDTHH:mm:ss.sssZ').format(utils.momentDateTimeFormat).toString() : '';
// returns display value for key
const getValueSetDisplay = (key: string | undefined, valueSet: IValueSet | undefined): string | undefined => {
let result = key;
if (valueSet && key && valueSet[key]) {
result = valueSet[key].display;
}
return result;
}
const getDataOutputElement = (dataSet: IDataEntry) => {
return (
<React.Fragment key={JSON.stringify(dataSet)}>
......@@ -207,4 +194,16 @@ export const ShowCertificateData = (props: any) => {
)
}
export default ShowCertificateData
\ No newline at end of file
export default ShowCertificateData
export const convertDateToOutputFormat = (dateString: string): string => dateString ? moment(dateString, 'YYYY-MM-DDTHH:mm:ss.sssZ').format(utils.momentDateTimeFormat).toString() : '';
// returns display value for key
export const getValueSetDisplay = (key: string | undefined, valueSet: IValueSet | undefined): string | undefined => {
let result = key;
if (valueSet && key && valueSet[key]) {
result = valueSet[key].display;
}
return result;
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment