refactor: cleaning and polishing

This commit is contained in:
2026-04-24 14:26:24 +03:00
parent 4b05fbafc2
commit 87444b5718
8 changed files with 69 additions and 62 deletions

View File

@@ -71,6 +71,7 @@ val_is_a_number = function(x) {
# exit if empty
if (is_this_empty_value(x)) return(NULL)
# хак для пропуска значений
if (x == "NA") return(NULL)
@@ -82,7 +83,7 @@ val_is_a_number = function(x) {
## находится ли число в заданном диапазоне значений -------
val_number_within_a_range = function(x, ranges) {
# exit if empty
if (is_this_empty_value(x)) return(NULL)
if (x == "NA") return(NULL)

View File

@@ -46,8 +46,6 @@ check_if_table_is_exist_and_init_if_not = function(
if (table_name %in% DBI::dbListTables(con)) {
cli::cli_inform(c("*" = "проверка таблицы в базе данных: '{table_name}'"))
# если таблица существует, производим проверку структуры таблицы
compare_existing_table_with_schema(
table_name = table_name,
@@ -121,6 +119,8 @@ compare_existing_table_with_schema = function(
con = rlang::env_get(rlang::caller_env(), nm = "con")
) {
cli::cli_progress_step("проверка таблицы в базе данных: '{table_name}'")
main_key <- schm$get_main_key_id
key_id <- schm$get_key_id(table_name)
forms_ids <- schm$get_forms_ids(table_name)
@@ -401,5 +401,4 @@ local_db_backup <- function(
}
}
)
}
}

View File

@@ -48,8 +48,8 @@ scheme_R6 <- R6::R6Class(
"task_status", "select_one", "Статус задачи", NA, "completed",
"task_status", "select_one", "Статус задачи", NA, "deleted",
"task_title", "text", "Название задачи", NA, NA,
"task_description", "text", "Описание задачи", "краткое описание", NA,
"task_due_date", "date", "Дата выполнения задачи", "YE DJN", NA,
"task_description", "text", "Описание задачи", "краткое описание", "2",
"task_due_date", "date", "Дата выполнения задачи", NA, NA,
) |>
dplyr::mutate(condition = NA)

View File

@@ -135,7 +135,8 @@ render_forms = function(
form <- shiny::textAreaInput(
inputId = form_id,
label = label,
rows = 1
rows = 1,
resize = "none"
)
}