feat: task_module
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#' @description Function to open connection to db, disigned to easy dubugging.
|
||||
#' @param where text mark to distingiush calss
|
||||
make_db_connection = function(scheme, where = "") {
|
||||
if (getOption("APP.DEBUG", FALSE)) message("=== DB CONNECT ", where)
|
||||
|
||||
DBI::dbConnect(RSQLite::SQLite(), fs::path(
|
||||
config::get("form_app_configure_path"),
|
||||
"db",
|
||||
|
||||
@@ -40,6 +40,19 @@ scheme_R6 <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
|
||||
# отдельно для тасков
|
||||
private$schemes_list[["tasks"]] <- tibble::tribble(
|
||||
~ form_id, ~form_type, ~form_label, ~form_description, ~choices,
|
||||
"dummy", "text", "dummy", "dummy", NA,
|
||||
"task_status", "select_one", "Статус задачи", NA, "active",
|
||||
"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,
|
||||
) |>
|
||||
dplyr::mutate(condition = NA)
|
||||
|
||||
# extract main key
|
||||
private$main_key_id <- self$get_key_id("main")
|
||||
|
||||
@@ -78,6 +91,7 @@ scheme_R6 <- R6::R6Class(
|
||||
get_scheme = function(table_name) {
|
||||
private$schemes_list[[table_name]]
|
||||
},
|
||||
|
||||
## с полями имеющие значение -------
|
||||
get_scheme_with_values_forms = function(table_name) {
|
||||
private$schemes_list[[table_name]] |>
|
||||
@@ -117,7 +131,7 @@ scheme_R6 <- R6::R6Class(
|
||||
nested_forms_names = NA,
|
||||
bslib_rendered_ui = NA,
|
||||
excluded_types = c("nested_forms", "description", "description_header"),
|
||||
reserved_table_names = c("meta", "log", "main"),
|
||||
reserved_table_names = c("meta", "log", "main", "tasks"),
|
||||
|
||||
load_scheme_from_xlsx = function(sheet_name) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user