|
@@ -1,14 +1,21 @@
|
|
|
<script setup lang="ts">
|
|
|
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 parentDialogOpen = ref(false);
|
|
|
const node = computed(() => {
|
|
|
- return store.selectedNode;
|
|
|
+ return store.selectedNode;
|
|
|
|
|
|
});
|
|
|
|
|
|
+function clickNode(clickedNode: UABaseNode) {
|
|
|
+ //TODO: replace parent references
|
|
|
+ parentDialogOpen.value=false;
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -20,21 +27,24 @@ const node = computed(() => {
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text" id="inputGroup-sizing-default">Name</span>
|
|
|
</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 class="input-group mb-3">
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text" id="inputGroup-sizing-default">Reference</span>
|
|
|
</div>
|
|
|
<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>
|
|
|
</select>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <TheTreeDialog :open="parentDialogOpen" @cancel="parentDialogOpen = false" @select-node="(node) => clickNode(node)"></TheTreeDialog>
|
|
|
</template>
|
|
|
|
|
|
|