30 lines
709 B
R
Executable File
30 lines
709 B
R
Executable File
##
|
|
## Datum : 2026-04-28_13-11
|
|
## Name : Christian Oswald
|
|
## Datei : contacts.R
|
|
## Projekt : gemfin-shiny
|
|
## Kommentar: model für contacts
|
|
##
|
|
|
|
|
|
f_contacts_tabelle <- function(conn){
|
|
tbl(conn, "contacts") %>%
|
|
select(id, display_name, street, city, member) %>%
|
|
arrange(display_name) %>%
|
|
collect
|
|
}
|
|
|
|
f_contact <- function(conn, idwert){
|
|
dbxSelect(conn, paste0("SELECT * FROM contacts WHERE id=", idwert))
|
|
}
|
|
|
|
get_contact_choices <- function(conn) {
|
|
contacts <- tbl(conn, "contacts") |>
|
|
select(id, display_name) |>
|
|
collect() |>
|
|
arrange(display_name)
|
|
|
|
choices <- setNames(as.character(contacts$id), contacts$display_name)
|
|
return(c("Kein Kontakt" = 0, choices))
|
|
}
|