ubicloud/views/components/free_quota.erb
Jeremy Evans 750ebdc055 Change from erb_formatter to herb/formatter
Currently, herb/formatter has at least 4 bugs the prevent us from
switching to it (https://github.com/marcoroth/herb/issues 476, 477,
478, and 479). This includes manual fixes for each issue.

herb/formatter also introduces a rubocop violation for the
Layout/AssignmentIndentation cop. This disables that cop.
2025-09-05 14:01:01 -07:00

38 lines
1.3 KiB
Text

<% warning_style = !@has_valid_payment_method %>
<% bold_text_color = warning_style ? "text-orange-700" : "text-green-900" %>
<div class="mb-2 rounded-md p-4 <%= warning_style ? "bg-orange-50" : "bg-green-50" %>">
<div class="flex items-center <%= warning_style ? "text-orange-600" : "text-green-800" %>">
<div class="flex-shrink-0">
<%== part("components/icon", name: "hero-banknotes", classes: "h-9 w-9") %>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium">
<span>
You have <%= @remaining_free_quota.to_i %> free <%= @free_quota_unit %> available (few-minute delay).
</span>
<span>Free quota refreshes next month.</span>
<br>
<% if @has_valid_payment_method %>
<a
href="<%= billing_path %>"
class="font-bold <%= bold_text_color %>"
>
Billing
</a>
<span>information is valid. Charges start after the free quota.</span>
<% else %>
<span>To avoid service interruption, please</span>
<a
href="<%= billing_path %>"
class="font-bold <%= bold_text_color %>"
>
click here
</a>
<span>to add a valid billing method.</span>
<% end %>
</h3>
</div>
</div>
</div>