Skip to content

Bugfixes - Table Filter and Mail Test #2296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/tables/CellTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ export default function cellTable(
columnProp = column
}

if (!Array.isArray(columnProp) && typeof columnProp === 'object') {
if (
!Array.isArray(columnProp) &&
typeof columnProp === 'object' &&
columnProp !== undefined &&
columnProp !== null
) {
columnProp = Object.keys(columnProp).map((key) => {
return {
[key]: columnProp[key],
Expand Down
8 changes: 7 additions & 1 deletion src/components/utilities/TenantSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,20 @@ const TenantSelector = ({ action, showAllTenantSelector = true, NavSelector = fa
const Paramcount = Array.from(searchParams).length
if (Paramcount <= 1) {
const customerId = searchParams.get('customerId')
const tableFilter = searchParams.get('tableFilter')
var newSearchParams = {}
if (tableFilter) {
newSearchParams.tableFilter = tableFilter
}
if (customerId && isSuccess) {
const currentTenant = tenants.filter((tenant) => tenant.customerId === customerId)
if (currentTenant.length > 0) {
dispatch(setCurrentTenant({ tenant: currentTenant[0] }))
}
}
if (!customerId && Object.keys(currentTenant).length > 0) {
updateSearchParams({ customerId: currentTenant?.customerId })
newSearchParams.customerId = currentTenant?.customerId
updateSearchParams(newSearchParams)
}
}
}, [dispatch, isSuccess, searchParams, currentTenant, tenants, updateSearchParams])
Expand Down
8 changes: 4 additions & 4 deletions src/views/email-exchange/tools/MailTest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ const MailTest = () => {
},
{
name: 'SPF',
selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'spf')[0].Status == 'pass',
selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'spf')[0]?.Status == 'pass',
cell: cellBooleanFormatter(),
},
{
name: 'DKIM',
selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'dkim')[0].Status == 'pass',
selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'dkim')[0]?.Status == 'pass',
cell: cellBooleanFormatter(),
},
{
name: 'DMARC',
selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'dmarc')[0].Status == 'pass',
selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'dmarc')[0]?.Status == 'pass',
cell: cellBooleanFormatter(),
},
{
name: 'Comp Auth',
selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'compauth')[0].Status == 'pass',
selector: (row) => row?.AuthResult.filter((x) => x?.Name === 'compauth')[0]?.Status == 'pass',
cell: cellBooleanFormatter(),
},
{
Expand Down