R/mod_destination_ui.R

Defines functions mod_destination_server mod_destination_ui

# WARNING - Generated by {fusen} from /dev/dev_golem_module.Rmd: do not edit by hand

#' destination UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd 
#'
#' @importFrom shiny NS tagList 
#' @keywords internal
mod_destination_ui <- function(id){
  ns <- NS(id)
  tagList(
   tabsetPanel(type = "tabs",
         tabPanel(title= "Main Destination",
                  mod_plotviz_ui(ns("destination1"),
                  thisPlot = "plot_ctr_destination" ) ),
         
         tabPanel(title= "Recognition by Origin",
                  mod_plotviz_ui(ns("destination2"),
                  thisPlot = "plot_ctr_origin_recognition" ) )
      ) ## End Tabset 
  )
}
    
#' destination Server Functions
#'
#' @param reactiveParameters  Main app filters defined through mod_input
#' @noRd 
#' @import ggplot2
#' @import shiny
#' @keywords internal
mod_destination_server <- function(id, reactiveParameters){
  moduleServer( id, function(input, output, session){
    ns <- session$ns
      mod_plotviz_server("destination1", 
                         thisPlot = "plot_ctr_destination",
                         reactiveParameters )
       mod_plotviz_server("destination2", 
                          thisPlot = "plot_ctr_origin_recognition",
                          reactiveParameters )
 
  })
}
    
## To be copied in the UI
# mod_destination_ui("destination_1")
    
## To be copied in the server
# mod_destination_server("destination_1")
Edouard-Legoupil/unhcrdatapackage documentation built on Nov. 6, 2023, 6:10 p.m.