From 63115f0328a086230b963fb89074d8662cef8bfd Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 3 Apr 2024 23:28:55 +0300 Subject: [PATCH 01/10] asdsadsa --- .gitignore | 7 ++- migrations/versions/4eacd6dcd461_.py | 54 ++++++++++++++++++ .../__pycache__/6fc3d1adb061_.cpython-312.pyc | Bin 1549 -> 1549 bytes .../__pycache__/885bdd7b5161_.cpython-312.pyc | Bin 1301 -> 1301 bytes 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 migrations/versions/4eacd6dcd461_.py diff --git a/.gitignore b/.gitignore index 1408a6e..502dd3b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,9 @@ project.db c*.txt migrations/__pycache__/* migrations/versions/__pycache__/* -__pycache__ \ No newline at end of file +__pycache__ +migrations/versions/__pycache__ +migrations/__pycache__ +migrations/versions/__pycache__/6fc3d1adb061_.cpython-312.pyc +migrations/versions/__pycache__/6fc3d1adb061_.cpython-312.pyc +migrations/versions/__pycache__/885bdd7b5161_.cpython-312.pyc \ No newline at end of file diff --git a/migrations/versions/4eacd6dcd461_.py b/migrations/versions/4eacd6dcd461_.py new file mode 100644 index 0000000..7bbfec8 --- /dev/null +++ b/migrations/versions/4eacd6dcd461_.py @@ -0,0 +1,54 @@ +"""empty message + +Revision ID: 4eacd6dcd461 +Revises: c208cbc25232 +Create Date: 2024-04-03 23:25:42.271936 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '4eacd6dcd461' +down_revision = 'c208cbc25232' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('oboruds', schema=None) as batch_op: + batch_op.add_column(sa.Column('numberved', sa.String(length=100), nullable=True)) + batch_op.add_column(sa.Column('numberppasu', sa.String(length=100), nullable=True)) + batch_op.add_column(sa.Column('balancenumber', sa.Integer(), nullable=True)) + batch_op.alter_column('nazvanie', + existing_type=sa.TEXT(length=500), + type_=sa.String(length=500), + existing_nullable=True) + batch_op.alter_column('raspologenie', + existing_type=sa.TEXT(length=200), + type_=sa.String(length=200), + existing_nullable=True) + batch_op.drop_column('buhnumberpp') + + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('oboruds', schema=None) as batch_op: + batch_op.add_column(sa.Column('buhnumberpp', sa.VARCHAR(length=100), nullable=True)) + batch_op.alter_column('raspologenie', + existing_type=sa.String(length=200), + type_=sa.TEXT(length=200), + existing_nullable=True) + batch_op.alter_column('nazvanie', + existing_type=sa.String(length=500), + type_=sa.TEXT(length=500), + existing_nullable=True) + batch_op.drop_column('balancenumber') + batch_op.drop_column('numberppasu') + batch_op.drop_column('numberved') + + # ### end Alembic commands ### diff --git a/migrations/versions/__pycache__/6fc3d1adb061_.cpython-312.pyc b/migrations/versions/__pycache__/6fc3d1adb061_.cpython-312.pyc index 42c75e8fe00a35ef480aa614c57cb252456ff8f1..4d546f9f7ca6012e9499b75a9532fc7557f65d40 100644 GIT binary patch delta 53 zcmeC>>E+=)&CAQh00bX)@TQ&E$oq;((%C8|peR4RC^0uTGcP?Rpt2+*KMyF9wON4q GFB1UC01|Hi delta 53 zcmeC>>E+=)&CAQh00hrDc+&Q50%WVP?Voul$e{FnU@|DP+5|Zp9d1zEWrGi F2>`1`5vc$G diff --git a/migrations/versions/__pycache__/885bdd7b5161_.cpython-312.pyc b/migrations/versions/__pycache__/885bdd7b5161_.cpython-312.pyc index 74241f9535d5eaf3dc252ae18501e377824a4f06..aa20e0ed9c33cefa3dec43d423a33b0d6a771671 100644 GIT binary patch delta 33 ncmbQrHI<9|G%qg~0}xC|<=My`#Kh=4IgUx3F>7-f(|jfXe)R{> delta 33 ncmbQrHI<9|G%qg~0}$Mm;@!v{#Kh<_IgUx3F@19x(|jfXe{=`X From 7ccbba06c16689cb9da436ef98a8265d39bf46d6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 4 Apr 2024 12:48:43 +0300 Subject: [PATCH 02/10] add click on row --- app.py | 30 ++++++++++------- static/js/allmatc.js | 69 +++++++++++++++++++++----------------- templates/all.html | 59 ++++++++++++++++++++++++++++++-- templates/searchonaud.html | 5 ++- 4 files changed, 114 insertions(+), 49 deletions(-) diff --git a/app.py b/app.py index cb89f7a..23b2c07 100644 --- a/app.py +++ b/app.py @@ -119,20 +119,26 @@ def alloborud(): @app.route('/getall') def getall(): - oboruds = Oboruds.query.all() - oboruds_json = [{ - - 'invNumber': oborud.invNumber, - 'nazvanie': oborud.nazvanie, - 'raspologenie': oborud.raspologenie, - 'balancenumber': oborud.balancenumber, - 'kolichestvo': oborud.kolichestvo, - 'balancenumber': oborud.balancenumber, - 'aud_id': oborud.aud_id - } for oborud in oboruds] + oborud = db.session.query(Auditory, Oboruds).filter( + Oboruds.aud_id==Auditory.id + ).order_by(Oboruds.invNumber).all() + results = [] + for auditory, oboruds in oborud : + results.append({ + 'invNumber': oboruds.invNumber, + 'nazvanie': oboruds.nazvanie, + 'raspologenie': oboruds.raspologenie, + 'balancenumber': oboruds.balancenumber, + 'kolichestvo': oboruds.kolichestvo, + 'numberppasu': oboruds.numberppasu, + 'numberved': oboruds.numberved, + 'aud': auditory.audnazvanie + + }) + - return jsonify(oboruds_json) + return jsonify(results) @app.route('/updateduplicate', methods=['GET', 'POST']) def updateduplicate(): diff --git a/static/js/allmatc.js b/static/js/allmatc.js index bd27654..ff2c8e2 100644 --- a/static/js/allmatc.js +++ b/static/js/allmatc.js @@ -1,36 +1,43 @@ -function getAllData(){ - $.ajax({ - url: "/getall", - type: "get", - contentType: 'application/json', - dataType: 'json', +$(document).ready(function() { - success: function(response){ - console.log("1111") - let data = response; - var table = document.getElementById('alldatable'); - var tbody = table.getElementsByTagName('tbody')[0]; + let tableBody = document.getElementById('alldatatable').getElementsByTagName("tbody")[0]; + tableBody.innerHTML = ''; + i = 0; + + $.getJSON("/getall", function(data) { + $.each(data, function(index, item) { + let newRow = tableBody.insertRow(tableBody.rows.length); + let cell1 = newRow.insertCell(0); + let cell2 = newRow.insertCell(1); + let cell3 = newRow.insertCell(2); + let cell4 = newRow.insertCell(3); + let cell5 = newRow.insertCell(4); + let cell6 = newRow.insertCell(5); + let cell7 = newRow.insertCell(6); + i++; + + cell1.innerText = i; + cell2.innerText = item.invNumber; + cell4.innerText = item.nazvanie; + cell3.innerText = item.kolichestvo; + cell5.innerText = item.numberved; + cell6.innerText = item.raspologenie; + cell7.innerText = item.aud; - // Clear existing data - tbody.innerHTML = ''; - - // Loop through the data and create table rows - data.forEach(function(item) { - var row = document.createElement('tr'); - Object.values(item).forEach(function(value) { - var cell = document.createElement('td'); - cell.textContent = value; - row.appendChild(cell); - }); - tbody.appendChild(row); - }); - - - }, - - }) -} + $(newRow).data('itemData', i); -getAllData() + $(newRow).on("click", function() { + let ind = newRow.cells[0].innerText; + let invNumber = newRow.cells[1].innerText; + + $('#getmodal').modal('show') + }); + + }); + }); + + }); + + diff --git a/templates/all.html b/templates/all.html index 62b54bf..0729e6d 100644 --- a/templates/all.html +++ b/templates/all.html @@ -2,10 +2,53 @@ {% block content %} + + + +
-

Все мат. ценности

+

Все мат. ценности

@@ -14,8 +57,8 @@
-
- +
+
@@ -27,6 +70,16 @@ + + + + + + + + + +
№ п/пАудитория
1234567
diff --git a/templates/searchonaud.html b/templates/searchonaud.html index 7cef429..ff0d394 100644 --- a/templates/searchonaud.html +++ b/templates/searchonaud.html @@ -8,12 +8,12 @@ @@ -57,17 +56,19 @@
-
+
- - + + - + + + From f9a188c927522375fde1479d1b10278191aa747f Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 4 Apr 2024 20:00:26 +0300 Subject: [PATCH 04/10] add data to db --- app.py | 21 ++++++-------- static/js/allmatc.js | 66 ++++++++++++++++++++++---------------------- 2 files changed, 42 insertions(+), 45 deletions(-) diff --git a/app.py b/app.py index 23b2c07..efabbad 100644 --- a/app.py +++ b/app.py @@ -140,11 +140,6 @@ def getall(): return jsonify(results) -@app.route('/updateduplicate', methods=['GET', 'POST']) -def updateduplicate(): - if request.method == 'POST': - aud = request.form.get('auditory_dubl') - @app.route('/vneaud', methods=['GET', 'POST']) def vneaud(): @@ -200,19 +195,21 @@ def addraspved(): query_string = request.data.decode() - print(query_string) un_query_string = unquote(unquote(query_string)).split(',') - print(un_query_string) - - ob = db.session.query(Oboruds).filter_by(invNumber=un_query_string[0]).first() - ob.raspologenie=un_query_string[2] - ob.numberved = un_query_string[1] + + ob.numberved=un_query_string[1] + ob.kolichestvo = un_query_string[2] + ob.balancenumber = un_query_string[3] + ob.raspologenie=un_query_string[4] + + db.session.commit() db.session.close() - + + return jsonify({'success': True}, 200, {'ContentType': 'application/json'}) diff --git a/static/js/allmatc.js b/static/js/allmatc.js index 6e6c306..644f435 100644 --- a/static/js/allmatc.js +++ b/static/js/allmatc.js @@ -50,7 +50,7 @@ function getAllData(){ let rasp = document.getElementById('modal_rapolog') invnom.innerText = invnomertxt - matcen.innerText = nazvanietxt.substring(0,15) + matcen.innerText = nazvanietxt.substring(0,20) if (vednumbertxt.length>0){ vedomost.value = vednumbertxt; @@ -93,11 +93,11 @@ $( document ).ready(function() { - vednumber = ''; - kolvo = ''; - balancenumber = ''; - matcen = ''; - rasp = ''; + vednumber.value = ''; + kolvo.value = ''; + balancenumber.value = ''; + matcen.value = ''; + rasp.value = ''; $('#getmodal').modal('hide') @@ -116,40 +116,40 @@ $('#modalsavetodb').click(function(){ - let changeddata = new Array() + let changeddata = new Array() - changeddata[0] = invnom.text; - changeddata[1] = vednumber.value; - changeddata[2] = kolvo.value; - changeddata[3] = balancenumber.value; - changeddata[4] = rasp.value; - + changeddata[0] = invnom.text; + changeddata[1] = vednumber.value; + changeddata[2] = kolvo.value; + changeddata[3] = balancenumber.value; + changeddata[4] = rasp.value; + - let sendData = changeddata.join(',') - console.log(sendData) + let sendData = changeddata.join(',') + console.log(sendData) $.ajax({ - url: "/addraspved", - type: "POST", - contentType: "application/json;charset=utf-8", - dataType: "json", - data: sendData, + url: "/addraspved", + type: "POST", + contentType: "application/json;charset=utf-8", + dataType: "json", + data: sendData, - success: function(){ - - invnom = ''; - vednumber = ''; - kolvo = ''; - balancenumber = ''; - matcen = ''; - rasp = ''; - changeddata = [] + success: function(){ + $('#getmodal').modal('hide') - $('#getmodal').modal('hide') - - getAllData(); - } + getAllData() + + vednumber.value = ''; + kolvo.value = ''; + balancenumber.value = ''; + matcen.value = ''; + rasp.value = ''; + changeddata = [] + + + }, }) From 1c901ddb00534301ead96960ca5ae184f888dfec Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 4 Apr 2024 22:51:45 +0300 Subject: [PATCH 05/10] all done --- app.py | 68 ++++++++++++++++++------- static/js/allmatc.js | 115 ++++++++++++++++++++++++++++++++++++++++--- templates/all.html | 77 +++++++++++++++++++++++++---- 3 files changed, 225 insertions(+), 35 deletions(-) diff --git a/app.py b/app.py index efabbad..3a120cc 100644 --- a/app.py +++ b/app.py @@ -119,23 +119,32 @@ def alloborud(): @app.route('/getall') def getall(): - oborud = db.session.query(Auditory, Oboruds).filter( - Oboruds.aud_id==Auditory.id - ).order_by(Oboruds.invNumber).all() + oborud = db.session.query(Oboruds).order_by(Oboruds.invNumber).all() results = [] - for auditory, oboruds in oborud : - results.append({ - 'invNumber': oboruds.invNumber, - 'nazvanie': oboruds.nazvanie, - 'raspologenie': oboruds.raspologenie, - 'balancenumber': oboruds.balancenumber, - 'kolichestvo': oboruds.kolichestvo, - 'numberppasu': oboruds.numberppasu, - 'numberved': oboruds.numberved, - 'aud': auditory.audnazvanie - - }) + for oboruds in oborud : + if oboruds.aud_id is None: + results.append({ + 'invNumber': oboruds.invNumber, + 'nazvanie': oboruds.nazvanie, + 'raspologenie': oboruds.raspologenie, + 'balancenumber': oboruds.balancenumber, + 'kolichestvo': oboruds.kolichestvo, + 'numberppasu': oboruds.numberppasu, + 'numberved': oboruds.numberved, + 'aud': "" }) + else: + aud = db.session.query(Auditory).filter_by(id=oboruds.aud_id).first() + results.append({ + 'invNumber': oboruds.invNumber, + 'nazvanie': oboruds.nazvanie, + 'raspologenie': oboruds.raspologenie, + 'balancenumber': oboruds.balancenumber, + 'kolichestvo': oboruds.kolichestvo, + 'numberppasu': oboruds.numberppasu, + 'numberved': oboruds.numberved, + 'aud': aud.audnazvanie }) + return jsonify(results) @@ -196,7 +205,7 @@ def addraspved(): query_string = request.data.decode() un_query_string = unquote(unquote(query_string)).split(',') - + ob = db.session.query(Oboruds).filter_by(invNumber=un_query_string[0]).first() @@ -211,7 +220,32 @@ def addraspved(): return jsonify({'success': True}, 200, {'ContentType': 'application/json'}) - + + +@app.route('/addoborudasu', methods=['GET', 'POST']) +def addoborud(): + if request.method == 'POST': + + query_string = request.data.decode() + + un_query_string = unquote(unquote(query_string)).split(',') + print(un_query_string) + + + db.session.add( + Oboruds(invNumber=un_query_string[0], + nazvanie=un_query_string[5], + raspologenie= un_query_string[4], + numberved=un_query_string[1], + kolichestvo=un_query_string[2], + balancenumber=un_query_string[3] + ) + ) + + db.session.commit() + + + return jsonify({'success': True}, 200, {'ContentType': 'application/json'}) # ================================================================================== diff --git a/static/js/allmatc.js b/static/js/allmatc.js index 644f435..acd3864 100644 --- a/static/js/allmatc.js +++ b/static/js/allmatc.js @@ -1,5 +1,18 @@ +function clearTable() { + var table = document.getElementById("alldatatable"); + var rowCount = table.rows.length; + + // Iterate through each row and remove it + for (var i = rowCount - 1; i > 0; i--) { + table.deleteRow(i); + } +} + function getAllData(){ + console.log('12321321') + ///clearTable(); + let tableBody = document.getElementById('alldatatable').getElementsByTagName("tbody")[0]; i = 0; $.getJSON("/getall", function(data) { @@ -82,7 +95,7 @@ $( document ).ready(function() { }); - $('#modalclose').click(function(){ +$('#modalclose').click(function(){ let vednumber = document.getElementById('modal_vednumber') @@ -112,6 +125,7 @@ $('#modalsavetodb').click(function(){ let balancenumber = document.getElementById('modal_balance') let matcen = document.getElementById('modal_matcenn') let rasp = document.getElementById('modal_rapolog') + let nazv = document.getElementById('modal_nazvanie') @@ -124,6 +138,7 @@ $('#modalsavetodb').click(function(){ changeddata[3] = balancenumber.value; changeddata[4] = rasp.value; + let sendData = changeddata.join(',') console.log(sendData) @@ -138,19 +153,103 @@ $('#modalsavetodb').click(function(){ success: function(){ $('#getmodal').modal('hide') - - getAllData() - + + getAllData(); vednumber.value = ''; kolvo.value = ''; balancenumber.value = ''; matcen.value = ''; rasp.value = ''; - changeddata = [] - - + changeddata = []; }, }) -}) \ No newline at end of file +}) + + +$('#addoborud').click(function(){ + + $('#addmodal').modal('show'); + +}) + +$('#modal2savetodb').click(function(){ + + let invnom = document.getElementById('modal2_invnom') + let vednumber = document.getElementById('modal2_vednumber') + let kolvo = document.getElementById('modal2_kolvo') + let balancenumber = document.getElementById('modal2_balance') + let matcen = document.getElementById('modal2_matcenn') + let rasp = document.getElementById('modal2_rapolog') + let nazv = document.getElementById('modal2_nazvanie') + + + + + let changeddata = new Array() + + changeddata[0] = invnom.value; + changeddata[1] = vednumber.value; + changeddata[2] = kolvo.value; + changeddata[3] = balancenumber.value; + changeddata[4] = rasp.value; + changeddata[5] = nazv.value; + + + + let sendData = changeddata.join(',') + console.log(sendData) + + $.ajax({ + + url: "/addoborudasu", + type: "POST", + contentType: "application/json;charset=utf-8", + dataType: "json", + data: sendData, + + success: function(){ + vednumber.value = ''; + invnom.value= ''; + nazvanie.value=''; + kolvo.value = ''; + balancenumber.value = ''; + matcen.value = ''; + rasp.value = ''; + $('#addmodal').modal('hide') + + + }, + + }) + + +}) + +$('#modal2close').click(function(){ + + + let vednumber = document.getElementById('modal2_vednumber') + let invnomer = document.getElementById('modal2_invnom') + let nazvanie = document.getElementById('modal2_nazvanie') + let kolvo = document.getElementById('modal2_kolvo') + let balancenumber = document.getElementById('modal2_balance') + let matcen = document.getElementById('modal2_matcenn') + let rasp = document.getElementById('modal2_rapolog') + + + + vednumber.value = ''; + invnomer.value= ''; + nazvanie.value=''; + kolvo.value = ''; + balancenumber.value = ''; + matcen.value = ''; + rasp.value = ''; + + $('#addmodal').modal('hide') + + + +} ) \ No newline at end of file diff --git a/templates/all.html b/templates/all.html index 260e58d..e0c36de 100644 --- a/templates/all.html +++ b/templates/all.html @@ -44,15 +44,78 @@ + + + + + + +

Все мат. ценности

-
- -
+
+ +
+ +
+
+ +
@@ -72,13 +135,7 @@
- - - - - - - +
№ п/п№ п/п вед
п/п
АСУ
№ п/п
вед
Инв. номер Название Кол-во СчётАудиторияАуд - яРасположение
1234567
From d943894ae873ef70fad94b5a4399680ecc91e50a Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 4 Apr 2024 22:55:38 +0300 Subject: [PATCH 06/10] all done2 --- app.py | 3 --- static/js/allmatc.js | 10 +++++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app.py b/app.py index 3a120cc..7e478da 100644 --- a/app.py +++ b/app.py @@ -229,9 +229,6 @@ def addoborud(): query_string = request.data.decode() un_query_string = unquote(unquote(query_string)).split(',') - print(un_query_string) - - db.session.add( Oboruds(invNumber=un_query_string[0], nazvanie=un_query_string[5], diff --git a/static/js/allmatc.js b/static/js/allmatc.js index acd3864..10c7c82 100644 --- a/static/js/allmatc.js +++ b/static/js/allmatc.js @@ -176,7 +176,7 @@ $('#addoborud').click(function(){ $('#modal2savetodb').click(function(){ - let invnom = document.getElementById('modal2_invnom') + let invnomer = document.getElementById('modal2_invnom') let vednumber = document.getElementById('modal2_vednumber') let kolvo = document.getElementById('modal2_kolvo') let balancenumber = document.getElementById('modal2_balance') @@ -189,7 +189,7 @@ $('#modal2savetodb').click(function(){ let changeddata = new Array() - changeddata[0] = invnom.value; + changeddata[0] = invnomer.value; changeddata[1] = vednumber.value; changeddata[2] = kolvo.value; changeddata[3] = balancenumber.value; @@ -211,15 +211,15 @@ $('#modal2savetodb').click(function(){ success: function(){ vednumber.value = ''; - invnom.value= ''; + invnomer.value= ''; nazvanie.value=''; kolvo.value = ''; balancenumber.value = ''; matcen.value = ''; rasp.value = ''; + $('#addmodal').modal('hide') - - + }, }) From 2e9cc918d59a44ea26fa46510646c3a26e63cb27 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Apr 2024 01:26:46 +0300 Subject: [PATCH 07/10] update db schema --- migrations/versions/10da3140ab2e_.py | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 migrations/versions/10da3140ab2e_.py diff --git a/migrations/versions/10da3140ab2e_.py b/migrations/versions/10da3140ab2e_.py new file mode 100644 index 0000000..f82f04f --- /dev/null +++ b/migrations/versions/10da3140ab2e_.py @@ -0,0 +1,32 @@ +"""empty message + +Revision ID: 10da3140ab2e +Revises: 4eacd6dcd461 +Create Date: 2024-04-05 01:25:48.931573 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '10da3140ab2e' +down_revision = '4eacd6dcd461' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('oboruds', schema=None) as batch_op: + batch_op.add_column(sa.Column('kolichestvo', sa.Integer(), nullable=True)) + + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('oboruds', schema=None) as batch_op: + batch_op.drop_column('kolichestvo') + + # ### end Alembic commands ### From 29b0070260e67241b0fc57cd041cf4e495206e47 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 8 Apr 2024 10:47:54 +0300 Subject: [PATCH 08/10] add reload page --- release-05-04-24/asuinventory | 1 + static/js/allmatc.js | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 160000 release-05-04-24/asuinventory diff --git a/release-05-04-24/asuinventory b/release-05-04-24/asuinventory new file mode 160000 index 0000000..2e9cc91 --- /dev/null +++ b/release-05-04-24/asuinventory @@ -0,0 +1 @@ +Subproject commit 2e9cc918d59a44ea26fa46510646c3a26e63cb27 diff --git a/static/js/allmatc.js b/static/js/allmatc.js index 10c7c82..5a15a9b 100644 --- a/static/js/allmatc.js +++ b/static/js/allmatc.js @@ -154,13 +154,13 @@ $('#modalsavetodb').click(function(){ success: function(){ $('#getmodal').modal('hide') - getAllData(); vednumber.value = ''; kolvo.value = ''; balancenumber.value = ''; matcen.value = ''; rasp.value = ''; changeddata = []; + window.location.reload(); }, }) @@ -219,6 +219,7 @@ $('#modal2savetodb').click(function(){ rasp.value = ''; $('#addmodal').modal('hide') + window.location.reload() }, @@ -252,4 +253,8 @@ $('#modal2close').click(function(){ -} ) \ No newline at end of file +} ) + +$('#modal2').on('hidden.bs.modal', function () { + location.reload(); + }) \ No newline at end of file From 496ef3fa9db318bf3f43b8b3601fdad6c227d873 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 9 Apr 2024 23:51:48 +0300 Subject: [PATCH 09/10] bug fix --- .../__pycache__/6fc3d1adb061_.cpython-312.pyc | Bin 1549 -> 0 bytes .../__pycache__/885bdd7b5161_.cpython-312.pyc | Bin 1301 -> 0 bytes release-05-04-24/asuinventory | 1 - 3 files changed, 1 deletion(-) delete mode 100644 migrations/versions/__pycache__/6fc3d1adb061_.cpython-312.pyc delete mode 100644 migrations/versions/__pycache__/885bdd7b5161_.cpython-312.pyc delete mode 160000 release-05-04-24/asuinventory diff --git a/migrations/versions/__pycache__/6fc3d1adb061_.cpython-312.pyc b/migrations/versions/__pycache__/6fc3d1adb061_.cpython-312.pyc deleted file mode 100644 index 4d546f9f7ca6012e9499b75a9532fc7557f65d40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1549 zcmb_c&2Jk;6rb5|uj7*N(Nx3*ONE1lsbV`$TMHrOgF`rklF)+}qt$w6YCG%~GwTE+ zkaFOEAV^5`S|tZ6kmwOORpLS*rP9fU6sK^7vINFMejOTt2yJ=s!-VyQ&6G$LC%JO%7MB+ItS4X^nGzY7-Jp&Z@U^3yG{)wPU8M(a{i74`cKd}bBy}v z3MwOxcYp~EgyGjmAIlB2gNvEk)nzCmMHw08Wx^^*TY%Z&4OSj|l7qjnX_C zwBycuAR0l>^PHAPlkA6~*M&7a-VTd86S*fdEhlz6w&TT=*>UP-I)vD6==J;{k+_p+ zD??e^j9E8mC;D0t(>7&r1Y@{5jJPOj;q;xAdh;d=+syHOaBbe~$DJ?$%@%cI-gJ1c z8*I}c4q3nHcflOnd zy5A^+Ozjv+>L$K_>ByLVXv`fNb6+igz4qnW9sj$H?;H0TKe&V1+rQju4D!~%c>g>n z>z?&(^TFyM|L(xpc&dtMPt%x>Q#|FOuX{_i<%{x97uDsL^}kVF17k|{J0SdDR44L3 z(UK@<9{++y>N*p*h=~itE(j1;r6{M2V9$V@WC;tS5ee7}pcyup%?e|Ngge2oEpsr> z3-en5=eMOa>Pr65$nSkHFkVZ`|JO{^x+F?n5|u8U@+?H!yRxLnKPu`{PA_H?-L^^S z+IFHl9`##YcSv26f8;ryxC4DQ1B()ajlO?LPMpv_o3@w}0L$STP>&}jp%D!Tx5FUi z6%$$9MJIqL&G6KC!w*T%qi?cTK_|G)s{qF`#`v+MVdcpMglB(6v&ROSdU4k{nto|F acQpMxKyGH&{6kalCO&yq!6o(ztosvgombTW diff --git a/migrations/versions/__pycache__/885bdd7b5161_.cpython-312.pyc b/migrations/versions/__pycache__/885bdd7b5161_.cpython-312.pyc deleted file mode 100644 index aa20e0ed9c33cefa3dec43d423a33b0d6a771671..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1301 zcmb_c&1(}|6u&o<%uFVUv?^3gm67Krm?v%1*fx}cwwrGHw7PMK43oL{wW;$F@13+p zRJ!mFaAyTUw^A31f^OgL!2_XCuw0kAao1Wz=*n{^6HMi;9`DY~Z_YjE+%xCn$NW<$ z7zoxwn*Vb~LFkj*^j0bn_9sDjgb1<_!6fBjKV_w`loe00(j;wVNXAl$VrlT`M16p) zEYSdsj#AR^EK|P~bxfaf?krKmSfr~>-V6hCey(OtPF5R)Of;&a7e>1l%4=qWPPkL! zZgqT$R*hLkors!q05x-LWNiHR5xB?9u}W>EQmam#A0HX5T$nP9FEZg07OAkcAoBf@ zMZQ0xn-mtmbU>&a?Y{?jgd!Yk0akkT_Z0Akn$e5YW@4$Ld+07&$@DoSVx;wSD>D8s zizt2exc`S8Hj^z$zsPLL++b}cc|qUftCs^t9rPO-MI5ieOs*pgR|nlzuA?@F z9%PXtENmt7VuPUR&VE~!45XA)@=+k~k+8&)@XFw;}$14E43dVRZrQ-Cr qBM1+DL_@ne%AZ` Date: Tue, 9 Apr 2024 23:52:19 +0300 Subject: [PATCH 10/10] bug fix --- static/js/allmatc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/allmatc.js b/static/js/allmatc.js index 5a15a9b..41c321f 100644 --- a/static/js/allmatc.js +++ b/static/js/allmatc.js @@ -11,7 +11,7 @@ function clearTable() { function getAllData(){ console.log('12321321') - ///clearTable(); + clearTable(); let tableBody = document.getElementById('alldatatable').getElementsByTagName("tbody")[0]; i = 0; @@ -74,7 +74,7 @@ function getAllData(){ } if (schettxt.length>0){ - balancenumber.value = kolvotxt; + balancenumber.value = schettxt; } if (raspologtxt.length>0){