```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

```{r echo = FALSE, include=FALSE}
library(admintools)
library(dplyr)
```

Dear Buck Mulligan, PhD,

 Stately, plump Buck Mulligan came from the stairhead, bearing a bowl of lather on which a mirror and a razor lay crossed. A yellow dressinggown, ungirdled, was sustained gently behind him on the mild morning air. He held the bowl aloft and intoned:

—Introibo ad altare Dei.

Halted, he peered down the dark winding stairs and called out coarsely:

—Come up, Kinch! Come up, you fearful jesuit! 

# Project 1

Solemnly he came forward and mounted the round gunrest. He faced about and blessed gravely thrice the tower, the surrounding land and the awaking mountains. Then, catching sight of Stephen Dedalus, he bent towards him and made rapid crosses in the air, gurgling in his throat and shaking his head. 

## January

Stephen Dedalus, displeased and sleepy, leaned his arms on the top of the staircase and looked coldly at the shaking gurgling face that blessed him, equine in its length, and at the light untonsured hair, grained and hued like pale oak. 

```{r echo = FALSE}
c1 <- comp_table(
  data = timesheet,
  agg_by = "Task",
  min_date = as.Date("2022-01-01"),
  max_date = as.Date("2022-01-31"),
  proj_name = "Project 1",
  available_comp = 15000  # 15000 Euro retainer
  ) 

knitr::kable(c1)
```

## February

 Buck Mulligan peeped an instant under the mirror and then covered the bowl smartly.

—Back to barracks! he said sternly. 

```{r echo = FALSE}
c2 <- comp_table(
  data = timesheet,
  agg_by = "Task",
  min_date = as.Date("2022-02-01"),
  max_date = as.Date("2022-02-28"),
  proj_name = "Project 1",
  available_comp = min(c1$Remaining)
  ) 

knitr::kable(c2)
```

## March

 He added in a preacher’s tone:

—For this, O dearly beloved, is the genuine Christine: body and soul and blood and ouns. Slow music, please. Shut your eyes, gents. One moment. A little trouble about those white corpuscles. Silence, all. 

```{r echo = FALSE}
c3 <- comp_table(
  data = timesheet,
  agg_by = "Task",
  min_date = as.Date("2022-03-01"),
  max_date = as.Date("2022-03-31"),
  proj_name = "Project 1",
  available_comp = min(c2$Remaining)
  ) 

knitr::kable(c3)
```

## April

He peered sideways up and gave a long slow whistle of call, then paused awhile in rapt attention, his even white teeth glistening here and there with gold points. Chrysostomos. Two strong shrill whistles answered through the calm. 

```{r echo = FALSE}
c4 <- comp_table(
  data = timesheet,
  agg_by = "Task",
  min_date = as.Date("2022-04-01"),
  max_date = as.Date("2022-04-30"),
  proj_name = "Project 1",
  available_comp = min(c3$Remaining)
  ) 

knitr::kable(c4)
```

# Project 2

 —Thanks, old chap, he cried briskly. That will do nicely. Switch off the current, will you?

## January

He skipped off the gunrest and looked gravely at his watcher, gathering about his legs the loose folds of his gown. The plump shadowed face and sullen oval jowl recalled a prelate, patron of arts in the middle ages. A pleasant smile broke quietly over his lips. 

```{r echo = FALSE}
c5 <- comp_table(
  data = timesheet,
  agg_by = "Task",
  min_date = as.Date("2022-01-01"),
  max_date = as.Date("2022-01-31"),
  proj_name = "Project 2",
  available_comp = 10000
  ) 

knitr::kable(c5)
```

## February

—The mockery of it! he said gaily. Your absurd name, an ancient Greek! 

```{r echo = FALSE}
c6 <- comp_table(
  data = timesheet,
  agg_by = "Task",
  min_date = as.Date("2022-02-01"),
  max_date = as.Date("2022-02-28"),
  proj_name = "Project 2",
  available_comp = min(c5$Remaining)
  ) 

knitr::kable(c6)
```

## March

 He pointed his finger in friendly jest and went over to the parapet, laughing to himself. Stephen Dedalus stepped up, followed him wearily halfway and sat down on the edge of the gunrest, watching him still as he propped his mirror on the parapet, dipped the brush in the bowl and lathered cheeks and neck.

Buck Mulligan’s gay voice went on. 

```{r echo = FALSE}
c7 <- comp_table(
  data = timesheet,
  agg_by = "Task",
  min_date = as.Date("2022-03-01"),
  max_date = as.Date("2022-03-31"),
  proj_name = "Project 2",
  available_comp = min(c6$Remaining)
  ) 

knitr::kable(c7)
```

 —My name is absurd too: Malachi Mulligan, two dactyls. But it has a Hellenic ring, hasn’t it? Tripping and sunny like the buck himself. We must go to Athens. Will you come if I can get the aunt to fork out twenty quid?

## April

He laid the brush aside and, laughing with delight, cried: 

```{r echo = FALSE}
c8 <- comp_table(
  data = timesheet,
  agg_by = "Task",
  min_date = as.Date("2022-04-01"),
  max_date = as.Date("2022-04-30"),
  proj_name = "Project 2",
  available_comp = min(c7$Remaining)
  ) 

knitr::kable(c8)
```