Commit 1f57c314 authored by Dorchies David's avatar Dorchies David
Browse files

feat: add contextual labels for objective thresholds

Refs #14
parent bf60ab67
Pipeline #22731 passed with stage
in 3 minutes and 6 seconds
......@@ -58,6 +58,19 @@ mod_one_objective_focus_ui <- function(id){
mod_one_objective_focus_server <- function(id, con, SGL_RT_storage){
moduleServer( id, function(input, output, session){
ns <- session$ns
observeEvent({
input$station
}, {
objectives <- rvgest::objectives[rvgest::objectives$station == input$station,]
levels <- unique(rvgest::objectives$level)
names(levels) <- paste(objectives$level, "Q",
ifelse(objectives$flood, "<", ">"),
objectives$threshold, "m3/s")
golem::print_dev(levels)
updateSelectInput(session, inputId = "level", choices = levels)
})
observe({
objective <- rvgest::objectives[rvgest::objectives$station == input$station & rvgest::objectives$level == input$level,]
indexMonths <- c(1,31,28,31,30,31,30,31,31,30,31,30)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment