diff --git a/App/Report/__init__.py b/App/Report/__init__.py index a83f370..682f139 100644 --- a/App/Report/__init__.py +++ b/App/Report/__init__.py @@ -1,7 +1,7 @@ from flask import request, Blueprint, render_template, session, url_for from checker import check_auth from os import path -from .report_model import sales_report, make_report +from .report_model import view_report, make_report import json with open(path.join(path.dirname(__file__), 'reports.json')) as f: @@ -56,7 +56,7 @@ def view(): report_access = json.load(f) if session['role'] in report_access['read']: - ready_report = sales_report(data, report_access['view']) + ready_report = view_report(data, report_access['view']) if ready_report.status: title= f'{report_access["title"]} за {data["month"]}-{data["year"]}' return render_template("output.html", items=ready_report.result, diff --git a/App/Report/report_model.py b/App/Report/report_model.py index 223af0b..d38310c 100644 --- a/App/Report/report_model.py +++ b/App/Report/report_model.py @@ -18,7 +18,7 @@ def check_report(input_data: dict) -> bool: return False return True -def sales_report(input_data: dict, view_script: str) -> InfoRespronse: +def view_report(input_data: dict, view_script: str) -> InfoRespronse: status = check_report(input_data) if not status: return InfoRespronse((),