Client billing code push
This commit is contained in:
110
app/templates/activity_log.html
Normal file
110
app/templates/activity_log.html
Normal file
@@ -0,0 +1,110 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Activity Logs</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: "Segoe UI", Tahoma, sans-serif;
|
||||
background-color: #f8f9fa;
|
||||
margin: 20px;
|
||||
}
|
||||
h2 {
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.top-buttons {
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
form {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
input, button {
|
||||
padding: 8px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
button {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
table {
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
border-collapse: collapse;
|
||||
background: white;
|
||||
box-shadow: 0 0 8px rgba(0,0,0,0.1);
|
||||
}
|
||||
th, td {
|
||||
padding: 12px;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
}
|
||||
th {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Activity Logs</h2>
|
||||
|
||||
<div class="top-buttons">
|
||||
<a href="{{ url_for('main.dashboard') }}">
|
||||
<button type="button">⬅ Back to Dashboard</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<form method="get" action="{{ url_for('main.activity_log') }}" class="filter-form">
|
||||
<label for="username">Username:</label>
|
||||
<input type="text" id="username" name="username" placeholder="Enter username" value="{{ username or '' }}">
|
||||
|
||||
<label for="start_date">Start Date:</label>
|
||||
<input type="date" id="start_date" name="start_date" value="{{ start_date or '' }}">
|
||||
|
||||
<label for="end_date">End Date:</label>
|
||||
<input type="date" id="end_date" name="end_date" value="{{ end_date or '' }}">
|
||||
|
||||
<button type="submit" class="btn btn-primary">Filter</button>
|
||||
</form>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Timestamp</th>
|
||||
<th>User</th>
|
||||
<th>Action</th>
|
||||
<th>Details</th>
|
||||
</tr>
|
||||
{% for log in logs %}
|
||||
<tr>
|
||||
<td>{{ log.timestamp }}</td>
|
||||
<td>{{ log.user }}</td>
|
||||
<td>{{ log.action }}</td>
|
||||
<td>{{ log.details }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% if logs|length == 0 %}
|
||||
<tr>
|
||||
<td colspan="4">No logs found</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
|
||||
<script>
|
||||
function resetFilter() {
|
||||
window.location.href = "{{ url_for('main.activity_log') }}";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
439
app/templates/filter_tasks.html
Normal file
439
app/templates/filter_tasks.html
Normal file
@@ -0,0 +1,439 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Filtered Task Display</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f7f9fc;
|
||||
margin: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
form {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-end;
|
||||
gap: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
select,
|
||||
button {
|
||||
padding: 5px 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
button[type="submit"] {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
button[type="submit"]:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
|
||||
.button-container1 {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.button-container1 button {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
padding: 8px 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.button-container1 button:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
|
||||
.button-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 15px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.edit-mode-button {
|
||||
padding: 8px 16px;
|
||||
font-size: 14px;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.edit-mode-button:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
|
||||
#selectedFilters {
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
strong {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 30px;
|
||||
margin-left: 275px;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.main-task-row {
|
||||
background-color: #d9eaf7;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.subtask-row {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.edit-field {
|
||||
display: none;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.no-tasks-message {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
select {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
/* Sidebar Styling */
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
background-color: #f4f4f4;
|
||||
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
|
||||
padding: 20px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.sidebar .logo {
|
||||
width: 60px;
|
||||
height: auto;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.sidebar a {
|
||||
display: block;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
padding: 10px 15px;
|
||||
margin: 10px 0;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebar a:hover {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 15px 0;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
h1.report_title {
|
||||
text-align: center;
|
||||
margin-top: 100px;
|
||||
color: #333;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
overflow-y: auto;
|
||||
}
|
||||
th {
|
||||
position: sticky; /* Ensures the header stays on top */
|
||||
top: 58px; /* Keeps the header fixed at the top */
|
||||
z-index: 1; /* Ensures it's above the content */
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<img
|
||||
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA+CAYAAAB3NHh5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4JpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4NkEzOEVGMzEwQTQxMUU4QUFBQkY0QTA2QzlEM0MxNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2QUQzQTIzRDE4NTkxMUU4ODE2Q0IwMTY0RjgxQTVGNyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2QUQzQTIzQzE4NTkxMUU4ODE2Q0IwMTY0RjgxQTVGNyIge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cEgLAOE4HCY8zgoAZuI28RPdiuO45umHw9LuIKoWHPlOiY1RNeIETfI5gkWM6YABv/MZFMeHCWONOAFwWRFhrKjkEPFAshMwB/CReZ9LZn/QCM8ErBe+ZQ9VUid8JdpAclH4llO40kmFjBdmTmsXYL4NFQWzIkGXDt7adA8cGlgZzQrGS+OMpABwW2HVwkrbSAWH5gNBa0nBhCUk3TjOQ9BkIp0phyQ9wl6a+dwb56QTiEOmkNa2IgzyzpWA+zZ2oMNiG0eSydLp/l5aj/Qq4VsLyrXh5jgJz9NpK1Bo6UQqHuCCfbVZ2aSP5smbBW+pYx5gh4FDRM+6D/BZEWksQf2ULVxC5g80L8YqyFPx/xrvSOQUjaUSnfYyevWyFVr6t0wY92AsVXizJJNximnfFuFbAVElGHnyNKfVothjDpr4iyjNAgqlVfbSA+GKR7gAMLEIexzA1SMTjnUA4VjZspsAMQxluGqxVqhbFMetjQcB7xk6umXChUZzyCCkFnBcIeGblI3tZ+h4if3UCJczE49EoXbLA87VcWNLBUMHLvjVamO42YZqxljf8tAcjsNOIuxyGuEMGyoLPQr72SP4Ww/T5LBURZ226rweyWUUC+I2mW9jZ3GTeCnjHk0y4fOCNl8yvHQO4/oBYbzJPIaszKmmdsiEa4R+vSkYwe0IRyxee0X4PkEoNPgPfiKQSsmDVcHaXL5HshBH2i2OsauAdXRstNgWacOcvU12WtyPl6xcf53yb01Ub7sIeQHA6zcZKJ7IiYdMth5QNNpxOJ2pZ5rJGMZcGOvbuEq4WifZSWHoD0bSZS99FvCB6QHRcdXptONOuNP0KuuN+wYiZkV/MPJg6Ck77WPLvwIMAHzX4zyhUFlrAAAAAElFTkSuQmCC"
|
||||
alt="LCEPL Logo"
|
||||
/>
|
||||
<a href="/">Dashboard</a>
|
||||
<a href="/upload_excel">Upload Excel</a>
|
||||
<a href="/generate_report_page">Print Report</a>
|
||||
<a href="/filter_tasks">Filter Tasks</a>
|
||||
</div>
|
||||
|
||||
<div class="header">LAXMI CIVIL ENGINEERING SERVICES PVT. LTD.</div>
|
||||
<h1 class="report_title">Filtered Tasks</h1>
|
||||
|
||||
<form method="GET" action="{{ url_for('main.filter_tasks') }}">
|
||||
<!-- District Dropdown -->
|
||||
<label for="district">District:</label>
|
||||
<select name="district" id="district" onchange="this.form.submit()">
|
||||
<option value="">-- Select District --</option>
|
||||
{% for d in districts %}
|
||||
<option value="{{ d }}" {% if d == selected_district %}selected{% endif %}>{{ d }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<!-- Block Dropdown -->
|
||||
<label for="block">Block:</label>
|
||||
<select name="block" id="block" onchange="this.form.submit()">
|
||||
<option value="">-- Select Block --</option>
|
||||
{% for b in blocks %}
|
||||
<option value="{{ b }}" {% if b == selected_block %}selected{% endif %}>{{ b }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<!-- Village Dropdown -->
|
||||
<label for="village">Village:</label>
|
||||
<select name="village" id="village" onchange="this.form.submit()">
|
||||
<option value="">-- Select Village --</option>
|
||||
{% for v in villages %}
|
||||
<option value="{{ v }}" {% if v == selected_village %}selected{% endif %}>{{ v }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<div id="selectedFilters">
|
||||
{% if selected_district or selected_block or selected_village %}
|
||||
<p>
|
||||
{% if selected_district %}<strong>District:</strong> {{ selected_district }}{% endif %}
|
||||
{% if selected_block %} <strong> | Block:</strong> {{ selected_block }}{% endif %}
|
||||
{% if selected_village %} <strong> | Village:</strong> {{ selected_village }}{% endif %}
|
||||
</p>
|
||||
{% else %}
|
||||
<p><strong>No filters applied. Showing all tasks.</strong></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="button-container1">
|
||||
<button onclick="window.location.href='/'">Home Page</button>
|
||||
</div>
|
||||
|
||||
<div class="button-container">
|
||||
<button class="edit-mode-button" type="button" onclick="toggleEditMode()">Edit Tasks</button>
|
||||
<button class="edit-mode-button" type="button" id="cancelBtn" onclick="cancelEditMode()" style="display: none;">Cancel</button>
|
||||
<button class="edit-mode-button" type="button" onclick="submitChangedFields()">Submit Updates</button>
|
||||
</div>
|
||||
|
||||
{% if grouped_tasks %}
|
||||
<table class="table-container">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Task Name</th>
|
||||
<th>Unit</th>
|
||||
<th>Qty</th>
|
||||
<th>Rate</th>
|
||||
<th>BOQ Amt</th>
|
||||
<th>Prev Billed Qty</th>
|
||||
<th>Prev Bill Amt</th>
|
||||
<th>RA Bill Qty</th>
|
||||
<th>RA Bill Amt</th>
|
||||
<th>Cum Billed Qty</th>
|
||||
<th>Cum Billed Amt</th>
|
||||
<th>Var Qty</th>
|
||||
<th>Var Amt</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set formula_fields = [
|
||||
"previous_billing_amount",
|
||||
"in_this_ra_billing_amount",
|
||||
"cumulative_billed_qty",
|
||||
"cumulative_billed_amount",
|
||||
"variation_qty",
|
||||
"variation_amount"
|
||||
] %}
|
||||
|
||||
{% for group in grouped_tasks %}
|
||||
<tr class="main-task-row">
|
||||
<td colspan="1">{{ group.task_name }}</td>
|
||||
</tr>
|
||||
|
||||
{% for sub in group.subtasks %}
|
||||
<tr class="subtask-row">
|
||||
{% for field in ["task_name","unit","qty","rate","boq_amount","previous_billed_qty","previous_billing_amount","in_this_ra_bill_qty","in_this_ra_billing_amount","cumulative_billed_qty","cumulative_billed_amount","variation_qty","variation_amount"] %}
|
||||
<td>
|
||||
<span class="static-text">{{ sub[field] }}</span>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="edit-field"
|
||||
name="{{ field }}_{{ sub.id }}"
|
||||
value="{{ sub[field] }}"
|
||||
data-original-value="{{ sub[field] | trim }}"
|
||||
{% if field in formula_fields %} readonly style="background:#f5f5f5;" {% endif %}
|
||||
>
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p class="no-tasks-message">No tasks found for the selected filters.</p>
|
||||
{% endif %}
|
||||
|
||||
<!-- ✅ Scripts -->
|
||||
<script>
|
||||
// Toggle edit mode
|
||||
function toggleEditMode() {
|
||||
document.querySelectorAll('.static-text').forEach(span => span.style.display = 'none');
|
||||
document.querySelectorAll('.edit-field').forEach(input => input.style.display = 'inline-block');
|
||||
document.getElementById('cancelBtn').style.display = 'inline-block';
|
||||
}
|
||||
|
||||
// Cancel edit mode
|
||||
function cancelEditMode() {
|
||||
document.querySelectorAll('.edit-field').forEach(input => {
|
||||
input.style.display = 'none';
|
||||
input.value = input.dataset.originalValue;
|
||||
});
|
||||
document.querySelectorAll('.static-text').forEach(span => span.style.display = 'inline-block');
|
||||
document.getElementById('cancelBtn').style.display = 'none';
|
||||
}
|
||||
|
||||
// Submit changed fields only
|
||||
function submitChangedFields() {
|
||||
const updates = {};
|
||||
document.querySelectorAll('.edit-field').forEach(input => {
|
||||
const original = input.dataset.originalValue;
|
||||
const current = input.value;
|
||||
if (current !== original) {
|
||||
updates[input.name] = current;
|
||||
}
|
||||
});
|
||||
|
||||
if (Object.keys(updates).length === 0) {
|
||||
alert('No changes detected.');
|
||||
return;
|
||||
}
|
||||
|
||||
fetch('/update_tasks', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(updates)
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
alert(data.message || 'Tasks updated successfully.');
|
||||
window.location.reload();
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error updating tasks:', error);
|
||||
alert('Failed to update tasks.');
|
||||
});
|
||||
}
|
||||
|
||||
// ✅ Filtering dependent dropdowns
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const districtDropdown = document.getElementById("district");
|
||||
const blockDropdown = document.getElementById("block");
|
||||
const villageDropdown = document.getElementById("village");
|
||||
|
||||
districtDropdown.addEventListener("change", function () {
|
||||
let district = this.value;
|
||||
blockDropdown.innerHTML = '<option value="">Select Block</option>';
|
||||
villageDropdown.innerHTML = '<option value="">Select Village</option>';
|
||||
|
||||
if (district) {
|
||||
fetch(`/get_blocks?district=${district}`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
data.forEach(block => {
|
||||
let option = document.createElement("option");
|
||||
option.value = block;
|
||||
option.textContent = block;
|
||||
blockDropdown.appendChild(option);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
blockDropdown.addEventListener("change", function () {
|
||||
let block = this.value;
|
||||
villageDropdown.innerHTML = '<option value="">Select Village</option>';
|
||||
|
||||
if (block) {
|
||||
fetch(`/get_villages?block=${block}`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
data.forEach(village => {
|
||||
let option = document.createElement("option");
|
||||
option.value = village;
|
||||
option.textContent = village;
|
||||
villageDropdown.appendChild(option);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
516
app/templates/index.html
Normal file
516
app/templates/index.html
Normal file
@@ -0,0 +1,516 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
|
||||
<title>LAXMI CIVIL ENGINEERING SERVICES PVT. LTD.</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Arial, sans-serif;
|
||||
/* display: flex; */
|
||||
flex-direction: row;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
background-color: #f4f4f4;
|
||||
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
|
||||
padding: 20px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 1001;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sidebar .logo {
|
||||
width: 150px;
|
||||
height: auto;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.sidebar a {
|
||||
display: block;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
padding: 10px 15px;
|
||||
margin: 10px 0;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebar a:hover {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 15px 0;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin: 100px 20px 20px 330px;
|
||||
padding: 20px;
|
||||
background-color: #f9f9f9;
|
||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 8px;
|
||||
width: calc(100% - 270px);
|
||||
max-width: 1500px;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
margin: 20px auto;
|
||||
width: 100%;
|
||||
max-height: calc(18 * 40px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 20px 0;
|
||||
font-size: 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 12px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
text-align: center;
|
||||
position: sticky; /* Ensures the header stays on top */
|
||||
top: 0; /* Keeps the header fixed at the top */
|
||||
z-index: 1; /* Ensures it's above the content */
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.total-row {
|
||||
position: -webkit-sticky; /* For Safari */
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
background-color: #007bff !important;
|
||||
font-weight: bold;
|
||||
border-top: 2px solid #ddd;
|
||||
z-index: 10;
|
||||
color: #ddd;
|
||||
display: table-row; /* Ensures row alignment is maintained */
|
||||
}
|
||||
|
||||
.amount {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.summary-title {
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
/* Style for the filter and search inputs */
|
||||
.filter-container,
|
||||
.search-container {
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-container label,
|
||||
.search-container label {
|
||||
font-size: 16px;
|
||||
margin-bottom: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#blockSelect,
|
||||
#search-input {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px;
|
||||
box-sizing: border-box; /* Ensures padding is included in width */
|
||||
}
|
||||
|
||||
#blockSelect {
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
#search-input {
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
#blockSelect:focus,
|
||||
#search-input:focus {
|
||||
border-color: #007bff;
|
||||
outline: none;
|
||||
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
/* Adjust layout for mobile responsiveness */
|
||||
.filter-container,
|
||||
.search-container {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
#blockSelect,
|
||||
#search-input {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
/* Smaller dropdown container */
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 180px; /* reduced width */
|
||||
font-size: 14px; /* smaller font */
|
||||
}
|
||||
|
||||
/* Smaller dropdown button */
|
||||
.dropdown-btn {
|
||||
background-color: #ffffff;
|
||||
color: black;
|
||||
padding: 6px 8px; /* smaller padding */
|
||||
border: 1px solid #ccc;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
font-size: 14px; /* smaller font */
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Smaller dropdown content */
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #ffffff;
|
||||
min-width: 180px; /* match button width */
|
||||
border: 1px solid #ccc;
|
||||
z-index: 1;
|
||||
max-height: 150px; /* slightly smaller max height */
|
||||
overflow-y: auto;
|
||||
font-size: 13px; /* smaller font */
|
||||
}
|
||||
|
||||
/* Smaller checkbox labels */
|
||||
.dropdown-content label {
|
||||
display: block;
|
||||
padding: 4px 8px; /* reduced padding */
|
||||
cursor: pointer;
|
||||
font-size: 13px; /* reduced font size */
|
||||
}
|
||||
|
||||
/* Hover effect */
|
||||
.dropdown-content label:hover {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
/* Show the dropdown content when clicked */
|
||||
.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
display: inline-block;
|
||||
margin-left: 20px;
|
||||
color:#ddd;
|
||||
background-color: #007bff;
|
||||
padding: 5px 8px 5px 8px;
|
||||
border-radius: 7px;
|
||||
border: 1px solid #007bff;
|
||||
height: 30px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="sidebar">
|
||||
<img
|
||||
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA+CAYAAAB3NHh5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4JpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u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sLyrXh5jgJz9NpK1Bo6UQqHuCCfbVZ2aSP5smbBW+pYx5gh4FDRM+6D/BZEWksQf2ULVxC5g80L8YqyFPx/xrvSOQUjaUSnfYyevWyFVr6t0wY92AsVXizJJNximnfFuFbAVElGHnyNKfVothjDpr4iyjNAgqlVfbSA+GKR7gAMLEIexzA1SMTjnUA4VjZspsAMQxluGqxVqhbFMetjQcB7xk6umXChUZzyCCkFnBcIeGblI3tZ+h4if3UCJczE49EoXbLA87VcWNLBUMHLvjVamO42YZqxljf8tAcjsNOIuxyGuEMGyoLPQr72SP4Ww/T5LBURZ226rweyWUUC+I2mW9jZ3GTeCnjHk0y4fOCNl8yvHQO4/oBYbzJPIaszKmmdsiEa4R+vSkYwe0IRyxee0X4PkEoNPgPfiKQSsmDVcHaXL5HshBH2i2OsauAdXRstNgWacOcvU12WtyPl6xcf53yb01Ub7sIeQHA6zcZKJ7IiYdMth5QNNpxOJ2pZ5rJGMZcGOvbuEq4WifZSWHoD0bSZS99FvCB6QHRcdXptONOuNP0KuuN+wYiZkV/MPJg6Ck77WPLvwIMAHzX4zyhUFlrAAAAAElFTkSuQmCC"
|
||||
alt="LCEPL Logo"
|
||||
/>
|
||||
<a href="/">Dashboard</a>
|
||||
<a href="/upload_excel">Upload Excel</a>
|
||||
<a href="/generate_report_page">Print Report</a>
|
||||
<!--<a href="/tasks">Show Tasks</a>-->
|
||||
<a href="/filter_tasks">Filter Tasks</a>
|
||||
<a href="/activity_log">Activity Logs</a>
|
||||
<a href="{{ url_for('main.logout') }}" style="margin-top:auto; color: #fff; background-color: #dc3545;">Logout</a>
|
||||
|
||||
</div>
|
||||
<div class="header">LAXMI CIVIL ENGINEERING SERVICES PVT. LTD.</div>
|
||||
<div class="container">
|
||||
<h1 class="summary-title">Dashboard</h1>
|
||||
<!-- Block Selection Dropdown -->
|
||||
<form method="get" action="{{ url_for('main.dashboard') }}">
|
||||
<div class="filter-container">
|
||||
<label>Select Blocks:</label>
|
||||
<div class="dropdown-container">
|
||||
<div class="dropdown">
|
||||
<div class="dropdown-btn" onclick="toggleDropdown()">Select Blocks</div>
|
||||
<div id="dropdownContent" class="dropdown-content">
|
||||
{% for block in blocks %}
|
||||
<label>
|
||||
<input class="input-style" type="checkbox" name="block[]" value="{{ block }}"
|
||||
{% if block in selected_blocks %}checked{% endif %}>
|
||||
{{ block }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="submit-btn">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<div class="search-container">
|
||||
<br><label for="search-input">Search Village:</label>
|
||||
<input class="input-style" type="text" id="search-input" placeholder="Enter village name..." onkeyup="filterVillages()">
|
||||
</div>
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Sr. No.</th>
|
||||
<th>Block</th>
|
||||
<th>Village Name</th>
|
||||
<th>Total BOQ Amount</th>
|
||||
<th>Claimed Amount (Rs.)</th>
|
||||
<th>To be Claimed Amount (Rs.)</th>
|
||||
<th>Cumulative Amount (Rs.)</th>
|
||||
<th>Total Variation Amount</th>
|
||||
<th>Balance against BOQ</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="village-table-body">
|
||||
{% for village in villages %}
|
||||
<tr>
|
||||
<td>{{ loop.index }}</td>
|
||||
<td>{{ village.block_name }}</td>
|
||||
<td>{{ village.village_name }}</td>
|
||||
<td class="amount" data-amount="{{ village.total_boq_amount | default(0) }}">
|
||||
{{ village.total_boq_amount | round(2) }}
|
||||
</td>
|
||||
<!-- Claimed Amount -->
|
||||
<td class="amount" data-amount="{{ village.prev_billed_amount | default(0) }}">
|
||||
{{ village.prev_billed_amount | round(2) }}
|
||||
</td>
|
||||
<!-- To Be Claimed Amount -->
|
||||
<td class="amount" data-amount="{{ village.to_be_claimed_amount }}">
|
||||
{{ village.to_be_claimed_amount | round(2) }}
|
||||
</td>
|
||||
<!-- Cumulative = prev billed + to be claimed -->
|
||||
<td class="amount" data-amount="{{ village.cumulative_billed_amount | default(0) | float }}">
|
||||
{{ village.cumulative_billed_amount | default(0) | float | round(2) }}
|
||||
</td>
|
||||
<!-- Total Variation Amount -->
|
||||
<td class="amount" data-amount="{{ village.total_variation_amount | default(0) }}">
|
||||
{{ village.total_variation_amount | round(2) }}
|
||||
</td>
|
||||
<!-- Balance against BOQ -->
|
||||
<td class="amount" data-amount="{{ (village.total_boq_amount | default(0) | float) - (village.cumulative_billed_amount | default(0) | float) - (village.total_variation_amount | default(0) | float) }}">
|
||||
{{ ((village.total_boq_amount | default(0) | float) - (village.cumulative_billed_amount | default(0) | float) - (village.total_variation_amount | default(0) | float)) | round(2) }}
|
||||
</td>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="9" style="text-align: center">No data available.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr class="total-row">
|
||||
<td colspan="3"><strong>Total</strong></td>
|
||||
<td class="amount" id="total-boq"></td>
|
||||
<td class="amount" id="total-billed"></td>
|
||||
<td class="amount" id="total-to-be-claimed"></td>
|
||||
<td class="amount" id="total-cumulative"></td>
|
||||
<td class="amount" id="total-variation"></td>
|
||||
<td class="amount" id="total-balance-against-boq"></td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
function formatAmount(amount) {
|
||||
return parseFloat(amount).toFixed(2);
|
||||
}
|
||||
|
||||
|
||||
// Apply formatting to all cells on load
|
||||
window.onload = function () {
|
||||
// Format all amount cells
|
||||
document.querySelectorAll('.amount').forEach(function (cell) {
|
||||
var amount = parseFloat(cell.getAttribute('data-amount'));
|
||||
if (!isNaN(amount)) {
|
||||
cell.textContent = formatAmount(amount);
|
||||
}
|
||||
});
|
||||
|
||||
// Totals
|
||||
let totalBOQ = 0;
|
||||
let totalBilled = 0;
|
||||
let totalToBeClaimed = 0;
|
||||
let totalCumulative = 0;
|
||||
let totalVariation = 0;
|
||||
let totalBalanceAgainstBOQ = 0;
|
||||
|
||||
const rows = document.querySelectorAll('tbody tr:not(.total-row)');
|
||||
rows.forEach(row => {
|
||||
const cells = row.querySelectorAll('td');
|
||||
|
||||
const boq = parseFloat(cells[3]?.getAttribute('data-amount') || 0); // Total BOQ Amount
|
||||
const billed = parseFloat(cells[4]?.getAttribute('data-amount') || 0); // Claimed Amount
|
||||
const toBeClaimed = parseFloat(cells[5]?.getAttribute('data-amount') || 0); // To Be Claimed
|
||||
const cumulative = parseFloat(cells[6]?.getAttribute('data-amount') || 0); // Cumulative
|
||||
const variation = parseFloat(cells[7]?.getAttribute('data-amount') || 0); // Total Variation
|
||||
const balanceAgainstBOQ = parseFloat(cells[8]?.getAttribute('data-amount') || 0); // Balance BOQ
|
||||
|
||||
totalBOQ += boq;
|
||||
totalBilled += billed;
|
||||
totalToBeClaimed += toBeClaimed;
|
||||
totalCumulative += cumulative;
|
||||
totalVariation += variation;
|
||||
totalBalanceAgainstBOQ += balanceAgainstBOQ;
|
||||
});
|
||||
|
||||
document.getElementById('total-boq').textContent = formatAmount(totalBOQ);
|
||||
document.getElementById('total-billed').textContent = formatAmount(totalBilled);
|
||||
document.getElementById('total-to-be-claimed').textContent = formatAmount(totalToBeClaimed);
|
||||
document.getElementById('total-cumulative').textContent = formatAmount(totalCumulative);
|
||||
document.getElementById('total-variation').textContent = formatAmount(totalVariation);
|
||||
document.getElementById('total-balance-against-boq').textContent = formatAmount(totalBalanceAgainstBOQ);
|
||||
};
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function filterVillages() {
|
||||
const searchInput = document.getElementById("search-input").value.toLowerCase();
|
||||
const tableBody = document.getElementById("village-table-body");
|
||||
const rows = tableBody.getElementsByTagName("tr");
|
||||
|
||||
Array.from(rows).forEach((row) => {
|
||||
const villageNameCell = row.getElementsByTagName("td")[2]; // 3rd column (Village Name)
|
||||
|
||||
if (villageNameCell) {
|
||||
const villageName = villageNameCell.textContent || villageNameCell.innerText;
|
||||
row.style.display = villageName.toLowerCase().indexOf(searchInput) > -1 ? "" : "none";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function toggleDropdown() {
|
||||
var dropdown = document.getElementById("dropdownContent");
|
||||
dropdown.style.display = dropdown.style.display === "block" ? "none" : "block";
|
||||
}
|
||||
|
||||
document.getElementById("dropdownContent").addEventListener("click", function (event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
// Convert number to Cr-Lakh-Rs format
|
||||
function formatAmountCRL(amount) {
|
||||
if (amount >= 10000000) { // 1 Crore
|
||||
let crore = Math.floor(amount / 10000000);
|
||||
let lakh = Math.floor((amount % 10000000) / 100000);
|
||||
let rupees = Math.floor(amount % 100000);
|
||||
return `${crore} Cr ${lakh} Lakh ${rupees} Rs`;
|
||||
} else if (amount >= 100000) { // 1 Lakh
|
||||
let lakh = Math.floor(amount / 100000);
|
||||
let rupees = Math.floor(amount % 100000);
|
||||
return `${lakh} Lakh ${rupees} Rs`;
|
||||
} else {
|
||||
return `${amount.toFixed(2)} Rs`;
|
||||
}
|
||||
}
|
||||
// Convert number to Cr or Lakh dynamically
|
||||
function formatAmountCRL(amount) {
|
||||
if (amount >= 10000000) { // 1 Crore
|
||||
return (amount / 10000000).toFixed(2) + ' Cr';
|
||||
} else if (amount >= 100000) { // 1 Lakh
|
||||
return (amount / 100000).toFixed(2) + ' Lakh';
|
||||
} else {
|
||||
return amount.toFixed(2);
|
||||
}
|
||||
}
|
||||
|
||||
// Apply formatting to total row on load
|
||||
window.onload = function () {
|
||||
// Calculate totals
|
||||
let totalBOQ = 0;
|
||||
let totalBilled = 0;
|
||||
let totalToBeClaimed = 0;
|
||||
let totalCumulative = 0;
|
||||
let totalVariation = 0;
|
||||
let totalBalanceAgainstBOQ = 0;
|
||||
|
||||
const rows = document.querySelectorAll('tbody tr:not(.total-row)');
|
||||
rows.forEach(row => {
|
||||
const cells = row.querySelectorAll('td');
|
||||
|
||||
totalBOQ += parseFloat(cells[3]?.getAttribute('data-amount') || 0);
|
||||
totalBilled += parseFloat(cells[4]?.getAttribute('data-amount') || 0);
|
||||
totalToBeClaimed += parseFloat(cells[5]?.getAttribute('data-amount') || 0);
|
||||
totalCumulative += parseFloat(cells[6]?.getAttribute('data-amount') || 0);
|
||||
totalVariation += parseFloat(cells[7]?.getAttribute('data-amount') || 0);
|
||||
totalBalanceAgainstBOQ += parseFloat(cells[8]?.getAttribute('data-amount') || 0);
|
||||
});
|
||||
|
||||
document.getElementById('total-boq').textContent = formatAmountCRL(totalBOQ);
|
||||
document.getElementById('total-billed').textContent = formatAmountCRL(totalBilled);
|
||||
document.getElementById('total-to-be-claimed').textContent = formatAmountCRL(totalToBeClaimed);
|
||||
document.getElementById('total-cumulative').textContent = formatAmountCRL(totalCumulative);
|
||||
document.getElementById('total-variation').textContent = formatAmountCRL(totalVariation);
|
||||
document.getElementById('total-balance-against-boq').textContent = formatAmountCRL(totalBalanceAgainstBOQ);
|
||||
};
|
||||
|
||||
|
||||
window.onclick = function (e) {
|
||||
if (!e.target.matches('.dropdown-btn')) {
|
||||
var dropdowns = document.getElementsByClassName("dropdown-content");
|
||||
for (var i = 0; i < dropdowns.length; i++) {
|
||||
var openDropdown = dropdowns[i];
|
||||
if (openDropdown.classList.contains('show')) {
|
||||
openDropdown.classList.remove('show');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
90
app/templates/login.html
Normal file
90
app/templates/login.html
Normal file
@@ -0,0 +1,90 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>LCEPL Client Billing Software</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background: #f3f3f3;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
background: white;
|
||||
padding: 2rem;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 0.5rem;
|
||||
margin-bottom: 1rem;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
padding: 0.5rem;
|
||||
background: #007bff;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.flash {
|
||||
color: red;
|
||||
text-align: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.title {
|
||||
text-align: center;
|
||||
color: #007bff;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-container">
|
||||
<h1 class="title">Laxmi Civil Engineering Services</h1>
|
||||
<h4 class="subtitle">LOGIN</h4>
|
||||
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<div class="flash flash-{{ category }}">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
|
||||
|
||||
<form method="post">
|
||||
<input type="text" name="username" placeholder="Username" required />
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
placeholder="Password"
|
||||
required
|
||||
/>
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
244
app/templates/task_report.html
Normal file
244
app/templates/task_report.html
Normal file
@@ -0,0 +1,244 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Task Report Generator</title>
|
||||
|
||||
<!-- Select2 CSS -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
font-family: 'Arial', sans-serif;
|
||||
background-color: #f4f7fc;
|
||||
padding: 0 20px;
|
||||
margin-left: 275px;
|
||||
}
|
||||
|
||||
h1.report_title {
|
||||
text-align: center;
|
||||
margin-top: 100px;
|
||||
color: #333;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
form {
|
||||
max-width: 500px;
|
||||
margin: 60px auto;
|
||||
padding: 30px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
form label {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
select, button {
|
||||
width: 100%;
|
||||
padding: 12px 16px;
|
||||
font-size: 16px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #ddd;
|
||||
margin-bottom: 20px;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: #28a745;
|
||||
color: white;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:hover { background-color: #218838; }
|
||||
|
||||
.form-group { margin-bottom: 15px; }
|
||||
|
||||
.sidebar {
|
||||
width: 295px;
|
||||
background-color: #f4f4f4;
|
||||
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
|
||||
padding: 20px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.sidebar .logo { width: 60px; margin-bottom: 20px; }
|
||||
|
||||
.sidebar a {
|
||||
display: block;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
padding: 10px 15px;
|
||||
margin: 10px 0;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebar a:hover {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 15px 0;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<!-- <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA..." class="logo"/> -->
|
||||
<img
|
||||
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA+CAYAAAB3NHh5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4JpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcml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PQr72SP4Ww/T5LBURZ226rweyWUUC+I2mW9jZ3GTeCnjHk0y4fOCNl8yvHQO4/oBYbzJPIaszKmmdsiEa4R+vSkYwe0IRyxee0X4PkEoNPgPfiKQSsmDVcHaXL5HshBH2i2OsauAdXRstNgWacOcvU12WtyPl6xcf53yb01Ub7sIeQHA6zcZKJ7IiYdMth5QNNpxOJ2pZ5rJGMZcGOvbuEq4WifZSWHoD0bSZS99FvCB6QHRcdXptONOuNP0KuuN+wYiZkV/MPJg6Ck77WPLvwIMAHzX4zyhUFlrAAAAAElFTkSuQmCC"
|
||||
alt="LCEPL Logo"
|
||||
/>
|
||||
<a href="/">Dashboard</a>
|
||||
<a href="/upload_excel">Upload Excel</a>
|
||||
<a href="/generate_report_page">Print Report</a>
|
||||
<a href="/filter_tasks">Filter Tasks</a>
|
||||
</div>
|
||||
|
||||
<div class="header">LAXMI CIVIL ENGINEERING SERVICES PVT. LTD.</div>
|
||||
|
||||
<h1 class="report_title">Generate Task Report</h1>
|
||||
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<script>
|
||||
alert("{{ message }}");
|
||||
</script>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<form action="/report_excel" method="GET">
|
||||
|
||||
<!-- District -->
|
||||
<div class="form-group">
|
||||
<label for="district">District</label>
|
||||
<select name="district" id="district" required>
|
||||
<option value="" disabled selected>Select District</option>
|
||||
{% for d in districts %}
|
||||
<option value="{{ d }}">{{ d }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Block -->
|
||||
<div class="form-group">
|
||||
<label for="block">Block</label>
|
||||
<select name="block" id="block" required>
|
||||
<option value="" disabled selected>Select Block</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Main Task -->
|
||||
<div class="form-group">
|
||||
<label for="main_task">Main Task</label>
|
||||
<select name="main_task" id="main_task" required>
|
||||
<option value="" disabled selected>Select Main Task</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button type="submit">Generate Report</button>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
|
||||
<!-- Select2 -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#district').select2({ width: '100%' });
|
||||
$('#block').select2({ width: '100%' });
|
||||
$('#main_task').select2({ width: '100%' });
|
||||
|
||||
// District → Blocks
|
||||
$('#district').on('change', function () {
|
||||
|
||||
const district = $(this).val();
|
||||
|
||||
$('#block').empty().append('<option value="">Select Block</option>');
|
||||
$('#main_task').empty().append('<option value="">Select Main Task</option>');
|
||||
|
||||
if (!district) return;
|
||||
|
||||
$.ajax({
|
||||
url: '/get_blocks_by_district',
|
||||
method: 'GET',
|
||||
data: { district: district },
|
||||
success: function (response) {
|
||||
|
||||
response.blocks.forEach(block => {
|
||||
$('#block').append(`<option value="${block}">${block}</option>`);
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// Block → Tasks
|
||||
$('#block').on('change', function () {
|
||||
|
||||
const block = $(this).val();
|
||||
|
||||
$('#main_task').empty().append('<option value="">Select Main Task</option>');
|
||||
|
||||
if (!block) return;
|
||||
|
||||
$.ajax({
|
||||
url: '/get_tasks_by_block',
|
||||
method: 'GET',
|
||||
data: { block: block },
|
||||
success: function (response) {
|
||||
|
||||
response.tasks.forEach(task => {
|
||||
$('#main_task').append(`<option value="${task}">${task}</option>`);
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
366
app/templates/tasks_display.html
Normal file
366
app/templates/tasks_display.html
Normal file
@@ -0,0 +1,366 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Tasks</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f8f9fa;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
text-align: center;
|
||||
color: #007bff;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 90%;
|
||||
margin: 10px auto;
|
||||
border-collapse: collapse;
|
||||
background-color: #fff;
|
||||
font-size: 0.85em;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
margin-left: 285px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 8px 10px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.main-task-row {
|
||||
background-color: #e3f2fd;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.subtask-row td {
|
||||
background-color: #fefefe;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.button-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 10px;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.button-container a,
|
||||
.button-container button {
|
||||
padding: 10px 20px;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
background-color: #007bff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.button-container a {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.top-buttons {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.top-buttons button {
|
||||
padding: 8px;
|
||||
font-size: 12px;
|
||||
background-color: #28a745;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.top-buttons button:hover {
|
||||
background-color: #218838;
|
||||
}
|
||||
|
||||
.static-text {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.edit-field {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#searchBox {
|
||||
width: 300px;
|
||||
padding: 8px;
|
||||
margin: 0 auto 10px;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#taskTableWrapper {
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
margin: 15px auto;
|
||||
border: 4px solid #f3f3f3;
|
||||
border-top: 4px solid #007bff;
|
||||
border-radius: 50%;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
animation: spin 0.8s linear infinite;
|
||||
display: none;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* Sidebar Styling */
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
background-color: #f4f4f4;
|
||||
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
|
||||
padding: 20px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.sidebar .logo {
|
||||
width: 60px;
|
||||
height: auto;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.sidebar a {
|
||||
display: block;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
padding: 10px 15px;
|
||||
margin: 10px 0;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebar a:hover {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
.header {
|
||||
width: 100%;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 15px 0;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<img
|
||||
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA+CAYAAAB3NHh5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4JpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4NkEzOEVGMzEwQTQxMUU4QUFBQkY0QTA2QzlEM0MxNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZ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<a href="/">Dashboard</a>
|
||||
<a href="/upload_excel">Upload Excel</a>
|
||||
<a href="/generate_report_page">Print Report</a>
|
||||
<!--<a href="/tasks">Show Tasks</a>-->
|
||||
<a href="/filter_tasks">Filter Tasks</a>
|
||||
</div>
|
||||
<div class="header">LAXMI CIVIL ENGINEERING SERVICES PVT. LTD.</div>
|
||||
<h1>Uploaded Tasks</h1>
|
||||
|
||||
<div class="top-buttons">
|
||||
<button onclick="window.location.href='/'">Home Page</button>
|
||||
</div>
|
||||
|
||||
<div class="button-container">
|
||||
<a href="/generate_report_page">Print Task Wise Report</a>
|
||||
<button onclick="toggleEditMode()">Edit Tasks</button>
|
||||
<button onclick="cancelEditMode()" id="cancelBtn" style="display: none; background-color: #dc3545;">Cancel Edit</button>
|
||||
<button onclick="submitChangedFields()">Submit Updates</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input type="text" id="searchBox" placeholder="Search tasks..." />
|
||||
</div>
|
||||
|
||||
{% if work_details %}
|
||||
<h2>Work Details</h2>
|
||||
<table class="work-details">
|
||||
<tr><th>Name of Work</th><td>{{ work_details.name_of_work }}</td></tr>
|
||||
<tr><th>Cover Agreement No</th><td>{{ work_details.cover_agreement_no }}</td></tr>
|
||||
<tr><th>Name of Contractor</th><td>{{ work_details.name_of_contractor }}</td></tr>
|
||||
<tr><th>Name of TPI Agency</th><td>{{ work_details.name_of_tpi_agency }}</td></tr>
|
||||
<tr><th>Name of Division</th><td>{{ work_details.name_of_division }}</td></tr>
|
||||
<tr><th>Name of District</th><td>{{ work_details.district }}</td></tr>
|
||||
<tr><th>Village</th><td>{{ work_details.name_of_village }}</td></tr>
|
||||
<tr><th>Block</th><td>{{ work_details.block }}</td></tr>
|
||||
<tr><th>Scheme ID</th><td>{{ work_details.scheme_id }}</td></tr>
|
||||
<tr><th>Measurement Book</th><td>{{ work_details.measurement_book }}</td></tr>
|
||||
<tr><th>Date of Billing</th><td>{{ work_details.date_of_billing }}</td></tr>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
<h2>Task Details</h2>
|
||||
<div class="spinner" id="loader"></div>
|
||||
|
||||
<div id="taskTableWrapper" style="opacity: 1;">
|
||||
<form id="task-form">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Main Task</th>
|
||||
<th>Unit</th>
|
||||
<th>Qty</th>
|
||||
<th>Rate</th>
|
||||
<th>BOQ Amt</th>
|
||||
<th>Prev Billed Qty</th>
|
||||
<th>Prev Bill Amt</th>
|
||||
<th>RA Bill Qty</th>
|
||||
<th>RA Bill Amt</th>
|
||||
<th>Cum Billed Qty</th>
|
||||
<th>Cum Billed Amt</th>
|
||||
<th>Var Qty</th>
|
||||
<th>Var Amt</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for group in grouped_tasks %}
|
||||
<tr class="main-task-row">
|
||||
{% for field in ["task_name", "unit", "qty", "rate", "boq_amount", "previous_billed_qty", "previous_billing_amount", "in_this_ra_bill_qty", "in_this_ra_billing_amount", "cumulative_billed_qty", "cumulative_billed_amount", "variation_qty", "variation_amount"] %}
|
||||
<td>
|
||||
<span class="static-text">{{ group[field] }}</span>
|
||||
<input type="text" class="edit-field" name="{{ field }}_{{ group.id }}" value="{{ group[field] }}" data-original-value="{{ group[field] | trim }}" style="display: none;" />
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% for sub in group.subtasks %}
|
||||
<tr class="subtask-row">
|
||||
{% for field in ["task_name", "unit", "qty", "rate", "boq_amount", "previous_billed_qty", "previous_billing_amount", "in_this_ra_bill_qty", "in_this_ra_billing_amount", "cumulative_billed_qty", "cumulative_billed_amount", "variation_qty", "variation_amount"] %}
|
||||
<td>
|
||||
<span class="static-text">{{ sub[field] }}</span>
|
||||
<input type="text" class="edit-field" name="{{ field }}_{{ sub.id }}" value="{{ sub[field] }}" data-original-value="{{ sub[field] | trim }}" style="display: none;" />
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
function toggleEditMode() {
|
||||
document.querySelectorAll('.static-text').forEach(span => span.style.display = 'none');
|
||||
document.querySelectorAll('.edit-field').forEach(input => input.style.display = 'inline-block');
|
||||
document.getElementById('cancelBtn').style.display = 'inline-block';
|
||||
}
|
||||
|
||||
function cancelEditMode() {
|
||||
document.querySelectorAll('.static-text').forEach(span => span.style.display = 'inline-block');
|
||||
document.querySelectorAll('.edit-field').forEach(input => {
|
||||
input.style.display = 'none';
|
||||
input.value = input.getAttribute('data-original-value');
|
||||
});
|
||||
document.getElementById('cancelBtn').style.display = 'none';
|
||||
}
|
||||
|
||||
function submitChangedFields() {
|
||||
const updates = {};
|
||||
document.querySelectorAll('.edit-field').forEach(input => {
|
||||
const original = input.getAttribute('data-original-value') || '';
|
||||
const current = input.value.trim();
|
||||
if (current !== original.trim()) {
|
||||
updates[input.name] = current;
|
||||
}
|
||||
});
|
||||
|
||||
if (Object.keys(updates).length === 0) {
|
||||
alert("No changes made.");
|
||||
return;
|
||||
}
|
||||
|
||||
fetch('/update_tasks', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(updates)
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
alert(data.message || 'Update complete!');
|
||||
window.location.reload();
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Update error:', error);
|
||||
alert('Error updating tasks');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const searchBox = document.getElementById("searchBox");
|
||||
const tableWrapper = document.getElementById("taskTableWrapper");
|
||||
const loader = document.getElementById("loader");
|
||||
|
||||
document.querySelectorAll("tbody tr").forEach(row => {
|
||||
const text = Array.from(row.querySelectorAll("td")).map(cell => {
|
||||
const span = cell.querySelector(".static-text")?.innerText || '';
|
||||
const input = cell.querySelector(".edit-field")?.value || '';
|
||||
return (span + " " + input).toLowerCase();
|
||||
}).join(" ");
|
||||
row.setAttribute("data-search-text", text);
|
||||
});
|
||||
|
||||
let timeout;
|
||||
searchBox.addEventListener("input", function () {
|
||||
clearTimeout(timeout);
|
||||
loader.style.display = "block";
|
||||
tableWrapper.style.opacity = "0.3";
|
||||
|
||||
const term = this.value.toLowerCase();
|
||||
|
||||
timeout = setTimeout(() => {
|
||||
document.querySelectorAll("tbody tr").forEach(row => {
|
||||
const searchable = row.getAttribute("data-search-text");
|
||||
row.style.display = searchable.includes(term) ? "" : "none";
|
||||
});
|
||||
loader.style.display = "none";
|
||||
tableWrapper.style.opacity = "1";
|
||||
}, 150);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
166
app/templates/upload.html
Normal file
166
app/templates/upload.html
Normal file
@@ -0,0 +1,166 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Upload Excel</title>
|
||||
<style>
|
||||
/* General Styling */
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 50vh;
|
||||
background-color: #f4f7f9;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
/* Sidebar Styling */
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
background-color: #f4f4f4;
|
||||
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
|
||||
padding: 20px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.sidebar .logo {
|
||||
width: 60px;
|
||||
height: auto;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.sidebar a {
|
||||
display: block;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
padding: 10px 15px;
|
||||
margin: 10px 0;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebar a:hover {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Main Container Styling */
|
||||
.main-content {
|
||||
margin: 400px auto;
|
||||
/* margin-left: 270px; */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
width: calc(100% - 270px);
|
||||
}
|
||||
|
||||
form {
|
||||
background-color: #ffffff;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
width: 90%;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-size: 2rem;
|
||||
color: #007bff;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
input[type="file"] {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
font-size: 1rem;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
transition: border-color 0.3s ease;
|
||||
}
|
||||
|
||||
input[type="file"]:focus {
|
||||
border-color: #007bff;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.upload {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background-color: #007bff;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
||||
button:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
.header {
|
||||
width: 100%;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 15px 0;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<img
|
||||
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA+CAYAAAB3NHh5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4JpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4NkEzOEVGMzEwQTQxMUU4QUFBQkY0QTA2QzlEM0M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alt="LCEPL Logo"
|
||||
class="logo"
|
||||
/>
|
||||
<a href="/">Dashboard</a>
|
||||
<a href="/upload_excel">Upload Excel</a>
|
||||
<a href="/generate_report_page">Print Report</a>
|
||||
<!--<a href="/tasks">Show Tasks</a>-->
|
||||
<a href="/filter_tasks">Filter Tasks</a>
|
||||
</div>
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="main-content">
|
||||
<form action="/upload" method="post" enctype="multipart/form-data">
|
||||
<div class="header">LAXMI CIVIL ENGINEERING SERVICES PVT. LTD.</div>
|
||||
<h1>Upload Excel File</h1>
|
||||
<input type="file" name="file" required />
|
||||
<button class="upload" type="submit">Upload</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user