filter task show main task value and main and sub task edit
This commit is contained in:
@@ -279,6 +279,7 @@
|
||||
<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>
|
||||
<button class="edit-mode-button" type="button" onclick="downloadExcel()">Download Excel</button>
|
||||
</div>
|
||||
|
||||
{% if grouped_tasks %}
|
||||
@@ -311,25 +312,50 @@
|
||||
] %}
|
||||
|
||||
{% for group in grouped_tasks %}
|
||||
<tr class="main-task-row">
|
||||
<!-- <tr class="main-task-row">
|
||||
<td colspan="1">{{ group.task_name }}</td>
|
||||
</tr>
|
||||
</tr> -->
|
||||
<!-- <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>
|
||||
{{ '' if group[field] in [None, 0, "0"] else group[field] }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr> -->
|
||||
<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] if group[field] is not none else '' }}
|
||||
</span>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="edit-field"
|
||||
name="{{ field }}_main_{{ loop.index }}"
|
||||
value="{{ group[field] if group[field] is not none else '' }}"
|
||||
data-original-value="{{ group[field] if group[field] is not none else '' }}"
|
||||
>
|
||||
</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>
|
||||
<span class="static-text">
|
||||
{{ sub[field] if sub[field] is not none else '' }}
|
||||
</span>
|
||||
|
||||
<input
|
||||
<input
|
||||
type="text"
|
||||
class="edit-field"
|
||||
name="{{ field }}_{{ sub.id }}"
|
||||
value="{{ sub[field] }}"
|
||||
data-original-value="{{ sub[field] | trim }}"
|
||||
value="{{ sub[field] if sub[field] is not none else '' }}"
|
||||
data-original-value="{{ sub[field] if sub[field] is not none else '' }}"
|
||||
{% if field in formula_fields %} readonly style="background:#f5f5f5;" {% endif %}
|
||||
>
|
||||
</td>
|
||||
>
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@@ -434,6 +460,15 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function downloadExcel() {
|
||||
const district = document.getElementById("district").value;
|
||||
const block = document.getElementById("block").value;
|
||||
const village = document.getElementById("village").value;
|
||||
|
||||
let url = `/download_filtered_tasks?district=${district}&block=${block}&village=${village}`;
|
||||
window.location.href = url;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,10 +3,15 @@
|
||||
<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') }}">
|
||||
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}"> -->
|
||||
|
||||
<title>LAXMI CIVIL ENGINEERING SERVICES PVT. LTD.</title>
|
||||
<style>
|
||||
*{
|
||||
padding:0;
|
||||
margin: 0 ;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Arial, sans-serif;
|
||||
@@ -29,13 +34,13 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.sidebar .logo {
|
||||
width: 150px;
|
||||
height: auto;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
.sidebar a {
|
||||
display: block;
|
||||
color: #333;
|
||||
@@ -45,12 +50,11 @@
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.sidebar a:hover {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
background-color: #007bff;
|
||||
@@ -65,7 +69,20 @@
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.header span {
|
||||
display: inline-flex;
|
||||
white-space: nowrap;
|
||||
animation: scrollText 15s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes scrollText {
|
||||
from {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
to {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
.container {
|
||||
margin: 100px 20px 20px 330px;
|
||||
padding: 20px;
|
||||
@@ -75,14 +92,14 @@
|
||||
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;
|
||||
@@ -90,13 +107,13 @@ table {
|
||||
font-size: 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 12px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
|
||||
th {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
@@ -105,13 +122,11 @@ th {
|
||||
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;
|
||||
@@ -123,17 +138,21 @@ tr:nth-child(even) {
|
||||
color: #ddd;
|
||||
display: table-row; /* Ensures row alignment is maintained */
|
||||
}
|
||||
|
||||
|
||||
.amount {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
.summary-title {
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
font-family:'Times New Roman', Times, serif;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.summary-title:hover{
|
||||
color: #ff0b23;
|
||||
}
|
||||
/* Style for the filter and search inputs */
|
||||
.filter-container,
|
||||
.search-container {
|
||||
@@ -141,14 +160,14 @@ tr:nth-child(even) {
|
||||
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%;
|
||||
@@ -158,29 +177,29 @@ tr:nth-child(even) {
|
||||
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%;
|
||||
@@ -194,7 +213,7 @@ tr:nth-child(even) {
|
||||
width: 180px; /* reduced width */
|
||||
font-size: 14px; /* smaller font */
|
||||
}
|
||||
|
||||
|
||||
/* Smaller dropdown button */
|
||||
.dropdown-btn {
|
||||
background-color: #ffffff;
|
||||
@@ -206,7 +225,7 @@ tr:nth-child(even) {
|
||||
font-size: 14px; /* smaller font */
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/* Smaller dropdown content */
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
@@ -219,7 +238,7 @@ tr:nth-child(even) {
|
||||
overflow-y: auto;
|
||||
font-size: 13px; /* smaller font */
|
||||
}
|
||||
|
||||
|
||||
/* Smaller checkbox labels */
|
||||
.dropdown-content label {
|
||||
display: block;
|
||||
@@ -227,17 +246,17 @@ tr:nth-child(even) {
|
||||
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;
|
||||
@@ -245,12 +264,11 @@ tr:nth-child(even) {
|
||||
background-color: #007bff;
|
||||
padding: 5px 8px 5px 8px;
|
||||
border-radius: 7px;
|
||||
border: 1px solid #007bff;
|
||||
height: 30px;
|
||||
width: 100px;
|
||||
border: 1px solid #007bff;
|
||||
height: 30px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -268,9 +286,9 @@ tr:nth-child(even) {
|
||||
<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="header"><span>LAXMI CIVIL ENGINEERING SERVICES PVT. LTD.</span></div>
|
||||
<div class="container">
|
||||
<h1 class="summary-title">Dashboard</h1>
|
||||
<h1 class="summary-title">DASHBOARD</h1>
|
||||
<!-- Block Selection Dropdown -->
|
||||
<form method="get" action="{{ url_for('main.dashboard') }}">
|
||||
<div class="filter-container">
|
||||
|
||||
@@ -4,33 +4,39 @@
|
||||
<meta charset="UTF-8" />
|
||||
<title>LCEPL Client Billing Software</title>
|
||||
<style>
|
||||
*{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background: #f3f3f3;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
height: 98.3vh;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
background: white;
|
||||
padding: 2rem;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
||||
width: 300px;
|
||||
border-radius: 20px;
|
||||
box-shadow: 10px 10px 20px rgba(110, 0, 0, 0.3);
|
||||
width: 21%;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
margin-bottom: 1.5rem;
|
||||
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 0.5rem;
|
||||
margin-bottom: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
@@ -57,6 +63,7 @@
|
||||
|
||||
.subtitle {
|
||||
text-align: center;
|
||||
margin: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user