mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-18 00:37:27 +00:00
SUMMARY • Re-implemented `web/src/pages/Redemption/EditRedemption.js` with Semi Form components, removing legacy local-state handling. • Added `formApiRef` for centralized control; external “Submit” button now triggers `formApi.submitForm()`. • Replaced `Input/AutoComplete/DatePicker` etc. with `<Form.*>` fields, leveraging built-in validation & accessibility. • Field validations: – `name` (create only), `quota`, `count` → required with localized messages. • Expiration-time flow: – Default value `null` (no more 1970-01-01). – When loading data, convert 0 → null, timestamp → Date. – On submit, Date → unix seconds; empty → 0. • Responsive grid layout (`Row/Col`) for tidy alignment. • Added helpful `showClear` & full-width styling for inputs; quota presets retained. • Cleaned unused imports & handlers; fixed linter issues. RESULT The Redemption form now benefits from higher performance, clearer validation, and a cleaner codebase consistent with Semi Design best practices.