|
@@ -1,14 +1,21 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import { useStore } from '@/util/store'
|
|
import { useStore } from '@/util/store'
|
|
-import { computed } from 'vue';
|
|
|
|
|
|
+import { computed, ref } from 'vue';
|
|
|
|
+import TheTreeDialog from './TheTreeDialog.vue';
|
|
|
|
+import type { UABaseNode } from '@/ua/UABaseNode';
|
|
const store = useStore()
|
|
const store = useStore()
|
|
|
|
|
|
-
|
|
|
|
|
|
+const parentDialogOpen = ref(false);
|
|
const node = computed(() => {
|
|
const node = computed(() => {
|
|
- return store.selectedNode;
|
|
|
|
|
|
+ return store.selectedNode;
|
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+function clickNode(clickedNode: UABaseNode) {
|
|
|
|
+ //TODO: replace parent references
|
|
|
|
+ parentDialogOpen.value=false;
|
|
|
|
+}
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
@@ -20,21 +27,24 @@ const node = computed(() => {
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text" id="inputGroup-sizing-default">Name</span>
|
|
<span class="input-group-text" id="inputGroup-sizing-default">Name</span>
|
|
</div>
|
|
</div>
|
|
- <input readonly type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default"
|
|
|
|
- :value="node?.getParent()?.displayName">
|
|
|
|
|
|
+ <input readonly type="text" class="form-control" aria-label="Default"
|
|
|
|
+ aria-describedby="inputGroup-sizing-default" :value="node?.getParent()?.displayName">
|
|
|
|
+ <button class="btn btn-light" @click="parentDialogOpen = true">...</button>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
<div class="input-group mb-3">
|
|
<div class="input-group mb-3">
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text" id="inputGroup-sizing-default">Reference</span>
|
|
<span class="input-group-text" id="inputGroup-sizing-default">Reference</span>
|
|
</div>
|
|
</div>
|
|
<select class="form-select" aria-label="Default select example">
|
|
<select class="form-select" aria-label="Default select example">
|
|
- <option selected v-text="node?.getParentRef()?.referenceType" ></option>
|
|
|
|
|
|
+ <option selected v-text="node?.getParentRef()?.referenceType"></option>
|
|
<option value="1">...</option>
|
|
<option value="1">...</option>
|
|
</select>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <TheTreeDialog :open="parentDialogOpen" @cancel="parentDialogOpen = false" @select-node="(node) => clickNode(node)"></TheTreeDialog>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
|