diff --git a/README.md b/README.md index 89fccd79..e7dcbeaf 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,48 @@ Create projects and choose if they are counted as 'work time'. Select the projec + Ask for notes when switching project (if empty): Pops up a dialog to add notes if no notes are given and you try to switch projects + Export: export database for backup and later import (import currently not yet implemented) +#### Heimat Integration + +KeepTime can be integrated with [Heimat](https://doubleslash.heimat.software), allowing you to map and import your Heimat projects directly into KeepTime. + +To enable Heimat integration: + +1. In the Settings, switch to the "Heimat" section. + ![Settings Heimat](readme/images/settingsHeimat.png?raw=true "Settings Heimat") +1. Enter the following details: + - **URL:** `https://your-heimat-domain-com` + - **Access Token:** Retrieve your access token from Heimat and paste it here. +![Heimat Website](readme/images/heimatWebsite.png?raw=true "Heimat Website") +1. Click on **"Validate connection"**. If the connection is valid, you can proceed. + +Once the connection is validated, you can use the **"Map projects"** feature to map your Heimat projects to KeepTime projects or import Heimat projects directly into KeepTime. + + ### Reports: -![Report Screen](readme/images/reportDescription.png?raw=true "Report") -+ the report screen gives you a summary for every day +KeepTime’s reporting workflow works by tracking daily work and synchronizing project activities with external task management. Here’s how you use it: + +1. **Track Your Work** + Throughout your workday, log activities and assign them to projects. Each entry includes a timeslot, duration, and optional notes. + +2. **Review Your Daily Report** + At any time, open the report view to see an overview of your day, including all logged activities, their durations, and project associations. + +3. **Edit and Manage Entries** + Use the controls in the report to copy, edit, or delete individual work entries as needed. You can also copy notes or summaries for external use. + +4. **Select the Day to View** + Use the calendar widget to select which day’s report you want to review. Only days with recorded work are available. + +![Report Dialog](readme/images/reportDescription.png) + +5. **Synchronize Projects with Heimat** + When ready to sync your work with Heimat: + - Open the project synchronization view. + - Select which projects to include in the synchronization. + - Press the Sync button to transfer your tracked work to Heimat. + +![External Project Dialog](readme/images/externalProjectDialog.png) ## Install diff --git a/readme/images/externalProjectDialog.png b/readme/images/externalProjectDialog.png new file mode 100644 index 00000000..77c28fb8 Binary files /dev/null and b/readme/images/externalProjectDialog.png differ diff --git a/readme/images/heimatWebsite.png b/readme/images/heimatWebsite.png new file mode 100644 index 00000000..45ed9a5d Binary files /dev/null and b/readme/images/heimatWebsite.png differ diff --git a/readme/images/reportDescription.png b/readme/images/reportDescription.png index bda4588a..8bb86ac3 100644 Binary files a/readme/images/reportDescription.png and b/readme/images/reportDescription.png differ diff --git a/readme/images/settingsHeimat.png b/readme/images/settingsHeimat.png new file mode 100644 index 00000000..a0bee6de Binary files /dev/null and b/readme/images/settingsHeimat.png differ diff --git a/src/main/java/de/doubleslash/keeptime/controller/HeimatController.java b/src/main/java/de/doubleslash/keeptime/controller/HeimatController.java index cd6f7aaa..3e1a5ffe 100644 --- a/src/main/java/de/doubleslash/keeptime/controller/HeimatController.java +++ b/src/main/java/de/doubleslash/keeptime/controller/HeimatController.java @@ -85,7 +85,7 @@ public void tryLogin() { try { heimatAPI.isLoginValid(); } catch (Exception e) { - throw new SecurityException("Could not connect to HEIMAT API. Maybe wrong configuration?", e); + throw new SecurityException("Could not connect to Heimat API. Maybe wrong configuration?", e); } } @@ -222,7 +222,7 @@ public List getTableRows(final LocalDate currentReportDate, final List< long heimatTimeSeconds = addHeimatTimes(times); final Mapping mapping2 = new Mapping(id, true, false, - "Present in HEIMAT but not KeepTime\n\nSync to " + externalProjectMapping.getExternalTaskName() + "\n(" + "Present in Heimat but not KeepTime\n\nSync to " + externalProjectMapping.getExternalTaskName() + "\n(" + externalProjectMapping.getExternalProjectName() + ")", times, mappedProjects.stream() .filter( mp -> mp.getExternalTaskId() @@ -390,7 +390,7 @@ public ExistingAndInvalidMappings getExistingProjectMappings(List ex .filter(ep -> ep.id() == mapping.get().getExternalTaskId()) .findAny(); if (any.isEmpty()) { - LOG.warn("A mapping exists but task does not exist anymore in HEIMAT! '{}'->'{}'.", + LOG.warn("A mapping exists but task does not exist anymore in Heimat! '{}'->'{}'.", mapping.get().getProject(), mapping.get().getExternalTaskId()); invalidExternalMappings.add(mapping.get()); return new ProjectMapping(p, null); diff --git a/src/main/java/de/doubleslash/keeptime/view/ExternalProjectsMapController.java b/src/main/java/de/doubleslash/keeptime/view/ExternalProjectsMapController.java index 53a94f64..7124493d 100644 --- a/src/main/java/de/doubleslash/keeptime/view/ExternalProjectsMapController.java +++ b/src/main/java/de/doubleslash/keeptime/view/ExternalProjectsMapController.java @@ -108,7 +108,7 @@ private void initialize() { externalProjects); externalProjectsObservableList.add(0, null); // option to clear selection - TableColumn externalColumn = new TableColumn<>("HEIMAT project"); + TableColumn externalColumn = new TableColumn<>("Heimat project"); externalColumn.setCellValueFactory(data -> new SimpleObjectProperty<>(data.getValue().getHeimatTask())); externalColumn.setCellFactory(col -> new TableCell<>() { // TODO search in box would be nice @@ -199,7 +199,7 @@ protected void updateItem(HeimatTask item, boolean empty) { private List showMultiSelectDialog(final List externalProjects, List unmappedHeimatTasks) { Dialog> dialog = new Dialog<>(); - dialog.setTitle("Import HEIMAT projects"); + dialog.setTitle("Import Heimat projects"); dialog.setHeaderText("You can select mutliple items"); dialog.initOwner(this.thisStage); dialog.setWidth(600); @@ -211,7 +211,7 @@ private List showMultiSelectDialog(final List externalPr dialog.getDialogPane().getButtonTypes().addAll(okButtonType, cancelButtonType); TableView tableView = new TableView<>(); - TableColumn nameColumn = new TableColumn<>("HEIMAT project"); + TableColumn nameColumn = new TableColumn<>("Heimat project"); nameColumn.setCellValueFactory(data -> new SimpleObjectProperty<>(data.getValue())); nameColumn.setCellFactory(param -> new TableCell<>() { @Override diff --git a/src/main/java/de/doubleslash/keeptime/view/ExternalProjectsSyncController.java b/src/main/java/de/doubleslash/keeptime/view/ExternalProjectsSyncController.java index 0f6dac2f..53f4c6ef 100644 --- a/src/main/java/de/doubleslash/keeptime/view/ExternalProjectsSyncController.java +++ b/src/main/java/de/doubleslash/keeptime/view/ExternalProjectsSyncController.java @@ -320,7 +320,7 @@ protected void updateItem(TableRow item, boolean empty) { } else { keeptimeLabel.setText("KeepTime: " + localTimeStringConverter.toString( LocalTime.ofSecondOfDay(item.keeptimeTimeSeconds.get()))); - heimatLabel.setText("HEIMAT: " + localTimeStringConverter.toString( + heimatLabel.setText("Heimat: " + localTimeStringConverter.toString( LocalTime.ofSecondOfDay(item.heimatTimeSeconds.get()))); timeSpinner.setDisable(!item.mapping.canBeSynced()); timeSpinner.getValueFactory().setValue(LocalTime.ofSecondOfDay(0)); @@ -379,7 +379,7 @@ protected void updateItem(TableRow item, boolean empty) { final Label keeptimeLabel = new Label("KeepTime:"); keeptimeLabel.setMinWidth(60); hbox.getChildren().addAll(copyKeepTimeNotes, keeptimeLabel, keepTimeNotesLabel); - final Label heimatLabel = new Label("HEIMAT:"); + final Label heimatLabel = new Label("Heimat:"); heimatLabel.setMinWidth(60); hbox2.getChildren().addAll(copyHeimatNotes, heimatLabel, heimatNotesLabel); container.getChildren().addAll(textArea, hbox, hbox2); diff --git a/src/main/java/de/doubleslash/keeptime/view/ReportController.java b/src/main/java/de/doubleslash/keeptime/view/ReportController.java index 5d714518..b156ec80 100644 --- a/src/main/java/de/doubleslash/keeptime/view/ReportController.java +++ b/src/main/java/de/doubleslash/keeptime/view/ReportController.java @@ -143,7 +143,7 @@ private void initHeimatIntegration() { heimatSyncButton.setMinSize(25, 25); heimatSyncButton.setGraphic(svgNodeWithScale); heimatSyncButton.setContentDisplay(ContentDisplay.GRAPHIC_ONLY); - heimatSyncButton.setTooltip(new Tooltip("Synchronize to HEIMAT...")); + heimatSyncButton.setTooltip(new Tooltip("Synchronize to Heimat...")); heimatSyncButton.setOnAction(ae-> { try { showSyncStage(); diff --git a/src/main/resources/layouts/externalProjectSync.fxml b/src/main/resources/layouts/externalProjectSync.fxml index c88a404a..37de7edc 100644 --- a/src/main/resources/layouts/externalProjectSync.fxml +++ b/src/main/resources/layouts/externalProjectSync.fxml @@ -1,23 +1,15 @@ - - - - - - - - - - - + + + - + - + - +