diff --git a/app/views/savings_goals/show.html.erb b/app/views/savings_goals/show.html.erb index bc1f552ec..4d6624e0c 100644 --- a/app/views/savings_goals/show.html.erb +++ b/app/views/savings_goals/show.html.erb @@ -80,6 +80,30 @@ + <% if @savings_goal.status == :behind && @savings_goal.monthly_target_amount && !@savings_goal.paused? %> + <%# Catch-up callout %> + <% catch_up_money = Money.new(@savings_goal.monthly_target_amount, @savings_goal.currency) %> + <%= render DS::Alert.new(variant: "warning", title: t("savings_goals.show.catch_up.title", amount: catch_up_money.format)) do %> +

+ <% if @savings_goal.target_date %> + <%= t("savings_goals.show.catch_up.body_with_date", date: I18n.l(@savings_goal.target_date, format: :long)) %> + <% else %> + <%= t("savings_goals.show.catch_up.body") %> + <% end %> +

+
+ <%= render DS::Link.new( + text: t("savings_goals.show.catch_up.cta", amount: catch_up_money.format), + variant: "primary", + size: "sm", + href: new_savings_goal_contribution_path(@savings_goal), + icon: "plus", + frame: :modal + ) %> +
+ <% end %> + <% end %> + <%# Top row: ring card + projection chart card %>
diff --git a/config/locales/views/savings_goals/en.yml b/config/locales/views/savings_goals/en.yml index c604440f4..1acd08068 100644 --- a/config/locales/views/savings_goals/en.yml +++ b/config/locales/views/savings_goals/en.yml @@ -114,6 +114,11 @@ en: no_pace: No contributions yet. Add some to start a projection. behind: At %{current}/mo you'll fall short. Bump to %{required}/mo to hit it on time. on_track: At your current pace, you'll reach this goal around %{date}. + catch_up: + title: "Save %{amount}/mo to catch up" + body_with_date: "Bump your monthly contribution to stay on track for %{date}." + body: Bump your monthly contribution to stay on track. + cta: "Add %{amount}" source: initial: Initial manual: Manual