diff --git a/src/nextapp/components/authorization-profile-form/authorization-profile-dialog.tsx b/src/nextapp/components/authorization-profile-form/authorization-profile-dialog.tsx index 52777f538..c915f0f81 100644 --- a/src/nextapp/components/authorization-profile-form/authorization-profile-dialog.tsx +++ b/src/nextapp/components/authorization-profile-form/authorization-profile-dialog.tsx @@ -270,6 +270,7 @@ const AuthorizationProfileDialog: React.FC = ({ }, [data, handleCreateProfile, handleSaveProfile, id] ); + const owner = id ? data?.owner : data?.owner ?? user; React.useEffect(() => { setName(data?.name); @@ -305,7 +306,7 @@ const AuthorizationProfileDialog: React.FC = ({ - + diff --git a/src/nextapp/components/table/table.tsx b/src/nextapp/components/table/table.tsx index 96f65bb28..19a69fce1 100644 --- a/src/nextapp/components/table/table.tsx +++ b/src/nextapp/components/table/table.tsx @@ -22,6 +22,7 @@ interface Column extends TableColumnHeaderProps { name: React.ReactNode; key?: string; sortable?: boolean; + sortKey?: string; } interface ApsTableProps extends TableProps { @@ -109,7 +110,7 @@ const ApsTable: React.FC = ({ } onClick={ sort && tableProps.key - ? handleSort(tableProps.key) + ? handleSort(tableProps.sortKey ?? tableProps.key) : undefined } _hover={{ diff --git a/src/nextapp/components/user-profile/user-profile.tsx b/src/nextapp/components/user-profile/user-profile.tsx index 5df4db4e2..e155d2b78 100644 --- a/src/nextapp/components/user-profile/user-profile.tsx +++ b/src/nextapp/components/user-profile/user-profile.tsx @@ -26,6 +26,10 @@ const UserProfile: React.FC = ({ ...props }) => { const testId = props['data-testid'] ?? 'user-profile'; + if (!data) { + return null; + } + return ( diff --git a/src/nextapp/pages/manager/consumers/index.tsx b/src/nextapp/pages/manager/consumers/index.tsx index 87c6f7499..5a05edd48 100644 --- a/src/nextapp/pages/manager/consumers/index.tsx +++ b/src/nextapp/pages/manager/consumers/index.tsx @@ -248,7 +248,7 @@ const ConsumersPage: React.FC< key: 'tags', sortable: false, }, - { name: 'Updated', key: 'sortDate' }, + { name: 'Updated', key: 'sortDate', sortKey: 'updatedAt' }, ]} data={consumers} data-testid="all-consumer-control-tbl"