formatting

This commit is contained in:
Andreas Gammelgaard Damsbo 2024-11-18 16:50:03 +01:00
parent 4e7af7d01f
commit 3590a9e216
No known key found for this signature in database
2 changed files with 13 additions and 14 deletions

View File

@ -32,6 +32,11 @@ server <- function(input, output, session) {
# return(!is.null(getData())) # return(!is.null(getData()))
# }) # })
dd <- shiny::reactive({
shiny::req(input$ds)
v$file <- "loaded"
ds2dd_detailed(data = dat())
})
output$uploaded <- shiny::reactive({ output$uploaded <- shiny::reactive({
if (is.null(v$file)) { if (is.null(v$file)) {
@ -43,12 +48,6 @@ server <- function(input, output, session) {
shiny::outputOptions(output, "uploaded", suspendWhenHidden = FALSE) shiny::outputOptions(output, "uploaded", suspendWhenHidden = FALSE)
dd <- shiny::reactive({
shiny::req(input$ds)
v$file <- "loaded"
ds2dd_detailed(data = dat())
})
output$data.tbl <- gt::render_gt( output$data.tbl <- gt::render_gt(
dd() |> dd() |>
purrr::pluck("data") |> purrr::pluck("data") |>

View File

@ -19,17 +19,17 @@ ui <-
".ods" ".ods"
) )
), ),
shiny::actionButton( # shiny::actionButton(
inputId = "load_data", # inputId = "load_data",
label = "Load data", # label = "Load data",
icon = shiny::icon("circle-down") # icon = shiny::icon("circle-down")
), # ),
shiny::helpText("Have a look at the preview panels to validate the data dictionary and imported data."), shiny::helpText("Have a look at the preview panels to validate the data dictionary and imported data."),
# For some odd reason this only unfolds when the preview panel is shown.. # For some odd reason this only unfolds when the preview panel is shown..
# This has been solved by adding an arbitrary button to load data # This has been solved by adding an arbitrary button to load data - which was abandoned again
shiny::conditionalPanel( shiny::conditionalPanel(
# condition = "output.uploaded=='yes'", condition = "output.uploaded=='yes'",
condition = "input.load_data", # condition = "input.load_data",
# shiny::helpText("Below you can download the dataset formatted for upload and the # shiny::helpText("Below you can download the dataset formatted for upload and the
# corresponding data dictionary for a new data base, if you want to upload manually."), # corresponding data dictionary for a new data base, if you want to upload manually."),
# Button # Button