From bd952fd56d6caf51223bd95de764d5d0daee55db Mon Sep 17 00:00:00 2001 From: michaelglenister Date: Mon, 3 Jun 2024 18:46:50 +0200 Subject: [PATCH] Use constance to show the correct quarter --- assets/js/components/income.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/assets/js/components/income.js b/assets/js/components/income.js index c47953e0b..3a02e6da9 100644 --- a/assets/js/components/income.js +++ b/assets/js/components/income.js @@ -341,13 +341,9 @@ export class NationalConditionalGrantsSection extends AbstractIncomeSection { this._transferredLabel = {}; this._spentLabel = {}; for (const year in this._chartData) { - const legendYear = this.sectionData.snapshot_date.year; - let legendQuarter = null; - if (year >= this.sectionData.snapshot_date.year) { - legendQuarter = this.sectionData.snapshot_date.quarter; - } else if (year < this.sectionData.snapshot_date.year) { - legendQuarter = 4; - } + let legendYear = this.sectionData.snapshot_date.year; + let legendQuarter = this.sectionData.snapshot_date.quarter; + this._transferredLabel[year] = `Amount transferred up to ${legendYear} Q${legendQuarter}`; this._spentLabel[year] = `Amount spent up to ${legendYear} Q${legendQuarter}`;