Skip to content

Commit 731a75f

Browse files
authored
Merge pull request #238 from unicef/cso-dash-export
Fixes export button url and conditional rendering of export button on…
2 parents b2fe6d6 + 4bfca9e commit 731a75f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dash/pages/page-dashboard.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ <h1 main-title>
7070
hide-search hidden$="[[!_isActive(partnershipPage, 'hact')]]">
7171
</etools-dropdown>
7272
</div>
73-
<div class="top-content-action" hidden$="[[!hactActive]]">
74-
<a target="_blank" href="[[exportUrl]]">
73+
<div class="top-content-action" hidden$="[[hideExport]]">
74+
<a target="_blank" href="[[csvUrl]]">
7575
<paper-button>
7676
<iron-icon icon="file-download"></iron-icon>
7777
Export
@@ -194,6 +194,7 @@ <h1 main-title>
194194
dashTab === 'partnerships' ? this.set('pageTitle', 'CSO Dashboard') : this.set('pageTitle', 'Dashboard');
195195
},
196196
_updateUrlTab: function(tab) {
197+
this.hideExport = tab === 'hact' || tab === 'partnerships' ? false : true;
197198
if (!tab) {
198199
return;
199200
}
@@ -208,7 +209,7 @@ <h1 main-title>
208209
window.location.href = this.baseSite +'/t2f/edit-travel/-1';
209210
},
210211
_setExportYear: function() {
211-
this.exportUrl = event.target.dropdownValue;
212+
this.csvUrl = event.target.dropdownValue;
212213
},
213214
});
214215

0 commit comments

Comments
 (0)