Skip to content

Commit

Permalink
chore(verification): added last updated field to the reload verificat…
Browse files Browse the repository at this point in the history
…ion passportHeader frontend
  • Loading branch information
saudkhan116 committed Jul 1, 2024
1 parent 073b571 commit e53d5fe
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
26 changes: 18 additions & 8 deletions dpp-frontend/src/components/passport/PassportHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<DialogComponent :disabled="!verificationData.vc" icon="mdi-check-decagram" class="contract-modal">
<v-btn
rounded="pill"
:color="verificationData.vc ? 'green' : 'grey'"
:color="!verificationData.verified ? 'red' : !verificationData.vc ? 'grey' : 'green'"
:disabled="!verificationData.vc"
size="large"
class="verification-btn"
Expand All @@ -59,7 +59,11 @@
md
:icon="verificationData.vc ? 'mdi-check-decagram' : 'mdi-check-decagram-outline'"
></v-icon>
{{ $t("passportHeader.verification") }}
{{
!verificationData.verified || !verificationData.vc
? $t("passportHeader.unverified")
: $t("passportHeader.verification")
}}
</v-btn>
<template v-slot:title v-if="verificationData.vc">
{{ $t("passportHeader.verification") }}
Expand Down Expand Up @@ -117,9 +121,7 @@
</span>
</div>
<div v-if="verificationData.proof.type">
<span class="verification-label proof-value">
{{ $t("passportHeader.proofPurpose proof-value") }}:
</span>
<span class="verification-label proof-value"> {{ $t("passportHeader.proofPurpose") }}: </span>
<span class="verification-value proof-value">
{{ verificationData.proof.proofPurpose }}
</span>
Expand Down Expand Up @@ -147,7 +149,6 @@
? $t("passportHeader.verified")
: $t("passportHeader.unverified")
}}
<!-- {{ reloadVerificationData.status }} -->
</span>
</li>
<li class="verification" v-if="reloadVerificationData.message">
Expand All @@ -156,6 +157,12 @@
{{ reloadVerificationData.message }}
</span>
</li>
<li class="verification" v-if="reloadVerificationData.lastUpdated">
<span class="verification-label"> {{ $t("passportHeader.lastUpdated") }}: </span>
<span class="verification-value">
{{ reloadVerificationData.lastUpdated }}
</span>
</li>
</div>
</ul>
</div>
Expand Down Expand Up @@ -221,8 +228,9 @@ export default {
return {
verificationData: this.$props.verification,
reloadVerificationData: {
message: "Passport verified",
status: 200,
message: null,
status: null,
lastUpdated: null,
},
aspect: this.$props.vcAspect,
auth: inject("authentication"),
Expand All @@ -239,6 +247,8 @@ export default {
result.then((response) => {
this.reloadVerificationData.status = response.status;
this.reloadVerificationData.message = response.message;
let lastUpdated = new Date().toLocaleString();
this.reloadVerificationData.lastUpdated = lastUpdated;
});
},
},
Expand Down
3 changes: 2 additions & 1 deletion dpp-frontend/src/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
"verified": "Verifiziert",
"status": "Status",
"message": "Nachricht",
"lastUpdated": "Zuletzt aktualisiert",
"error": "Fehler",
"unverified": "Nicht Verifiziert",
"proof": "Nachweis",
Expand All @@ -165,7 +166,7 @@
"proofPurpose": "Zwecknachweis",
"verificationMethod": "Verifizierungsmethode",
"created": "Erstellt",
"jws": "JWS"
"jws": "Signatur"
},
"field": {
"tempRange": "Temperaturbereich:",
Expand Down
3 changes: 2 additions & 1 deletion dpp-frontend/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
"verified": "Verified",
"status": "Status",
"message": "Message",
"lastUpdated": "Last Updated",
"error": "Error",
"unverified": "Not Verified",
"proof": "Proof",
Expand All @@ -165,7 +166,7 @@
"proofPurpose": "Purpose proof",
"verificationMethod": "Verification method",
"created": "Created",
"jws": "JWS"
"jws": "Signature"
},
"field": {
"tempRange": "Temp range:",
Expand Down

0 comments on commit e53d5fe

Please sign in to comment.