Subversion Repositories SmartDukaan

Rev

Rev 23951 | Rev 24019 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23819 govind 1
<style>
2
 
3
	.btn:hover{
4
  		color: grey;
5
  		text-decoration: none;
6
	}
7
	.btn-info:hover{
8
  		color: grey;
9
  		text-decoration: none;
10
	}
11
}
12
</style>
13
<section class="wrapper">     
14
	<div class="row">
15
		<div class="col-lg-12">
16
			<h3 class="page-header"><i class="icon_document_alt"></i>PriceDrop</h3>
17
			<ol class="breadcrumb">
18
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
19
				<li><i class="icon_document_alt"></i>PriceDrop</li>
23868 amit.gupta 20
				<li><button type="button" data-toggle="modal" class="btn btn-sm btn-primary mk_new_price_drop" data-target="#newPriceDropModal">Add new</li>
21
				<!-- Modal -->
22
				<div id="newPriceDropModal" class="modal fade" role="dialog">
23
				  <div class="modal-dialog">
24
 
25
				    <!-- Modal content-->
26
				    <div class="modal-content">
27
				      <div class="modal-header">
28
				        <button type="button" class="close" data-dismiss="modal">&times;</button>
29
				        <h4 class="modal-title">Add Price Drop</h4>
30
				      </div>
31
				      <div class="modal-body">
32
			      		<form id="pdForm">
23876 amit.gupta 33
						  <div class="form-group row">
23951 amit.gupta 34
					  			<div class="col-lg-6">
23876 amit.gupta 35
							    	<input placeholder="Search Item" type="text" class="form-control typeahead" id="typeaheaditem" name="Item" data-provide="typeahead" autocomplete="off">
36
							    </div>
23951 amit.gupta 37
							    <div class="col-lg-3">
38
								    <input type="text" class="form-control" id="affectedDate" placeholder="Affected on" type="text"/>
39
								</div>
40
							    <div class="col-lg-3">
41
									<button type="button" class="btn btn-primary download-imeis">Download IMEIs</button>
42
								</div>
43
							    <!--<div class="col-lg-4 checkbox">
23876 amit.gupta 44
								  <label><input id="allColors" type="checkbox" value="">Apply to all Colors</label>
23951 amit.gupta 45
								</div>-->
23868 amit.gupta 46
						  </div>
47
						  <div class="form-group row">
48
						  	<div class="col-lg-4">
49
						  		<label for="priceDrop">Price Drop Announced:</label>
50
							    <input type="number" class="form-control" id="pd">
51
							</div>
23951 amit.gupta 52
 
23868 amit.gupta 53
						  </div>
54
						  <div class="form-group row">
55
							<div class="col-lg-4">
56
							    <label for="dpDrop">New MOP:</label>
57
							    <input type="number" class="form-control" id="newMop">
58
							</div>
59
							<div class="col-lg-4">
60
							    <label for="dpDrop">New Transfer Price:</label>
61
							    <input type="number" class="form-control" id="newTp">
62
							</div>
63
							<div class="col-lg-4">
64
							    <label for="dpDrop">New NLC:</label>
65
							    <input type="number" class="form-control" id="newNlc">
66
							</div>
67
						  </div>
68
						</form>
69
				      </div>
70
				      <div class="modal-footer">
23951 amit.gupta 71
						  <button type="button" class="addPriceDrop btn btn-primary">Add Price Drop</button>
23868 amit.gupta 72
				        <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
73
				      </div>
74
				    </div>
75
 
76
				  </div>
77
				</div>
23819 govind 78
			</ol>
79
		</div>
80
	</div>
81
 
82
    <div class="price-drop-table">
83
	  <div class="row">
84
			<div class="col-lg-12" id="priceDrop" >
85
				<table class="table table-striped table-condensed table-bordered">
86
	    			<thead>
87
			            <tr>
23968 amit.gupta 88
							<th>Item Name</th>
89
							<th>Old DP</th>
90
							<th>Price Drop</th>
91
							<th>New DP</th>
92
							<th>TP</th>
93
							<th>NLC </th>
94
							<th>Affected On</th>
23876 amit.gupta 95
							<th>Created On</th>
23968 amit.gupta 96
							<th>Price Drop In</th>
23876 amit.gupta 97
							<th>Partner Payout</th>
98
							<th>Processed On</th>
99
							<th>Download IMEIs</th>
23819 govind 100
 
101
			            </tr>
102
			        </thead>
103
					<tbody>
104
						#foreach($priceDrop in $priceDrops )
23968 amit.gupta 105
						<tr data-pricedropid="$priceDrop.getId()">
106
							<td>$catalogDescription.get($priceDrop.getCatalogItemId())</td>
107
							<td>$priceDrop.getOldDp()</td>
23819 govind 108
							<td>$priceDrop.getAmount()</td>
23968 amit.gupta 109
							<td>$priceDrop.getNewDp()</td>
110
							<td>$priceDrop.getTp()</td>
111
							<td>$priceDrop.getNlc()</td>
23868 amit.gupta 112
							<td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
23876 amit.gupta 113
							<td>$priceDrop.getCreatedOn().format($dateTimeFormatter)</td>
23819 govind 114
							#if($priceDrop.getProcessTimestamp())
23876 amit.gupta 115
							<td>$priceDrop.getPriceDropIn()</td>
116
							<td>$priceDrop.getPartnerPayout()</td>
23868 amit.gupta 117
							<td>$priceDrop.getProcessTimestamp().format($dateTimeFormatter)</td>	
23819 govind 118
							#else
23876 amit.gupta 119
							<td>
23968 amit.gupta 120
									<input type="number" name="priceDropIn" placeholder = "Price Drop In"   class="form-control price-drop-in input-sm"/>
23876 amit.gupta 121
							</td>
122
							<td>
23968 amit.gupta 123
									<input type="number" name="partnerPayout" placeholder = "Partner Payout"   class="form-control partner-payout input-sm"/>
23876 amit.gupta 124
							</td>
125
							<td>
23968 amit.gupta 126
								<input class="btn btn-info btn-sm mk_process_price_drop" data-cashback="$priceDrop.getId()" type="submit" value="Process"/>
23876 amit.gupta 127
							</td>
23819 govind 128
							#end
23876 amit.gupta 129
							<td>
130
								<input class="downloadtotalIMEI btn btn-info btn-sm" value="Download" type="submit" />
131
							</td>
132
						</tr>
23819 govind 133
						#end
134
					</tbody>
135
				</table>
136
				</div>
137
				</div>
138
				</div>
139
				</section>
140
 
141
				<script type="text/javascript">
142
$(document).ready(function() {
23868 amit.gupta 143
	    var start = moment().subtract(29, 'days');
144
    	var end = moment();
145
 
23819 govind 146
  priceDropTable = $('#priceDrop').find('table').DataTable({
147
  "pageLength": 10,
148
  order:[[ 5, 'desc' ]]
149
  });
23868 amit.gupta 150
  customItems = $customItems;
151
  itemAhead = $("#typeaheaditem").typeahead({
152
	  source: customItems,
153
	  autoSelect: false,
154
	  displayText:function(item){return item.itemDescription;},
23876 amit.gupta 155
	  afterSelect:	function(selectedItem){
156
	  					console.log(selectedItem);
157
	  					currentItem = selectedItem;
23868 amit.gupta 158
	  				}
159
	});
23819 govind 160
  });
23868 amit.gupta 161
  affectedDateInput=$('#affectedDate');
23886 amit.gupta 162
  affectedDateInput.daterangepicker(getSingleDatePicker(), dateRangeCallback);
23868 amit.gupta 163
  $("#newPriceDropModal").on('hidden.bs.modal', function () {
164
            $("#pdForm").trigger("reset");
165
  });
23819 govind 166
</script>