aesmail / kaffy

Powerfully simple admin package for phoenix applications
https://kaffy.fly.dev/admin/
MIT License
1.3k stars 153 forks source link

How can I make Main Dashboard widgets? #302

Open ByeongUkChoi opened 8 months ago

ByeongUkChoi commented 8 months ago
defmodule MyApp.Products.ProductAdmin do
  def widgets(_schema, _conn) do
    [
      %{
        type: "tidbit",
        title: "Average Reviews",
        content: "4.7 / 5.0",
        icon: "thumbs-up",
        width: 6,
      }
    ]
  end
end

This way, widgets for individual contexts come out well. However, widgets for individual contexts are also visible on the main dashboard. How do I declare a widget only on a dashboard that is different from the widget in the main individual context?

geeksilva97 commented 2 months ago

Same question here

geeksilva97 commented 2 months ago

I'm trying some stuff here https://github.com/geeksilva97/kaffy/pull/1