The number of tests in the DB differs from the app:
There are only 48 tests in the app but 54 tests in viw_inlet_conveyance_full. I'm guessing this was done to avoid showing duplicate records, but we should really be deleting them rather than hiding them from the user:
|
rv$ict_table <- reactive(rv$ict_table_db() %>% |
|
mutate(across(where(is.POSIXct), trunc, "days")) %>% |
|
mutate(across(where(is.POSIXlt), as.character)) %>% |
|
mutate(across(c("surcharge", "photos_uploaded", "summary_report_sent"), |
|
~ case_when(. == 1 ~ "Yes", |
|
. == 0 ~ "No"))) %>% |
|
dplyr::select("component_id", "test_date", "phase", |
|
"calculated_flow_rate_cfm", "equilibrated_flow_rate_cfm", "test_volume_cf", |
|
"max_water_depth_ft", |
|
"surcharge", "time_to_surcharge_min", "inlet_conveyance_uid") %>% |
|
distinct()) |
|
|
Right now, viw_inlet_conveyance_full shows duplicate values likely due to the joins because we have duplicate records with a primary key:
SELECT * FROM fieldwork.viw_inlet_conveyance_full
WHERE inlet_conveyance_uid = 14
| inlet_conveyance_uid |
system_id |
greenit_name |
| 14 |
"410-3" |
"Harrowgate Park" |
| 14 |
"410-3" |
"Harrowgate Park" |
The number of tests in the DB differs from the app:
There are only 48 tests in the app but 54 tests in
viw_inlet_conveyance_full. I'm guessing this was done to avoid showing duplicate records, but we should really be deleting them rather than hiding them from the user:shiny-inlet-conveyance/inlet_conveyance.R
Lines 285 to 296 in 8fba0e5
Right now, viw_inlet_conveyance_full shows duplicate values likely due to the joins because we have duplicate records with a primary key: