Files

4.1 KiB

admin-events Specification

Purpose

Admins with the Events module create and maintain the events that leads are captured at, including each event's team of salespeople.

Requirements

Requirement: Event list

The system SHALL let an admin with BO_EVENTS list events, paginated on the server, searchable by name, filterable by enabled state, and sortable by name, start date and end date. Each row SHALL show name, location, start date, end date and whether the event is enabled.

Scenario: Search by name

  • GIVEN events KL Food Fair 2027 and Penang Expo
  • WHEN an admin with BO_EVENTS searches for food
  • THEN the list shows KL Food Fair 2027 and not Penang Expo

Scenario: Disabled filter

  • GIVEN an enabled event and a disabled event
  • WHEN the admin filters by disabled
  • THEN only the disabled event is listed

Scenario: No module

  • WHEN an admin without BO_EVENTS opens the Events page or calls an events endpoint
  • THEN the page shows not-authorised and the endpoint responds 403

Requirement: Create event

The system SHALL let an admin with BO_EVENTS create an event with a name (required, at most 100 characters), a location (required, at most 200 characters), a start date and an end date (both required, whole days). The end date SHALL NOT be before the start date. The event SHALL start on the start date at 00:00:00 and end on the end date at 23:59:59. A new event SHALL be enabled. Events MAY overlap.

Scenario: New event

  • WHEN an admin creates KL Food Fair 2027 at MITEC from 2027-01-15 to 2027-01-17
  • THEN the event is saved as enabled, starting 2027-01-15 00:00:00 and ending 2027-01-17 23:59:59
  • AND it appears in the event list

Scenario: Missing fields

  • WHEN an admin submits the form without a name, location, start date or end date
  • THEN the save is refused and each missing field is named

Scenario: End before start

  • WHEN an admin submits an end date earlier than the start date
  • THEN the save is refused with a message on the end date

Scenario: One-day event

  • WHEN the start date and the end date are the same day
  • THEN the event is saved and lasts that whole day

Requirement: Edit event

The system SHALL let an admin with BO_EVENTS change an event's name, location, start date, end date and enabled state, with the same rules as create. Editing SHALL NOT change any other stored event data. Events SHALL NOT be deletable; an event that should no longer be used is disabled.

Scenario: Disable

  • WHEN an admin disables an event
  • THEN the event shows as disabled in the list and its other details are unchanged

Scenario: Unknown event

  • WHEN an admin opens or saves an event id that does not exist
  • THEN the system responds not found

Requirement: Event team

The system SHALL let an admin with BO_EVENTS choose, on create and on edit, the event's team: zero or more active admin users who work the event as salespeople. A user SHALL appear at most once on a team. Saving SHALL replace the team with the chosen set. Team membership SHALL belong to the admin's company. Removing someone from the team SHALL NOT change anything already recorded against them.

Scenario: Team on create

  • WHEN an admin creates an event with sales1 and sales2 on the team
  • THEN opening the event shows sales1 and sales2 as its team

Scenario: Change team

  • GIVEN an event whose team is sales1 and sales2
  • WHEN an admin saves it with sales2 and sales3
  • THEN the team is sales2 and sales3

Scenario: Only active admin users

  • WHEN an admin opens the team picker
  • THEN it offers active admin users only, never members or deactivated users
  • AND a request adding a member, a deactivated user or an unknown user to the team is refused

Scenario: Deactivated member stays visible

  • GIVEN sales1 is on an event's team
  • WHEN sales1 is deactivated
  • THEN the event still lists sales1 on its team, marked inactive, until an admin removes them
  • AND saving the event with sales1 still on the team succeeds