@@ -475,6 +476,7 @@ const props = defineProps({
const emit = defineEmits([
"rowClick",
+ "row-click",
"lazy-load",
"page-change",
"sort-change",
diff --git a/frontend/src/components/pages/Calendar.vue b/frontend/src/components/pages/Calendar.vue
index 4970158..f9371c8 100644
--- a/frontend/src/components/pages/Calendar.vue
+++ b/frontend/src/components/pages/Calendar.vue
@@ -1,1175 +1,10 @@
-
-
-
-
-
-
- Select Date
-
-
-
-
-
- Cancel
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ timeSlot.display }}
-
-
-
-
-
-
-
{{ event.serviceType }}
-
{{ event.customer }}
-
{{ formatTimeDisplay(event.scheduledTime) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ service.priority.toUpperCase() }}
-
- ${{ service.estimatedCost.toLocaleString() }}
-
-
- {{ service.serviceType }}
- {{ service.customer }}
-
-
-
- mdi-clock
- {{ formatDuration(service.duration) }}
-
-
-
-
- {{ service.notes }}
-
-
-
- mdi-calendar-plus
- Schedule
-
-
-
-
-
-
-
mdi-check-circle
-
All services scheduled!
-
-
-
-
-
-
-
-
- {{ selectedEvent.title }}
-
- {{ selectedEvent.priority.toUpperCase() }}
-
-
-
-
-
-
- mdi-account
- Customer: {{ selectedEvent.customer }}
-
-
- mdi-map-marker
- Address: {{ selectedEvent.address }}
-
-
- mdi-wrench
- Service Type: {{ selectedEvent.serviceType }}
-
-
- mdi-calendar
- Date: {{ selectedEvent.scheduledDate }}
-
-
- mdi-clock
- Time: {{ selectedEvent.scheduledTime }} ({{
- formatDuration(selectedEvent.duration)
- }})
-
-
- mdi-account-hard-hat
- Foreman: {{ selectedEvent.foreman || "Not assigned" }}
-
-
- mdi-account-group
- Crew:
- {{ selectedEvent.crew?.join(", ") || "Not assigned" }}
-
-
- mdi-currency-usd
- Estimated Cost: ${{
- selectedEvent.estimatedCost.toLocaleString()
- }}
-
-
- mdi-note-text
- Notes: {{ selectedEvent.notes }}
-
-
-
-
-
-
- Close
-
-
-
-
+
diff --git a/frontend/src/components/pages/Client.vue b/frontend/src/components/pages/Client.vue
index 3e5ae71..1a30421 100644
--- a/frontend/src/components/pages/Client.vue
+++ b/frontend/src/components/pages/Client.vue
@@ -1,22 +1,8 @@
-
+
+
@@ -53,7 +39,6 @@ import TabList from "primevue/tablist";
import Tab from "primevue/tab";
import TabPanels from "primevue/tabpanels";
import TabPanel from "primevue/tabpanel";
-import Select from "primevue/select";
import Api from "../../api";
import { useRoute } from "vue-router";
import { useLoadingStore } from "../../stores/loading";
@@ -61,6 +46,8 @@ import { useNotificationStore } from "../../stores/notifications-primevue";
import DataUtils from "../../utils";
import Overview from "../clientSubPages/Overview.vue";
import ProjectStatus from "../clientSubPages/ProjectStatus.vue";
+import TopBar from "../clientView/TopBar.vue";
+import AdditionalInfoBar from "../clientView/AdditionalInfoBar.vue";
const route = useRoute();
const loadingStore = useLoadingStore();
@@ -88,6 +75,17 @@ const addresses = computed(() => {
return [];
});
+const nextVisitDate = ref(null); // Placeholder, update as needed
+
+const selectedAddressIdx = computed({
+ get: () => addresses.value.indexOf(selectedAddress.value),
+ set: (idx) => {
+ if (idx >= 0 && idx < addresses.value.length) {
+ selectedAddress.value = addresses.value[idx];
+ }
+ }
+});
+
const getClientNames = async (type) => {
loadingStore.setLoading(true);
try {
@@ -181,53 +179,6 @@ watch(
);
diff --git a/frontend/src/components/pages/Clients.vue b/frontend/src/components/pages/Clients.vue
index 0da91c0..653e842 100644
--- a/frontend/src/components/pages/Clients.vue
+++ b/frontend/src/components/pages/Clients.vue
@@ -21,6 +21,7 @@
:totalRecords="totalRecords"
:loading="isLoading"
@lazy-load="handleLazyLoad"
+ @row-click="handleRowClick"
/>
@@ -121,7 +122,7 @@ const columns = [
filterInputId: "customerSearchInput",
},
{
- label: "Address",
+ label: "Property",
fieldName: "address",
type: "text",
sortable: true,
@@ -181,20 +182,6 @@ const tableActions = [
},
// Global action - always available
},
- {
- label: "View Details",
- action: (rowData) => {
- router.push(`/client?client=${rowData.customerName}&address=${rowData.address}`);
- },
- type: "button",
- style: "info",
- icon: "pi pi-eye",
- requiresSelection: true, // Single selection action - appears above table, enabled when exactly one row selected
- layout: {
- position: "center",
- variant: "outlined",
- },
- },
// {
// label: "Export Selected",
// action: (selectedRows) => {
@@ -338,6 +325,12 @@ watch(
{ deep: true },
);
+// Handle row click to navigate to client details
+const handleRowClick = (event) => {
+ const rowData = event.data;
+ router.push(`/client?client=${rowData.customerName}&address=${rowData.address}`);
+};
+
onMounted(async () => {
// if lookup has a value (it will either be "customer" or "property", put focus onto the appropriate search input)
if (lookup) {
diff --git a/frontend/src/components/pages/Create.vue b/frontend/src/components/pages/Create.vue
deleted file mode 100644
index 86a5a1a..0000000
--- a/frontend/src/components/pages/Create.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
Create Page
-
-
-
-
diff --git a/frontend/src/components/pages/ErrorHandlingDemo.vue b/frontend/src/components/pages/ErrorHandlingDemo.vue
deleted file mode 100644
index 33acc3f..0000000
--- a/frontend/src/components/pages/ErrorHandlingDemo.vue
+++ /dev/null
@@ -1,664 +0,0 @@
-
-
-
PrimeVue Toast Error Handling Demo
-
-
-
-
Current Component Errors (for debugging):
-
-
- Global Error: {{ errorStore.lastError.message }}
-
-
-
-
- {{ component }} Error: {{ error.message }}
-
-
-
-
-
-
-
-
Test PrimeVue Toast Notifications:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Real API Integration with ApiWithToast:
-
-
-
-
-
-
-
-
-
-
Client Data ({{ clientData.length }} items):
-
{{ JSON.stringify(clientData.slice(0, 2), null, 2) }}
-
-
-
-
Client Status Counts:
-
-
- {{ status }}: {{ count }}
-
-
-
-
-
-
-
-
Error History:
-
-
-
-
- No errors in history yet. Try clicking the error buttons above to generate some
- errors!
-
-
-
-
-
-
Debug Info:
-
History array length: {{ errorStore.errorHistory.length }}
-
- Recent errors method returns: {{ errorStore.getRecentErrors(5).length }} items
-
-
-
-
-
-
-
{{ error.message }}
-
-
-
-
-
-
-
-
-
diff --git a/frontend/src/components/pages/TestDateForm.vue b/frontend/src/components/pages/TestDateForm.vue
deleted file mode 100644
index 1865e34..0000000
--- a/frontend/src/components/pages/TestDateForm.vue
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
-
-
-
-
-
diff --git a/frontend/src/router.js b/frontend/src/router.js
index 5275466..f811ef8 100644
--- a/frontend/src/router.js
+++ b/frontend/src/router.js
@@ -5,15 +5,11 @@ import Clients from "./components/pages/Clients.vue";
import Jobs from "./components/pages/Jobs.vue";
import Invoices from "./components/pages/Invoices.vue";
import Estimates from "./components/pages/Estimates.vue";
-import Create from "./components/pages/Create.vue";
import Routes from "./components/pages/Routes.vue";
import TimeSheets from "./components/pages/TimeSheets.vue";
import Warranties from "./components/pages/Warranties.vue";
import Home from "./components/pages/Home.vue";
-import TestDateForm from "./components/pages/TestDateForm.vue";
import Client from "./components/pages/Client.vue";
-import ErrorHandlingDemo from "./components/pages/ErrorHandlingDemo.vue";
-import ScheduleBid from "./components/pages/ScheduleBid.vue";
import Estimate from "./components/pages/Estimate.vue";
const routes = [
@@ -24,17 +20,13 @@ const routes = [
{ path: "/calendar", component: Calendar },
{ path: "/clients", component: Clients },
{ path: "/client", component: Client },
- { path: "/schedule-bid", component: ScheduleBid },
{ path: "/jobs", component: Jobs },
{ path: "/invoices", component: Invoices },
{ path: "/estimates", component: Estimates },
{ path: "/estimate", component: Estimate },
{ path: "/routes", component: Routes },
- { path: "/create", component: Create },
{ path: "/timesheets", component: TimeSheets },
{ path: "/warranties", component: Warranties },
- { path: "/test-dates", component: TestDateForm },
- { path: "/dev/error-handling-demo", component: ErrorHandlingDemo },
{ path: "/:pathMatch(.*)*", component: Home }, // Fallback to Home for unknown routes
];