Реализация первого вида отчета

This commit is contained in:
2024-11-14 22:01:36 +03:00
parent e522666f40
commit d8b501b6a6
5 changed files with 48 additions and 14 deletions

View File

@@ -32,7 +32,7 @@ def create():
if session['role'] in report_access['write']:
proc_name = report_access['procedure']
ready_report = make_report(data, proc_name)
ready_report = make_report(data, int(id),proc_name)
if ready_report.status:
return render_template("OK.html")
else:
@@ -49,7 +49,9 @@ def view():
title='Просмотр отчета',
items = report_list)
else:
data = dict(month=request.form.get('month'), year=request.form.get('year'))
data = dict(month=request.form.get('month'),
year=request.form.get('year'),
id = request.form.get('category'))
id = request.form.get('category')
with open(path.join(path.dirname(__file__), f'access/{id}.json')) as f:
report_access = json.load(f)