diff --git a/client/wrap.js b/client/wrap.js index 3234c84..acb262d 100644 --- a/client/wrap.js +++ b/client/wrap.js @@ -54,14 +54,14 @@ $(document).ready(() => { $('') - .append('') + .append('') ); const loader = $('
') @@ -78,6 +78,7 @@ $(document).ready(() => { bandId: $('select').val(), wrapDate: $('.datepicker').val(), weight: $('#weight').val(), + wounded: $('#wounded').prop('checked'), }; try { @@ -87,6 +88,7 @@ $(document).ready(() => { } finally { loader.hide(); $('#weight').val(''); + $('#wounded').prop('checked', false); $('#send').removeClass('disabled'); } }) @@ -98,6 +100,10 @@ $(document).ready(() => { .append('') .append('') ) + .append( + $('
') + .append('') + ) .append( $('
') .append(action) diff --git a/index.js b/index.js index 7968536..05a1561 100644 --- a/index.js +++ b/index.js @@ -44,10 +44,14 @@ CREATE TABLE IF NOT EXISTS Bandz ( );`); function addChikin(db, chikin) { - const sql_insert = 'INSERT INTO Chikinz (bandId, weight, killDate, wrapDate) VALUES (?, ?, ?, ?);'; - const {bandId, weight, killDate, wrapDate} = chikin; + const sql_insert = 'INSERT INTO Chikinz '+ + '(bandId, weight, killDate, wrapDate, wounded) ' + + 'VALUES (?, ?, ?, ?, ?);'; + const {bandId, weight, killDate, wrapDate, wounded} = chikin; return new Promise((resolve, reject) => { - db.run(sql_insert, [bandId, weight, killDate, wrapDate], function(err) { + db.run(sql_insert, + [bandId, weight, killDate, wrapDate, wounded], + function(err) { if (err) { return reject(err); }