45 lines
2.0 KiB
Markdown
45 lines
2.0 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Business User Group Metadata Visibility
|
|
|
|
The frontend SHALL display business user group metadata returned by shop and membership APIs while omitting internal group IDs from these views.
|
|
|
|
#### Scenario: Show business group fields for shops
|
|
|
|
- **WHEN** an administrator views the shop list or shop details
|
|
- **THEN** the frontend displays the business group code, name, enabled state, and business line returned by the API
|
|
- **AND** the frontend does not display the business group ID
|
|
|
|
#### Scenario: Show current group fields for members and candidates
|
|
|
|
- **WHEN** an administrator views current members or candidate accounts in the group drawer
|
|
- **THEN** the frontend displays each account's current group code, name, and enabled state
|
|
- **AND** displays "未分组" when the account has no current group
|
|
- **AND** the frontend does not display the current group ID
|
|
|
|
#### Scenario: Show current member count
|
|
|
|
- **WHEN** an administrator views the business user group list
|
|
- **THEN** the frontend displays the `member_count` returned for each group
|
|
|
|
#### Scenario: Keep member selection and username visible
|
|
|
|
- **WHEN** an administrator scrolls horizontally in either member or candidate table
|
|
- **THEN** the selection checkbox and username columns remain fixed on the left
|
|
|
|
### Requirement: Incremental Business User Group Membership
|
|
|
|
The frontend SHALL use the member query, candidate query, incremental POST add/move, and scoped DELETE remove contracts from the modification document.
|
|
|
|
#### Scenario: Add or move members
|
|
|
|
- **WHEN** the user selects candidate accounts and confirms adding members
|
|
- **THEN** the frontend MUST POST the account IDs to `/api/admin/business-user-groups/{id}/members`
|
|
- **AND** MUST refresh current members and member counts
|
|
|
|
#### Scenario: Remove current members
|
|
|
|
- **WHEN** the user selects members currently belonging to the group and confirms removal
|
|
- **THEN** the frontend MUST DELETE `/api/admin/business-user-groups/{id}/members` with the account IDs
|
|
- **AND** MUST refresh current members
|