Admin analytics: heatmap per device, anteprima staff e analisi costi.
Separa heatmap mobile/desktop, opt-out analytics per operatori, dashboard costi con KPI e trend mensili. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<%= form_with model: @entry, url: url, method: method, local: true, class: "admin-filter-form" do |f| %>
|
||||
<div class="admin-filter-grid">
|
||||
<label class="admin-filter-field">
|
||||
<span><%= t("admin.costs.entries.month") %></span>
|
||||
<%= text_field_tag "platform_cost_entry[month]",
|
||||
@entry.month&.strftime("%Y-%m"),
|
||||
type: "month",
|
||||
required: true %>
|
||||
</label>
|
||||
<label class="admin-filter-field">
|
||||
<span><%= t("admin.costs.entries.label") %></span>
|
||||
<%= f.text_field :label, required: true, maxlength: 120 %>
|
||||
<span class="muted admin-table-sub"><%= t("admin.costs.entries.label_hint") %></span>
|
||||
</label>
|
||||
<label class="admin-filter-field">
|
||||
<span><%= t("admin.costs.entries.amount") %></span>
|
||||
<%= number_field_tag "platform_cost_entry[amount_euros]",
|
||||
(@entry.amount_cents.to_f / 100.0 if @entry.amount_cents.present?),
|
||||
step: 0.01,
|
||||
min: 0.01,
|
||||
required: true %>
|
||||
</label>
|
||||
<label class="admin-filter-field" style="grid-column: span 2;">
|
||||
<span><%= t("admin.costs.entries.notes") %></span>
|
||||
<%= f.text_area :notes, rows: 3 %>
|
||||
</label>
|
||||
</div>
|
||||
<div class="admin-filter-actions">
|
||||
<%= f.submit t("admin.costs.entries.save"), class: "admin-btn admin-btn--primary admin-btn--sm" %>
|
||||
<%= link_to t("admin.costs.entries.cancel"),
|
||||
admin_costs_path(month: @entry.month&.strftime("%Y-%m")),
|
||||
class: "admin-btn admin-btn--outline admin-btn--sm" %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -0,0 +1,10 @@
|
||||
<% content_for :body_class, "admin-body" %>
|
||||
|
||||
<div class="admin-page-head">
|
||||
<h2 class="admin-page-title"><%= t("admin.costs.entries.edit_title") %></h2>
|
||||
<p class="muted admin-page-sub"><%= @entry.label %> · <%= admin_month_label(@entry.month) %></p>
|
||||
</div>
|
||||
|
||||
<section class="panel">
|
||||
<%= render "form", url: admin_cost_entry_path(@entry), method: :patch %>
|
||||
</section>
|
||||
@@ -0,0 +1,9 @@
|
||||
<% content_for :body_class, "admin-body" %>
|
||||
|
||||
<div class="admin-page-head">
|
||||
<h2 class="admin-page-title"><%= t("admin.costs.entries.new_title") %></h2>
|
||||
</div>
|
||||
|
||||
<section class="panel">
|
||||
<%= render "form", url: admin_cost_entries_path, method: :post %>
|
||||
</section>
|
||||
Reference in New Issue
Block a user