Skip to content

Commit

Permalink
add holding table to reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Mar 19, 2024
1 parent 6a5e365 commit 7ef83fe
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dashboard
Title: What the Package Does (One Line, Title Case)
Version: 0.0.5.001
Version: 0.0.5.002
Authors@R:
person(given = "First",
family = "Last",
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "dashboard: What the Package Does (One Line, Title Case)",
"codeRepository": "https://github.com/ropensci-review-tools/dashboard",
"license": "https://spdx.org/licenses/MIT",
"version": "0.0.5.001",
"version": "0.0.5.002",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
28 changes: 28 additions & 0 deletions quarto/reviews.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,31 @@ gt::gt (dat5) |>
```{r no-await-rev-resp, echo = FALSE, results = "asis", eval = !has_rev_in}
cat ("There are currently no submissions at this stage.")
```

## Holding

```{r holding-prepro, echo = FALSE}
# Change 'elapsed' to time since 'holding' label applied:
date_vec <- lubridate::ymd_hms (dat_holding$holding_date)
hold_elapsed <- dashboard:::get_elapsed_time (date_vec)
dat_holding$elapsed <- hold_elapsed$dtime
dat_holding$elapsed_days <- hold_elapsed$dtime_days
hold_cols <- c ("number", "title", "stats", "stage", "elapsed", "elapsed_days")
dat_holding <- dplyr::select (dat_holding, dplyr::all_of (hold_cols)) |>
dplyr::rename ("on_hold_for" = elapsed) |>
dplyr::arrange (dplyr::desc (elapsed_days))
has_on_hold <- nrow (dat_holding) > 0L
```

::: {style="all.initial;"}
```{r on-hold-table, echo = FALSE, eval = has_on_hold}
gt::gt (dat_holding) |>
gt::cols_hide (c (elapsed_days)) |>
dashboard:::add_bg_colours ()
```
:::

```{r no-on-hold, echo = FALSE, results = "asis", eval = !has_on_hold}
cat ("There are currently no submissions on hold.")
```

0 comments on commit 7ef83fe

Please sign in to comment.