From ee403adc0a2a69c0f590ce3566b3a096881d6ec8 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Tue, 5 Nov 2024 22:46:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=81=D0=BD=D0=BE=D0=B2=D1=8B=20=D0=B1?= =?UTF-8?q?=D0=BB=D1=8E=D0=BF=D1=80=D0=B8=D0=BD=D1=82=D0=B0=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=BE=D1=82=D1=87=D0=B5=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 | 21 +++++++++++++++++++++ App/Report/reports.json | 3 +++ App/Report/templates/quartely.html | 18 ++++++++++++++++++ App/Report/templates/report_menu.html | 22 ++++++++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 App/Report/__init__.py create mode 100644 App/Report/reports.json create mode 100644 App/Report/templates/quartely.html create mode 100644 App/Report/templates/report_menu.html diff --git a/App/Report/__init__.py b/App/Report/__init__.py new file mode 100644 index 0000000..9dbf937 --- /dev/null +++ b/App/Report/__init__.py @@ -0,0 +1,21 @@ +from flask import request, Blueprint, render_template +from ..checker import check_auth +from os import path +import json + +with open(path.join(path.dirname(__file__), 'zapros_menu.json')) as f: + report_list = json.load(f) + +report_bp = Blueprint('report_bp', __name__, template_folder='templates') + +@report_bp.route('/', methods=['GET', 'POST']) +@check_auth +def menu(): + if request.method == 'GET': + return render_template('report_menu.html', options=report_list) + +@report_bp.route('/quarterly', methods=['GET', 'POST']) +@check_auth +def quarterly(): + if request.method == 'GET': + return render_template('quarterly.html') diff --git a/App/Report/reports.json b/App/Report/reports.json new file mode 100644 index 0000000..04f2742 --- /dev/null +++ b/App/Report/reports.json @@ -0,0 +1,3 @@ +[ + {"name": "Квартальный отчет передвижений заготовок", "url": "report_bp.quaterly"} +] \ No newline at end of file diff --git a/App/Report/templates/quartely.html b/App/Report/templates/quartely.html new file mode 100644 index 0000000..5698b30 --- /dev/null +++ b/App/Report/templates/quartely.html @@ -0,0 +1,18 @@ + + + + + Квартальный отчет + + + +
+ +
+ +

Заглушка для квартального отчета

+
+ +
+ + \ No newline at end of file diff --git a/App/Report/templates/report_menu.html b/App/Report/templates/report_menu.html new file mode 100644 index 0000000..e604a1b --- /dev/null +++ b/App/Report/templates/report_menu.html @@ -0,0 +1,22 @@ + + + + + Меню отчетов + + + +
+ +
+

Выберите вариант отчетов

+ +
+ +
+ + \ No newline at end of file