diff --git a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/View.tsx b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/View.tsx
index daac164e8c..0b14171b98 100644
--- a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/View.tsx
+++ b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/View.tsx
@@ -179,7 +179,8 @@ export const View = (props: Props) => {
const exposureStatus = getExposureStatus(
exposure,
props.enabledFeatureFlags.includes("AdditionalRemovalStatuses"),
- isDataBrokerUnderMaintenance(exposure),
+ // TODO: Waiting for criteria for data brokers under maintenance to be determined
+ // isDataBrokerUnderMaintenance(exposure),
);
return (
@@ -561,11 +562,12 @@ export const View = (props: Props) => {
);
};
-export function isDataBrokerUnderMaintenance(
- exposure: Exposure | OnerepScanResultDataBrokerRow,
-): boolean {
- return (
- isScanResult(exposure) &&
- exposure.broker_status === "removal_under_maintenance"
- );
-}
+// TODO: Waiting for criteria for data brokers under maintenace to be determined
+// export function isDataBrokerUnderMaintenance(
+// exposure: Exposure | OnerepScanResultDataBrokerRow,
+// ): boolean {
+// return (
+// isScanResult(exposure) &&
+// exposure.broker_status === "removal_under_maintenance"
+// );
+// }
diff --git a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx
index cb9c437eb6..61ec578ad9 100644
--- a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx
+++ b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx
@@ -19,13 +19,29 @@ import { getSubscriberBreaches } from "../../../../../../../../../functions/serv
import { getSubscriberEmails } from "../../../../../../../../../functions/server/getSubscriberEmails";
import { RemovalUnderMaintenanceView } from "./RemovalUnderMaintenanceView";
import { hasPremium } from "../../../../../../../../../functions/universal/user";
+import { getEnabledFeatureFlags } from "../../../../../../../../../../db/tables/featureFlags";
+import { AutoSignIn } from "../../../../../../../../../components/client/AutoSignIn";
export default async function RemovalUnderMaintenance() {
const session = await getServerSession();
const countryCode = getCountryCode(headers());
- if (!session?.user?.subscriber?.id || !hasPremium(session.user)) {
+
+ if (!session) {
+ return ;
+ }
+
+ const enabledFeatureFlags = await getEnabledFeatureFlags({
+ email: session.user.email,
+ });
+
+ if (
+ !session?.user?.subscriber?.id ||
+ !hasPremium(session.user) ||
+ !enabledFeatureFlags.includes("EnableRemovalUnderMaintenanceStep")
+ ) {
redirect("/user/dashboard");
}
+
const profileId = await getOnerepProfileId(session.user.subscriber.id);
const latestScan = await getScanResultsWithBroker(
profileId,
diff --git a/src/app/components/client/FixNavigation.tsx b/src/app/components/client/FixNavigation.tsx
index 58df6ff375..2b9668cced 100644
--- a/src/app/components/client/FixNavigation.tsx
+++ b/src/app/components/client/FixNavigation.tsx
@@ -82,9 +82,10 @@ export const Steps = (props: {
{label} {count > 0 && `(${count})`}
);
- const dataBrokerStepCompleted =
- hasCompletedStepSection(props.data, "Scan") &&
- hasCompletedStepSection(props.data, "DataBrokerManualRemoval");
+ const dataBrokerStepCompleted = hasCompletedStepSection(props.data, "Scan");
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
+ // && hasCompletedStepSection(props.data, "DataBrokerManualRemoval");
+
return (
{isEligibleForStep(props.data, "Scan") && (
diff --git a/src/app/components/client/exposure_card/ExposureCard.stories.tsx b/src/app/components/client/exposure_card/ExposureCard.stories.tsx
index 8d5fae0c8a..31897fe1ba 100644
--- a/src/app/components/client/exposure_card/ExposureCard.stories.tsx
+++ b/src/app/components/client/exposure_card/ExposureCard.stories.tsx
@@ -50,17 +50,21 @@ const ScanMockItemInProgress = createRandomScanResult({
status: "optout_in_progress",
manually_resolved: false,
});
-const ScanMockItemRemovalUnderMaintenance = createRandomScanResult({
- status: "optout_in_progress",
- manually_resolved: false,
- broker_status: "removal_under_maintenance",
-});
-const ScanMockItemRemovalUnderMaintenanceFixed = createRandomScanResult({
- status: "optout_in_progress",
- manually_resolved: true,
- broker_status: "removal_under_maintenance",
-});
+// TODO: Waiting for criteria for data brokers under maintenace to be determined
+// const ScanMockItemRemovalUnderMaintenance = createRandomScanResult({
+// status: "optout_in_progress",
+// manually_resolved: false,
+// broker_status: "removal_under_maintenance",
+// });
+
+// TODO: Waiting for criteria for data brokers under maintenace to be determined
+// const ScanMockItemRemovalUnderMaintenanceFixed = createRandomScanResult({
+// status: "optout_in_progress",
+// manually_resolved: true,
+// broker_status: "removal_under_maintenance",
+// });
+
const BreachMockItemRemoved = createRandomBreach({
isResolved: true,
dataClassesEffected: [
@@ -115,21 +119,23 @@ export const DataBreachActionNeeded: Story = {
},
};
-export const DataBrokerRemovalUnderMaintenance: Story = {
- args: {
- exposureImg: FamilyTreeImage,
- exposureData: ScanMockItemRemovalUnderMaintenance,
- isPremiumUser: true,
- },
-};
+// TODO: Waiting for criteria for data brokers under maintenace to be determined
+// export const DataBrokerRemovalUnderMaintenance: Story = {
+// args: {
+// exposureImg: FamilyTreeImage,
+// exposureData: ScanMockItemRemovalUnderMaintenance,
+// isPremiumUser: true,
+// },
+// };
-export const DataBrokerRemovalUnderMaintenanceFixed: Story = {
- args: {
- exposureImg: FamilyTreeImage,
- exposureData: ScanMockItemRemovalUnderMaintenanceFixed,
- isPremiumUser: true,
- },
-};
+// TODO: Waiting for criteria for data brokers under maintenace to be determined
+// export const DataBrokerRemovalUnderMaintenanceFixed: Story = {
+// args: {
+// exposureImg: FamilyTreeImage,
+// exposureData: ScanMockItemRemovalUnderMaintenanceFixed,
+// isPremiumUser: true,
+// },
+// };
export const DataBreachFixed: Story = {
args: {
diff --git a/src/app/components/client/exposure_card/ExposureCard.test.tsx b/src/app/components/client/exposure_card/ExposureCard.test.tsx
index 5d2ce59fdd..f64da0bf60 100644
--- a/src/app/components/client/exposure_card/ExposureCard.test.tsx
+++ b/src/app/components/client/exposure_card/ExposureCard.test.tsx
@@ -13,10 +13,11 @@ import Meta, {
DataBrokerActionNeeded,
DataBrokerInProgress,
DataBrokerManualRemoved,
- DataBrokerRemovalUnderMaintenance,
- DataBrokerRemovalUnderMaintenanceFixed,
DataBrokerRemoved,
DataBrokerRequestedRemoval,
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
+ // DataBrokerRemovalUnderMaintenance,
+ // DataBrokerRemovalUnderMaintenanceFixed,
} from "./ExposureCard.stories";
jest.mock("../../../hooks/useTelemetry");
@@ -75,35 +76,39 @@ describe("ScanResultCard", () => {
expect(innerDescription).toBeInTheDocument();
});
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
// Data broker removal under maintenance
- it("shows the right description for a scan result card with removal under maintenance status", () => {
- const ComposedProgressCard = composeStory(
- DataBrokerRemovalUnderMaintenance,
- Meta,
- );
- render();
- const innerDescription = screen.getByText(
- "We’ve asked this data broker to remove your profile but they haven’t done it.",
- { exact: false },
- );
-
- expect(innerDescription).toBeInTheDocument();
- });
-
+ // eslint-disable-next-line jest/no-commented-out-tests
+ // it("shows the right description for a scan result card with removal under maintenance status", () => {
+ // const ComposedProgressCard = composeStory(
+ // DataBrokerRemovalUnderMaintenance,
+ // Meta,
+ // );
+ // render();
+ // const innerDescription = screen.getByText(
+ // "We’ve asked this data broker to remove your profile but they haven’t done it.",
+ // { exact: false },
+ // );
+
+ // expect(innerDescription).toBeInTheDocument();
+ // });
+
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
// Data broker removal under maintenance resolved
- it("shows the right description for a scan result card with removal under maintenance status that's been resolved", () => {
- const ComposedProgressCard = composeStory(
- DataBrokerRemovalUnderMaintenanceFixed,
- Meta,
- );
- render();
- const innerDescription = screen.getByText(
- "You could be added back in the future, so Monitor will continue to scan data broker sites for new exposures.",
- { exact: false },
- );
-
- expect(innerDescription).toBeInTheDocument();
- });
+ // eslint-disable-next-line jest/no-commented-out-tests
+ // it("shows the right description for a scan result card with removal under maintenance status that's been resolved", () => {
+ // const ComposedProgressCard = composeStory(
+ // DataBrokerRemovalUnderMaintenanceFixed,
+ // Meta,
+ // );
+ // render();
+ // const innerDescription = screen.getByText(
+ // "You could be added back in the future, so Monitor will continue to scan data broker sites for new exposures.",
+ // { exact: false },
+ // );
+
+ // expect(innerDescription).toBeInTheDocument();
+ // });
// Data broker removal in progress
it("shows the right description for a scan result card where removal is in progress", () => {
@@ -117,20 +122,22 @@ describe("ScanResultCard", () => {
expect(innerDescription).toBeInTheDocument();
});
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
// Data broker removal under maintenance
- it("shows the right description for a scan result card where removal is under maintenance", () => {
- const ComposedProgressCard = composeStory(
- DataBrokerRemovalUnderMaintenance,
- Meta,
- );
- render();
- const innerDescription = screen.getByText(
- "We’ve asked this data broker to remove your profile but they haven’t done it.",
- { exact: false },
- );
-
- expect(innerDescription).toBeInTheDocument();
- });
+ // eslint-disable-next-line jest/no-commented-out-tests
+ // it("shows the right description for a scan result card where removal is under maintenance", () => {
+ // const ComposedProgressCard = composeStory(
+ // DataBrokerRemovalUnderMaintenance,
+ // Meta,
+ // );
+ // render();
+ // const innerDescription = screen.getByText(
+ // "We’ve asked this data broker to remove your profile but they haven’t done it.",
+ // { exact: false },
+ // );
+
+ // expect(innerDescription).toBeInTheDocument();
+ // });
it("shows an additional note for “requested removal” status label", () => {
const ComposedProgressCard = composeStory(DataBrokerRequestedRemoval, Meta);
diff --git a/src/app/components/client/exposure_card/ScanResultCard.tsx b/src/app/components/client/exposure_card/ScanResultCard.tsx
index e9ea6a01ca..0efe3776aa 100644
--- a/src/app/components/client/exposure_card/ScanResultCard.tsx
+++ b/src/app/components/client/exposure_card/ScanResultCard.tsx
@@ -118,22 +118,25 @@ export const ScanResultCard = (props: ScanResultCardProps) => {
const dataBrokerDescription = () => {
// Data broker cards manually resolved do not change their status to "removed";
// instead, we track them using the "manually_resolved" property.
- if (scanResult.broker_status === "removal_under_maintenance") {
- if (scanResult.manually_resolved) {
- return l10n.getFragment(
- "exposure-card-description-info-for-sale-fixed-removal-under-maintenance-manually-fixed",
- { elems: { data_broker_profile: dataBrokerProfileLink } },
- );
- }
- return l10n.getFragment(
- "exposure-card-description-info-for-sale-manual-removal-needed",
- {
- elems: {
- b: ,
- },
- },
- );
- }
+
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
+ // if (scanResult.broker_status === "removal_under_maintenance") {
+ // if (scanResult.manually_resolved) {
+ // return l10n.getFragment(
+ // "exposure-card-description-info-for-sale-fixed-removal-under-maintenance-manually-fixed",
+ // { elems: { data_broker_profile: dataBrokerProfileLink } },
+ // );
+ // }
+ // return l10n.getFragment(
+ // "exposure-card-description-info-for-sale-manual-removal-needed",
+ // {
+ // elems: {
+ // b: ,
+ // },
+ // },
+ // );
+ // }
+
if (scanResult.manually_resolved) {
return l10n.getFragment(
"exposure-card-description-info-for-sale-fixed-manually-fixed",
@@ -249,9 +252,10 @@ export const ScanResultCard = (props: ScanResultCardProps) => {
);
}
- if (props.scanResult.broker_status === "removal_under_maintenance") {
- return {props.resolutionCta};
- }
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
+ // if (props.scanResult.broker_status === "removal_under_maintenance") {
+ // return {props.resolutionCta};
+ // }
switch (props.scanResult.status) {
case "new":
@@ -323,9 +327,10 @@ export const ScanResultCard = (props: ScanResultCardProps) => {
-
{
props.exposure,
props.enabledFeatureFlags?.includes("AdditionalRemovalStatuses") ??
false,
- props.isRemovalUnderMaintenance || false, // Pass maintenance flag
+ // TODO: Waiting for criteria for data brokers under maintenance to be determined
+ // props.isRemovalUnderMaintenance || false,
);
return (
@@ -54,7 +56,8 @@ export const StatusPill = (props: Props) => {
exposure: props.exposure,
pillType,
l10n,
- isDataBrokerUnderMaintenance: props.isRemovalUnderMaintenance,
+ // TODO: Waiting for criteria for data brokers under maintenance to be determined
+ // isDataBrokerUnderMaintenance: props.isRemovalUnderMaintenance,
})
: getStatusLabel({
pillType,
@@ -74,7 +77,8 @@ type StatusLabelProps = {
exposure?: Exposure;
pillType: string;
l10n: ExtendedReactLocalization;
- isDataBrokerUnderMaintenance?: boolean;
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
+ // isDataBrokerUnderMaintenance?: boolean;
};
const getStatusLabel = (props: StatusLabelProps): string => {
@@ -85,9 +89,10 @@ const getStatusLabel = (props: StatusLabelProps): string => {
if (manuallyRemoved) {
return props.l10n.getString("status-pill-removed");
}
- if (props.isDataBrokerUnderMaintenance) {
- return props.l10n.getString("status-pill-action-needed");
- }
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
+ // if (props.isDataBrokerUnderMaintenance) {
+ // return props.l10n.getString("status-pill-action-needed");
+ // }
switch (props.pillType) {
case StatusPillTypeMap.RequestedRemoval:
return props.l10n.getString("status-pill-requested-removal");
@@ -106,16 +111,18 @@ const getStatusLabel = (props: StatusLabelProps): string => {
export const getExposureStatus = (
exposure: Exposure,
additionalRemovalStatusesEnabled: boolean,
- isRemovalUnderMaintenance: boolean,
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
+ // isRemovalUnderMaintenance: boolean,
): StatusPillType => {
if (isScanResult(exposure)) {
if (exposure.manually_resolved) {
return "fixed";
}
- if (isRemovalUnderMaintenance) {
- return "actionNeeded";
- }
+ // TODO: Waiting for criteria for data brokers under maintenance to be determined
+ // if (isRemovalUnderMaintenance) {
+ // return "actionNeeded";
+ // }
switch (exposure.status) {
case "removed":
diff --git a/src/app/functions/server/dashboard.ts b/src/app/functions/server/dashboard.ts
index 52c2bb8955..4a1801681c 100644
--- a/src/app/functions/server/dashboard.ts
+++ b/src/app/functions/server/dashboard.ts
@@ -6,7 +6,6 @@ import { OnerepScanResultDataBrokerRow } from "knex/types/tables";
import { BreachDataTypes } from "../universal/breach";
import { RemovalStatusMap } from "../universal/scanResult";
import { SubscriberBreach } from "../../../utils/subscriberBreaches";
-import { DataBrokerRemovalStatusMap } from "../universal/dataBroker";
export type DataPoints = {
// shared
@@ -204,12 +203,16 @@ export function getDashboardSummary(
(r.status === RemovalStatusMap.OptOutInProgress ||
r.status === RemovalStatusMap.WaitingForVerification) &&
!isManuallyResolved;
- const isRemovalUnderMaintenance =
- r.broker_status === DataBrokerRemovalStatusMap.RemovalUnderMaintenance;
+
+ // TODO: Waiting for criteria for data brokers under maintenance to be determined
+ // const isRemovalUnderMaintenance =
+ // r.broker_status === DataBrokerRemovalStatusMap.RemovalUnderMaintenance;
+
if (isInProgress) {
- if (!isRemovalUnderMaintenance) {
- summary.dataBrokerInProgressNum++;
- }
+ // TODO: Waiting for criteria for data brokers under maintenance to be determined
+ // if (!isRemovalUnderMaintenance) {
+ summary.dataBrokerInProgressNum++;
+ // }
} else if (isAutoFixed) {
summary.dataBrokerAutoFixedNum++;
} else if (isManuallyResolved) {
@@ -231,13 +234,14 @@ export function getDashboardSummary(
summary.allDataPoints.familyMembers += r.relatives.length;
if (isInProgress) {
- if (!isRemovalUnderMaintenance) {
- summary.inProgressDataPoints.emailAddresses += r.emails.length;
- summary.inProgressDataPoints.phoneNumbers += r.phones.length;
- summary.inProgressDataPoints.addresses += r.addresses.length;
- summary.inProgressDataPoints.familyMembers += r.relatives.length;
- summary.dataBrokerInProgressDataPointsNum += dataPointsIncrement;
- }
+ // TODO: Waiting for criteria for data brokers under maintenance to be determined
+ // if (!isRemovalUnderMaintenance) {
+ summary.inProgressDataPoints.emailAddresses += r.emails.length;
+ summary.inProgressDataPoints.phoneNumbers += r.phones.length;
+ summary.inProgressDataPoints.addresses += r.addresses.length;
+ summary.inProgressDataPoints.familyMembers += r.relatives.length;
+ summary.dataBrokerInProgressDataPointsNum += dataPointsIncrement;
+ // }
}
// for fixed data points: email, phones, addresses, relatives, full name (1)
diff --git a/src/app/functions/server/getRelevantGuidedSteps.test.ts b/src/app/functions/server/getRelevantGuidedSteps.test.ts
index 692bb0c8f3..91e96b8d17 100644
--- a/src/app/functions/server/getRelevantGuidedSteps.test.ts
+++ b/src/app/functions/server/getRelevantGuidedSteps.test.ts
@@ -561,35 +561,37 @@ describe("getNextGuidedStep", () => {
).toBe("Done");
});
- it("links to the removal under maintenance step if a user has scan resutls with a data broker that has a removal under maintenance status", () => {
- expect(
- getNextGuidedStep({
- countryCode: "us",
- latestScanData: {
- scan: {
- ...completedScan.scan!,
- onerep_scan_status: "finished",
- },
- results: [
- createRandomScanResult({
- status: "optout_in_progress",
- manually_resolved: false,
- broker_status: "removal_under_maintenance",
- }),
- ],
- },
- subscriberBreaches: [],
- user: {
- email: "arbitrary@example.com",
- },
- }),
- ).toStrictEqual({
- href: "/user/dashboard/fix/data-broker-profiles/removal-under-maintenance",
- id: "DataBrokerManualRemoval",
- completed: false,
- eligible: true,
- });
- });
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
+ // eslint-disable-next-line jest/no-commented-out-tests
+ // it("links to the removal under maintenance step if a user has scan resutls with a data broker that has a removal under maintenance status", () => {
+ // expect(
+ // getNextGuidedStep({
+ // countryCode: "us",
+ // latestScanData: {
+ // scan: {
+ // ...completedScan.scan!,
+ // onerep_scan_status: "finished",
+ // },
+ // results: [
+ // createRandomScanResult({
+ // status: "optout_in_progress",
+ // manually_resolved: false,
+ // broker_status: "removal_under_maintenance",
+ // }),
+ // ],
+ // },
+ // subscriberBreaches: [],
+ // user: {
+ // email: "arbitrary@example.com",
+ // },
+ // }),
+ // ).toStrictEqual({
+ // href: "/user/dashboard/fix/data-broker-profiles/removal-under-maintenance",
+ // id: "DataBrokerManualRemoval",
+ // completed: false,
+ // eligible: true,
+ // });
+ // });
it("links to the Credit Card step if the user's credit card has been breached", () => {
expect(
diff --git a/src/app/functions/server/getRelevantGuidedSteps.ts b/src/app/functions/server/getRelevantGuidedSteps.ts
index 50fa51994e..34e0877616 100644
--- a/src/app/functions/server/getRelevantGuidedSteps.ts
+++ b/src/app/functions/server/getRelevantGuidedSteps.ts
@@ -136,14 +136,15 @@ export function isEligibleForStep(
stepId: StepLink["id"],
): boolean {
// Only premium users can see the manual data broker removal flow, once they have run a scan
- if (stepId === "DataBrokerManualRemoval") {
- const dataBrokersRequireManualRemoval =
- data.latestScanData?.results?.some((result) => {
- return result.broker_status === "removal_under_maintenance";
- }) ?? false;
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
+ // if (stepId === "DataBrokerManualRemoval") {
+ // const dataBrokersRequireManualRemoval =
+ // data.latestScanData?.results?.some((result) => {
+ // return result.broker_status === "removal_under_maintenance";
+ // }) ?? false;
- return dataBrokersRequireManualRemoval;
- }
+ // return dataBrokersRequireManualRemoval;
+ // }
if (stepId === "Scan") {
return data.countryCode === "us";
@@ -244,15 +245,16 @@ export function hasCompletedStep(
data: StepDeterminationData,
stepId: StepLink["id"],
): boolean {
- if (stepId === "DataBrokerManualRemoval") {
- return (
- data.latestScanData?.results?.every(
- (result) =>
- result.broker_status !== "removal_under_maintenance" ||
- result.manually_resolved,
- ) ?? false
- );
- }
+ // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined
+ // if (stepId === "DataBrokerManualRemoval") {
+ // return (
+ // data.latestScanData?.results?.every(
+ // (result) =>
+ // result.broker_status !== "removal_under_maintenance" ||
+ // result.manually_resolved,
+ // ) ?? false
+ // );
+ // }
if (stepId === "Scan") {
const hasRunScan =
diff --git a/src/db/tables/featureFlags.ts b/src/db/tables/featureFlags.ts
index de998eb6b7..a7fa820bfb 100644
--- a/src/db/tables/featureFlags.ts
+++ b/src/db/tables/featureFlags.ts
@@ -54,6 +54,7 @@ export const featureFlagNames = [
"DataBrokerRemovalTimeEstimateLabel",
"DataBrokerRemovalTimeEstimateCsat",
"SettingsPageRedesign",
+ "EnableRemovalUnderMaintenanceStep",
] as const;
export type FeatureFlagName = (typeof featureFlagNames)[number];