feat(sets): состав сета доступен и в архивной тренировке, после правки тренировка уходит на повторный синк

This commit is contained in:
Иван Овчинников
2026-11-22 00:29:58 +03:00
parent 5d2ed76e29
commit 569b94f799
3 changed files with 11 additions and 4 deletions
+4
View File
@@ -27,6 +27,9 @@ export function showGroupDialogFor(workoutId, groupId = null) {
w.setGroups.push({ id: genId(), name: data.name, exerciseIds: data.exerciseIds });
}
// Состав сета меняет саму тренировку — пусть уедет на сервер заново
if (w.endTime) w.synced = false;
saveState();
renderMainScreen();
});
@@ -40,6 +43,7 @@ export function removeGroup(workoutId, groupId) {
const w = state.workouts.find(x => x.id === workoutId);
if (!w) return;
w.setGroups = (w.setGroups || []).filter(g => g.id !== groupId);
if (w.endTime) w.synced = false;
saveState();
renderMainScreen();
}