fix: missing namespaces for functions

This commit is contained in:
2026-06-17 13:45:43 +03:00
parent 4c50473c7e
commit 89d58c8df5

26
app.R
View File

@@ -359,13 +359,13 @@ server <- function(input, output, session) {
}
)
exported_df <- setNames(exported_values, input_ids) |>
as_tibble()
exported_df <- stats::setNames(exported_values, input_ids) |>
dplyr::as_tibble()
# пайплайн для главной таблицы
if (table_name == "main") {
exported_df <- exported_df |>
mutate(
dplyr::mutate(
!!dplyr::sym(mhcs()$get_main_key_id) := values$main_key,
.before = 1
)
@@ -374,7 +374,7 @@ server <- function(input, output, session) {
# для всех остальных таблицы (вложенные)
if (table_name != "main") {
exported_df <- exported_df |>
mutate(
dplyr::mutate(
!!dplyr::sym(mhcs()$get_main_key_id) := values$main_key,
!!dplyr::sym(nested_key_id) := values$nested_key,
.before = 1
@@ -546,12 +546,12 @@ server <- function(input, output, session) {
str_cols <- which(col_types$form_type != "date")
values$data <- values$data |>
select(-mhcs()$get_main_key_id) |>
mutate(
dplyr::select(-mhcs()$get_main_key_id) |>
dplyr::mutate(
dplyr::across(tidyselect::all_of({{date_cols}}), as.Date),
dplyr::across(tidyselect::all_of({{str_cols}}), as.character),
) |>
arrange({{key_id}})
dplyr::arrange({{key_id}})
output$dt_nested <- DT::renderDataTable(
DT::datatable(
@@ -898,7 +898,7 @@ server <- function(input, output, session) {
con <- db$make_db_connection(scheme(),"load_data_button")
on.exit(db$close_db_connection(con, "load_data_button"))
if (length(dbListTables(con)) != 0 && "main" %in% DBI::dbListTables(con)) {
if (length(DBI::dbListTables(con)) != 0 && "main" %in% DBI::dbListTables(con)) {
# GET DATA files
ids <- db$get_keys_from_table("main", mhcs(), con)
@@ -1250,10 +1250,10 @@ server <- function(input, output, session) {
dplyr::across(tidyselect::all_of({{number_columns}}), num_converter),
dplyr::across(tidyselect::all_of({{other_cols}}), \(x) dplyr::if_else(x == "", as.character(NA), as.character(x)))
) |>
select(all_of(unique(c(main_key_id, scheme$form_id))))
dplyr::select(tidyselect::all_of(unique(c(main_key_id, scheme$form_id))))
df_original <- DBI::dbReadTable(con, table_name) |>
as_tibble()
dplyr::as_tibble()
if (input$upload_data_from_xlsx_owerwrite_all_data == TRUE) {
@@ -1262,7 +1262,7 @@ server <- function(input, output, session) {
} else {
# удаление данных в базе данных по ключам
walk(
purrr::walk(
.x = unique(df[[main_key_id]]),
.f = \(main_key) {
@@ -1308,7 +1308,7 @@ server <- function(input, output, session) {
read_df_from_db_all <- function(table_name, con) {
# check if this table exist
if (table_name %in% dbListTables(con)) {
if (table_name %in% DBI::dbListTables(con)) {
# prepare query
query <- glue::glue("
SELECT * FROM {table_name}
@@ -1335,7 +1335,7 @@ server <- function(input, output, session) {
action <- match.arg(action)
action_row <- tibble(
action_row <- dplyr::tibble(
date = Sys.time(),
user = values$current_user,
app_id = config::get("form_id"),