Add mailing label download buttons to Owners tab
All checks were successful
Deploy stAndrews / deploy (push) Successful in 2s

This commit is contained in:
2026-03-09 14:53:10 -04:00
parent 3aaf0566ec
commit 7d8a914c12

29
app.R
View File

@@ -233,6 +233,15 @@ ui <- f7Page(
title = "Table:", title = "Table:",
divider = TRUE, divider = TRUE,
DTOutput("table") DTOutput("table")
),
f7Card(
title = "Download:",
divider = TRUE,
f7List(
inset = TRUE,
downloadButton("download_filtered", "Download Filtered"),
downloadButton("download_all", "Download All (388)")
)
) )
), ),
#### services ---- #### services ----
@@ -411,6 +420,26 @@ server <- function(input, output) {
) )
) )
}) })
output$download_filtered <- downloadHandler(
filename = "st_andrews_owners_filtered.csv",
content = function(file) {
filteredOwners() |>
sf::st_drop_geometry() |>
dplyr::select(owner_1, owner_2, label) |>
write.csv(file, row.names = FALSE)
}
)
output$download_all <- downloadHandler(
filename = "st_andrews_owners_all.csv",
content = function(file) {
owners |>
sf::st_drop_geometry() |>
dplyr::select(owner_1, owner_2, label) |>
write.csv(file, row.names = FALSE)
}
)
# venice map ---- # venice map ----
output$venice_map <- renderLeaflet({ output$venice_map <- renderLeaflet({
leaflet() %>% leaflet() %>%