From 4941d954a0c6a027d2d1b814930e4d500fc527f8 Mon Sep 17 00:00:00 2001 From: madeliri Date: Sat, 11 Apr 2026 14:32:21 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=B4=D0=B8=D0=BD=D0=B0=D0=BC=D0=B8?= =?UTF-8?q?=D1=87=D0=B5=D1=81=D0=BA=D0=B8=D0=B9=20=D1=80=D0=B5=D0=BD=D0=B4?= =?UTF-8?q?=D0=B5=D1=80=D0=B8=D0=BD=D0=B3=20=D1=8D=D0=BB=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=D0=BE=D0=B2=20=D1=84=D0=BE=D1=80=D0=BC=D1=8B=20(?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=20=D0=BD=D0=B0=D0=BB=D0=B8=D1=87=D0=B8=D0=B8?= =?UTF-8?q?=20=D0=B2=D1=8B=D0=B1=D1=80=D0=B0=D0=BD=D0=BD=D0=BE=D0=B3=D0=BE?= =?UTF-8?q?=20=D0=B3=D0=BB=D0=B0=D0=B2=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=BA?= =?UTF-8?q?=D0=BB=D1=8E=D1=87=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.R | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/app.R b/app.R index c032caf..ffdd42d 100644 --- a/app.R +++ b/app.R @@ -106,12 +106,7 @@ ui <- page_sidebar( position = "left", open = list(mobile = "always") ), - # list of rendered panels - navset_card_underline( - id = "main", - !!!nav_panels_list, - header = NULL - ) + as_fill_carrier(uiOutput("main_ui_navset")) ) # MODALS ======================== @@ -131,6 +126,7 @@ if (AUTH_ENABLED) ui <- shinymanager::secure_app(ui, enable_admin = TRUE) # SERVER LOGIC ============================= server <- function(input, output, session) { + # AUTH SETUP ======================================== if (AUTH_ENABLED) { # check_credentials directly on sqlite db @@ -157,14 +153,21 @@ server <- function(input, output, session) { nested_id_and_types = NULL ) - # showModal(modalDialog( - # title = "Добро пожаловать", - # "что будем делать?", - # footer = tagList( - # actionButton("add_new_main_key_button", "добавить"), - # actionButton("load_data_button", "загрузить") - # ) - # )) + # динамический рендеринг -------------------------- + output$main_ui_navset <- renderUI({ + + shiny::validate( + need(values$main_key, "⚠️ Необходимо указать id пациента!") + ) + + # list of rendered panels + navset_card_underline( + id = "main", + !!!nav_panels_list, + header = NULL, + height = NULL + ) + }) # ========================================== # ОБЩИЕ ФУНКЦИИ ============================ @@ -359,7 +362,8 @@ server <- function(input, output, session) { ), actionButton("add_new_nested_key_button", "add"), actionButton("nested_form_save_button", "save"), - actionButton("nested_form_dt_button", "dt") + actionButton("nested_form_dt_button", "dt"), + open = list(mobile = "always-above") ), # if (!is.null(values$nested_key)) {rlang::syms(!!!yay_its_fun)} else bslib::nav_panel("empty") !!!yay_its_fun @@ -441,6 +445,7 @@ server <- function(input, output, session) { con <- db$make_db_connection("nested_form_save_button") on.exit(db$close_db_connection(con, "nested_form_save_button"), add = TRUE) + removeModal() show_modal_for_nested_form_dt(con) }) @@ -909,7 +914,7 @@ server <- function(input, output, session) { } ) - ## upload xlsx to df ---------------------- + ## import data from xlsx ---------------------- observeEvent(input$button_upload_data_from_xlsx, { showModal(modalDialog(