From 54cf175b00c990827bd4888ca08dabd4cb6dc8df Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Wed, 20 Nov 2024 22:40:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BD=D0=B8=D0=B2=D0=B5=D1=80=D1=81?= =?UTF-8?q?=D0=B0=D0=BB=D1=8C=D0=BD=D0=B0=D1=8F=20=D1=84=D1=83=D0=BD=D0=BA?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=BF=D1=80=D0=BE=D1=81=D0=BC=D0=BE=D1=82?= =?UTF-8?q?=D1=80=D0=B0=20=D0=BE=D1=82=D1=87=D1=91=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Report/__init__.py | 4 ++-- App/Report/report_model.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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((),