Skip to content

Commit

Permalink
get rid of outputs colons; add header for no data state
Browse files Browse the repository at this point in the history
  • Loading branch information
graphographer committed Apr 4, 2024
1 parent ccc350e commit f549f22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/components/tabs/BeMapActivityData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { isEmpty } from 'lodash-es';
export class BeMapActivityData extends StateProvider {
render() {
return isEmpty(this.state.activitiesForSelectedCountryByAgency)
? html`<em>No data available.</em>`
? html`<h4>USG Program Data for Fiscal Year ${this.state.latestFY}</h4>
<em>No data available.</em>`
: html`
<h4>USG Program Data for Fiscal Year ${this.state.latestFY}</h4>
<p>
Expand Down
18 changes: 9 additions & 9 deletions src/components/tabs/BeMapOutputIndicators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class BeMapOutputIndicators extends StateProvider {
<ul class="flex-grow">
${LEARNERS_REACHED_DEMOS.map(demo => {
return html`<li class="space-between">
<span class="flex-grow">${demo}:</span>
<span class="flex-grow">${demo}</span>
<span
>${US_NUMBER_FORMATTER.format(
// @ts-ignore
Expand All @@ -132,7 +132,7 @@ export class BeMapOutputIndicators extends StateProvider {
</li>`;
})}
<li class="space-between flex-grow">
<span>Total All Ages:</span>
<span>Total All Ages</span>
<span
>${US_NUMBER_FORMATTER.format(
this.state.learnersReached.TotalAll as number
Expand Down Expand Up @@ -197,7 +197,7 @@ export class BeMapOutputIndicators extends StateProvider {
'Total'
].map(demo => {
return html`<li class="space-between flex-grow">
<span>${demo}:</span>
<span>${demo}</span>
<span
>${US_NUMBER_FORMATTER.format(
// @ts-ignore
Expand Down Expand Up @@ -241,7 +241,7 @@ export class BeMapOutputIndicators extends StateProvider {
'Total'
].map(demo => {
return html`<li class="space-between flex-grow">
<span>${demo}:</span>
<span>${demo}</span>
<span
>${US_NUMBER_FORMATTER.format(
// @ts-ignore
Expand All @@ -261,7 +261,7 @@ export class BeMapOutputIndicators extends StateProvider {
${hasFacilitiesRepaired
? html`
<li class="space-between flex-grow">
<span>${EIndicatorHeader.FacilitiesRepaired}:</span>
<span>${EIndicatorHeader.FacilitiesRepaired}</span>
<span
>${US_NUMBER_FORMATTER.format(
this.state.outputIndicatorsForSelectedCountryStructural[
Expand All @@ -275,7 +275,7 @@ export class BeMapOutputIndicators extends StateProvider {
${hasLearningMaterials
? html`
<li class="space-between flex-grow">
<span>${EIndicatorHeader.LearningMaterials}:</span>
<span>${EIndicatorHeader.LearningMaterials}</span>
<span
>${US_NUMBER_FORMATTER.format(
this.state.outputIndicatorsForSelectedCountryStructural[
Expand Down Expand Up @@ -304,19 +304,19 @@ export class BeMapOutputIndicators extends StateProvider {
<ul>
${increasedAccess
? html`<li class="space-between flex-grow">
<span>${[EIndicatorHeader.IncreasedAccess]}:</span>
<span>${[EIndicatorHeader.IncreasedAccess]}</span>
<span>${US_NUMBER_FORMATTER.format(increasedAccess)}</span>
</li>`
: ''}
${newEmployment
? html`<li class="space-between flex-grow">
<span>${[EIndicatorHeader.NewEmployment]}:</span>
<span>${[EIndicatorHeader.NewEmployment]}</span>
<span>${US_NUMBER_FORMATTER.format(newEmployment)}</span>
</li>`
: ''}
${softSkills
? html`<li class="space-between flex-grow">
<span>${[EIndicatorHeader.SoftSkills]}:</span>
<span>${[EIndicatorHeader.SoftSkills]}</span>
<span>${US_NUMBER_FORMATTER.format(softSkills)}</span>
</li>`
: ''}
Expand Down

0 comments on commit f549f22

Please sign in to comment.