PhoenixKitProjects.Web.Components.RunningCard (PhoenixKitProjects v0.2.1)

Copy Markdown View Source

One row in the dashboard's "Running" section — clickable link wrapping a title, tier pill, started-X-ago metadata, done/total counts, an in-progress note, and a colored progress bar.

Driven by the project_summary map shape returned by Projects.project_summaries/1:

%{
  project: %Project{},
  total: integer,
  done: integer,
  in_progress: integer,
  progress_pct: integer,
  total_hours: number,
  planned_end: DateTime.t() | nil
}

The caller passes the tier directly so the dashboard can reuse the same tier classifier it uses to sort + cap the list.

Example

<.running_card summary={s} tier={running_tier(s)} navigate={Paths.project(s.project.uuid)} lang={lang} />

Summary

Functions

running_card(assigns)

Attributes

  • summary (:map) (required)
  • tier (:atom) (required) - Must be one of :late, :near_done, :on_track, or :empty.
  • navigate (:string) (required)
  • lang (:string) - Defaults to nil.