mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
* Initial multi-step property form * Improve form structure, add optional tooltip help icons to form fields * Add basic inline alert component * Clean up and improve property form lifecycle * Implement Account status concept * Lint fixes * Remove whitespace * Balance editing, scope updates for account * Passing tests * Fix brakeman warning * Remove stale columns * data constraint tweaks * Redundant property
51 lines
1.6 KiB
Plaintext
51 lines
1.6 KiB
Plaintext
<%# locals: (account:, title: nil, subtitle: nil) %>
|
|
|
|
<header class="space-y-4">
|
|
<div class="flex items-center gap-4">
|
|
<% content = yield %>
|
|
|
|
<% if content.present? %>
|
|
<%= content %>
|
|
<% else %>
|
|
<div class="flex items-center gap-3 overflow-hidden">
|
|
<%= render "accounts/logo", account: account %>
|
|
|
|
<div class="flex items-center gap-2">
|
|
<div class="truncate">
|
|
<div class="flex items-center gap-3">
|
|
<h2 class="font-medium text-xl truncate <%= "animate-pulse" if account.syncing? %>"><%= title || account.name %></h2>
|
|
<% if account.draft? %>
|
|
<%= render LinkComponent.new(
|
|
text: "Complete setup",
|
|
href: edit_account_path(account),
|
|
variant: :outline,
|
|
size: :sm,
|
|
frame: :modal
|
|
) %>
|
|
<% end %>
|
|
</div>
|
|
<% if subtitle.present? %>
|
|
<p class="text-sm text-secondary"><%= subtitle %></p>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="flex items-center gap-1 ml-auto">
|
|
<% if Rails.env.development? || self_hosted? %>
|
|
<%= icon(
|
|
"refresh-cw",
|
|
as_button: true,
|
|
size: "sm",
|
|
href: account.linked? ? sync_plaid_item_path(account.plaid_account.plaid_item) : sync_account_path(account),
|
|
disabled: account.syncing?,
|
|
frame: :_top
|
|
) %>
|
|
<% end %>
|
|
|
|
<%= render "accounts/show/menu", account: account %>
|
|
</div>
|
|
</div>
|
|
</header>
|