feat: 预计最终到期时间展示新增具体
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m49s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m49s
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
### Requirement: IoT Card Estimated Final Expiry Display
|
||||
|
||||
The IoT card management list integration SHALL preserve and display the backend asset-level estimated final package expiry fields without calculating package continuation dates in the frontend.
|
||||
The IoT card management list integration SHALL preserve and display the five backend asset-level estimated final package expiry fields `estimated_final_expires_at`, `days_until_final_expiry`, `expiry_estimate_status`, `expiry_estimate_status_name`, and `is_expiring` returned in `data.items[]` by `GET /api/admin/iot-cards/standalone`. The status SHALL be one of `exact`, `waiting_activation`, `none`, or `invalid_data`; non-`exact` records SHALL have `estimated_final_expires_at=null` and `days_until_final_expiry=null`. The frontend SHALL NOT calculate package continuation dates. This requirement applies only to the admin IoT card list.
|
||||
|
||||
#### Scenario: Display exact card final expiry estimate
|
||||
|
||||
@@ -13,11 +13,26 @@ The IoT card management list integration SHALL preserve and display the backend
|
||||
|
||||
#### Scenario: Display activation-pending card final expiry
|
||||
|
||||
- **GIVEN** 卡列表接口返回待激活等不可预计的 `expiry_estimate_status`
|
||||
- **GIVEN** 卡列表接口返回 `expiry_estimate_status=waiting_activation`
|
||||
- **WHEN** 页面渲染卡列表行
|
||||
- **THEN** `预计套餐到期时间` MUST display `待激活后起算`
|
||||
- **AND** 页面 MUST NOT calculate or display a fabricated date
|
||||
|
||||
#### Scenario: Display card estimate status names for non-exact states
|
||||
|
||||
- **GIVEN** 卡列表接口返回 `expiry_estimate_status=none` 或 `expiry_estimate_status=invalid_data`
|
||||
- **WHEN** 页面渲染卡列表行
|
||||
- **THEN** `none` MUST display a stable empty placeholder
|
||||
- **AND** `invalid_data` MUST display `数据异常`
|
||||
- **AND** 页面 MUST use the status enum to choose the display rule
|
||||
|
||||
#### Scenario: Preserve null fields for non-exact card estimates
|
||||
|
||||
- **GIVEN** 卡列表接口返回 `expiry_estimate_status=none` 或 `expiry_estimate_status=invalid_data`
|
||||
- **THEN** `estimated_final_expires_at` MUST be `null`
|
||||
- **AND** `days_until_final_expiry` MUST be `null`
|
||||
- **AND** 页面 MUST NOT derive either field from套餐数据
|
||||
|
||||
#### Scenario: Highlight expiring card without reordering
|
||||
|
||||
- **GIVEN** 卡列表接口返回 `is_expiring=true` and `days_until_final_expiry`
|
||||
@@ -31,3 +46,9 @@ The IoT card management list integration SHALL preserve and display the backend
|
||||
- **WHEN** 页面渲染预计套餐到期时间列
|
||||
- **THEN** 页面 MUST display a stable placeholder
|
||||
- **AND** 页面 MUST NOT use an individual package expiry as a substitute
|
||||
|
||||
#### Scenario: Preserve card status name without using it for business calculation
|
||||
|
||||
- **WHEN** 卡列表接口返回 `expiry_estimate_status_name`
|
||||
- **THEN** 前端类型 MUST preserve the field
|
||||
- **AND** 页面 MUST NOT calculate or replace the backend status name
|
||||
|
||||
Reference in New Issue
Block a user