From 3422fd0471d4582e255a25e3c23b015d79ee7cd0 Mon Sep 17 00:00:00 2001 From: Brianna Cerkiewicz Date: Mon, 13 Jan 2025 10:30:45 -0800 Subject: [PATCH] chore: populate operator column in contacts grid --- .../datagrid/models/contacts/contactColumns.ts | 12 ++---------- .../models/contacts/contactGroupColumns.ts | 14 ++++---------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/bciers/apps/administration/app/components/datagrid/models/contacts/contactColumns.ts b/bciers/apps/administration/app/components/datagrid/models/contacts/contactColumns.ts index e447e966a6..f955ec616d 100644 --- a/bciers/apps/administration/app/components/datagrid/models/contacts/contactColumns.ts +++ b/bciers/apps/administration/app/components/datagrid/models/contacts/contactColumns.ts @@ -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, }, { @@ -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; diff --git a/bciers/apps/administration/app/components/datagrid/models/contacts/contactGroupColumns.ts b/bciers/apps/administration/app/components/datagrid/models/contacts/contactGroupColumns.ts index c8c9c16f59..d09f15cc83 100644 --- a/bciers/apps/administration/app/components/datagrid/models/contacts/contactGroupColumns.ts +++ b/bciers/apps/administration/app/components/datagrid/models/contacts/contactGroupColumns.ts @@ -11,7 +11,7 @@ const contactGroupColumns = ( const columnGroupModel: GridColumnGroupingModel = [ { groupId: "first_name", - headerName: "Facility Name", + headerName: "First Name", renderHeaderGroup: SearchCell, children: [{ field: "first_name" }], }, @@ -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",