Skip to content

Draft: Add an Afform for displaying campaign contributions

This adds:

  • A SearchKit for contributions by campaign
    • a table display
    • a chart_kit display of type pie chart showing campaign contributions by type
    • a chart_kit display of type line showing a campaign contribution heartbeat over time
  • A FormBuilder form displaying all of those displays on a page
    • accessible with a dedicated route civicrm/campaign/contributions/#/?id=[id]
    • filtering by campaign ID via the id URL parameter
  • A button linking to each campaign's contributions on the Administer Campaigns display

The chart_kit displays depend on the chart_kit extension and are only added if the extension is installed (see condition in the managed entity file).

However, I don't know how to check for an extension being installed in the Afform template (.aff.html file). I don't think chart_kit should be a hard dependency for Campaign Manager, so this issue is still to be solved to avoid errors when displaying the form. Any help with this is greatly appreciated - maybe @colemanw has an idea?

Also, I consider this an intermediate approach until the single campaign view can contain those search displays instead of having a separate page.

Merge request reports

Loading