From c328d1cd102d896b1e581dc2693b9e60727f1fd0 Mon Sep 17 00:00:00 2001 From: Darko Gjorgjijoski Date: Mon, 6 Apr 2026 22:56:57 +0200 Subject: [PATCH] Mount send modals on index views and dashboard, pass missing props SendInvoiceModal and SendEstimateModal were only mounted on detail views. Resend from table dropdowns did nothing because the modal component was not in the DOM. Added to index views and dashboard. Pass canCreatePayment and canCreateEstimate props to InvoiceDropdown from detail view and dashboard. --- .../company/dashboard/components/DashboardTable.vue | 1 + .../features/company/dashboard/views/DashboardView.vue | 5 +++++ .../company/estimates/views/EstimateIndexView.vue | 3 +++ .../features/company/invoices/views/InvoiceDetailView.vue | 6 ++++++ .../features/company/invoices/views/InvoiceIndexView.vue | 8 ++++++++ 5 files changed, 23 insertions(+) diff --git a/resources/scripts-v2/features/company/dashboard/components/DashboardTable.vue b/resources/scripts-v2/features/company/dashboard/components/DashboardTable.vue index 5e55ed84..1bf12493 100644 --- a/resources/scripts-v2/features/company/dashboard/components/DashboardTable.vue +++ b/resources/scripts-v2/features/company/dashboard/components/DashboardTable.vue @@ -168,6 +168,7 @@ const canCreateInvoiceFromEstimate = computed(() => userStore.hasAbilities(ABILI :can-delete="canDeleteInvoice" :can-send="canSendInvoice" :can-create-payment="canCreatePayment" + :can-create-estimate="canCreateEstimate" /> diff --git a/resources/scripts-v2/features/company/dashboard/views/DashboardView.vue b/resources/scripts-v2/features/company/dashboard/views/DashboardView.vue index 8d087e1d..7f1cc6d9 100644 --- a/resources/scripts-v2/features/company/dashboard/views/DashboardView.vue +++ b/resources/scripts-v2/features/company/dashboard/views/DashboardView.vue @@ -5,6 +5,8 @@ import { useUserStore } from '../../../../stores/user.store' import DashboardStats from '../components/DashboardStats.vue' import DashboardChart from '../components/DashboardChart.vue' import DashboardTable from '../components/DashboardTable.vue' +import SendInvoiceModal from '@v2/features/company/invoices/components/SendInvoiceModal.vue' +import SendEstimateModal from '@v2/features/company/estimates/components/SendEstimateModal.vue' const route = useRoute() const router = useRouter() @@ -27,4 +29,7 @@ onMounted(() => { + + + diff --git a/resources/scripts-v2/features/company/estimates/views/EstimateIndexView.vue b/resources/scripts-v2/features/company/estimates/views/EstimateIndexView.vue index 86ccd2ba..c2d5eea6 100644 --- a/resources/scripts-v2/features/company/estimates/views/EstimateIndexView.vue +++ b/resources/scripts-v2/features/company/estimates/views/EstimateIndexView.vue @@ -220,6 +220,8 @@ + +