t0ng7u
2591ca3d60
🚀 chore(ui): Refactor UpstreamRatioSync with conflict-modal component, performance hooks & cleanup (#1286)
WHAT’S NEW
• Extracted reusable ConflictConfirmModal for clearer JSX hierarchy
• Added detailed conflict detection & confirmation flow before syncing options
• Refactored state-heavy callbacks (`selectValue`, `performSync`) with `useCallback` to avoid unnecessary renders
• Introduced build-time constants (later removed unused export) and unified helper utilities
• Ensured final ratios are rebuilt accurately before API `PUT`, fixing “value not updated” bug
• Enhanced UI hints: warning icon on conflict, multiline billing info, mobile-friendly modal size
• General code cleanup: removed dead variables, adopted early returns, improved comments
WHY
Improves maintainability, user clarity when billing-type collisions occur, and guarantees data consistency after synchronisation.
2025-06-23 17:35:39 +08:00
..
2025-06-07 23:15:25 +08:00
2025-06-21 20:38:22 +08:00
2025-06-07 23:22:25 +08:00
2025-06-04 01:00:48 +08:00
2025-06-21 22:31:19 +08:00
2025-06-22 18:28:32 +08:00
2025-06-04 00:42:06 +08:00
2025-06-04 00:42:06 +08:00
2025-05-20 02:33:38 +08:00
2025-06-03 23:56:39 +08:00
2025-06-04 00:42:06 +08:00
2025-06-13 20:51:20 +08:00
2025-06-23 17:35:39 +08:00
2025-06-09 00:14:35 +08:00
2025-06-04 00:42:06 +08:00
2025-06-16 22:15:12 +08:00
2025-06-20 00:52:45 +08:00
2025-06-16 03:20:54 +08:00