mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
feat: implement expandable view for cashflow sankey chart (#739)
* feat: implement expandable view for cashflow sankey chart * refactor: migrate cashflow dialog sizing to tailwind utilities * refactor: declarative draggable restore on cashflow dialog close * refactor: localized title and use Tailwind utilities * refactor: update dialog interaction especially on mobile * refactor: add global expand text to localization * fix: restore draggable immediately after dialog close * Whitespace noise --------- Signed-off-by: Juan José Mata <juanjo.mata@gmail.com> Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
@@ -18,6 +18,19 @@
|
||||
data-sankey-chart-currency-symbol-value="<%= sankey_data[:currency_symbol] %>"
|
||||
class="w-full h-full"></div>
|
||||
</div>
|
||||
|
||||
<%= render DS::Dialog.new(id: "cashflow-expanded-dialog", auto_open: false, width: "custom", disable_frame: true, content_class: "!w-[96vw] max-w-[1650px]", data: { action: "close->cashflow-expand#restore" }) do |dialog| %>
|
||||
<% dialog.with_header(title: t("pages.dashboard.cashflow_sankey.title"), hide_close_icon: false) %>
|
||||
<% dialog.with_body do %>
|
||||
<div class="w-full h-[85dvh] max-h-[90dvh] overflow-y-auto overscroll-contain">
|
||||
<div
|
||||
data-controller="sankey-chart"
|
||||
data-sankey-chart-data-value="<%= sankey_data.to_json %>"
|
||||
data-sankey-chart-currency-symbol-value="<%= sankey_data[:currency_symbol] %>"
|
||||
class="w-full h-full"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="h-[300px] lg:h-[340px] bg-container py-4 flex flex-col items-center justify-center">
|
||||
<div class="space-y-3 text-center flex flex-col items-center">
|
||||
|
||||
Reference in New Issue
Block a user