| 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>
|
| 34304 |
ranu |
36 |
<td> $userMap.get($model.getFofoId()).getName()
|
|
|
37 |
- $fofoStoreMap.get($model.getFofoId()).getCode() </td>
|
| 34198 |
ranu |
38 |
<td> $model.getCatalogId() </td>
|
|
|
39 |
<td> $model.getModelNumber() </td>
|
|
|
40 |
<td> $model.getBrand() </td>
|
| 34295 |
ranu |
41 |
<td><input type="text" value="$model.getRequested_allocation()"
|
|
|
42 |
class="reuested_allocation" disabled> <a role="button"> <i
|
|
|
43 |
class="fa fa-edit edit-allocation"></i></a></td>
|
| 34198 |
ranu |
44 |
<td>
|
|
|
45 |
<button class="btn btn-sm btn-success allocation-request-approve-reject"
|
|
|
46 |
data-id="$model.getId()" data-status="true">Approve
|
|
|
47 |
</button>
|
|
|
48 |
/
|
|
|
49 |
<button class="btn btn-sm btn-danger allocation-request-approve-reject"
|
|
|
50 |
data-id="$model.getId()" data-status="false">Reject
|
|
|
51 |
</button>
|
| 34295 |
ranu |
52 |
/
|
|
|
53 |
<button class="btn btn-sm btn-info allocation-request-edit"
|
|
|
54 |
data-id="$model.getId()">Edit
|
|
|
55 |
</button>
|
| 34198 |
ranu |
56 |
</td>
|
|
|
57 |
</tr>
|
|
|
58 |
#end
|
|
|
59 |
</tbody>
|
|
|
60 |
</table>
|
|
|
61 |
</div>
|
|
|
62 |
<div id="approved" class="tab-pane fade">
|
| 34295 |
ranu |
63 |
<table class="table table-bordered table-condensed approvedRequestedAllocationList"
|
| 34198 |
ranu |
64 |
style="width:100%">
|
|
|
65 |
<thead class="row htable" style="background:#F5F5F5;">
|
|
|
66 |
<tr style="color:black;">
|
|
|
67 |
<th>Fofo Id</th>
|
|
|
68 |
<th>Partner Name</th>
|
|
|
69 |
<th>Catalog Id</th>
|
|
|
70 |
<th>Model Number</th>
|
|
|
71 |
<th>Brand</th>
|
|
|
72 |
<th>Requested Allocation</th>
|
|
|
73 |
<th>Action</th>
|
|
|
74 |
</tr>
|
|
|
75 |
</thead>
|
|
|
76 |
<tbody>
|
|
|
77 |
#foreach($model in $approvedRequestedHidAllocations)
|
|
|
78 |
<tr>
|
|
|
79 |
<td> $model.getFofoId() </td>
|
| 34305 |
ranu |
80 |
<td> $userMap.get($model.getFofoId()).getName()
|
|
|
81 |
- $fofoStoreMap.get($model.getFofoId()).getCode() </td>
|
| 34198 |
ranu |
82 |
<td> $model.getCatalogId() </td>
|
|
|
83 |
<td> $model.getModelNumber() </td>
|
|
|
84 |
<td> $model.getBrand() </td>
|
| 34295 |
ranu |
85 |
<td><input type="text" value="$model.getRequested_allocation()"
|
|
|
86 |
class="reuested_allocation" disabled> <a role="button"> <i
|
|
|
87 |
class="fa fa-edit edit-allocation"></i></a></td>
|
| 34198 |
ranu |
88 |
<td>
|
|
|
89 |
<button class="btn btn-sm btn-danger allocation-request-approve-reject"
|
|
|
90 |
data-id="$model.getId()" data-status="false">Reject
|
|
|
91 |
</button>
|
| 34295 |
ranu |
92 |
<button class="btn btn-sm btn-info allocation-request-edit"
|
|
|
93 |
data-id="$model.getId()">Edit
|
|
|
94 |
</button>
|
| 34198 |
ranu |
95 |
</td>
|
|
|
96 |
</tr>
|
|
|
97 |
#end
|
|
|
98 |
</tbody>
|
|
|
99 |
</table>
|
|
|
100 |
</div>
|
|
|
101 |
|
|
|
102 |
</div>
|
|
|
103 |
</div>
|
|
|
104 |
|
|
|
105 |
</div>
|
|
|
106 |
|
|
|
107 |
</section>
|
|
|
108 |
|
|
|
109 |
<script>
|
|
|
110 |
|
|
|
111 |
$(document).ready(function () {
|
|
|
112 |
// Initialize first table
|
| 34295 |
ranu |
113 |
var sanctionTable = $('.pendingRequestedAllocationList').DataTable({
|
| 34198 |
ranu |
114 |
"scrollX": true,
|
|
|
115 |
scrollCollapse: true,
|
|
|
116 |
"fixedHeader": true,
|
|
|
117 |
"order": [[0, "desc"]],
|
|
|
118 |
dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
|
|
|
119 |
});
|
|
|
120 |
|
|
|
121 |
// Initialize second table
|
| 34295 |
ranu |
122 |
var sanctionTableApproved = $('.approvedRequestedAllocationList').DataTable({
|
| 34198 |
ranu |
123 |
"scrollX": true,
|
|
|
124 |
scrollCollapse: true,
|
|
|
125 |
"fixedHeader": true,
|
|
|
126 |
"order": [[0, "desc"]],
|
|
|
127 |
dom: '<"top"lf>rt<"bottom"ip><"clear">' // Proper dom setup
|
|
|
128 |
});
|
|
|
129 |
|
|
|
130 |
// Adjust columns when tab changes
|
|
|
131 |
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
|
|
132 |
// Wait for tab switch and then adjust columns
|
|
|
133 |
setTimeout(function () {
|
|
|
134 |
sanctionTable.columns.adjust().draw();
|
|
|
135 |
sanctionTableApproved.columns.adjust().draw();
|
|
|
136 |
}, 100); // Delay adjustment slightly to ensure tab switch is complete
|
|
|
137 |
});
|
|
|
138 |
});
|
|
|
139 |
|
|
|
140 |
</script>
|