openspec: admin-insights-pages change

This commit is contained in:
2026-08-10 09:17:11 +10:00
parent 426c99296d
commit d80c08306c
7 changed files with 132 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
## ADDED Requirements
### Requirement: Dashboard revenue and customers
The admin dashboard SHALL show total customers and total revenue (sum of paid order amounts).
#### Scenario: View stats
- **WHEN** an admin opens the dashboard
- **THEN** customer count and revenue (paid orders) are displayed
### Requirement: Customer tags in admin
The Users resource SHALL show a customer's tags (code, status, item type).
#### Scenario: Open a customer
- **WHEN** an admin views a user
- **THEN** their tags are listed
### Requirement: orders.amount
The `orders` table SHALL have an `amount` column (numeric, default 0) editable in the Order resource.
#### Scenario: Set an order amount
- **WHEN** an admin sets an amount on an order
- **THEN** revenue reflects it once the order is paid

View File

@@ -0,0 +1,19 @@
## ADDED Requirements
### Requirement: Public info pages
The site SHALL serve `/about`, `/what-is-this`, and `/contact` as styled pages sharing the site layout, with contact details on the contact page.
#### Scenario: Visit each page
- **WHEN** a visitor opens /about, /what-is-this, or /contact
- **THEN** a styled page renders with the site header/footer
### Requirement: Customer pause gates alerts
When a user is paused (admin flag), scans on their tags SHALL be recorded but no alert SMS SHALL be sent (alert or contact paths).
#### Scenario: Paused owner
- **WHEN** a scan arrives on a tag whose owner is paused
- **THEN** the scan is recorded with `alert_sent = false` and no SMS is sent
#### Scenario: Unpaused owner
- **WHEN** the owner is unpaused
- **THEN** normal alert rules apply