diff --git a/frontend/rabbi_gerzi/src/components/ElementSiblingNavigation.vue b/frontend/rabbi_gerzi/src/components/ElementSiblingNavigation.vue
new file mode 100644
index 0000000..f862ea9
--- /dev/null
+++ b/frontend/rabbi_gerzi/src/components/ElementSiblingNavigation.vue
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
diff --git a/frontend/rabbi_gerzi/src/stores/elements.ts b/frontend/rabbi_gerzi/src/stores/elements.ts
index d72683c..894ac73 100644
--- a/frontend/rabbi_gerzi/src/stores/elements.ts
+++ b/frontend/rabbi_gerzi/src/stores/elements.ts
@@ -20,6 +20,7 @@ type ElementFileType = 'iconImage' | 'shortPdf' | 'longPdf'
interface ElementResponse {
element: Element
childElements: ChildElement[]
+ siblingElements: ChildElement[]
}
export interface UpdateElementInput {
@@ -58,6 +59,7 @@ const ELEMENT_UPDATE_URL = `${API_BASE_URL}/api/element/update`
export const useElementsStore = defineStore('elements', () => {
const element = ref(null)
const childElements = ref([])
+ const siblingElements = ref([])
const isLoading = ref(false)
const error = ref(null)
const isSaving = ref(false)
@@ -71,6 +73,7 @@ export const useElementsStore = defineStore('elements', () => {
async function fetchElement(elementId: string): Promise {
element.value = null
childElements.value = []
+ siblingElements.value = []
error.value = null
saveError.value = null
childActionError.value = null
@@ -94,8 +97,10 @@ export const useElementsStore = defineStore('elements', () => {
const data: ElementResponse = await response.json()
element.value = data.element
childElements.value = data.childElements
+ siblingElements.value = data.siblingElements
} catch {
childElements.value = []
+ siblingElements.value = []
error.value = 'Network error - could not load element'
} finally {
isLoading.value = false
@@ -388,6 +393,7 @@ export const useElementsStore = defineStore('elements', () => {
return {
element,
childElements,
+ siblingElements,
isLoading,
error,
isSaving,
diff --git a/frontend/rabbi_gerzi/src/views/AdminElementPage.vue b/frontend/rabbi_gerzi/src/views/AdminElementPage.vue
index 75b257a..1a8606c 100644
--- a/frontend/rabbi_gerzi/src/views/AdminElementPage.vue
+++ b/frontend/rabbi_gerzi/src/views/AdminElementPage.vue
@@ -2,6 +2,7 @@
import { storeToRefs } from 'pinia'
import { computed, reactive, ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
+import ElementSiblingNavigation from '@/components/ElementSiblingNavigation.vue'
import RichTextEditor from '@/components/RichTextEditor.vue'
import SiteHeader from '@/components/SiteHeader.vue'
import { useElementsStore } from '@/stores/elements'
@@ -23,6 +24,7 @@ const elementsStore = useElementsStore()
const {
element,
childElements,
+ siblingElements,
isLoading,
error,
isSaving,
@@ -318,6 +320,13 @@ function resetInput(changeEvent: Event): void {
class="admin-element-page__form"
@submit.prevent="handleSubmit"
>
+
+