Skip to content

[FEAT]: Add a History tab to show number of form submissions #569

@marcvergees

Description

@marcvergees

📝 Description

Add a new "History" tab to the FireForm UI that shows how many reports (form submissions) have been created. The tab should display a summary count of submissions and a simple list or table of recent submission records (timestamp, submitting user or identifier, and form ID). The implementation can read directly from the existing form submissions table to get counts and records.

💡 Rationale

Users need a quick way to see how many reports have been created for a form and to browse recent submissions without querying the database manually. This improves discoverability and auditability of submissions.

🛠️ Proposed Solution

A brief sketch of how we might implement this:

  • UI: Add a "History" tab (or section) to the form view in the frontend.
  • Backend: Add an endpoint that queries the form submissions table and returns counts and recent submission rows (limit 50) with fields: timestamp, formId, submitter (if available), and submission id.
  • Wiring: Frontend calls the endpoint and renders the count and a paginated list/table.
  • Tests: Add unit/integration tests for the endpoint and a basic UI test.

Implementation note: This is straightforward because the submissions are already persisted in the form submissions table — the endpoint simply aggregates and returns that data.

✅ Acceptance Criteria

How will we know this is finished?

  • History tab is visible in the form view.
  • The tab shows the total number of submissions (count) for the current form.
  • The tab lists recent submissions with timestamp and an identifier (user or submission id).
  • Endpoint is covered by tests.
  • Documentation updated in docs/ describing the new UI and endpoint.

📌 Additional Context

The quickest implementation reads directly from the form submissions table. If needed later, we can add filters (date range, submitter) and pagination.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

Status
No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions