Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
26010 amit.gupta 1
<!DOCTYPE html>
2
<html lang="en">
3
  <head>
4
    <meta charset="utf-8">
5
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6
    <meta name="description" content="Smart Dukaan FOCO Dashboard">
7
    <meta name="author" content="smartdukaan">
8
    <!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">--> 
9
	<link rel="shortcut icon" href="assets/images/icons/favicon.png">
10
 
11
    <title>Smart Dukaan - FOCO Dashboard</title>
12
 
13
    <!-- Bootstrap CSS -->    
14
    <!-- bootstrap theme -->
15
    <!--external css-->
16
    <!-- font icon -->
17
    <link href="resources/css/elegant-icons-style.css" rel="stylesheet" />
18
    <link href="resources/css/font-awesome.min.css" rel="stylesheet" />    
19
    <!-- full calendar css-->
20
    <!-- owl carousel -->
21
    <link rel="stylesheet" href="resources/css/owl.carousel.css" type="text/css">
22
	<link href="resources/css/jquery-jvectormap-1.2.2.css" rel="stylesheet">
23
    <!-- Custom styles -->
24
	<link href="resources/css/widgets.css" rel="stylesheet">
25
    <link href="resources/css/style.css?v=${cssVersion}" rel="stylesheet">
26
    <link href="resources/css/card.css?v=${cssVersion}" rel="stylesheet">
27
    <link href="resources/css/style-responsive.css" rel="stylesheet" />
28
	<link href="resources/css/jquery-ui-1.10.4.min.css" rel="stylesheet">
29
    <link type="text/css" href="resources/css/bootstrap.css" rel="stylesheet">
30
	<!--<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/bootstrap/3/css/bootstrap.css" />-->
31
    <link href="resources/css/bootstrap-theme.min.css" rel="stylesheet">
32
	<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
33
 
34
	<link rel="stylesheet" type="text/css" href="resources/css/bootstrap-multiselect.css" />
27333 amit.gupta 35
	<link rel="stylesheet" type="text/css" href="resources/css/multi.min.css"/>
36
	<link rel="stylesheet" type="text/css" href="resources/css/slimselect.min.css"/>
37
	<link rel="stylesheet" type="text/css" href="resources/js/chosen.min.css"/>
26010 amit.gupta 38
	<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.16/css/dataTables.bootstrap.min.css"/>
39
	<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.7.0/css/all.css' integrity='sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ' crossorigin='anonymous'>
27412 amit.gupta 40
	<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" />
41
 
26010 amit.gupta 42
	<style type="text/css">
43
		.loading {
44
  			display: none;
45
		}
46
		.breadcrumb {
47
    		padding: 0 15px;
48
    	}
49
 
50
    	.stars-outer {
51
		  display: inline-block;
52
		  position: relative;
53
		  font-family: FontAwesome;
54
		}
55
 
56
		.stars-outer::before {
57
		  content: "\f006 \f006 \f006 \f006 \f006";
58
		}
59
 
60
		.stars-inner {
61
		  position: absolute;
62
		  top: 0;
63
		  left: 0;
64
		  white-space: nowrap;
65
		  overflow: hidden;
66
		  width: 0;
67
		}
68
 
69
		.stars-inner::before {
70
		  content: "\f005 \f005 \f005 \f005 \f005";
71
		  color: #f8ce0b;
72
		}
73
 
74
 
75
	.table-striped > tbody > tr:nth-child(odd) > td{
76
  		background: white;
77
  		background-color: #dae5f4;
78
	}
79
	.table-striped > tbody > tr:nth-child(even) > td{
80
  		background:  #f2f2f2;
81
  		background-color: #b8d1f3;
82
	}
83
 
84
	.btn:hover{
85
  		color: grey;
86
  		text-decoration: none;
87
	}
88
	.btn-primary:hover{
89
  		color: grey;
90
  		text-decoration: none;
91
	}
92
	.sale-details{
93
		cursor:pointer;
94
	}
95
 
96
	.popover {
97
		min-width:18%;
98
	}
99
	.fa-2x {
100
		font-size:1.4em;
101
	}
102
	.cover {
103
	  object-fit: cover;
104
	  width: 100%;
105
	  height: 90px;
106
	  padding: 8px;
107
	}
108
	.info-box .notifications i {
109
    display: inline-block;
110
    margin-top:0px;
111
    height: 25px;
112
    font-size: 16px;
113
    line-height: 25px;
114
    width: 25px;
115
    float: none;
116
    text-align: center;
117
    padding-right: 0px;
118
    color:#768399;
119
  }
120
 
121
	#preview {
122
	  position: relative;
123
	  color: #fff;
124
	  float: left;
125
	  width: 100%;
126
	  -webkit-border-radius: 10px;
127
	  -moz-border-radius: 10px;
128
	  border-radius: 10px;
129
	  clear: both;
130
	}
131
	#canvas-preview{
132
	  width: 100%;
133
	  position: relative;
134
	  top:-15px;
135
	}
136
	#preview-textfield{
137
	  position: absolute; top: -10px; left: 0; right: 0;
138
	  text-align: center; font-size: 2em; font-weight: bold;
139
	  color: white; font-family: 'Amaranth', sans-serif;
140
	}
141
 
142
 
143
	</style>
26418 tejbeer 144
	<script type="text/javascript">
145
	function getAuthUser(authId){
146
 
26473 amit.gupta 147
		doGetAjaxRequestHandler(context + "/getAuthUserPartners?authId="+authId,
26418 tejbeer 148
			function(response) {
149
				$('#' + "main-content").html(response);
150
				console.log(response)
151
			});
152
	}
27509 tejbeer 153
 
154
		function getWarehouseBrandStock(warehouseId){
155
 
156
		doGetAjaxRequestHandler(context + "/getWarehouseWiseBrandStock?warehouseId="+warehouseId,
157
			function(response) {
158
				$('#' + "main-content").html(response);
159
				console.log(response)
160
			});
161
	}
26418 tejbeer 162
	</script>
163
 
26010 amit.gupta 164
  </head>
165
 
166
  <body style="zoom:90%;background-color:#f7f7f7">
167
  <!--<div class="loading"><img src="resources/images/icons/loading.gif"></div>-->
168
  <!-- container section start -->
169
  <section id="container">
170
 
171
 
172
      <header class="header dark-bg">
173
            <div class="toggle-nav">
174
                <div class="icon-reorder tooltips" data-original-title="Toggle Navigation" data-placement="bottom"><i class="icon_menu"></i></div>
175
            </div>
176
            <div class="top-nav notification-row">
177
                <!-- notificatoin dropdown start-->
178
                <ul class="nav pull-right top-menu">
179
                    <!-- user login dropdown start-->
180
                    <li class="dropdown">
181
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
182
                            <span class="profile-ava">
183
                                <img class="avatar-custom" id="photo" alt="" src="">
184
                            </span>
185
                            <span class="username" id="fofo_name"></span>
186
                            <b class="caret"></b>
187
                        </a>
188
                        <ul class="dropdown-menu extended logout">
189
                            <div class="log-arrow-up"></div>
190
                            <li class="eborder-top">
191
                                <a class="change-auth-user-password" href="javascript:void(0);"><i class=""></i>Change Password</a>
192
                            </li>
193
                            <li>
194
                                <a href="${rc.contextPath}/logout"><i class="icon_key_alt" id = "logout"></i> Log Out</a>
195
                            </li>
196
                        </ul>
197
                    </li>
198
                    <!-- user login dropdown end -->
199
                </ul>
200
                <!-- notificatoin dropdown end-->
201
            </div>
202
      </header>      
203
      <!--header end-->
204
 
205
      <!--sidebar start-->
206
      <aside>
207
          <div id="sidebar"  class="nav-collapse ">
208
              <!-- sidebar menu start-->
209
              <ul class="sidebar-menu">                
210
              	  <li class="active">
211
                      <a class="" href="${rc.contextPath}/dashboard">
212
                          <i class="icon_house_alt"></i>
213
                          <span>Dashboard</span>
214
                      </a>
215
                  </li>
26512 amit.gupta 216
                  <li><a class="product-compare-info" href="javascript:void(0);">Product Compare</a></li>
26740 amit.gupta 217
                  <li><a class="web-listing" href="javascript:void(0);">Web Listing</a></li>
26958 tejbeer 218
                  <li><a class="banner-listing" href="javascript:void(0);">Banner Listing</a></li>
26014 amit.gupta 219
                  #foreach($menuItem in $menu)
220
		            <li class="sub-menu">
221
		              <a href="javascript:;" class="">
222
	                       <i class="icon_document_alt"></i>
223
	                       <span>$menuItem.getDisplayText()</span>
224
	                       <span class="menu-arrow arrow_carrot-right"></span>
225
		              </a>
226
					  <ul class="sub">
227
					  #foreach($subMenu in $menuItem.getSubMenus())
228
						  <li><a class="$subMenu.getActionClass()" href="javascript:void(0);">$subMenu.getDisplayText()</a></li>
229
					  #end
230
					</ul>
231
		           	</li>
26010 amit.gupta 232
                  #end
233
              </ul>
234
              <!-- sidebar menu end-->
235
          </div>
236
      </aside>
237
      <!--sidebar end-->
238
 
239
	<!--main content start-->
240
	<section id="main-content">
241
		<section class="wrapper">
242
          	<!--overview start-->
243
			<div class="row">
244
				<div class="col-lg-12">
245
					<h3 class="page-header"><i class="fa fa-laptop"></i> Dashboard</h3>
246
					<ol class="breadcrumb">
247
						<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
248
						<li><i class="fa fa-laptop"></i>Dashboard</li>						  	
249
					</ol>
250
				</div>
251
			</div>
252
			<!-- overview end -->
26418 tejbeer 253
 
26468 amit.gupta 254
			    #if($authIdAndallValues)
26418 tejbeer 255
				<div class="row">
256
 
257
					<div class="col-lg-6">
258
				 <table class="table table-striped table-advance table-hover">
259
	    			<tbody>
260
	    				<tr>
261
	    				<th>Sale Head</th>
26472 amit.gupta 262
	    				<th>Total Partners</th>
26418 tejbeer 263
	    				<th>lmtd</th>
264
	    				<th>mtd</th>
265
	    				<th>Hygiene</th>
27333 amit.gupta 266
	    				<th>Tickets</th>
267
	    				<th>Leads</th>
268
	    				<!--<th>In Stock Investment</th>
269
	    				<th>Total Investment</th>-->
26418 tejbeer 270
	    				</tr>
26460 amit.gupta 271
	    				#foreach($name in $authIdAndallValues.keySet())
26418 tejbeer 272
	    				<tr onclick="getAuthUser($name)">
26468 amit.gupta 273
	    	 		     <td>$authIdAndAuthUserMap.get($name).getFirstName() $authIdAndAuthUserMap.get($name).getLastName()</td>
274
	    	 		     <td>$authIdAndallValues.get($name).getCount()</td>
26418 tejbeer 275
	    	 		     <td class="currency">$authIdAndallValues.get($name).getLmtd()</td>
276
	    	 		     <td class="currency">$authIdAndallValues.get($name).getMtd()</td>
26460 amit.gupta 277
	    	 		     <td>$authIdAndallValues.get($name).getHygienePercentage()</td>
27333 amit.gupta 278
	    	 		     <td>$authIdAndallValues.get($name).getTicket()</td>
279
	    	 		     <td>$authIdAndallValues.get($name).getLeads()</td>
280
	    	 		     <!--<td class="currency">$authIdAndallValues.get($name).getInvestment().getInStockAmount()</td>
281
	    	 		     <td class="currency">$authIdAndallValues.get($name).getInvestment().getTotalInvestment()</td>-->
26418 tejbeer 282
 
283
	    				</tr>
284
	    				 #end
285
 
286
	    		    </tbody>
287
	    		</table>
288
						</div>
289
 
290
						<div class="col-lg-4">
291
						 <table class="table table-striped table-advance table-hover">
292
	    			<tbody>
293
	    				<tr>
27333 amit.gupta 294
	    				<th>W/H Location</th>
295
	    				<th>Total Stock</th>
296
	    				<th>Total Value</th>
26418 tejbeer 297
	    				</tr>
27509 tejbeer 298
	    				#foreach($key in $warehouseMap.keySet())
299
 
300
	    				<tr onclick="getWarehouseBrandStock($warehouseStockMap.get($key).getWarehouseId())">
301
	    					<td>$warehouseMap.get($key)</td>
302
	    					#if($warehouseStockMap.get($key).getStockQty())
303
	    					<td>$warehouseStockMap.get($key).getStockQty()</td>
304
	    					<td class="currency">$warehouseStockMap.get($key).getStockValue()</td>
305
	    					#else
306
	    					<td>0</td>
307
	    					<td>0</td>
308
	    					#end
309
 
310
 
311
 
26418 tejbeer 312
		                  </tr>
27509 tejbeer 313
 
26418 tejbeer 314
	    				 #end
315
 
316
 
317
	    		    </tbody>
318
	    		</table>
319
 
320
			 </div>
321
			</div>
322
 
323
			#end
324
 
26010 amit.gupta 325
			<div class="row">
26063 amit.gupta 326
				<div class="col-lg-6">
327
					<div class="row col-lg-4">
328
						<h3 style="margin-top:-2px;margin-bottom:24px"><strong>Reports</strong></h3>
26010 amit.gupta 329
					</div>
26063 amit.gupta 330
					<div class="row col-lg-12 info-box white-bg">
26214 amit.gupta 331
						<table class="table table-striped reports-table" style="display:none">
26063 amit.gupta 332
						    <tbody>
333
					    		<div class="list-group">
334
					            #foreach($reporticoProjectEntry in $reporticoProjectMap.entrySet())
335
						            #foreach($reporticoUrlInfo in $reporticoProjectEntry.getValue())
336
										  <a href="${rc.contextPath}/reports/${reporticoProjectEntry.getKey()}${reporticoUrlInfo.getUrl()}" class="list-group-item"
337
											  #if($reporticoUrlInfo.getParamsList())
338
											  data-paramslist="$vmUtils.htmlJson($reporticoUrlInfo.getParamsList())"
339
											  #end
340
										  >
341
										    <h4 class="list-group-item-heading">$reporticoUrlInfo.getTitle()</h4>
342
										    <p class="list-group-item-text">$reporticoUrlInfo.getDescription()</p>
343
										  </a>
344
 
345
					    			#end
346
				    			#end
347
								</div>
348
						    </tbody>
349
						</table>
350
 
351
					</div>
352
				</div>
353
				<div class="col-lg-6">
354
					<div class="row col-lg-12 info-box white-bg">
355
						<div class="col-lg-4">
356
						<h3 style="margin-top:-2px;margin-bottom:24px"><strong>My Messages</strong>
357
						</h3>
26010 amit.gupta 358
						</div>
26063 amit.gupta 359
						<div class="col-lg-4">
360
							<div class="btn-group message-filter"> 
361
								<button data-messagetype="notification" type="button" class="btn btn-default" aria-label="Notifications" title="Notifications">
362
								<span class="glyphicon glyphicon-bell" aria-hidden="true"></span></button> 
363
								<button data-messagetype="announcement" type="button" class="btn btn-default" aria-label="Announcements" title="Announcements">
364
								<span class="glyphicon glyphicon-bullhorn" aria-hidden="true"></span></button> 
365
								<button data-messagetype="scheme" type="button" class="btn btn-default" aria-label="SmartDukaan Schemes" title="SmartDukaan Schemes">
366
									<span class="glyphicon glyphicon-tags" aria-hidden="true"></span>
367
								</button>
26446 tejbeer 368
								<button data-messagetype="marketing" type="button" class="btn btn-default" aria-label="SmartDukaan Schemes" title="SmartDukaan Schemes">
369
								 <span class="glyphicon glyphicon-picture" aria-hidden="true"></span>
370
							</button>
26063 amit.gupta 371
							</div>
372
						</div>
373
				    	<div class="col-lg-12 row notification-container" style="max-height: 500px;overflow-y: scroll;">
374
						</div>
26010 amit.gupta 375
					</div>
376
				</div>
377
			</div>
378
		</section>
379
    	<div class="text-center">
380
          <div class="credits">
381
          	<p>All rights reserved.&copy;2017, Smart Dukaan</p>
382
          </div>
383
		</div>
384
	</section>
385
 
386
	<script type="text/javascript">
387
		context="${rc.contextPath}";
388
		webApiScheme="$webApiScheme";
389
		webApiRoot="$webApiRoot";
390
		webApiHost="$webApiHost";
391
		webApiPort="$webApiPort";
26287 amit.gupta 392
		#if($authId)
26286 amit.gupta 393
			retailers = $retailers;
394
			warehouses = $warehouses;
26287 amit.gupta 395
	        authId = $authId;
26286 amit.gupta 396
		#end
26010 amit.gupta 397
	</script>
398
	#parse("include-scripts.vm")
399
 
400
  <script>
401
 
402
      //knob
403
      $(function() {
404
        /*$(".knob").knob({
405
          'draw' : function () { 
406
            $(this.i).val(this.cv + '%')
407
          }
408
        });*/
409
        $.fn.dataTable.moment( 'DD/MM/YYYY' );
410
        $.fn.dataTable.moment( 'DD/MM/YYYY hh:mm' );
411
        $('.currency').each(function(index, ele) {
412
			if (!isNaN(parseInt($(ele).html()))) {
413
				$(ele).html(numberToComma($(ele).html()));
414
			}
415
		});
416
      });
417
 
418
      $(function() {
419
    	 	var profile = localStorage.getItem('profile');
420
    	 	if (profile){
421
    			$("#photo").attr("src",JSON.parse(profile).image_url);
422
    			$("#fofo_name").text(JSON.parse(profile).name);
423
    	 	}
424
    	 	else{
425
    	 		$("#photo").attr("src","");
426
    			$("#fofo_name").text("Welcome, User");
427
    	 	}
428
    });
429
 
430
 
431
 
432
	$(function(){
433
		dateRangeCallback(moment(),moment());
434
		loaderDialogObj = bootbox.dialog({
435
		    message: '<div class="container text-center"><i class="fa fa-spin fa-spinner"></i>Loading...</div>',
27341 amit.gupta 436
		    show: false	
26010 amit.gupta 437
		});
438
	});
26062 tejbeer 439
 
26166 amit.gupta 440
	$(document).ready(function(){
26062 tejbeer 441
		 $('div.message-filter').on('click', 'button', function() {
442
			messageType = $(this).data("messagetype");
443
			if($(this).hasClass('btn-pressed')) {
444
				messageType="";
445
				$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
446
			} else {
447
				$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
448
				$(this).addClass('btn-pressed').removeClass('btn-default');
449
			}
450
			notifyTypeChange(messageType);
451
		});
452
		notifyTypeChange("");
26166 amit.gupta 453
	});
26062 tejbeer 454
 
26166 amit.gupta 455
	/*$(function(){
26062 tejbeer 456
		messageType = $(this).data("messagetype");
457
		if($(this).hasClass('btn-pressed')) {
458
			messageType="";
459
			$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
460
		} else {
461
			$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
462
			$(this).addClass('btn-pressed').removeClass('btn-default');
463
		}
464
		notifyTypeChange(messageType);
26166 amit.gupta 465
	});*/
26010 amit.gupta 466
</script>
26318 tejbeer 467
	<div id="report-modal" class="modal" role="dialog" data-backdrop="static" data-keyboard="false">
26063 amit.gupta 468
		<div class="modal-dialog">
469
 
470
		    <!-- Modal content-->
471
		    <div class="modal-content">
472
		      <div class="modal-header">
473
		        <button type="button" class="close" data-dismiss="modal">&times;</button>
474
		        <h4 class="modal-title"></h4>
475
		      </div>
476
		      <div class="modal-body">
477
			  </div>
478
			  <div class="modal-footer">
479
		        <button type="button" data-dismiss="modal" class="btn btn-default download-report">Download</button>
480
		      </div>
481
	    	</div>
482
		</div>
483
	</div>
26010 amit.gupta 484
 
485
  </body>
486
</html>