Subversion Repositories SmartDukaan

Rev

Rev 23876 | Rev 23951 | 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">
34
					  			<div class="col-lg-8">
35
							    	<input placeholder="Search Item" type="text" class="form-control typeahead" id="typeaheaditem" name="Item" data-provide="typeahead" autocomplete="off">
36
							    </div>
37
							    <div class="col-lg-4 checkbox">
38
								  <label><input id="allColors" type="checkbox" value="">Apply to all Colors</label>
39
								</div>
23868 amit.gupta 40
						  </div>
41
						  <div class="form-group row">
42
						  	<div class="col-lg-4">
43
						  		<label for="priceDrop">Price Drop Announced:</label>
44
							    <input type="number" class="form-control" id="pd">
45
							</div>
46
							<div class="col-lg-4">
47
							    <label for="dpDrop">Affected On:</label>
48
							    <input type="text" class="form-control" id="affectedDate" placeholder="DD/MM/YYYY" type="text"/>
49
							</div>
50
						  </div>
51
						  <div class="form-group row">
52
							<div class="col-lg-4">
53
							    <label for="dpDrop">New MOP:</label>
54
							    <input type="number" class="form-control" id="newMop">
55
							</div>
56
							<div class="col-lg-4">
57
							    <label for="dpDrop">New Transfer Price:</label>
58
							    <input type="number" class="form-control" id="newTp">
59
							</div>
60
							<div class="col-lg-4">
61
							    <label for="dpDrop">New NLC:</label>
62
							    <input type="number" class="form-control" id="newNlc">
63
							</div>
64
						  </div>
65
						</form>
66
				      </div>
67
				      <div class="modal-footer">
68
						  <button type="button" class="addPriceDrop btn btn-primary">Submit</button>
69
				        <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
70
				      </div>
71
				    </div>
72
 
73
				  </div>
74
				</div>
23819 govind 75
			</ol>
76
		</div>
77
	</div>
78
 
79
    <div class="price-drop-table">
80
	  <div class="row">
81
			<div class="col-lg-12" id="priceDrop" >
82
				<table class="table table-striped table-condensed table-bordered">
83
	    			<thead>
84
			            <tr>
23876 amit.gupta 85
			            	<th>Item Id</th>
86
							<th>Item Description</th>
87
							<th>Price Drop<br/>Amount</th>
88
							<th>Affetced On</th>
89
							<th>Created On</th>
90
							<th>Partner Payout</th>
91
							<th>Price Drop In</th>
92
							<th>Processed On</th>
93
							<th>Download IMEIs</th>
23819 govind 94
 
95
			            </tr>
96
			        </thead>
97
					<tbody>
98
						#foreach($priceDrop in $priceDrops )
23876 amit.gupta 99
						<tr data-priceDropId="$priceDrop.getId()">
23819 govind 100
							<td>$priceDrop.getItemId()</td>
23868 amit.gupta 101
							<td>$tagListingMap.get($priceDrop.getItemId()).getItemDescription()</td>
23819 govind 102
							<td>$priceDrop.getAmount()</td>
23868 amit.gupta 103
							<td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
23876 amit.gupta 104
							<td>$priceDrop.getCreatedOn().format($dateTimeFormatter)</td>
23819 govind 105
							#if($priceDrop.getProcessTimestamp())
23876 amit.gupta 106
							<td>$priceDrop.getPriceDropIn()</td>
107
							<td>$priceDrop.getPartnerPayout()</td>
23868 amit.gupta 108
							<td>$priceDrop.getProcessTimestamp().format($dateTimeFormatter)</td>	
23819 govind 109
							#else
23876 amit.gupta 110
							<td>
111
									<input type="number" name="priceDropIn" placeholder = "Price Drop In"   class="form-control phone input-sm"/>
112
							</td>
113
							<td>
114
									<input type="number" name="partnerPayout" placeholder = "Partner Payout"   class="form-control phone input-sm"/>
115
							</td>
116
							<td>
117
								<input class="btn btn-info btn-sm" data-cashback="$priceDrop.getId()" type="submit" value="Process" id="cashTopartner"/>
118
							</td>
23819 govind 119
							#end
23876 amit.gupta 120
							<td>
121
								<input class="downloadtotalIMEI btn btn-info btn-sm" value="Download" type="submit" />
122
							</td>
123
						</tr>
23819 govind 124
						#end
125
					</tbody>
126
				</table>
127
				</div>
128
				</div>
129
				</div>
130
				</section>
131
 
132
				<script type="text/javascript">
133
$(document).ready(function() {
23868 amit.gupta 134
	    var start = moment().subtract(29, 'days');
135
    	var end = moment();
136
 
23819 govind 137
  priceDropTable = $('#priceDrop').find('table').DataTable({
138
  "pageLength": 10,
139
  order:[[ 5, 'desc' ]]
140
  });
23868 amit.gupta 141
  customItems = $customItems;
142
  itemAhead = $("#typeaheaditem").typeahead({
143
	  source: customItems,
144
	  autoSelect: false,
145
	  displayText:function(item){return item.itemDescription;},
23876 amit.gupta 146
	  afterSelect:	function(selectedItem){
147
	  					console.log(selectedItem);
148
	  					currentItem = selectedItem;
23868 amit.gupta 149
	  				}
150
	});
23819 govind 151
  });
23868 amit.gupta 152
  affectedDateInput=$('#affectedDate');
23886 amit.gupta 153
  affectedDateInput.daterangepicker(getSingleDatePicker(), dateRangeCallback);
23868 amit.gupta 154
  $("#newPriceDropModal").on('hidden.bs.modal', function () {
155
            $("#pdForm").trigger("reset");
156
  });
23819 govind 157
</script>