Added quick action buttons to Clients page and Client Detail Page.

This commit is contained in:
rocketdebris 2026-01-08 11:41:01 -05:00
parent e615b84728
commit 181db2c4e6
3 changed files with 66 additions and 25 deletions

View file

@ -132,6 +132,13 @@ const columns = [
filterInputId: "propertySearchInput",
},
//{
// label: "Create Estimate",
// fieldName: "createEstimate",
// type: "status-button",
// buttonVariant: "outlined",
// onStatusClick: (status, rowData) => handleEstimateClick(status, rowData),
//},
//{
// label: "Appt. Scheduled",
// fieldName: "appointmentScheduledStatus",
// type: "status-button",
@ -184,6 +191,14 @@ const tableActions = [
},
// Global action - always available
},
{
label: "Create Estimate",
rowAction: true,
action: (rowData) => {
const address = encodeURIComponent(rowData.address);
router.push(`/estimate?new=true&address=${address}`);
},
},
// {
// label: "Export Selected",
// action: (selectedRows) => {
@ -284,13 +299,7 @@ const handleAppointmentClick = (status, rowData) => {
const handleEstimateClick = (status, rowData) => {
const address = encodeURIComponent(rowData.address);
if (status?.toLowerCase() === "not started") {
// Navigate to create quotation/estimate
router.push(`/estimate?new=true&address=${address}`);
} else {
// Navigate to view estimate details
router.push('/estimate?address=' + address);
}
router.push(`/estimate?new=true&address=${address}`);
};
const handlePaymentClick = (status, rowData) => {