From 6b84ba67cdc16bb2533920565a4fc445367dc296 Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Thu, 26 Sep 2024 18:58:32 +0200 Subject: [PATCH] add tanstack table, add clients table --- package-lock.json | 33 +++ package.json | 1 + .../Client/ClientMoreOptionsDropdown.vue | 9 +- .../Components/Common/Client/ClientTable.vue | 200 +++++++++++++++++- .../Common/Client/ClientTableRow.vue | 69 ------ .../js/Components/Common/TableHeading.vue | 2 +- resources/js/Components/TableCell.vue | 26 +++ 7 files changed, 259 insertions(+), 81 deletions(-) delete mode 100644 resources/js/Components/Common/Client/ClientTableRow.vue create mode 100644 resources/js/Components/TableCell.vue diff --git a/package-lock.json b/package-lock.json index 141503b8..09ba7f41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "@heroicons/vue": "^2.1.1", "@rushstack/eslint-patch": "^1.7.0", "@tailwindcss/container-queries": "^0.1.1", + "@tanstack/vue-table": "^8.20.5", "@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-typescript": "^13.0.0", "@vueuse/core": "^10.11.0", @@ -1663,6 +1664,19 @@ "tailwindcss": ">=3.0.0 || insiders" } }, + "node_modules/@tanstack/table-core": { + "version": "8.20.5", + "resolved": "https://registry.npmjs.org/@tanstack/table-core/-/table-core-8.20.5.tgz", + "integrity": "sha512-P9dF7XbibHph2PFRz8gfBKEXEY/HJPOhym8CHmjF8y3q5mWpKx9xtZapXQUWCgkqvsK0R46Azuz+VaxD4Xl+Tg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, "node_modules/@tanstack/virtual-core": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.9.0.tgz", @@ -1673,6 +1687,25 @@ "url": "https://github.com/sponsors/tannerlinsley" } }, + "node_modules/@tanstack/vue-table": { + "version": "8.20.5", + "resolved": "https://registry.npmjs.org/@tanstack/vue-table/-/vue-table-8.20.5.tgz", + "integrity": "sha512-2xixT3BEgSDw+jOSqPt6ylO/eutDI107t2WdFMVYIZZ45UmTHLySqNriNs0+dMaKR56K5z3t+97P6VuVnI2L+Q==", + "license": "MIT", + "dependencies": { + "@tanstack/table-core": "8.20.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "vue": ">=3.2" + } + }, "node_modules/@tanstack/vue-virtual": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/@tanstack/vue-virtual/-/vue-virtual-3.9.0.tgz", diff --git a/package.json b/package.json index 2f693426..7261bde6 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "@heroicons/vue": "^2.1.1", "@rushstack/eslint-patch": "^1.7.0", "@tailwindcss/container-queries": "^0.1.1", + "@tanstack/vue-table": "^8.20.5", "@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-typescript": "^13.0.0", "@vueuse/core": "^10.11.0", diff --git a/resources/js/Components/Common/Client/ClientMoreOptionsDropdown.vue b/resources/js/Components/Common/Client/ClientMoreOptionsDropdown.vue index be73becc..ba352833 100644 --- a/resources/js/Components/Common/Client/ClientMoreOptionsDropdown.vue +++ b/resources/js/Components/Common/Client/ClientMoreOptionsDropdown.vue @@ -7,23 +7,28 @@ import { import type { Client } from '@/packages/api/src'; import { canDeleteClients, canUpdateClients } from '@/utils/permissions'; import MoreOptionsDropdown from '@/packages/ui/src/MoreOptionsDropdown.vue'; +import ClientEditModal from '@/Components/Common/Client/ClientEditModal.vue'; +import { ref } from 'vue'; const emit = defineEmits<{ delete: []; - edit: []; archive: []; }>(); const props = defineProps<{ client: Client; }>(); +const showEditModal = ref(false);