Skip to content

Commit

Permalink
chore: populate operator column in contacts grid
Browse files Browse the repository at this point in the history
  • Loading branch information
BCerki committed Jan 13, 2025
1 parent 5963e7f commit 3422fd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,9 @@ const contactColumns = (
},
{ field: "last_name", headerName: "Last Name", width: 200 },
{ field: "email", headerName: "Business Email Address", flex: 1 },
// Two below fields don't exist in the data coming from the server(until we figure out how to get them)
{
field: "operation_name",
headerName: "Operation Name",
sortable: false,
width: 200,
},
{
field: "operator_legal_name",
field: "operators__legal_name",
headerName: "Operator Legal Name",
sortable: false,
width: 200,
},
{
Expand All @@ -37,7 +29,7 @@ const contactColumns = (

if (isExternalUser) {
// remove operator_legal_name and operation_name columns for external users
columns.splice(3, 2);
columns.splice(3, 1);
}

return columns;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const contactGroupColumns = (
const columnGroupModel: GridColumnGroupingModel = [
{
groupId: "first_name",
headerName: "Facility Name",
headerName: "First Name",
renderHeaderGroup: SearchCell,
children: [{ field: "first_name" }],
},
Expand All @@ -28,16 +28,10 @@ const contactGroupColumns = (
children: [{ field: "email" }],
},
{
groupId: "operator_legal_name",
groupId: "operators__legal_name",
headerName: "Operator Legal Name",
renderHeaderGroup: EmptyGroupCell,
children: [{ field: "operator_legal_name" }],
},
{
groupId: "operation_name",
headerName: "Operation Name",
renderHeaderGroup: EmptyGroupCell,
children: [{ field: "operation_name" }],
renderHeaderGroup: SearchCell,
children: [{ field: "operators__legal_name" }],
},
{
groupId: "action",
Expand Down

0 comments on commit 3422fd0

Please sign in to comment.