|
|
|
@ -162,6 +162,7 @@ |
|
|
|
<th>Event Desc</th> |
|
|
|
<th>Event Date</th> |
|
|
|
<th>Total Cost</th> |
|
|
|
<th>Total Poles</th> |
|
|
|
<th>Status</th> |
|
|
|
<th>History</th> |
|
|
|
<th>Uploaded Images</th> |
|
|
|
@ -515,6 +516,12 @@ |
|
|
|
|
|
|
|
filtered.forEach((row, index) => { |
|
|
|
let status = determineStatus(row); |
|
|
|
let totalPoles = 0; |
|
|
|
if (row.streets && row.streets.length > 0) { |
|
|
|
row.streets.forEach(street => { |
|
|
|
totalPoles += parseInt(street.no_of_poles) || 0; |
|
|
|
}); |
|
|
|
} |
|
|
|
tbody.append(` |
|
|
|
<tr> |
|
|
|
<td>${index + 1}</td> |
|
|
|
@ -525,6 +532,7 @@ |
|
|
|
<td>${formatValue(row.event_desc)}</td> |
|
|
|
<td>${formatValue(row.event_date ? row.event_date.split('T')[0] : '')}</td> |
|
|
|
<td>${formatValue(row.total_cost)}</td> |
|
|
|
<td>${totalPoles}</td> |
|
|
|
<td>${status}</td> |
|
|
|
<td> |
|
|
|
<button class="btn btn-secondary btn-sm" onclick="viewHistory('${row.refid}')">View History</button> |
|
|
|
|