From 3691d32aaa4fccaf098d5ff0092731d0da212f0e Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Mon, 7 Apr 2025 17:36:39 -0700 Subject: [PATCH 1/2] IO-3202 HasFeatureAccess Boolean Signed-off-by: Allan Carr --- .../feature-wrapper/feature-wrapper.component.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/components/feature-wrapper/feature-wrapper.component.jsx b/client/src/components/feature-wrapper/feature-wrapper.component.jsx index afd0eb604..6576d2f30 100644 --- a/client/src/components/feature-wrapper/feature-wrapper.component.jsx +++ b/client/src/components/feature-wrapper/feature-wrapper.component.jsx @@ -78,7 +78,11 @@ export function HasFeatureAccess({ featureName, bodyshop, bypass, debug = false } return true; } - return bodyshop?.features?.allAccess || dayjs(bodyshop?.features[featureName]).isAfter(dayjs()); + return ( + bodyshop?.features?.allAccess || + bodyshop?.features[featureName] || + dayjs(bodyshop?.features[featureName]).isAfter(dayjs()) + ); } export default connect(mapStateToProps, null)(FeatureWrapper); From 0a68d2791d86b47ec814b7b26190e605d7428e44 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Tue, 8 Apr 2025 09:51:52 -0700 Subject: [PATCH 2/2] IO-3202 HasFeatureAccess Boolean Signed-off-by: Allan Carr --- .../components/feature-wrapper/feature-wrapper.component.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/feature-wrapper/feature-wrapper.component.jsx b/client/src/components/feature-wrapper/feature-wrapper.component.jsx index 6576d2f30..7dabea2ac 100644 --- a/client/src/components/feature-wrapper/feature-wrapper.component.jsx +++ b/client/src/components/feature-wrapper/feature-wrapper.component.jsx @@ -20,6 +20,7 @@ function FeatureWrapper({ children, upsellComponent, bypass, + // eslint-disable-next-line no-unused-vars ...restProps }) { const { t } = useTranslation(); @@ -80,7 +81,7 @@ export function HasFeatureAccess({ featureName, bodyshop, bypass, debug = false } return ( bodyshop?.features?.allAccess || - bodyshop?.features[featureName] || + bodyshop?.features?.[featureName] || dayjs(bodyshop?.features[featureName]).isAfter(dayjs()) ); }