From 83d9e999a89564181217043847e794475e780786 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Fri, 21 Jun 2024 13:57:51 -0400 Subject: [PATCH] Sign in report tweaks --- src/views/identity/reports/SignIns.jsx | 32 ++++++++++++++++++-------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/src/views/identity/reports/SignIns.jsx b/src/views/identity/reports/SignIns.jsx index bcd14acc0c07..0e78095db5d1 100644 --- a/src/views/identity/reports/SignIns.jsx +++ b/src/views/identity/reports/SignIns.jsx @@ -16,7 +16,7 @@ import React, { useState } from 'react' import { Form } from 'react-final-form' import { useSelector } from 'react-redux' import { useNavigate } from 'react-router-dom' -import { RFFCFormCheck, RFFCFormInput } from 'src/components/forms' +import { Condition, RFFCFormCheck, RFFCFormInput } from 'src/components/forms' import { CippPageList } from 'src/components/layout' import { CellTip } from 'src/components/tables' import useQuery from 'src/hooks/useQuery' @@ -95,11 +95,10 @@ const columns = [ const SignInsReport = () => { const tenant = useSelector((state) => state.app.currentTenant) - let navigate = useNavigate() let query = useQuery() const filter = query.get('filter') const DateFilter = query.get('DateFilter') - const searchparams = query.toString() + const [searchParams, setSearchParams] = useState({}) const [visibleA, setVisibleA] = useState(true) const handleSubmit = async (values) => { @@ -113,11 +112,7 @@ const SignInsReport = () => { SearchNow: true, ...values, } - var queryString = Object.keys(shippedValues) - .map((key) => key + '=' + shippedValues[key]) - .join('&') - - navigate(`?${queryString}`) + setSearchParams(shippedValues) } return ( @@ -152,6 +147,11 @@ const SignInsReport = () => { render={({ handleSubmit, submitting, values }) => { return ( + + + + + { + + + + + + + @@ -190,9 +202,9 @@ const SignInsReport = () => { capabilities={{ allTenants: false, helpContext: 'https://google.com' }} datatable={{ columns: columns, - path: `/api/ListSignIns?${searchparams}`, + path: `/api/ListSignIns`, reportName: `${tenant?.defaultDomainName}-SignIns-Report`, - params: { TenantFilter: tenant?.defaultDomainName }, + params: { TenantFilter: tenant?.defaultDomainName, ...searchParams }, }} />