fix: clean up code

This commit is contained in:
Yarmo Mackenbach 2023-09-19 13:00:28 +02:00
parent a28f1bba96
commit 78ec2a6bc6
No known key found for this signature in database
GPG key ID: 3C57D093219103A3

View file

@ -61,8 +61,6 @@ export class Claim extends HTMLElement {
const claimJson = JSON.parse(value);
const claim = doipjs.Claim.fromJson(claimJson);
console.log(claimJson);
root.querySelector('.info .title').innerText = claimJson.display.name;
root.querySelector('.info .subtitle').innerText = claimJson.display.serviceProviderName ??
(claim.status < 300 ? '???' : '---');
@ -70,14 +68,11 @@ export class Claim extends HTMLElement {
try {
if (claim.status >= 200) {
root.setAttribute('data-status', claim.status < 300 ? 'success' : 'failed');
// root.querySelector('.icons .verificationStatus').setAttribute('data-value', claim.status < 300 ? 'success' : 'failed');
} else {
root.setAttribute('data-status', 'running');
// root.querySelector('.icons .verificationStatus').setAttribute('data-value', 'running');
}
} catch (error) {
root.setAttribute('data-status', 'failed');
// root.querySelector('.icons .verificationStatus').setAttribute('data-value', 'failed');
}
const elContent = root.querySelector('.content');