belege umbenannt

This commit is contained in:
2026-04-30 17:40:13 +02:00
parent f52d5fa3dd
commit b5d7e435c1
802 changed files with 84 additions and 19296 deletions
+18
View File
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>gemfin-shiny</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.statet.r.resourceProjects.RBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.statet.ide.resourceProjects.Statet</nature>
<nature>org.eclipse.statet.r.resourceProjects.R</nature>
</natures>
</projectDescription>
+10 -6
View File
@@ -60,7 +60,7 @@ buchungenServer <- function(id, conn, r_global) {
## ** Reactive Variablen ---- ## ** Reactive Variablen ----
postings_data <- reactiveVal(read_buch_tabelle(conn)) postings_data <- reactiveVal(read_buch_tabelle(conn))
sel_details <- reactiveVal(NULL) sel_details <- reactiveVal(NULL)
selected_trans_id <- reactiveVal(NULL) selected_entry_id <- reactiveVal(NULL)
reset_trigger <- reactiveVal(NULL) reset_trigger <- reactiveVal(NULL)
current_main_idx <- reactiveVal(NULL) current_main_idx <- reactiveVal(NULL)
@@ -179,17 +179,20 @@ updateTextAreaInput(session, "note", value = record_entry$purpose)
## ** Anhänge ---- ## ** Anhänge ----
output$attachments_ui <- renderUI({ output$attachments_ui <- renderUI({
req(sel_details()) req(sel_details())
entry_id <- selected_entry_id(dbxSelect(conn, paste0("SELECT entry_id FROM postings WHERE id=",
dbxSelect(conn, paste0("SELECT entry_id FROM postings WHERE id=", sel_details()$id[1])) %>% sel_details()$id[1])) %>%
pull pull )
att <- dbxSelect(conn, paste0("SELECT * FROM attachments WHERE entry_id = ", entry_id )) print(selected_entry_id())
att <- dbxSelect(conn, paste0("SELECT * FROM attachments WHERE entry_id = ", selected_entry_id() ))
if (nrow(att) == 0) return(p("Keine Anhänge vorhanden.")) if (nrow(att) == 0) return(p("Keine Anhänge vorhanden."))
## *** Anhänge anzeigen ---- ## *** Anhänge anzeigen ----
tagList(lapply(seq_len(nrow(att)), function(i) { tagList(lapply(seq_len(nrow(att)), function(i) {
ext <- tools::file_ext(att$original_name[i]) ext <- tools::file_ext(att$original_name[i])
filename <- paste0("attachments/", att$id[i], ".", ext) filename <- paste0("www/documents/", att$id[i], ".", ext)
## *** Anhang öffnen ---- ## *** Anhang öffnen ----
observeEvent(input[[paste0("open_att_", att$id[i])]], { observeEvent(input[[paste0("open_att_", att$id[i])]], {
browser()
showModal(modalDialog( showModal(modalDialog(
tags$iframe(src = filename, width = "100%", height = "600px", tags$iframe(src = filename, width = "100%", height = "600px",
style = "border:none;"), style = "border:none;"),
@@ -199,6 +202,7 @@ updateTextAreaInput(session, "note", value = record_entry$purpose)
footer = modalButton("Schließen") footer = modalButton("Schließen")
)) ))
}, ignoreInit = TRUE, once = FALSE) }, ignoreInit = TRUE, once = FALSE)
## *** Buttons Anhänge ---- ## *** Buttons Anhänge ----
div( div(
actionLink(ns(paste0("open_att_", att$id[i])), att$original_name[i]), actionLink(ns(paste0("open_att_", att$id[i])), att$original_name[i]),
+24
View File
@@ -498,3 +498,27 @@ dbDisconnect(con_f)
print("Migration finished.") print("Migration finished.")
## * Dateien umbenennen ----
library("tools")
atts <- dbReadTable(conn, "attachments")
sum(duplicated(atts$id)) == 0
pfad <- "www/attachments/"
for( ind in 1:nrow(atts)){
datei <- atts$original_name[ind]
if( file.exists(paste0(pfad, datei)) ){
# print(ind)
ext <- file_ext(datei)
idwert <- atts$id[ind]
if(is.na(idwert)) break
name_neu <- paste0(idwert,".",ext)
print(name_neu)
file.copy(from = paste0(pfad, datei), to=paste0("www/documents/", name_neu), overwrite = T)
}
}
atts %>%
filter(id == 1379)
which( "1379.pdf" %in% atts$original_name)
+24 -2
View File
@@ -12,8 +12,8 @@ library("conflicted")
library("R.utils") library("R.utils")
library("shinyjs") library("shinyjs")
conflicts_prefer(dplyr::select) conflicts_prefer()
conflicts_prefer(dplyr::filter) conflicts_prefer()
conn <- dbConnect(RSQLite::SQLite(), "db/development.sqlite") conn <- dbConnect(RSQLite::SQLite(), "db/development.sqlite")
@@ -21,3 +21,25 @@ sourceDirectory("R/")
source("~/R/rfunc/fehler_add.R") source("~/R/rfunc/fehler_add.R")
conflicts_prefer(
ggplot2::`%+%`,
shinyjs::alert,
shinydashboard::box,
rJava::clone,
dplyr::select,
dplyr::filter,
tidyr::extract,
shinyjs::hidden,
dplyr::ident,
dplyr::lag,
shiny::printStackTrace,
shinyjs::removeClass,
shinyjs::reset,
shiny::runExample,
shiny::setProgress,
shinyjs::show,
dplyr::sql,
shiny::validate,
.quiet = TRUE
)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More