Skip to content

refactor: enhance AdminDateTimePicker with date granularity#97

Merged
chenyme merged 2 commits into
devfrom
fix_admin_subscribe
Jun 2, 2026
Merged

refactor: enhance AdminDateTimePicker with date granularity#97
chenyme merged 2 commits into
devfrom
fix_admin_subscribe

Conversation

@chenyme

@chenyme chenyme commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix admin user billing edits and align related settings UI behavior.

  • Fixed admin user edit save detection so subscription-only changes send the expected PATCH request instead of silently closing.
  • Made user PATCH change detection future-safe by treating any business payload field as a change while excluding standalone reason.
  • Confirmed balance edits use the dedicated billing balance API path and are not affected by the subscription save issue.
  • Replaced the account editor’s custom subscription expiry calendar with the shared admin date picker.
  • Added date-only mode to the shared admin date picker, with localized calendar rendering and an in-popover clear action.
  • Kept datetime mode unchanged for features that need time precision, such as redemption codes and announcements.
  • Kept subscription plan and expiry date aligned in one row in the edit sheet.
  • Unified user settings page content width with admin settings pages.

Change type

  • Bug fix
  • Refactor

Affected areas

  • Frontend / UI
  • Billing / payments
  • Admin console

Verification

  • cd frontend && pnpm lint
  • git diff --check

Screenshots, API examples, or logs

Not included.

Configuration, migration, and compatibility notes

No backend API, database schema, configuration, or deployment changes.

Documentation

  • Documentation is not needed for this change.

Security and privacy

  • No secrets, tokens, credentials, local config, or personal data are included.
  • User data access remains scoped by authenticated user context unless an admin-only path explicitly requires broader access.
  • Security-sensitive behavior was reviewed for admin user updates and billing edits.

Checklist

  • Changes are focused and do not include unrelated refactors.
  • Tests or static verification were run where practical.
  • User-facing behavior, deployment steps, API contracts, or configuration changes are documented.
  • Generated artifacts are included only when this project explicitly requires them.
  • Caches, build output, .pyc files, .env files, and local storage data are not committed.

@chenyme chenyme linked an issue Jun 2, 2026 that may be closed by this pull request
3 tasks
@chenyme
chenyme merged commit 57225db into dev Jun 2, 2026
2 checks passed
@chenyme
chenyme deleted the fix_admin_subscribe branch June 2, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 无法修改用户的套餐

1 participant