| Line 163... |
Line 163... |
| 163 |
return '<div>No stock info available.</div>';
|
163 |
return '<div>No stock info available.</div>';
|
| 164 |
}
|
164 |
}
|
| 165 |
|
165 |
|
| 166 |
var html = '<div style="padding:10px; background:#f9f9f9; border:1px solid #ccc;">';
|
166 |
var html = '<div style="padding:10px; background:#f9f9f9; border:1px solid #ccc;">';
|
| 167 |
html += '<strong>Stock Details:</strong>';
|
167 |
html += '<strong>Stock Details:</strong>';
|
| - |
|
168 |
html += '<span style="margin-left:15px; color:#dc3545; font-size:12px;"><i class="fa fa-circle"></i> Activated but not billed</span>';
|
| 168 |
html += '<table class="table table-bordered" style="margin-top:10px;">';
|
169 |
html += '<table class="table table-bordered" style="margin-top:10px;">';
|
| 169 |
html += '<thead><tr><th>Item ID</th><th>Availability</th><th>Description</th></tr></thead>';
|
170 |
html += '<thead><tr><th>Item ID</th><th>Availability</th><th>Description</th><th>Status</th></tr></thead>';
|
| 170 |
html += '<tbody>';
|
171 |
html += '<tbody>';
|
| 171 |
|
172 |
|
| 172 |
responseList.forEach(function (item) {
|
173 |
responseList.forEach(function (item) {
|
| - |
|
174 |
var rowStyle = item.hasActivatedImei ? 'style="background-color: #f8d7da; color: #721c24;"' : '';
|
| 173 |
html += '<tr>';
|
175 |
html += '<tr ' + rowStyle + '>';
|
| 174 |
html += '<td>' + item.itemId + '</td>';
|
176 |
html += '<td>' + item.itemId + '</td>';
|
| 175 |
html += '<td>' + item.availability + '</td>';
|
177 |
html += '<td>' + item.availability + '</td>';
|
| 176 |
html += '<td>' + (item.itemDescription && item.itemDescription !== 0 ? item.itemDescription : 'Not Available') + '</td>';
|
178 |
html += '<td>' + (item.itemDescription && item.itemDescription !== 0 ? item.itemDescription : 'Not Available') + '</td>';
|
| - |
|
179 |
html += '<td>';
|
| - |
|
180 |
if (item.hasActivatedImei && item.activatedImeis && item.activatedImeis.length > 0) {
|
| - |
|
181 |
html += '<span style="color:#dc3545; font-weight:bold;">Activated - Need to Bill (' + item.activatedImeis.length + ')</span>';
|
| - |
|
182 |
html += '<div style="margin-top:5px; padding:5px; background:#fff; border:1px solid #dc3545; border-radius:4px;">';
|
| - |
|
183 |
html += '<small><strong>IMEI(s):</strong></small>';
|
| - |
|
184 |
item.activatedImeis.forEach(function (imei, index) {
|
| - |
|
185 |
html += '<span style="display:inline-block; margin:2px 5px; padding:2px 6px; background:#f8d7da; border-radius:3px; font-size:11px;">' + imei + '</span>';
|
| - |
|
186 |
});
|
| - |
|
187 |
html += '</div>';
|
| - |
|
188 |
} else {
|
| - |
|
189 |
html += '-';
|
| - |
|
190 |
}
|
| - |
|
191 |
html += '</td>';
|
| 177 |
html += '</tr>';
|
192 |
html += '</tr>';
|
| 178 |
});
|
193 |
});
|
| 179 |
|
194 |
|
| 180 |
html += '</tbody></table></div>';
|
195 |
html += '</tbody></table></div>';
|
| 181 |
|
196 |
|