From 40382157f9615c01fb09ccd20320ee1d2b0549ae Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Fri, 20 Dec 2024 19:12:21 -0700 Subject: [PATCH] fix linting --- src/views/ClaimCertificateView.vue | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/views/ClaimCertificateView.vue b/src/views/ClaimCertificateView.vue index 6716932..b0a0383 100644 --- a/src/views/ClaimCertificateView.vue +++ b/src/views/ClaimCertificateView.vue @@ -109,12 +109,12 @@ export default class ClaimCertificateView extends Vue { ctx.font = "bold 20px Arial"; const claimTypeText = claimData.claimType === "GiveAction" - ? "Gift" - : claimData.claimType === "PlanAction" - ? "Project" - : this.serverUtil.capitalizeAndInsertSpacesBeforeCaps( - claimData.claimType || "", - ); + ? "Gift" + : claimData.claimType === "PlanAction" + ? "Project" + : this.serverUtil.capitalizeAndInsertSpacesBeforeCaps( + claimData.claimType || "", + ); const claimTypeWidth = ctx.measureText(claimTypeText).width; ctx.fillText( claimTypeText, @@ -162,13 +162,18 @@ export default class ClaimCertificateView extends Vue { ); } - if (claimData.claim.object?.amountOfThisGood && claimData.claim.object?.unitCode) { + if ( + claimData.claim.object?.amountOfThisGood && + claimData.claim.object?.unitCode + ) { const amount = claimData.claim.object.amountOfThisGood; const unit = claimData.claim.object.unitCode; const amountText = serverUtil.displayAmount(unit, amount); const amountWidth = ctx.measureText(amountText).width; // if there was no description then put this in that spot, otherwise put it below the description - const yPos = descriptionText ? CANVAS_HEIGHT * 0.525 : CANVAS_HEIGHT * 0.495; + const yPos = descriptionText + ? CANVAS_HEIGHT * 0.525 + : CANVAS_HEIGHT * 0.495; ctx.font = "14px Arial"; ctx.fillText(amountText, (CANVAS_WIDTH - amountWidth) / 2, yPos); } @@ -176,7 +181,10 @@ export default class ClaimCertificateView extends Vue { // Draw claim issuer & recipient if (claimData.issuer) { ctx.font = "14px Arial"; - let fullIssuer = serverUtil.didInfoForCertificate(claimData.issuer, allContacts); + let fullIssuer = serverUtil.didInfoForCertificate( + claimData.issuer, + allContacts, + ); if (fullIssuer.length > 15) { fullIssuer = fullIssuer.substring(0, 30) + "..."; }