Download all report bysubcontractor id commit

This commit is contained in:
2025-12-12 18:38:50 +05:30
parent 2afd6c904a
commit b11a974869
10 changed files with 146 additions and 45 deletions

View File

@@ -37,7 +37,6 @@
</li>
<li class="nav-item"><a class="nav-link" href="/user/list">Users</a></li>
<!-- <li class="nav-item"><a class="nav-link" href="/user/list">Users</a></li> -->
</ul>
</div>
</div>
@@ -62,4 +61,5 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
</html>

View File

@@ -1,24 +1,39 @@
{% extends "base.html" %}
{% block content %}
<h2 class="mb-4">File Report</h2>
<div class="container mt-4">
<div class="card p-4 shadow-sm">
<h2 class="mb-4">File Report</h2>
<form method="POST">
<!-- FLASH MESSAGES -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
{% endfor %}
{% endif %}
{% endwith %}
<!-- SELECT SUBCONTRACTOR -->
<label class="form-label">Select Subcontractor</label>
<select name="subcontractor_id" id="subcontractor_id" class="form-select mb-3" required>
<option value="">-- Select Subcontractor --</option>
<div class="card p-4 shadow-sm">
{% for sc in subcontractors %}
<option value="{{ sc.id }}">{{ sc.subcontractor_name }}</option>
{% endfor %}
</select>
<form method="POST">
<button class="btn btn-primary w-100">Generate Report</button>
</form>
<!-- SELECT SUBCONTRACTOR -->
<label class="form-label fw-semibold">Select Subcontractor</label>
<select name="subcontractor_id" id="subcontractor_id" class="form-select mb-3" required>
<option value="">-- Select Subcontractor --</option>
{% for sc in subcontractors %}
<option value="{{ sc.id }}">{{ sc.subcontractor_name }}</option>
{% endfor %}
</select>
<button class="btn btn-primary w-100">Generate Report</button>
</form>
</div>
</div>
{% endblock %}