Port data-request feature after main rebase
Main's new compliance-portal data-request pages (rights request submission and listing) still referenced the sign-in dialog and package names the earlier rebase's OAuth /initiate migration and compliancepage -> complianceportal rename had already replaced. Gate the "New Request" button behind OAuth like the rest of the portal and point resolvers at the flattened visitor.Service methods. Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
@@ -30,8 +30,11 @@ import { useSearchParams } from "react-router";
|
||||
import { EmptyState } from "#/components/EmptyState/EmptyState";
|
||||
import { ListErrorBoundary } from "#/components/errors/ListErrorBoundary";
|
||||
import { PageHeader } from "#/components/PageHeader/PageHeader";
|
||||
import { buildNewRequestContinueUrl, NEW_REQUEST_PARAM } from "#/lib/auth/continueUrl";
|
||||
import { useSignInDialog } from "#/lib/auth/signInDialogContext";
|
||||
import {
|
||||
buildNewRequestContinueUrl,
|
||||
NEW_REQUEST_PARAM,
|
||||
redirectToInitiate,
|
||||
} from "#/lib/auth/continueUrl";
|
||||
|
||||
import type { RequestsPage_query$key } from "./__generated__/RequestsPage_query.graphql";
|
||||
import type { RequestsPageQuery } from "./__generated__/RequestsPageQuery.graphql";
|
||||
@@ -85,7 +88,6 @@ export function RequestsPage({ queryRef }: RequestsPageProps) {
|
||||
RequestsPage_query$key
|
||||
>(requestsPageFragment, root);
|
||||
|
||||
const { openSignIn } = useSignInDialog();
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
const [dialogOpen, setDialogOpen] = useState(false);
|
||||
|
||||
@@ -112,7 +114,7 @@ export function RequestsPage({ queryRef }: RequestsPageProps) {
|
||||
setDialogOpen(true);
|
||||
return;
|
||||
}
|
||||
openSignIn({ continueTo: buildNewRequestContinueUrl() });
|
||||
redirectToInitiate(buildNewRequestContinueUrl());
|
||||
};
|
||||
|
||||
const { page, results, loadMore } = requestsLayout();
|
||||
|
||||
@@ -225,10 +225,10 @@ func (r *queryResolver) MyRightsRequests(ctx context.Context, first *int, after
|
||||
return types.NewRightsRequestConnection(emptyPage), nil
|
||||
}
|
||||
|
||||
compliancePage := compliancepage.CompliancePageFromContext(ctx)
|
||||
compliancePage := complianceportal.CompliancePageFromContext(ctx)
|
||||
scope := coredata.NewScopeFromObjectID(compliancePage.OrganizationID)
|
||||
|
||||
result, err := r.trust.RightsRequests.ListForOrganizationIDAndContact(
|
||||
result, err := r.trust.ListRightsRequestsForOrganizationIDAndContact(
|
||||
ctx,
|
||||
scope,
|
||||
compliancePage.OrganizationID,
|
||||
|
||||
Reference in New Issue
Block a user