Files
one-pipe-system/openspec/changes/add-asset-package-admin-adjustments/tasks.md
sexygoat 2ecab976f5
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m22s
fix: 新增: 修改资产套餐已用量, 修改资产套餐过期时间
2026-06-13 10:41:10 +08:00

1.4 KiB

1. Implementation

  • 1.1 Add API request/response types for package used-data and expires-at updates.
  • 1.2 Add AssetService PATCH methods for /assets/{identifier}/packages/{package_usage_id}/used-data and /assets/{identifier}/packages/{package_usage_id}/expires-at.
  • 1.3 Pass the current asset identifier to the package list component if it is not already available there.
  • 1.4 Add operation buttons to the package list with environment, user_type, and permission visibility rules.
  • 1.5 Add edit-used-data dialog/form with non-negative integer MB validation and submit handling.
  • 1.6 Add edit-expires-at dialog/form with required datetime validation and submit handling.
  • 1.7 Refresh package list data and show success feedback after each successful update.
  • 1.8 Run targeted lint/type checks for changed files and document any unrelated existing failures.

2. Permission Setup

  • 2.1 Confirm final production permission codes for “修改已用量” and “修改过期时间”.
  • 2.2 Wire the confirmed permission codes into button visibility checks.

3. Validation

  • 3.1 Verify production-mode behavior: user_type=2 requires the matching permission for each button.
  • 3.2 Verify test/development-mode behavior: only user_type=1 sees the buttons and permissions are ignored.
  • 3.3 Verify unauthorized account types do not see either operation.