Changed Estimate Address and Customer columns to link types to facilitate easy access to data.
This commit is contained in:
parent
2badb6835b
commit
0620060066
@ -154,9 +154,13 @@ const filteredItems= []
|
||||
// End junk
|
||||
|
||||
const columns = [
|
||||
{ label: "Estimate Address", fieldName: "address", type: "text", sortable: true, filterable: true },
|
||||
{ label: "Estimate Address", fieldName: "address", type: "link", sortable: true, filterable:true,
|
||||
onLinkClick: (link, rowData) => handlePropertyClick(link, rowData),
|
||||
},
|
||||
//{ label: "Address", fieldName: "customInstallationAddress", type: "text", sortable: true },
|
||||
{ label: "Customer", fieldName: "customer", type: "text", sortable: true, filterable: true },
|
||||
{ label: "Customer", fieldName: "customer", type: "link", sortable: true, filterable: true,
|
||||
onLinkClick: (link, rowData) => handleCustomerClick(link, rowData),
|
||||
},
|
||||
{
|
||||
label: "Status",
|
||||
fieldName: "status",
|
||||
@ -194,6 +198,19 @@ const closeSubmitEstimateModal = () => {
|
||||
showSubmitEstimateModal.value = false;
|
||||
};
|
||||
|
||||
const handleCustomerClick = (link, rowData) => {
|
||||
console.log("DEBUG: Customer Link Clicked.");
|
||||
const client = encodeURIComponent(rowData.customer);
|
||||
const address = encodeURIComponent(rowData.address);
|
||||
router.push(`/client?client=${client}&address=${address}`);
|
||||
}
|
||||
|
||||
const handlePropertyClick = (link, rowData) => {
|
||||
console.log("DEBUG: Property Link Clicked.");
|
||||
const client = encodeURIComponent(rowData.customer);
|
||||
const address = encodeURIComponent(rowData.address);
|
||||
router.push(`/property?client=${client}&address=${address}`);
|
||||
}
|
||||
|
||||
const handleLazyLoad = async (event) => {
|
||||
console.log("Estimates page - handling lazy load:", event);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user