mirror of
https://github.com/we-promise/sure.git
synced 2026-04-17 02:54:10 +00:00
* Add lookbook + viewcomponent, organize design system file * Build menu component * Button updates * More button fixes * Replace all menus with new ViewComponent * Checkpoint: fix tests, all buttons and menus converted * Split into Link and Button components for clarity * Button cleanup * Simplify custom confirmation configuration in views * Finalize button, link component API * Add toggle field to custom form builder + Component * Basic tabs component * Custom tabs, convert all menu / tab instances in app * Gem updates * Centralized icon helper * Update all icon usage to central helper * Lint fixes * Centralize all disclosure instances * Dialog replacements * Consolidation of all dialog styles * Test fixes * Fix app layout issues, move to component with slots * Layout simplification * Flakey test fix * Fix dashboard mobile issues * Finalize homepage * Lint fixes * Fix shadows and borders in dark mode * Fix tests * Remove stale class * Fix filled icon logic * Move transparent? to public interface
38 lines
1.4 KiB
Plaintext
38 lines
1.4 KiB
Plaintext
<%# locals: (series:, period:) %>
|
|
|
|
<div class="flex justify-between gap-4 px-4">
|
|
<div class="space-y-2">
|
|
<div class="space-y-2">
|
|
<p class="text-sm text-secondary font-medium"><%= t(".title") %></p>
|
|
<p class="text-primary -space-x-0.5 text-3xl font-medium">
|
|
<%= series.current.format %>
|
|
</p>
|
|
<% if series.trend.nil? %>
|
|
<p class="text-sm text-secondary"><%= t(".data_not_available") %></p>
|
|
<% else %>
|
|
<%= render partial: "shared/trend_change", locals: { trend: series.trend, comparison_label: period.comparison_label } %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<%= form_with url: root_path, method: :get, data: { controller: "auto-submit-form" } do |form| %>
|
|
<%= form.select :period,
|
|
Period.as_options,
|
|
{ selected: period.key },
|
|
data: { "auto-submit-form-target": "auto" },
|
|
class: "bg-container border border-secondary font-medium rounded-lg px-3 py-2 text-sm pr-7 cursor-pointer text-primary focus:outline-hidden focus:ring-0" %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% if series.any? %>
|
|
<div
|
|
id="netWorthChart"
|
|
class="w-full flex-1 min-h-52"
|
|
data-controller="time-series-chart"
|
|
data-time-series-chart-data-value="<%= series.to_json %>"></div>
|
|
<% else %>
|
|
<div class="w-full h-full flex items-center justify-center">
|
|
<p class="text-secondary text-sm"><%= t(".data_not_available") %></p>
|
|
</div>
|
|
<% end %>
|