source('R/credentials.R')
source('R/lab_submission_module.R')
source('R/utils-pipe.R')
source('R/utils.R')
#' @include lab_submission_module.R
#' @export
ui <- shinymanager::secure_app(shiny::shinyUI(
shiny::fluidPage(
shinyjs::useShinyjs(),
theme = shinythemes::shinytheme("cosmo"),
shiny::navbarPage(
title = "covidApp",
id = "tabs",
# TAB1: Insert metadata
shiny::tabPanel(
title = "Load metadata",
value = "tab_1",
lab_submission_module_ui("tab1")
)
)
)
))
#' @export
server <- function(input, output, session) {
res_auth <- shinymanager::secure_server(
check_credentials <- shinymanager::check_credentials(credentials)
)
## Module tab 1
lab_submission_module_server("tab1")
## Conditional tab by user type
shiny::observe({
if (is.null(res_auth$module)) {
shiny::hideTab(inputId = "tabs", target = "tab_1")
} else {
if (res_auth$module == 1) {
shiny::showTab(inputId = "tabs", target = "tab_1")
} else {
shiny::hideTab(inputId = "tabs", target = "tab_1")
}
}
})
}
shiny::shinyApp(ui, server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.