Added quick action buttons to Clients page and Client Detail Page.
This commit is contained in:
parent
e615b84728
commit
181db2c4e6
3 changed files with 66 additions and 25 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue