Compare commits
No commits in common. "pages" and "main" have entirely different histories.
14
index.html
14
index.html
@ -201,11 +201,6 @@ function loadState() {
|
|||||||
DEMO_GROUPS.forEach(g => {
|
DEMO_GROUPS.forEach(g => {
|
||||||
const savedGroup = state.groups?.find(sg => sg.id === g.id);
|
const savedGroup = state.groups?.find(sg => sg.id === g.id);
|
||||||
if (savedGroup) {
|
if (savedGroup) {
|
||||||
// Восстанавливаем комментарий группы
|
|
||||||
if (savedGroup.groupComment !== undefined) {
|
|
||||||
g.groupComment = savedGroup.groupComment;
|
|
||||||
}
|
|
||||||
// Восстанавливаем статусы и комментарии строк
|
|
||||||
g.rows.forEach(r => {
|
g.rows.forEach(r => {
|
||||||
const savedRow = savedGroup.rows?.find(sr => sr.id === r.id);
|
const savedRow = savedGroup.rows?.find(sr => sr.id === r.id);
|
||||||
if (savedRow) {
|
if (savedRow) {
|
||||||
@ -219,14 +214,7 @@ function loadState() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function saveState() {
|
function saveState() {
|
||||||
const state = {
|
localStorage.setItem('gpz_comparison_state', JSON.stringify({ groups: DEMO_GROUPS }));
|
||||||
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;
|
let currentGroupId = null;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user