2024-12-15 13:48:55 +01:00
|
|
|
<template>
|
2024-12-16 15:39:49 +01:00
|
|
|
<div class="flex flex-row gap-2">
|
|
|
|
<p class="w-14 min-w-14 pt-2">JOIN</p>
|
|
|
|
<div class="flex flex-row flex-wrap gap-2 items-center w-full">
|
|
|
|
<div class="flex flex-row gap-2 items-center justify-end w-full">
|
|
|
|
<div class="p-1 border border-gray-400 hover:bg-gray-200 rounded-md" @click="">
|
|
|
|
<PlusIcon class="text-gray-500 h-6 w-6 cursor-pointer" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-12-15 13:48:55 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { defineComponent, type PropType } from "vue";
|
|
|
|
import { mapActions, mapState } from "pinia";
|
|
|
|
import type { DynamicQueryStructure } from "../../types/dynamicQueries";
|
|
|
|
import { useQueryBuilderStore } from "../../stores/admin/queryBuilder";
|
2024-12-16 15:39:49 +01:00
|
|
|
import { PlusIcon } from "@heroicons/vue/24/outline";
|
2024-12-15 13:48:55 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
export default defineComponent({
|
|
|
|
props: {
|
|
|
|
table: {
|
|
|
|
type: String,
|
|
|
|
default: "",
|
|
|
|
},
|
|
|
|
modelValue: {
|
|
|
|
type: Array as PropType<Array<DynamicQueryStructure & { foreignColumn: string }>>,
|
|
|
|
default: [],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
emits: ["update:model-value"],
|
|
|
|
data() {
|
|
|
|
return {};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapState(useQueryBuilderStore, ["tableMetas"]),
|
|
|
|
activeTable() {
|
|
|
|
return this.tableMetas.find((tm) => tm.tableName == this.table);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|