Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .RData
Binary file not shown.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Imports:
zip
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.0
RoxygenNote: 7.3.3
URL: https://github.com/PecanProject/fieldactivity
BugReports: https://github.com/PecanProject/fieldactivity/issues
Suggests:
Expand Down
9 changes: 9 additions & 0 deletions R/app_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ app_server <- function(input, output, session) {

updateSelectInput(session, "site", choices = site_choices, selected = auth_result$user)

} else if (auth_result$user == "icos_agri_user") {

shinyjs::enable("site")
shinyjs::show("site")
# Subset of site choices for the third user
site_choices <- sites[grepl("icos-agri", sites$site_type),]$site

updateSelectInput(session, "site", choices = site_choices, selected = auth_result$user)

} else {

updateSelectInput(session, "site", selected = auth_result$user)
Expand Down
2 changes: 1 addition & 1 deletion R/utils_global.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ date_format_display <- "%d/%m/%Y"
# see: “Paths hard-coded in R code”
sites_file_path <- function() system.file("extdata", "FOsites.csv",
package = "fieldactivity")
sites <- read.csv(sites_file_path())
sites <- read.csv(sites_file_path(), na.strings = c("", "NaN", "NULL"))
# converts block info from csv (e.g. "[0;1]") to vectors of strings ("0" "1")
blocks_to_vector <- function(x) strsplit(substr(x, start = 2, stop = nchar(x)-1), ";")
sites$blocks <- sapply(sites$blocks, blocks_to_vector)
Expand Down
Binary file removed dev/database.sqlite
Binary file not shown.
5 changes: 5 additions & 0 deletions inst/extdata/FOsites.csv
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,8 @@ Hoja,Svensk Kolinlagring Site,[18A;18C;18E;29A]
Otaniemi,CO-CARBON,[Old lawn;New lawn]
Viikki,SMEAR-Agri,[Alaniitty 1;Alaniitty 2;Keski-hakala]
Hauho,Lantmännen Site,[1]
Gebesee,icos-agri,[ec]
Selhausen,icos-agri,[ec]
Lonzee,icos-agri,[ec]
Grignon,icos-agri,[ec]
Cioffi,icos-agri,[ec]
Loading