Rev 23819 | Rev 23876 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<style>.btn:hover{color: grey;text-decoration: none;}.btn-info:hover{color: grey;text-decoration: none;}}</style><section class="wrapper"><div class="row"><div class="col-lg-12"><h3 class="page-header"><i class="icon_document_alt"></i>PriceDrop</h3><ol class="breadcrumb"><li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li><li><i class="icon_document_alt"></i>PriceDrop</li><li><button type="button" data-toggle="modal" class="btn btn-sm btn-primary mk_new_price_drop" data-target="#newPriceDropModal">Add new</li><!-- Modal --><div id="newPriceDropModal" class="modal fade" role="dialog"><div class="modal-dialog"><!-- Modal content--><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal">×</button><h4 class="modal-title">Add Price Drop</h4></div><div class="modal-body"><form id="pdForm"><div class="form-group"><input placeholder="Search Item" type="text" class="form-control typeahead" id="typeaheaditem" name="Item" data-provide="typeahead" autocomplete="off"></div><div class="form-group row"><div class="col-lg-4"><label for="priceDrop">Price Drop Announced:</label><input type="number" class="form-control" id="pd"></div><div class="col-lg-4"><label for="dpDrop">Affected On:</label><input type="text" class="form-control" id="affectedDate" placeholder="DD/MM/YYYY" type="text"/></div><div class="col-lg-4"><div class="checkbox"><label><input type="checkbox" value="">Apply on all Colors</label></div></div></div><div class="form-group row"><div class="col-lg-4"><label for="dpDrop">New MOP:</label><input type="number" class="form-control" id="newMop"></div><div class="col-lg-4"><label for="dpDrop">New Transfer Price:</label><input type="number" class="form-control" id="newTp"></div><div class="col-lg-4"><label for="dpDrop">New NLC:</label><input type="number" class="form-control" id="newNlc"></div></div></form></div><div class="modal-footer"><button type="button" class="addPriceDrop btn btn-primary">Submit</button><button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button></div></div></div></div></ol></div></div><div class="price-drop-table"><div class="row"><div class="col-lg-12" id="priceDrop" ><table class="table table-striped table-condensed table-bordered"><thead><tr><th>ItemId</th><th>ItemDescription</th><th>PriceDrop<br/>Amount</th><th>AffetcedOn</th><th>Cashback<br/>Amount</th><th>Process</th><th>Download<br/>IMEI<br/>For<br/>Partners</th><th>Download<br/>All<br/>IMEI</th></tr></thead><tbody>#foreach($priceDrop in $priceDrops )<tr><td>$priceDrop.getItemId()</td><td>$tagListingMap.get($priceDrop.getItemId()).getItemDescription()</td><td>$priceDrop.getAmount()</td><td>$priceDrop.getAffectedOn().format($dateFormatter)</td>#if($priceDrop.getProcessTimestamp())<td>$priceDrop.getCashbackAmount()</td><td>$priceDrop.getProcessTimestamp().format($dateTimeFormatter)</td>#else<td><div><input type="number" id="$priceDrop.getId()" name="processedamount" placeholder = "$priceDrop.getAmount()" class="form-control phone input-sm"/><input class="btn btn-info btn-sm" data-cashback="$priceDrop.getId()" style="width:35%;border-radius:0px;" type="submit" value="Cashback" id="cashTopartner"/></div></td><td>Not Processed</td>#end<td><input class="btn btn-info btn-sm" data-download="$priceDrop.getId()" style="width:100%;border-radius:0px;" type="submit" value="Download" id="download"/></td><td><input class="btn btn-info btn-sm" data-pricedropidfortotalimei="$priceDrop.getId()" style="width:100%;border-radius:0px;" value="Download" type="submit" id="downloadtotalIMEI"/></td></tr>#end</tbody></table></div></div></div></section><script type="text/javascript">$(document).ready(function() {var start = moment().subtract(29, 'days');var end = moment();priceDropTable = $('#priceDrop').find('table').DataTable({"pageLength": 10,order:[[ 5, 'desc' ]]});customItems = $customItems;itemAhead = $("#typeaheaditem").typeahead({source: customItems,autoSelect: false,displayText:function(item){return item.itemDescription;},afterSelect: function(currentItem){console.log(currentItem);currentItemId = currentItem.id;}});});affectedDateInput=$('#affectedDate');affectedDateInput.daterangepicker({todayHighlight: true,startDate: moment(),maxDate: moment(),autoclose: true,autoUpdateInput: true,singleDatePicker: true,locale: {format: 'DD/MM/YYYY'}});$("#newPriceDropModal").on('hidden.bs.modal', function () {$("#pdForm").trigger("reset");});</script>