Skip to content

Commit

Permalink
Revert "issue 1197"
Browse files Browse the repository at this point in the history
This reverts commit d9f81bc.
  • Loading branch information
horatiorosa committed May 17, 2024
1 parent d9f81bc commit 32367ee
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 60 deletions.
14 changes: 1 addition & 13 deletions app/components/data-table-row-current.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default Component.extend({
tagName: 'tr',
classNameBindings: ['getClassNames'],

getClassNames: computed('rowConfig', 'isSelected', function () {
getClassNames: computed('rowConfig', 'isSelected', function() {
const rowConfig = this.get('rowConfig');
const classes = [];

Expand All @@ -31,18 +31,6 @@ export default Component.extend({
return classes.join(' ');
}),

noPriorData: computed('data.previous.sum', function () {
const { 'data.previous': previous } = this.getProperties('data.previous');
if (
(previous &&
(typeof previous.sum === 'undefined' || previous.sum === null)) ||
typeof previous === 'undefined'
) {
return true;
}
return false;
}),

actions: {
showData() {
window.logModel = this.get('data');
Expand Down
6 changes: 3 additions & 3 deletions app/table-config/census/household-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ export default [
{ data: 'nfmhhu65', title: 'Householder under 65 years', indent: 1 },
{ data: 'nfmlvgaln', title: 'Householder living alone', indent: 1 },
{ data: 'nflva65pl', title: 'Householder 65 years and over', indent: 2 },
{ divider: true },
{ divider: true,},
{ data: 'hh_2', title: 'Total households', highlight: true },
{ data: 'mrdcplhh', title: 'Married couple household' },
{ data: 'mrdch18', title: 'With own children under 18', indent: 1 },
{ data: 'cocplhh', title: 'Cohabiting couple household' },
{ data: 'cocplhh', title: 'Cohabitng couple household' },
{ data: 'cocplch18', title: 'With own children under 18', indent: 1 },
{ data: 'malehhns', title: 'Male householder, no spouse or partner present' },
{ data: 'mnspchu18', title: 'With own children under 18', indent: 1 },
Expand All @@ -18,7 +18,7 @@ export default [
title: 'Female householder, no spouse or partner present',
},
{ data: 'fnspchu18', title: 'With own children under 18', indent: 1 },
{ divider: true },
{ divider: true,},
{ data: 'hhwu18', title: 'Households with individuals under 18 years' },
{ data: 'hhw65pl', title: 'Households with individuals 65 years and over' },
];
60 changes: 19 additions & 41 deletions app/templates/components/data-table-row-current.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#unless (or this.rowConfig.divider this.noPriorData)}}
{{#unless this.rowConfig.divider}}
<td class='title-column' {{action 'showData'}}>
<span>
{{this.rowConfig.title}}
Expand All @@ -19,7 +19,7 @@
class="cell-border-left no-compare-message"
colspan={{if this.reliability "5" "2"}}
>
Data for this row are not comparable or are unavailable
Data are suppressed for selected area
</td>
{{else}}
{{data-table-column-group
Expand Down Expand Up @@ -125,52 +125,30 @@
{{/if}}

{{else}}
{{#if this.noPriorData}}
<td class='title-column' {{action 'showData' }}>
<span>
{{@rowConfig.title}}
{{#if @rowConfig.tooltip}}
{{fa-icon icon='question-circle' transform='shrink-2'}}
{{ember-tooltip text=@rowConfig.tooltip side='right'}}
{{/if}}
</span>
</td>
<td
class="cell-border-left no-compare-message"
colspan="2"
>
{{#unless (not this.rowConfig.data)}}
Data for this row are not comparable or are unavailable
{{else}}
&nbsp;
{{/unless}}
</td>
{{else}}

<td>&nbsp;</td>
<td class="cell-border-left">&nbsp;</td>
<td>&nbsp;</td>
{{#if this.reliability}}
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="cell-border-left">&nbsp;</td>
{{/if}}


<td class="cell-border-left">&nbsp;</td>
<td>&nbsp;</td>
{{#if this.reliability}}
<td>&nbsp;</td>
{{#if this.reliability}}
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
{{/if}}

<td class="cell-border-left">&nbsp;</td>
<td>&nbsp;</td>
{{#if this.reliability}}
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
{{/if}}

<td class="cell-border-left">&nbsp;</td>
<td>&nbsp;</td>
{{#if this.reliability}}
{{/if}}

<td class="cell-border-left">&nbsp;</td>
<td>&nbsp;</td>
{{#if this.reliability}}
<td>&nbsp;</td>
<td>&nbsp;</td>
{{/if}}
{{/if}}

{{/unless}}
{{yield}}
6 changes: 3 additions & 3 deletions app/templates/components/data-table-row-previous.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class="cell-border-left no-compare-message"
colspan={{if this.reliability "5" "2"}}
>
Data for this row are not comparable or are unavailable
Data are suppressed for selected area
</td>
{{else}}
{{data-table-column-group
Expand Down Expand Up @@ -140,9 +140,9 @@
class="cell-border-left no-compare-message"
>
{{#unless (not this.rowConfig.data)}}
Data for this row are not comparable or are unavailable
Data for this row are not comparable or are unavailable
{{else}}
&nbsp;
&nbsp;
{{/unless}}
</td>
{{else}}
Expand Down

0 comments on commit 32367ee

Please sign in to comment.