fix(clients): preserve traffic reset schedule when toggling enable (#6502)

Carry the hydrated reset cycle and day into the enable update payload so toggling a client does not normalize its schedule to never. Cover both toggle directions with a regression test.
This commit is contained in:
Alireza Arezoumandan
2026-09-13 22:57:15 +03:30
committed by GitHub
parent d600de2c2e
commit d0ad773edf
2 changed files with 54 additions and 0 deletions
+2
View File
@@ -697,6 +697,8 @@ export function useClients(options: UseClientsOptions = {}) {
reset: Number(base.reset) || 0,
resetDay: Number(base.resetDay) || 0,
resetMax: Number(base.resetMax) || 0,
trafficReset: base.trafficReset || 'never',
trafficResetDay: Number(base.trafficResetDay) || 1,
group: base.group || '',
comment: base.comment || '',
enable: !!enable,