mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-20 05:39:39 +02:00
Add conditional rendering for sync all button in transactions index view
- The "Dev only: Sync all" button is now only displayed in the development environment to prevent accidental usage in production.
This commit is contained in:
parent
a51c4d2cba
commit
38b6e30bea
1 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,9 @@
|
||||||
<div class="flex items-center gap-5">
|
<div class="flex items-center gap-5">
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<%= render MenuComponent.new do |menu| %>
|
<%= render MenuComponent.new do |menu| %>
|
||||||
|
<% if Rails.env.development? %>
|
||||||
<% menu.with_item(variant: "button", text: "Dev only: Sync all", href: sync_all_accounts_path, method: :post, icon: "refresh-cw") %>
|
<% menu.with_item(variant: "button", text: "Dev only: Sync all", href: sync_all_accounts_path, method: :post, icon: "refresh-cw") %>
|
||||||
|
<% end %>
|
||||||
<% menu.with_item(variant: "link", text: "New rule", href: new_rule_path(resource_type: "transaction"), icon: "plus", data: { turbo_frame: :modal }) %>
|
<% menu.with_item(variant: "link", text: "New rule", href: new_rule_path(resource_type: "transaction"), icon: "plus", data: { turbo_frame: :modal }) %>
|
||||||
<% menu.with_item(variant: "link", text: "Edit rules", href: rules_path, icon: "git-branch", data: { turbo_frame: :_top }) %>
|
<% menu.with_item(variant: "link", text: "Edit rules", href: rules_path, icon: "git-branch", data: { turbo_frame: :_top }) %>
|
||||||
<% menu.with_item(variant: "link", text: "Edit categories", href: categories_path, icon: "shapes", data: { turbo_frame: :_top }) %>
|
<% menu.with_item(variant: "link", text: "Edit categories", href: categories_path, icon: "shapes", data: { turbo_frame: :_top }) %>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue