feat: рендеринг формы максимально реактивный

This commit is contained in:
2026-04-13 10:32:06 +03:00
parent 4225c4d382
commit dbfe27bbb8
2 changed files with 48 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
#' @export
make_list_of_pages <- function(main_schema, main_key_id) {
make_list_of_pages = function(main_schema, main_key_id) {
cli::cli_alert_success("AAAA")
purrr::map(
.x = unique(main_schema$part),
@@ -22,7 +22,7 @@ make_list_of_pages <- function(main_schema, main_key_id) {
}
#' @export
make_panels <- function(scheme) {
make_panels = function(scheme) {
cards <- purrr::map(
.x = unique(scheme$subgroup),
@@ -61,7 +61,7 @@ make_panels <- function(scheme) {
}
#' @export
render_forms <- function(
render_forms = function(
form_id,
form_label,
form_type,
@@ -242,7 +242,7 @@ render_forms <- function(
#' @export
#' @description
#' Функция возращает пустое значение для каждого типа формы
get_empty_data <- function(type) {
get_empty_data = function(type) {
if (type %in% c("text", "select_one", "select_multiple")) return(as.character(NA))
if (type %in% c("radio", "checkbox")) return(as.character(NA))
if (type %in% c("date")) return(as.Date(NA))
@@ -255,7 +255,7 @@ get_empty_data <- function(type) {
#' @param type - type of form;
#' @param value - value to update;
#' @param local_delimeter - delimeter to split file
update_forms_with_data <- function(
update_forms_with_data = function(
form_id,
form_type,
value,
@@ -341,7 +341,7 @@ update_forms_with_data <- function(
}
#' @export
clean_forms <- function(
clean_forms = function(
table_name,
schm,
ns
@@ -366,5 +366,4 @@ clean_forms <- function(
)
}
)
}