From b905779738e827b65af5308d152a23e7cc8c2699 Mon Sep 17 00:00:00 2001 From: Ian Torres Date: Wed, 18 Jun 2025 12:46:29 -0400 Subject: [PATCH] CONNECTION implemented. --- components/Tables/ConnectionsTable.vue | 175 +++++++++++++++++++- server/api/services/[id]/connection.post.ts | 36 ++++ stores/services.ts | 14 +- 3 files changed, 223 insertions(+), 2 deletions(-) create mode 100644 server/api/services/[id]/connection.post.ts diff --git a/components/Tables/ConnectionsTable.vue b/components/Tables/ConnectionsTable.vue index 63d078d..071cc04 100644 --- a/components/Tables/ConnectionsTable.vue +++ b/components/Tables/ConnectionsTable.vue @@ -15,12 +15,14 @@ // along with this program. If not, see . import type { TableColumn } from '@nuxt/ui' -import type { ConnectionsItem } from '@throttr/sdk'; +import type { ConnectionsItem, ConnectionResponse } from '@throttr/sdk'; import {formatDate, getHeader} from '~/server/throttr/utils'; import UDropdownMenu from "#ui/components/DropdownMenu.vue"; import UButton from "#ui/components/Button.vue"; const {t} = useI18n() +const services = useServices(); +const route = useRoute(); const columns: TableColumn[] = [ { @@ -53,6 +55,8 @@ const columns: TableColumn[] = [ }, { label: 'View', async onSelect() { + connection.value = await services.connection(route.params.id, row.original.id); + open_connection.value = true; } }, { label: 'Publish', @@ -82,11 +86,180 @@ const columns: TableColumn[] = [ const props = defineProps(['connections']) const open_publish = ref(false); +const open_connection = ref(false); + +const connection : Ref = ref({} as ConnectionResponse); const publish_channel = ref('');