v6 add debug logging
This commit is contained in:
parent
b26d2698d1
commit
c056f5cf2e
7
app.js
7
app.js
@ -17,6 +17,7 @@ document.getElementById('excelFile').addEventListener('change', function(e) {
|
|||||||
var ws = wb.Sheets[wb.SheetNames[0]];
|
var ws = wb.Sheets[wb.SheetNames[0]];
|
||||||
var rows = XLSX.utils.sheet_to_json(ws, {defval: ''});
|
var rows = XLSX.utils.sheet_to_json(ws, {defval: ''});
|
||||||
if (!rows.length) { document.getElementById('statusMsg').textContent = 'Файл пуст'; return; }
|
if (!rows.length) { document.getElementById('statusMsg').textContent = 'Файл пуст'; return; }
|
||||||
|
console.log('Данные файла:', rows);
|
||||||
build(rows);
|
build(rows);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
document.getElementById('statusMsg').textContent = 'Ошибка: ' + err.message;
|
document.getElementById('statusMsg').textContent = 'Ошибка: ' + err.message;
|
||||||
@ -55,6 +56,12 @@ function done(s) {
|
|||||||
|
|
||||||
function build(raw) {
|
function build(raw) {
|
||||||
var d = norm(raw);
|
var d = norm(raw);
|
||||||
|
console.log('Обработанные данные:', d);
|
||||||
|
console.log('Количество строк:', d.length);
|
||||||
|
|
||||||
|
d.forEach(function(r, i) {
|
||||||
|
console.log('Строка ' + i + ':\n ФИО:', r.name, '\n Статус:', r.status, '\n Обработанный статус:', r.status ? 'done' : 'not done');
|
||||||
|
});
|
||||||
|
|
||||||
document.getElementById('uploadSection').classList.add('hidden');
|
document.getElementById('uploadSection').classList.add('hidden');
|
||||||
document.getElementById('dashboard').classList.remove('hidden');
|
document.getElementById('dashboard').classList.remove('hidden');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user