diff --git a/services/web/app/views/subscriptions/dashboard-react.pug b/services/web/app/views/subscriptions/dashboard-react.pug index 7d6a7a3bcf..12ea293c41 100644 --- a/services/web/app/views/subscriptions/dashboard-react.pug +++ b/services/web/app/views/subscriptions/dashboard-react.pug @@ -15,6 +15,7 @@ block append meta meta(name="ol-planCodesChangingAtTermEnd" data-type="json", content=planCodesChangingAtTermEnd) meta(name="ol-currentInstitutionsWithLicence" data-type="json" content=currentInstitutionsWithLicence) meta(name="ol-hasSubscription" data-type="boolean" content=hasSubscription) + meta(name="ol-fromPlansPage" data-type="boolean" content=fromPlansPage) meta(name="ol-plans", data-type="json" content=plans) if (personalSubscription && personalSubscription.recurly) meta(name="ol-recurlyApiKey" content=settings.apis.recurly.publicKey) diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index ee8b443723..95d7823bce 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -913,6 +913,7 @@ "x_price_per_user": "", "x_price_per_year": "", "year": "", + "you_already_have_a_subscription": "", "you_are_a_manager_and_member_of_x_plan_as_member_of_group_subscription_y_administered_by_z": "", "you_are_a_manager_of_commons_at_institution_x": "", "you_are_a_manager_of_publisher_x": "", diff --git a/services/web/frontend/js/features/subscription/components/dashboard/subscription-dashboard.tsx b/services/web/frontend/js/features/subscription/components/dashboard/subscription-dashboard.tsx index e4e687d6fa..46f48bd3a5 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/subscription-dashboard.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/subscription-dashboard.tsx @@ -8,16 +8,25 @@ import PersonalSubscription from './personal-subscription' import ManagedGroupSubscriptions from './managed-group-subscriptions' import ManagedInstitutions from './managed-institutions' import { useSubscriptionDashboardContext } from '../../context/subscription-dashboard-context' +import getMeta from '../../../../utils/meta' +import { Alert } from 'react-bootstrap' function SubscriptionDashboard() { const { t } = useTranslation() const { hasDisplayedSubscription, hasSubscription } = useSubscriptionDashboardContext() + const fromPlansPage: boolean = getMeta('ol-fromPlansPage') + return (