| 34198 |
ranu |
1 |
<section class="wrapper">
|
|
|
2 |
<div class="row">
|
|
|
3 |
<div class="col-lg-12">
|
|
|
4 |
<h3 class="page-header"><i class="icon_document_alt"></i>Requested Allocations</h3>
|
|
|
5 |
<ol class="breadcrumb">
|
|
|
6 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
7 |
<li><i class="icon_document_alt"></i>Requested Allocations</li>
|
|
|
8 |
</ol>
|
|
|
9 |
</div>
|
|
|
10 |
</div>
|
|
|
11 |
<div class="row">
|
|
|
12 |
<div class="col-lg-12">
|
|
|
13 |
<ul class="nav nav-tabs">
|
|
|
14 |
<li class="active"><a data-toggle="tab" href="#pending">Pending</a></li>
|
|
|
15 |
<li><a data-toggle="tab" href="#approved">Approved</a></li>
|
|
|
16 |
</ul>
|
|
|
17 |
<div class="tab-content">
|
|
|
18 |
<div id="pending" class="tab-pane fade in active">
|
| 34295 |
ranu |
19 |
<table class="table table-bordered table-condensed pendingRequestedAllocationList"
|
| 34198 |
ranu |
20 |
style="width:100%">
|
|
|
21 |
<thead class="row htable" style="background:#F5F5F5;">
|
|
|
22 |
<tr style="color:black;">
|
|
|
23 |
<th>Fofo Id</th>
|
|
|
24 |
<th>Partner Name</th>
|
|
|
25 |
<th>Catalog Id</th>
|
|
|
26 |
<th>Model Number</th>
|
|
|
27 |
<th>Brand</th>
|
|
|
28 |
<th>Requested Allocation</th>
|
|
|
29 |
<th>Action</th>
|
|
|
30 |
</tr>
|
|
|
31 |
</thead>
|
|
|
32 |
<tbody>
|
|
|
33 |
#foreach($model in $pendingRequestedHidAllocations)
|
|
|
34 |
<tr>
|
|
|
35 |
<td> $model.getFofoId() </td>
|
|
|
36 |
<td> $userMap.get($model.getFofoId()).getName() </td>
|
|
|
37 |
<td> $model.getCatalogId() </td>
|
|
|
38 |
<td> $model.getModelNumber() </td>
|
|
|
39 |
<td> $model.getBrand() </td>
|
| 34295 |
ranu |
40 |
<td><input type="text" value="$model.getRequested_allocation()"
|
|
|
41 |
class="reuested_allocation" disabled> <a role="button"> <i
|
|
|
42 |
class="fa fa-edit edit-allocation"></i></a></td>
|
| 34198 |
ranu |
43 |
<td>
|
|
|
44 |
<button class="btn btn-sm btn-success allocation-request-approve-reject"
|
|
|
45 |
data-id="$model.getId()" data-status="true">Approve
|
|
|
46 |
</button>
|
|
|
47 |
/
|
|
|
48 |
<button class="btn btn-sm btn-danger allocation-request-approve-reject"
|
|
|
49 |
data-id="$model.getId()" data-status="false">Reject
|
|
|
50 |
</button>
|
| 34295 |
ranu |
51 |
/
|
|
|
52 |
<button class="btn btn-sm btn-info allocation-request-edit"
|
|
|
53 |
data-id="$model.getId()">Edit
|
|
|
54 |
</button>
|
| 34198 |
ranu |
55 |
</td>
|
|
|
56 |
</tr>
|
|
|
57 |
#end
|
|
|
58 |
</tbody>
|
|
|
59 |
</table>
|
|
|
60 |
</div>
|
|
|
61 |
<div id="approved" class="tab-pane fade">
|
| 34295 |
ranu |
62 |
<table class="table table-bordered table-condensed approvedRequestedAllocationList"
|
| 34198 |
ranu |
63 |
style="width:100%">
|
|
|
64 |
<thead class="row htable" style="background:#F5F5F5;">
|
|
|
65 |
<tr style="color:black;">
|
|
|
66 |
<th>Fofo Id</th>
|
|
|
67 |
<th>Partner Name</th>
|
|
|
68 |
<th>Catalog Id</th>
|
|
|
69 |
<th>Model Number</th>
|
|
|
70 |
<th>Brand</th>
|
|
|
71 |
<th>Requested Allocation</th>
|
|
|
72 |
<th>Action</th>
|
|
|
73 |
</tr>
|
|
|
74 |
</thead>
|
|
|
75 |
<tbody>
|
|
|
76 |
#foreach($model in $approvedRequestedHidAllocations)
|
|
|
77 |
<tr>
|
|
|
78 |
<td> $model.getFofoId() </td>
|
|
|
79 |
<td> $userMap.get($model.getFofoId()).getName() </td>
|
|
|
80 |
<td> $model.getCatalogId() </td>
|
|
|
81 |
<td> $model.getModelNumber() </td>
|
|
|
82 |
<td> $model.getBrand() </td>
|
| 34295 |
ranu |
83 |
<td><input type="text" value="$model.getRequested_allocation()"
|
|
|
84 |
class="reuested_allocation" disabled> <a role="button"> <i
|
|
|
85 |
class="fa fa-edit edit-allocation"></i></a></td>
|
| 34198 |
ranu |
86 |
<td>
|
|
|
87 |
<button class="btn btn-sm btn-danger allocation-request-approve-reject"
|
|
|
88 |
data-id="$model.getId()" data-status="false">Reject
|
|
|
89 |
</button>
|
| 34295 |
ranu |
90 |
<button class="btn btn-sm btn-info allocation-request-edit"
|
|
|
91 |
data-id="$model.getId()">Edit
|
|
|
92 |
</button>
|
| 34198 |
ranu |
93 |
</td>
|
|
|
94 |
</tr>
|
|
|
95 |
#end
|
|
|
96 |
</tbody>
|
|
|
97 |
</table>
|
|
|
98 |
</div>
|
|
|
99 |
|
|
|
100 |
</div>
|
|
|
101 |
</div>
|
|
|
102 |
|
|
|
103 |
</div>
|
|
|
104 |
|
|
|
105 |
</section>
|
|
|
106 |
|
|
|
107 |
<script>
|
|
|
108 |
|
|
|
109 |
$(document).ready(function () {
|
|
|
110 |
// Initialize first table
|
| 34295 |
ranu |
111 |
var sanctionTable = $('.pendingRequestedAllocationList').DataTable({
|
| 34198 |
ranu |
112 |
"scrollX": true,
|
|
|
113 |
scrollCollapse: true,
|
|
|
114 |
"fixedHeader": true,
|
|
|
115 |
"order": [[0, "desc"]],
|
|
|
116 |
dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
|
|
|
117 |
});
|
|
|
118 |
|
|
|
119 |
// Initialize second table
|
| 34295 |
ranu |
120 |
var sanctionTableApproved = $('.approvedRequestedAllocationList').DataTable({
|
| 34198 |
ranu |
121 |
"scrollX": true,
|
|
|
122 |
scrollCollapse: true,
|
|
|
123 |
"fixedHeader": true,
|
|
|
124 |
"order": [[0, "desc"]],
|
|
|
125 |
dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
|
|
|
126 |
});
|
|
|
127 |
|
|
|
128 |
// Adjust columns when tab changes
|
|
|
129 |
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
|
|
130 |
// Wait for tab switch and then adjust columns
|
|
|
131 |
setTimeout(function () {
|
|
|
132 |
sanctionTable.columns.adjust().draw();
|
|
|
133 |
sanctionTableApproved.columns.adjust().draw();
|
|
|
134 |
}, 100); // Delay adjustment slightly to ensure tab switch is complete
|
|
|
135 |
});
|
|
|
136 |
});
|
|
|
137 |
|
|
|
138 |
</script>
|