day on item page

This commit is contained in:
Jörg Henke
2022-07-05 19:18:02 +02:00
parent 6a44dc372d
commit 2bc826edd6
2 changed files with 9 additions and 0 deletions

View File

@ -72,10 +72,13 @@ public class DoneController {
@GetMapping("/done/edit/{id}")
public String toItem(@PathVariable Integer id, Model model) {
DoneBean bean = doneService.getBean(id);
DoneModel doneModel = new DoneModel();
if (bean == null) {
bean = new DoneBean(); // the add case
}
doneModel.setDay(bean.getLocalDate());
model.addAttribute("doneBean", bean);
model.addAttribute("doneModel", doneModel);
model.addAttribute("projectList", doneService.getProjects(true));
model.addAttribute("moduleList", doneService.getModules(true));
model.addAttribute("jobList", doneService.getJobs(true));

View File

@ -16,6 +16,12 @@
<input id="inputPk" type="text" th:field="*{pk}" class="form-control" readonly="readonly" />
</div>
</div>
<div class="row mb-3">
<label for="outputDay" class="col-sm-2 col-form-label">am</label>
<div class="col-sm-10">
<p th:text="${doneModel.dayString}" />
</div>
</div>
<div class="row mb-3">
<label for="inputTimefrom" class="col-sm-2 col-form-label">von</label>
<div class="col-sm-10">