Subversion Repositories SmartDukaan

Rev

Rev 23855 | Rev 23928 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23855 Rev 23914
Line -... Line 1...
-
 
1
<script type="text/javascript">
-
 
2
  
-
 
3
	$('input[name="extendScheme"]').daterangepicker($.extend(getSingleDatePicker(),{"drops": "up"}), dateRangeCallback);
-
 
4
  		 $(".add-scheme").click(function(){
-
 
5
        $("#newItemToSchemeModal").modal({backdrop: false});
-
 
6
    });
-
 
7
  		$("#newItemToSchemeModal").on('hidden.bs.modal', function () {
-
 
8
            $("#addSchemeForm").trigger("reset");
-
 
9
  });
-
 
10
	    </script>
1
<h3 style="padding-left:3%;padding-top:2%;font-weight:bold;">Scheme Id : $scheme.getId()</h3>
11
<h3 style="padding-left:3%;padding-top:2%;font-weight:bold;">Scheme Id : $scheme.getId()</h3>
-
 
12
 
2
<div class="row" style="padding-left:3%;">
13
<div class="row" style="padding-left:3%;">
3
	<div class="col-lg-4">
14
	<div class="col-lg-4">
-
 
15
	<table>
-
 
16
		<td>
4
		#if($scheme.getActiveTimestamp())
17
		#if($scheme.getActiveTimestamp())
5
			<span>Activated On : $scheme.getFormattedActiveTimestamp()</span>
18
			<span>Activated On : $scheme.getFormattedActiveTimestamp()</span>
6
			<p></p>
19
			<p></p>
7
		#end
20
		#end
8
		#if($scheme.getExpireTimestamp())
21
		#if($scheme.getExpireTimestamp())
9
			<span>Expired On : $scheme.getFormattedExpireTimestamp()</span>
22
			<span>Expired On : $scheme.getFormattedExpireTimestamp()</span>
10
			<p></p>
23
			<p></p>
11
		#end
24
		#end
-
 
25
		</td>
-
 
26
		<td><button class="btn btn-sm btn-primary add-scheme" data="$scheme.getId()" style="width:100%;background-color:#007aff;color:white;padding-right: 10px" data-toggle="modal" data-target="#newItemToSchemeModal">Add Item</button></td></table>
12
		<table class="table table-striped table-advance table-hover">
27
		<table class="table table-striped table-advance table-hover">
13
			<tbody>
28
			<tbody>
14
				<tr>
29
				<tr>	
15
					<th>Item Id</th>
30
					<th>Item Id</th>
16
					<th>Description</th>
31
					<th>Description</th>
-
 
32
					#if($roleType == "true")
-
 
33
					<th>DeleteItem</th>
-
 
34
					#end
17
				</tr>
35
				</tr>
-
 
36
				#if($scheme.getItemStringMap().size()>0)
18
    			#foreach( $itemIdDescriptionEntry in $scheme.getItemStringMap().entrySet())
37
    			#foreach( $itemIdDescriptionEntry in $scheme.getItemStringMap().entrySet())
19
    				<tr data="$itemId">
38
    				<tr data="$itemId">
20
    					<td>$itemIdDescriptionEntry.key</td>
39
    					<td>$itemIdDescriptionEntry.key</td>
21
    					<td>$itemIdDescriptionEntry.value</td>
40
    					<td>$itemIdDescriptionEntry.value</td>
-
 
41
    					#if($roleType == "true")
-
 
42
    					<td><button class="btn btn-primary delete-schemes" data-schemeid="$scheme.getId()" data-itemid="$itemIdDescriptionEntry.key">Delete</button>
-
 
43
    					#end
22
    				</tr>
44
    				</tr>
23
    			#end
45
    			#end
-
 
46
    			#else
-
 
47
    					<tr>
-
 
48
		    					<td colspan="12" style="text-align:center;">NO ITEM FOUND FOR SCHEME</td>
-
 
49
		    				</tr>
-
 
50
    				#end
24
			</tbody>
51
			</tbody>
25
    	</table>
52
    	</table>
26
		
53
		
27
		<p></p>
54
		<p></p>
28
		#if($scheme.isRetailerAll())
55
		#if($scheme.isRetailerAll())
29
			<td>Retailer All : <i class="fa fa-check" aria-hidden="true"></i></td>
56
			<td>Retailer All : <i class="fa fa-check" aria-hidden="true"></i></td>
30
		#else
57
		#else
31
			<td>Retailer All : <i class="fa fa-times" aria-hidden="true"></i></td>
58
			<td>Retailer All : <i class="fa fa-times" aria-hidden="true"></i></td>
32
		#end
59
		#end
-
 
60
		
-
 
61
		
-
 
62
		
-
 
63
		
-
 
64
		
33
		</p></p>
65
		</p></p>
-
 
66
		#set($fofoAdmin="false")
-
 
67
        	#if($roleType == "true")
-
 
68
	          	#set($fofoAdmin="true")
-
 
69
            #end
34
        #if($isFofoAdmin)
70
        #if($fofoAdmin == "true")
35
			<span>Created By : $scheme.getCreatedBy()</span>
71
			<span>Created By : $scheme.getCreatedBy()</span>
36
			<p></p>
72
			<p></p>
37
		#end
73
		#end
38
		#if(!$scheme.isRetailerAll())
74
		#if(!$scheme.isRetailerAll())
39
			<span>Retailer Ids : $scheme.getRetailerIdsString()</span>
75
			<span>Retailer Ids : $scheme.getRetailerIdsString()</span>
40
		#end
76
		#end
41
		#if($isFofoAdmin)
77
		#if($fofoAdmin == "true")
42
			<p></p>
78
			<p></p>
43
			#if((!$scheme.getActiveTimestamp()) && (!$scheme.getExpireTimestamp()))
79
			#if((!$scheme.getActiveTimestamp()) && (!$scheme.getExpireTimestamp()))
44
				<div class="btn-group" style="width:40%">
80
				<div class="btn-group" style="width:40%">
45
					<button class="btn active-scheme" data="$scheme.getId()" style="width:100%;background-color:#e98c8f;color:white;">Active</button>
81
					<button class="btn active-scheme" data="$scheme.getId()" style="width:100%;background-color:#e98c8f;color:white;">Active</button>
46
				</div>
82
				</div>
47
			#else
83
			#else
48
				#if(($scheme.getActiveTimestamp()) && (!$scheme.getExpireTimestamp()))
84
				#if(($scheme.getActiveTimestamp()) && (!$scheme.getExpireTimestamp()))
-
 
85
				<table>
-
 
86
				<td>
-
 
87
					<div class="scheme-extend">			
-
 
88
    		<div class="row">
-
 
89
    		<div class="col-lg-12">
-
 
90
				<div class="input-group" style="Width:80%">
-
 
91
						<input type = "hidden" value="$scheme.getId()" id="schemeId">
-
 
92
						<input  placeholder = "Extend Date Time" id="extendScheme" name="extendScheme" type="text" value="" class="form-control">
-
 
93
						 <span class="input-group-btn"> <button class="btn extendScheme" style="width:100%;background-color:#007aff;color:white;" id="extendScheme-button" type="button">Extend</button></span>
-
 
94
						  </div>
-
 
95
						  </div>	
-
 
96
				</div>
-
 
97
       			 </div>
-
 
98
				</td>
-
 
99
				<td>
49
					<div class="btn-group" style="width:40%">
100
					<div class="btn-group" style="width:150%">
50
						<button class="btn expire-scheme" data="$scheme.getId()" style="width:100%;background-color:#007aff;color:white;">Expire</button>
101
						<button class="btn expire-scheme" data="$scheme.getId()" style="width:100%;background-color:#007aff;color:white;">Expire</button>
51
					</div>
102
					</div>
-
 
103
					</td>
-
 
104
					</table><br><br>
52
				#end
105
				#end
53
			#end
106
			#end
54
		#end
107
		#end
55
	</div>
108
	</div>
-
 
109
<div id="newItemToSchemeModal" class="modal fade" role="dialog">
-
 
110
				  <div class="modal-dialog">
-
 
111
				
-
 
112
				    <!-- Modal content-->
-
 
113
				    <div class="modal-content">
-
 
114
				      <div class="modal-header">
-
 
115
				        <button type="button" class="close" data-dismiss="modal">&times;</button>
-
 
116
				        <h4 class="modal-title"><b>Add Item To Scheme</b></h4>
-
 
117
				      </div>
-
 
118
				      <div class="modal-body">
-
 
119
			      		<form id="addSchemeForm">
-
 
120
						  <div class="form-group row">
-
 
121
						  	<div class="col-lg-4" style="display: none;">
-
 
122
						  		<label for="schemeId">SchemeId</label>
-
 
123
							    <input type="number" class="form-control"  value="$scheme.getId()" id="schemeids" readonly>
-
 
124
							</div>
-
 
125
							<div class="col-lg-4">
-
 
126
							    <label for="ItemId"><b>ItemId</b></label>
-
 
127
							    <input type="text" class="form-control" id="itemids" placeholder="Item Id"/>
-
 
128
							</div>
-
 
129
						  </div>
-
 
130
						</form>
-
 
131
				      </div>
-
 
132
				      <div class="modal-footer">
-
 
133
						  <button type="button" class="btn btn-primary add-schemes">Add-Item</button>
-
 
134
				        <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
-
 
135
				      </div>
-
 
136
				    </div>
-
 
137
				
-
 
138
				  </div>
-
 
139
				  </div>
56
</div>
140
</div>
57
<hr />
141
<hr />