From fd5bc7faea73e342e7a9486f23c601c8e2d35590 Mon Sep 17 00:00:00 2001 From: Tilman Behrend Date: Thu, 18 Sep 2025 09:05:48 +0200 Subject: [PATCH] edit page: change footer and order order of elements --- frontend/src/layouts/MainLayout.vue | 4 +- frontend/src/pages/EditPage.vue | 412 ++++++++++++++++++++-------- 2 files changed, 293 insertions(+), 123 deletions(-) diff --git a/frontend/src/layouts/MainLayout.vue b/frontend/src/layouts/MainLayout.vue index 4e8a9c7..fbbcb8d 100644 --- a/frontend/src/layouts/MainLayout.vue +++ b/frontend/src/layouts/MainLayout.vue @@ -3,7 +3,7 @@ - MIIUS + THATS ME @@ -493,7 +493,7 @@ - + diff --git a/frontend/src/pages/EditPage.vue b/frontend/src/pages/EditPage.vue index 3c7703a..b6d1289 100644 --- a/frontend/src/pages/EditPage.vue +++ b/frontend/src/pages/EditPage.vue @@ -1,41 +1,23 @@ + + - + +
+ + +
+ + + + +
+ + + + + @@ -135,10 +150,38 @@
+ + + + + + +
+ +
- +
@@ -273,30 +316,79 @@
+ + +
+ + +
- - + +
- + + > + + - - + +
+ + Related Persons + + + +
+
+
{{ getInitials(person) }}
+
+ × +
+
+
+
+ Category @@ -347,88 +439,47 @@ />
-
-
- - - -
- - - - - - - -
- Related Persons - +
+ + Danger Zone +

+ Once you delete this entry, it cannot be recovered. Please be certain. +

+ - - -
-
-
{{ getInitials(person) }}
-
- × -
-
-
+ + +
+ + +
- -
- - - - -
@@ -449,6 +500,24 @@ + + + + + + + + + + @@ -473,9 +542,25 @@ export default { // Tab navigation state const currentTab = ref('basics') + const tabOrder = ['basics', 'content', 'media', 'details'] - // Form data - using default form data structure - const form = reactive({ ...defaultFormData }) + // Get current date and time + const getCurrentDate = () => { + const now = new Date() + return now.toISOString().split('T')[0] // Format: YYYY-MM-DD + } + + const getCurrentTime = () => { + const now = new Date() + return now.toTimeString().slice(0, 5) // Format: HH:MM + } + + // Form data with current date/time defaults + const form = reactive({ + ...defaultFormData, + date: getCurrentDate(), + time: getCurrentTime() + }) // Category selection state const selectedMainCategory = ref('') @@ -494,6 +579,21 @@ export default { const personOptionsRef = ref([...personOptions]) const mainCategoryOptions = ref(getMainCategories()) + // Tab navigation methods + const goToNextTab = () => { + const currentIndex = tabOrder.indexOf(currentTab.value) + if (currentIndex < tabOrder.length - 1) { + currentTab.value = tabOrder[currentIndex + 1] + } + } + + const goToPreviousTab = () => { + const currentIndex = tabOrder.indexOf(currentTab.value) + if (currentIndex > 0) { + currentTab.value = tabOrder[currentIndex - 1] + } + } + // Methods const loadEntry = () => { // TODO: Load entry data based on route params @@ -502,14 +602,15 @@ export default { // Load existing entry data // This would typically come from an API call console.log('Loading entry:', entryId) + // Note: When loading existing entry, you might want to override the default date/time } } const onSave = () => { - // TODO: Implement save functionality + // TODO: Implement publish functionality $q.notify({ type: 'positive', - message: 'Entry saved successfully!', + message: 'Entry published successfully!', position: 'top' }) router.push('/wave') @@ -652,7 +753,16 @@ export default { } } + // Close navigation drawer when page loads onMounted(() => { + // Close the drawer by setting it to false + const drawerElement = document.querySelector('.q-drawer') + if (drawerElement) { + // Trigger close event + const closeEvent = new CustomEvent('drawer-close') + window.dispatchEvent(closeEvent) + } + loadEntry() }) @@ -669,6 +779,8 @@ export default { tagOptions: tagOptionsRef, personOptions: personOptionsRef, mainCategoryOptions, + goToNextTab, + goToPreviousTab, onSave, onCancel, confirmDelete, @@ -695,6 +807,64 @@ export default {