From 18eb9e928a715b8d156517ab8ae0914c292bb800 Mon Sep 17 00:00:00 2001 From: drdolgovvv Date: Thu, 13 Aug 2026 10:12:29 +0300 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=D0=BD=D0=B5=D0=BA=D0=BE=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D1=8B=D0=B5=20=D0=B2=D0=B8=D0=B7=D1=83=D0=B0=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D1=8B=D0=B5=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/modules/utils.R | 10 +++++++--- www/styles.css | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/R/modules/utils.R b/R/modules/utils.R index c390d9d..2f71c8f 100644 --- a/R/modules/utils.R +++ b/R/modules/utils.R @@ -117,7 +117,9 @@ render_forms = function( }, if (!is.na(description) && !is.na(form_label)) shiny::br(), if (!is.na(description)) { - shiny::span(shiny::markdown(description)) |> htmltools::tagAppendAttributes(style = "color:gray; font-size:small; line-height: 1.4;") + shiny::markdown(description) |> + shiny::span() |> + htmltools::tagAppendAttributes(style = "color:gray; font-size:small; line-height: 1.4;") } ) } @@ -225,7 +227,7 @@ render_forms = function( if (form_type == "description_header") { form <- shiny::h5( label, - style = "margin-bottom: -8px; margin-top: 10px;" + style = "margin-bottom: 0px; margin-top: 10px;" ) } @@ -236,10 +238,12 @@ render_forms = function( form, ns = ifelse(missing(ns), shiny::NS(NULL), ns) ) + form <- shiny::tagAppendAttributes(form, style = "margin-top: -10px;") } if (is.null(form)) cli::cli_abort("невозможно создать форму типа '{form_type}' (id: '{form_id}') !") - form + + form } diff --git a/www/styles.css b/www/styles.css index 97ac71b..e04e2f8 100644 --- a/www/styles.css +++ b/www/styles.css @@ -1,7 +1,7 @@ .description-header { /* 1. Add the border around the whole box */ border-bottom: 2px solid #777777; - + /* 2. Forces border inside the total width/height (prevents breaking layouts) */ box-sizing: border-box; -- 2.49.1 From 975dee11ccf8c5b3c4ff80231babd39fe2528005 Mon Sep 17 00:00:00 2001 From: drdolgovvv Date: Wed, 2 Sep 2026 07:31:43 +0300 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=D0=BC=D0=B5=D0=BD=D1=8E=20=D0=B2?= =?UTF-8?q?=D1=8B=D0=B1=D0=BE=D1=80=D0=B0=20=D0=B2=20=D0=BF=D1=80=D0=B5?= =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D0=B0=D1=85=20=D0=BA=D0=B0=D1=80=D1=82=D0=BE?= =?UTF-8?q?=D1=87=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/modules/utils.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/modules/utils.R b/R/modules/utils.R index 2f71c8f..0e3b284 100644 --- a/R/modules/utils.R +++ b/R/modules/utils.R @@ -170,7 +170,8 @@ render_forms = function( selected = NULL, options = list( create = TRUE, - onInitialize = I('function() { this.setValue(""); }') + onInitialize = I('function() { this.setValue(""); }'), + # dropdownParent = "body" # overfrlow in card ) ) } @@ -185,7 +186,8 @@ render_forms = function( multiple = TRUE, options = list( create = TRUE, - onInitialize = I('function() { this.setValue(""); }') + onInitialize = I('function() { this.setValue(""); }'), + dropdownParent = "body" ) ) } -- 2.49.1 From 6a9535ffbb3772930ba92a0a96f4c31b1e0443fa Mon Sep 17 00:00:00 2001 From: drdolgovvv Date: Thu, 10 Sep 2026 16:21:09 +0300 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BB=D0=B8=D1=88=D0=BD=D0=B5=D0=B9=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BF=D1=8F=D1=82=D0=BE=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/modules/utils.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/modules/utils.R b/R/modules/utils.R index 0e3b284..1967036 100644 --- a/R/modules/utils.R +++ b/R/modules/utils.R @@ -170,7 +170,7 @@ render_forms = function( selected = NULL, options = list( create = TRUE, - onInitialize = I('function() { this.setValue(""); }'), + onInitialize = I('function() { this.setValue(""); }') # dropdownParent = "body" # overfrlow in card ) ) -- 2.49.1 From 4a06d93e64f9c5130d35424ba12f9654f971500e Mon Sep 17 00:00:00 2001 From: drdolgovvv Date: Mon, 14 Sep 2026 13:40:02 +0300 Subject: [PATCH 4/4] devel: setup for sql-like data generation --- R/modules/db.R | 21 ++++++++++++++++++--- R/modules/utils.R | 10 ++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/R/modules/db.R b/R/modules/db.R index 8c17d90..0fda81c 100644 --- a/R/modules/db.R +++ b/R/modules/db.R @@ -1,3 +1,7 @@ +options(box.path = here::here()) +box::use( + R/modules/utils +) #' @export #' @description Function to open connection to db, disigned to easy dubugging. @@ -102,9 +106,6 @@ get_dummy_data = function(type) { #' типу данных get_dummy_df = function(forms_id_type_list) { - options(box.path = here::here()) - box::use(R/modules/utils) - purrr::map( .x = forms_id_type_list, .f = utils$get_empty_data @@ -113,6 +114,20 @@ get_dummy_df = function(forms_id_type_list) { } +#' @description +#' Генерация пустого датасета с пустыми значениями соответствующие +#' типу данных +get_query_df = function(forms_id_type_list) { + + names_and_types <- purrr::map( + .x = forms_id_type_list, + .f = utils$get_sql_format + ) + + paste(names(names_and_types), unname(names_and_types), collapse = ",\n") + +} + #' @description #' Сравнение полей в существующей в базе данных таблице и попытка #' коррекции таблицы diff --git a/R/modules/utils.R b/R/modules/utils.R index 1967036..3b71b8a 100644 --- a/R/modules/utils.R +++ b/R/modules/utils.R @@ -260,6 +260,16 @@ get_empty_data = function(type) { if (type %in% c("number")) as.character(NA) } +#' @export +#' @description +#' Функция возращает пустое значение для каждого типа формы +get_sql_format = function(type) { + if (type %in% c("text", "select_one", "select_multiple")) return("TEXT") + if (type %in% c("radio", "checkbox")) return("TEXT") + if (type %in% c("date")) return("REAL") + if (type %in% c("number")) return("TEXT") +} + #' @export #' @description Function to update input forms (default variants only) #' @param id - input form id; -- 2.49.1