diff --git a/frontend/src/views/DiaryView.vue b/frontend/src/views/DiaryView.vue
index 2b57fda..844ea8c 100644
--- a/frontend/src/views/DiaryView.vue
+++ b/frontend/src/views/DiaryView.vue
@@ -103,8 +103,24 @@
{{ item.startTime }} |
Zeitblock
- {{ item.predefinedActivity ? item.predefinedActivity.name :
- item.activity }}
+
+
+
+
+
+
+
+
+ {{ item.predefinedActivity ? item.predefinedActivity.name : item.activity }}
+
|
{{ item.groupActivity ? item.groupActivity.name : '' }} |
@@ -354,6 +370,7 @@ export default {
accident: '',
},
accidents: [],
+ editingActivityId: null, // ID der Aktivität, die gerade bearbeitet wird
};
},
watch: {
@@ -1118,6 +1135,31 @@ export default {
closeAccidentForm() {
this.showAccidentForm = false;
},
+
+ startActivityEdit(item) {
+ this.editingActivityId = item.id;
+ this.$nextTick(() => {
+ this.$refs.activityInput.focus();
+ });
+ },
+
+ async saveActivityEdit(item) {
+ try {
+ await apiClient.put(`/diary-date-activities/${this.currentClub}/${item.id}`, {
+ customActivityName: item.activity,
+ duration: item.duration,
+ durationText: item.durationText,
+ groupId: item.groupId,
+ });
+ this.editingActivityId = null;
+ } catch (error) {
+ alert('Ein Fehler ist aufgetreten. Bitte versuchen Sie es erneut.');
+ }
+ },
+
+ cancelActivityEdit() {
+ this.editingActivityId = null;
+ },
},
async mounted() {
await this.init();
@@ -1301,7 +1343,13 @@ input[type="number"] {
.clickable {
cursor: pointer;
- color: #45a049;
+ color: var(--primary-color);
+ transition: color 0.2s ease;
+}
+
+.clickable:hover {
+ color: var(--primary-hover);
+ text-decoration: underline;
}
.highlighted {
|