| 35971 |
aman |
1 |
<style>
|
|
|
2 |
.badge-overdue-high {
|
|
|
3 |
background-color: #d9534f;
|
|
|
4 |
color: #fff;
|
|
|
5 |
padding: 3px 8px;
|
|
|
6 |
border-radius: 4px;
|
|
|
7 |
font-weight: bold;
|
|
|
8 |
}
|
|
|
9 |
|
|
|
10 |
.badge-overdue-med {
|
|
|
11 |
background-color: #f0ad4e;
|
|
|
12 |
color: #fff;
|
|
|
13 |
padding: 3px 8px;
|
|
|
14 |
border-radius: 4px;
|
|
|
15 |
font-weight: bold;
|
|
|
16 |
}
|
|
|
17 |
|
|
|
18 |
.badge-overdue-low {
|
|
|
19 |
background-color: #f7dc6f;
|
|
|
20 |
color: #333;
|
|
|
21 |
padding: 3px 8px;
|
|
|
22 |
border-radius: 4px;
|
|
|
23 |
font-weight: bold;
|
|
|
24 |
}
|
|
|
25 |
</style>
|
|
|
26 |
<section class="wrapper">
|
|
|
27 |
<div class="row">
|
|
|
28 |
<div class="col-lg-12">
|
|
|
29 |
<h3 class="page-header">DELAY PANEL</h3>
|
|
|
30 |
<ol class="breadcrumb">
|
|
|
31 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
32 |
<li><i class="icon_document_alt"></i>Delay Panel</li>
|
|
|
33 |
</ol>
|
|
|
34 |
</div>
|
|
|
35 |
</div>
|
|
|
36 |
<div class="col-lg-12">
|
|
|
37 |
<div class="row" style="margin-bottom:10px;">
|
|
|
38 |
<div class="col-lg-3">
|
|
|
39 |
<select id="teamFilter" class="form-control">
|
|
|
40 |
<option value="">All Teams</option>
|
|
|
41 |
</select>
|
|
|
42 |
</div>
|
|
|
43 |
</div>
|
|
|
44 |
<table class="table table-border table-condensed table-bordered" id="delayTable" style="width:100%">
|
|
|
45 |
<thead class="row htable" style="background:#F5F5F5;">
|
|
|
46 |
<tr style="color:black;">
|
|
|
47 |
<th>ID</th>
|
|
|
48 |
<th>Partner Name</th>
|
|
|
49 |
<th>Code</th>
|
|
|
50 |
<th>City</th>
|
|
|
51 |
<!-- <th>ASM</th>-->
|
|
|
52 |
<th>Delayed Even
|
|
|
53 |
<th>Responsible Team</th>
|
|
|
54 |
<th>Planned Date</th>
|
|
|
55 |
<th>Days Overdue</th>
|
|
|
56 |
</tr>
|
|
|
57 |
</thead>
|
|
|
58 |
<tbody>
|
|
|
59 |
#foreach($item in $delayItems)
|
|
|
60 |
<tr>
|
|
|
61 |
<td>$item.getOnboardingId()</td>
|
|
|
62 |
<td>#if($item.getOutletName())$item.getOutletName()#else-#end</td>
|
|
|
63 |
<td>#if($item.getCode())$item.getCode()#else-#end</td>
|
|
|
64 |
<td>#if($item.getCity())$item.getCity()#else-#end</td>
|
|
|
65 |
<!-- <td>#if($item.getFilledBy())$item.getFilledBy()#else-#end</td>-->
|
|
|
66 |
<td>$item.getEventName()</td>
|
|
|
67 |
<td>$item.getResponsibleTeam()</td>
|
|
|
68 |
<td>$item.getPlannedDate().format($dateFormatter)</td>
|
|
|
69 |
<td>
|
|
|
70 |
#if($item.getDaysOverdue() > 7)
|
|
|
71 |
<span class="badge-overdue-high">$item.getDaysOverdue() days</span>
|
|
|
72 |
#elseif($item.getDaysOverdue() > 3)
|
|
|
73 |
<span class="badge-overdue-med">$item.getDaysOverdue() days</span>
|
|
|
74 |
#else
|
|
|
75 |
<span class="badge-overdue-low">$item.getDaysOverdue() days</span>
|
|
|
76 |
#end
|
|
|
77 |
</td>
|
|
|
78 |
</tr>
|
|
|
79 |
#end
|
|
|
80 |
</tbody>
|
|
|
81 |
</table>
|
|
|
82 |
</div>
|
|
|
83 |
</section>
|
|
|
84 |
|
|
|
85 |
<script type="text/javascript">
|
|
|
86 |
$(document).ready(function () {
|
|
|
87 |
var dtable = $('#delayTable').DataTable({
|
|
|
88 |
"scrollX": true,
|
|
|
89 |
orderCellsTop: true,
|
|
|
90 |
"order": [[0, "desc"]],
|
|
|
91 |
"pageLength": 50
|
|
|
92 |
});
|
|
|
93 |
|
|
|
94 |
// Populate team filter dropdown from table data
|
|
|
95 |
var teams = {};
|
|
|
96 |
dtable.column(6).data().each(function (val) {
|
|
|
97 |
teams[val] = true;
|
|
|
98 |
});
|
|
|
99 |
var teamFilter = $('#teamFilter');
|
|
|
100 |
Object.keys(teams).sort().forEach(function (team) {
|
|
|
101 |
var opt = $('<option></option>').val(team).text(team);
|
|
|
102 |
teamFilter.append(opt);
|
|
|
103 |
});
|
|
|
104 |
|
|
|
105 |
// Filter by team
|
|
|
106 |
teamFilter.on('change', function () {
|
|
|
107 |
var val = $(this).val();
|
|
|
108 |
if (val) {
|
|
|
109 |
dtable.column(6).search('^'.concat(val).concat('$'), true, false).draw();
|
|
|
110 |
} else {
|
|
|
111 |
dtable.column(6).search('', true, false).draw();
|
|
|
112 |
}
|
|
|
113 |
});
|
|
|
114 |
});
|
|
|
115 |
</script>
|