big updates
This commit is contained in:
parent
34f2c110d6
commit
03a230b8f7
14 changed files with 2417 additions and 242 deletions
|
|
@ -124,26 +124,38 @@ const columns = [
|
|||
{
|
||||
label: "Appt. Scheduled",
|
||||
fieldName: "appointmentScheduledStatus",
|
||||
type: "status",
|
||||
type: "status-button",
|
||||
sortable: true,
|
||||
buttonVariant: "outlined",
|
||||
onStatusClick: (status, rowData) => handleAppointmentClick(status, rowData),
|
||||
disableCondition: (status) => status?.toLowerCase() !== "not started",
|
||||
},
|
||||
{
|
||||
label: "Estimate Sent",
|
||||
fieldName: "estimateSentStatus",
|
||||
type: "status",
|
||||
type: "status-button",
|
||||
sortable: true,
|
||||
buttonVariant: "outlined",
|
||||
onStatusClick: (status, rowData) => handleEstimateClick(status, rowData),
|
||||
disableCondition: (status) => status?.toLowerCase() !== "not started",
|
||||
},
|
||||
{
|
||||
label: "Payment Received",
|
||||
fieldName: "paymentReceivedStatus",
|
||||
type: "status",
|
||||
type: "status-button",
|
||||
sortable: true,
|
||||
buttonVariant: "outlined",
|
||||
onStatusClick: (status, rowData) => handlePaymentClick(status, rowData),
|
||||
disableCondition: (status) => status?.toLowerCase() !== "not started",
|
||||
},
|
||||
{
|
||||
label: "Job Status",
|
||||
fieldName: "jobStatus",
|
||||
type: "status",
|
||||
type: "status-button",
|
||||
sortable: true,
|
||||
buttonVariant: "outlined",
|
||||
onStatusClick: (status, rowData) => handleJobClick(status, rowData),
|
||||
disableCondition: (status) => status?.toLowerCase() !== "not started",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -335,6 +347,39 @@ const handleLazyLoad = async (event) => {
|
|||
isLoading.value = false;
|
||||
}
|
||||
};
|
||||
// Status button click handlers
|
||||
const handleAppointmentClick = (status, rowData) => {
|
||||
if (status?.toLowerCase() === "not started") {
|
||||
// Navigate to schedule on-site meeting
|
||||
const address = encodeURIComponent(rowData.address);
|
||||
router.push(`/schedule-onsite?new=true&address=${address}`);
|
||||
}
|
||||
};
|
||||
|
||||
const handleEstimateClick = (status, rowData) => {
|
||||
if (status?.toLowerCase() === "not started") {
|
||||
// Navigate to create quotation/estimate
|
||||
const address = encodeURIComponent(rowData.address);
|
||||
router.push(`/quotations?new=true&address=${address}`);
|
||||
}
|
||||
};
|
||||
|
||||
const handlePaymentClick = (status, rowData) => {
|
||||
if (status?.toLowerCase() === "not started") {
|
||||
// Navigate to payment processing
|
||||
const address = encodeURIComponent(rowData.address);
|
||||
router.push(`/payments?new=true&address=${address}`);
|
||||
}
|
||||
};
|
||||
|
||||
const handleJobClick = (status, rowData) => {
|
||||
if (status?.toLowerCase() === "not started") {
|
||||
// Navigate to job creation
|
||||
const address = encodeURIComponent(rowData.address);
|
||||
router.push(`/jobs?new=true&address=${address}`);
|
||||
}
|
||||
};
|
||||
|
||||
// Watch for filters change to update status counts
|
||||
watch(
|
||||
() => filtersStore.getTableFilters("clients"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue