diff --git a/index.html b/index.html index 69a10da..6c89cf6 100644 --- a/index.html +++ b/index.html @@ -107,6 +107,7 @@ +
${CATEGORY_NAMES[item.category]}
@@ -335,6 +336,8 @@ function filterGroups() { if (period === '2025' && itemYear !== '2025') return false; if (period === 'q1' && itemPeriod !== 'q1') return false; if (period === 'q2' && itemPeriod !== 'q2') return false; + if (period === 'q3' && itemPeriod !== 'q3') return false; + if (period === 'q4' && itemPeriod !== 'q4') return false; } return true; @@ -506,6 +509,19 @@ document.addEventListener('DOMContentLoaded', function() { document.getElementById('btn-reset').addEventListener('click', resetFilters); + document.getElementById('btn-clear-storage').addEventListener('click', function() { + if (confirm('Очистить все сохранённые данные и загрузить демо-данные заново?')) { + localStorage.removeItem('zakupki-review-state'); + appState.groups = JSON.parse(JSON.stringify(DEMO_DATA)); + appState.selectedItems.clear(); + appState.filters = { category: 'all', status: 'all', period: 'all' }; + document.getElementById('filter-category').value = 'all'; + document.getElementById('filter-status').value = 'all'; + document.getElementById('filter-period').value = 'all'; + renderGroups(); + } + }); + document.getElementById('btn-confirm').addEventListener('click', function() { if (appState.selectedItems.size === 0) return; const comment = document.getElementById('group-comment').value || 'Подтверждено пользователем';