-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #502 from Vizzuality/fix/ascor-assessment-dates
fix: assessment date combo boxes at ASCOR section
- Loading branch information
1 parent
f32e1e0
commit 72a6be4
Showing
9 changed files
with
27 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/views/tpi/ascor/_index_assessment.js.erb → app/views/tpi/ascor/index_assessment.js.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
(function () { | ||
document.getElementById('bubble-chart').innerHTML = "<%= j render('bubble_chart') %>"; | ||
const newUrl = new URL(window.location.href); | ||
newUrl.searchParams.set('assessment_date', <%= @assessment_date %>); | ||
newUrl.searchParams.set('assessment_date', "<%= @assessment_date %>"); | ||
window.history.replaceState({}, '', newUrl.href); | ||
ReactRailsUJS.mountComponents('#bubble-chart'); | ||
})(); |
4 changes: 2 additions & 2 deletions
4
.../ascor/_index_emissions_assessment.js.erb → ...i/ascor/index_emissions_assessment.js.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
(function () { | ||
document.getElementById('emissions-chart').innerHTML = "<%= j render('emissions_chart') %>"; | ||
const newUrl = new URL(window.location.href); | ||
newUrl.searchParams.set('emissions_assessment_date', <%= @assessment_date %>); | ||
newUrl.searchParams.set('emissions_assessment_date', "<%= @emissions_assessment_date %>"); | ||
window.history.replaceState({}, '', newUrl.href); | ||
ReactRailsUJS.mountComponents('#emissions-charts'); | ||
ReactRailsUJS.mountComponents('#emissions-chart'); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
app/views/tpi/ascor/_show_assessment.js.erb → app/views/tpi/ascor/show_assessment.js.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
(function () { | ||
document.getElementById('assessment').innerHTML = "<%= j render('assessment') %>"; | ||
document.getElementById('assessment').innerHTML = "<%= j render('assessment', assessment: @assessment) %>"; | ||
const newUrl = new URL(window.location.href); | ||
newUrl.searchParams.set('assessment_date', <%= @assessment_date %>); | ||
newUrl.searchParams.set('assessment_id', "<%= @assessment.id %>"); | ||
window.history.replaceState({}, '', newUrl.href); | ||
ReactRailsUJS.mountComponents('#assessment'); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters