Подгонка под описания

This commit is contained in:
2024-12-06 16:14:31 +03:00
parent 54071f20be
commit d995a2cc14
7 changed files with 8 additions and 10 deletions

View File

@@ -8,7 +8,7 @@ import json
with open(path.join(path.dirname(__file__), 'reports.json'), encoding='utf-8') as f:
report_list = json.load(f)
report_bp = Blueprint('report_bp', __name__, template_folder='templates')
report_bp = Blueprint('report_bp', __name__, template_folder='templates', static_folder='static')
@report_bp.route('/menu')
@check_auth

View File

@@ -0,0 +1,5 @@
div.form .period {
display: flex;
gap: 10px;
justify-content: center;
}

View File

@@ -0,0 +1,8 @@
function check_month(now_month, now_year) {
let selected_month = document.getElementById('month').value;
let selected_year = document.getElementById('year').value;
if (selected_month > now_month && selected_year == now_year) {
alert('Невозможно сформировать отчет за будущий период!');
return false;
}
}

View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<title>{{ title }}</title>
<link href="/static/css/main.css" type="text/css" rel="stylesheet">
<link href="/static/css/report.css" type="text/css" rel="stylesheet">
<link href="static/css/report.css" type="text/css" rel="stylesheet">
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet"
@@ -14,7 +14,7 @@
rel="stylesheet"
/>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="/static/js/check.js"></script>
<script src="static/js/check.js"></script>
</head>
<body class="p-3 m-0 border-0 bd-example m-0 border-0">
<div class="row flex-nowrap justify-content-between pb-5">

View File

@@ -29,7 +29,7 @@
<div class="col-12 d-flex justify-content-center">
<div class="btn-group py-5" role="group" aria-label="Basic example">
<a href="{{ url_for('report_bp.create') }}"><button type="button" class="btn btn-primary me-2">Создать отчет</button></a>
<a href="{{ url_for('report_bp.view') }}"><button type="button" class="btn btn-secondary">Читать отчеты</button></a>
<a href="{{ url_for('report_bp.view') }}"><button type="button" class="btn btn-primary">Читать отчеты</button></a>
</div>
</div>
</div>