v0.5.12: доделки перед сдачей заказчику
§4.7: агрегация CIDR в публичном /export (aggregateCIDRs) §5: клиентская JS-валидация (запрещённые диапазоны + нормализация) §4.1: фильтр «показать удалённые» для admin (API + UI) §5: уведомление о нормализации (уже работало, проверено) Файлы: - server.js: +aggregateCIDRs в /export - views/index.ejs: JS-валидация + чек-бокс удалённых - src/api/routes/entries.js: ?includeDeleted=true (admin only) - ui/routes/entries.js: проброс includeDeleted - docs/PLAN-predsdachey.md: план доделок
This commit is contained in:
@@ -67,7 +67,8 @@ function createRouter() {
|
||||
|
||||
selectedCompany = companies.find(c => c.id === companyId) || null;
|
||||
if (selectedCompany) {
|
||||
const er = await api.get('/api/v1/entries?company=' + companyId, token);
|
||||
const includeDeleted = req.query.includeDeleted === 'true' ? '&includeDeleted=true' : '';
|
||||
const er = await api.get('/api/v1/entries?company=' + companyId + includeDeleted, token);
|
||||
entries = er.data.entries || [];
|
||||
limit = er.data.limit || 15;
|
||||
}
|
||||
@@ -98,6 +99,7 @@ function createRouter() {
|
||||
success: req.query.success || null,
|
||||
lastValue: req.query.lastValue || '',
|
||||
lastComment: req.query.lastComment || '',
|
||||
includeDeleted: req.query.includeDeleted === 'true',
|
||||
csrfToken: '',
|
||||
});
|
||||
} catch (e) {
|
||||
@@ -107,7 +109,8 @@ function createRouter() {
|
||||
companies: [], selectedCompany: null,
|
||||
allClientIds: null, activeClientId: null,
|
||||
error: 'Ошибка загрузки: ' + e.message,
|
||||
success: null, lastValue: '', lastComment: '', csrfToken: '',
|
||||
success: null, lastValue: '', lastComment: '',
|
||||
includeDeleted: false, csrfToken: '',
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user