diff --git a/index.html b/index.html
index 956e14d..eee0521 100644
--- a/index.html
+++ b/index.html
@@ -201,6 +201,11 @@ function loadState() {
DEMO_GROUPS.forEach(g => {
const savedGroup = state.groups?.find(sg => sg.id === g.id);
if (savedGroup) {
+ // Восстанавливаем комментарий группы
+ if (savedGroup.groupComment !== undefined) {
+ g.groupComment = savedGroup.groupComment;
+ }
+ // Восстанавливаем статусы и комментарии строк
g.rows.forEach(r => {
const savedRow = savedGroup.rows?.find(sr => sr.id === r.id);
if (savedRow) {
@@ -214,7 +219,14 @@ function loadState() {
}
function saveState() {
- localStorage.setItem('gpz_comparison_state', JSON.stringify({ groups: DEMO_GROUPS }));
+ const state = {
+ groups: DEMO_GROUPS.map(g => ({
+ id: g.id,
+ groupComment: g.groupComment,
+ rows: g.rows.map(r => ({ id: r.id, status: r.status, comment: r.comment }))
+ }))
+ };
+ localStorage.setItem('gpz_comparison_state', JSON.stringify(state));
}
let currentGroupId = null;