fix selectable columns & token refresh

This commit is contained in:
Julian Krauser 2024-12-19 12:31:10 +01:00
parent 361a1c9519
commit bb6b114af7

View file

@ -10,7 +10,7 @@
* *
</p> </p>
<p <p
v-for="col in activeTable?.columns" v-for="col in columns"
:key="col.column" :key="col.column"
class="rounded-md shadow-sm relative block w-fit px-3 py-2 border border-gray-300 text-gray-900 rounded-b-md sm:text-sm" class="rounded-md shadow-sm relative block w-fit px-3 py-2 border border-gray-300 text-gray-900 rounded-b-md sm:text-sm"
:class="value.includes(col.column) ? 'border-gray-600 bg-gray-200' : ''" :class="value.includes(col.column) ? 'border-gray-600 bg-gray-200' : ''"
@ -49,6 +49,9 @@ export default defineComponent({
activeTable() { activeTable() {
return this.tableMetas.find((tm) => tm.tableName == this.table); return this.tableMetas.find((tm) => tm.tableName == this.table);
}, },
columns() {
return this.activeTable?.columns?.filter((c) => !this.foreignColumns?.includes(c.column));
},
foreignColumns() { foreignColumns() {
return this.activeTable?.relations.map((r) => r.column); return this.activeTable?.relations.map((r) => r.column);
}, },