Added Customer Name column to the Client's page and included the ability to search/filter based on it.
This commit is contained in:
parent
4e1fbeefea
commit
8fa55bea70
2 changed files with 39 additions and 18 deletions
|
|
@ -102,12 +102,20 @@ const refreshStatusCounts = async () => {
|
|||
};
|
||||
|
||||
const filters = {
|
||||
customerName: { value: null, matchMode: FilterMatchMode.CONTAINS },
|
||||
addressTitle: { value: null, matchMode: FilterMatchMode.CONTAINS },
|
||||
};
|
||||
|
||||
const columns = [
|
||||
{
|
||||
label: "Name",
|
||||
label: "Customer Name",
|
||||
fieldName: "customerName",
|
||||
type: "text",
|
||||
sortable: true,
|
||||
filterable: true
|
||||
},
|
||||
{
|
||||
label: "Address",
|
||||
fieldName: "addressTitle",
|
||||
type: "text",
|
||||
sortable: true,
|
||||
|
|
@ -131,7 +139,12 @@ const columns = [
|
|||
type: "status",
|
||||
sortable: true,
|
||||
},
|
||||
{ label: "Job Status", fieldName: "jobStatus", type: "status", sortable: true },
|
||||
{
|
||||
label: "Job Status",
|
||||
fieldName: "jobStatus",
|
||||
type: "status",
|
||||
sortable: true
|
||||
},
|
||||
];
|
||||
|
||||
const tableActions = [
|
||||
|
|
@ -271,6 +284,8 @@ const handleLazyLoad = async (event) => {
|
|||
// Call API with pagination, filters, and sorting
|
||||
const result = await Api.getPaginatedClientDetails(paginationParams, filters, sorting);
|
||||
|
||||
console.log(result);
|
||||
|
||||
// Update local state - extract from pagination structure
|
||||
tableData.value = result.data;
|
||||
totalRecords.value = result.pagination.total;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue