Subversion Repositories SmartDukaan

Rev

Rev 27529 | Rev 27545 | 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
	}
27529 tejbeer 162
 
163
 
164
</script>
165
 
166
 
167
<script type="text/javascript">
168
	function getWarehouseWiseData(){
169
	console.log("Hello")
170
		doGetAjaxRequestHandler(context + "/getWarehouseWiseData",
171
			function(response) {
172
				$('#' + "main-content").html(response);
173
				console.log(response)
174
				if(response == 'true'){
175
				console.log("hello 2")
176
 
177
				  window.location.href = $('.dashboardload').attr('href');
178
				 }
179
			});
180
	}
181
 
26418 tejbeer 182
 
27529 tejbeer 183
</script>
184
 
185
 
186
 
26010 amit.gupta 187
  </head>
188
 
189
  <body style="zoom:90%;background-color:#f7f7f7">
190
  <!--<div class="loading"><img src="resources/images/icons/loading.gif"></div>-->
191
  <!-- container section start -->
192
  <section id="container">
193
 
194
 
195
      <header class="header dark-bg">
196
            <div class="toggle-nav">
197
                <div class="icon-reorder tooltips" data-original-title="Toggle Navigation" data-placement="bottom"><i class="icon_menu"></i></div>
198
            </div>
199
            <div class="top-nav notification-row">
200
                <!-- notificatoin dropdown start-->
201
                <ul class="nav pull-right top-menu">
202
                    <!-- user login dropdown start-->
203
                    <li class="dropdown">
204
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
205
                            <span class="profile-ava">
206
                                <img class="avatar-custom" id="photo" alt="" src="">
207
                            </span>
208
                            <span class="username" id="fofo_name"></span>
209
                            <b class="caret"></b>
210
                        </a>
211
                        <ul class="dropdown-menu extended logout">
212
                            <div class="log-arrow-up"></div>
213
                            <li class="eborder-top">
214
                                <a class="change-auth-user-password" href="javascript:void(0);"><i class=""></i>Change Password</a>
215
                            </li>
216
                            <li>
217
                                <a href="${rc.contextPath}/logout"><i class="icon_key_alt" id = "logout"></i> Log Out</a>
218
                            </li>
219
                        </ul>
220
                    </li>
221
                    <!-- user login dropdown end -->
222
                </ul>
223
                <!-- notificatoin dropdown end-->
224
            </div>
225
      </header>      
226
      <!--header end-->
227
 
228
      <!--sidebar start-->
229
      <aside>
230
          <div id="sidebar"  class="nav-collapse ">
231
              <!-- sidebar menu start-->
232
              <ul class="sidebar-menu">                
233
              	  <li class="active">
27529 tejbeer 234
                      <a class="dashboardload" href="${rc.contextPath}/dashboard">
26010 amit.gupta 235
                          <i class="icon_house_alt"></i>
236
                          <span>Dashboard</span>
237
                      </a>
238
                  </li>
26512 amit.gupta 239
                  <li><a class="product-compare-info" href="javascript:void(0);">Product Compare</a></li>
26740 amit.gupta 240
                  <li><a class="web-listing" href="javascript:void(0);">Web Listing</a></li>
26958 tejbeer 241
                  <li><a class="banner-listing" href="javascript:void(0);">Banner Listing</a></li>
27520 amit.gupta 242
                  <li><a class="published-schemes" href="javascript:void(0);">Published Offers</a></li>
243
                  <li><a class="view-invoices" href="javascript:void(0);">View Invoices</a></li>
26014 amit.gupta 244
                  #foreach($menuItem in $menu)
245
		            <li class="sub-menu">
246
		              <a href="javascript:;" class="">
247
	                       <i class="icon_document_alt"></i>
248
	                       <span>$menuItem.getDisplayText()</span>
249
	                       <span class="menu-arrow arrow_carrot-right"></span>
250
		              </a>
251
					  <ul class="sub">
252
					  #foreach($subMenu in $menuItem.getSubMenus())
253
						  <li><a class="$subMenu.getActionClass()" href="javascript:void(0);">$subMenu.getDisplayText()</a></li>
254
					  #end
255
					</ul>
256
		           	</li>
26010 amit.gupta 257
                  #end
258
              </ul>
259
              <!-- sidebar menu end-->
260
          </div>
261
      </aside>
262
      <!--sidebar end-->
263
 
264
	<!--main content start-->
265
	<section id="main-content">
266
		<section class="wrapper">
267
          	<!--overview start-->
268
			<div class="row">
269
				<div class="col-lg-12">
270
					<h3 class="page-header"><i class="fa fa-laptop"></i> Dashboard</h3>
271
					<ol class="breadcrumb">
272
						<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
273
						<li><i class="fa fa-laptop"></i>Dashboard</li>						  	
274
					</ol>
275
				</div>
276
			</div>
277
			<!-- overview end -->
26418 tejbeer 278
 
26468 amit.gupta 279
			    #if($authIdAndallValues)
26418 tejbeer 280
				<div class="row">
281
 
282
					<div class="col-lg-6">
283
				 <table class="table table-striped table-advance table-hover">
284
	    			<tbody>
285
	    				<tr>
286
	    				<th>Sale Head</th>
26472 amit.gupta 287
	    				<th>Total Partners</th>
26418 tejbeer 288
	    				<th>lmtd</th>
289
	    				<th>mtd</th>
290
	    				<th>Hygiene</th>
27333 amit.gupta 291
	    				<th>Tickets</th>
292
	    				<th>Leads</th>
293
	    				<!--<th>In Stock Investment</th>
294
	    				<th>Total Investment</th>-->
26418 tejbeer 295
	    				</tr>
26460 amit.gupta 296
	    				#foreach($name in $authIdAndallValues.keySet())
26418 tejbeer 297
	    				<tr onclick="getAuthUser($name)">
26468 amit.gupta 298
	    	 		     <td>$authIdAndAuthUserMap.get($name).getFirstName() $authIdAndAuthUserMap.get($name).getLastName()</td>
299
	    	 		     <td>$authIdAndallValues.get($name).getCount()</td>
26418 tejbeer 300
	    	 		     <td class="currency">$authIdAndallValues.get($name).getLmtd()</td>
301
	    	 		     <td class="currency">$authIdAndallValues.get($name).getMtd()</td>
26460 amit.gupta 302
	    	 		     <td>$authIdAndallValues.get($name).getHygienePercentage()</td>
27333 amit.gupta 303
	    	 		     <td>$authIdAndallValues.get($name).getTicket()</td>
304
	    	 		     <td>$authIdAndallValues.get($name).getLeads()</td>
305
	    	 		     <!--<td class="currency">$authIdAndallValues.get($name).getInvestment().getInStockAmount()</td>
306
	    	 		     <td class="currency">$authIdAndallValues.get($name).getInvestment().getTotalInvestment()</td>-->
26418 tejbeer 307
 
308
	    				</tr>
309
	    				 #end
310
 
311
	    		    </tbody>
312
	    		</table>
313
						</div>
314
 
27529 tejbeer 315
				<div class="col-lg-4">
316
 
317
				<div style="float:right"> <span style="margin-right:10px">Last Fetch :- $reporticoDate.getLastCreatedTimestamp().format($dateTimeFormatter)</span><button class="btn btn-primary fetchWarehouseData"  onclick="getWarehouseWiseData()" type="button">Fetch</button>
318
						     </div>
319
				<table class="table table-striped table-advance table-hover">
26418 tejbeer 320
	    			<tbody>
321
	    				<tr>
27333 amit.gupta 322
	    				<th>W/H Location</th>
323
	    				<th>Total Stock</th>
324
	    				<th>Total Value</th>
27529 tejbeer 325
	    				<th>Pending Indent</th>
27541 tejbeer 326
	    				<th>Tertiary</th>
26418 tejbeer 327
	    				</tr>
27509 tejbeer 328
	    				#foreach($key in $warehouseMap.keySet())
329
 
330
	    				<tr onclick="getWarehouseBrandStock($warehouseStockMap.get($key).getWarehouseId())">
331
	    					<td>$warehouseMap.get($key)</td>
332
	    					#if($warehouseStockMap.get($key).getStockQty())
333
	    					<td>$warehouseStockMap.get($key).getStockQty()</td>
334
	    					<td class="currency">$warehouseStockMap.get($key).getStockValue()</td>
335
	    					#else
336
	    					<td>0</td>
337
	    					<td>0</td>
338
	    					#end
27529 tejbeer 339
	    					#if($warehouseStockMap.get($key).getPendingIndent())
340
	    				    <td>$warehouseStockMap.get($key).getPendingIndent()</td>
341
	    				    #else
342
	    				    <td>0</td>
343
	    					#end
27509 tejbeer 344
 
27541 tejbeer 345
	    					<td>$warehouseStockMap.get($key).getTertiary()</td>
346
 
27509 tejbeer 347
 
348
 
27541 tejbeer 349
 
26418 tejbeer 350
		                  </tr>
27509 tejbeer 351
 
26418 tejbeer 352
	    				 #end
353
 
354
 
355
	    		    </tbody>
356
	    		</table>
357
 
358
			 </div>
359
			</div>
360
 
361
			#end
362
 
26010 amit.gupta 363
			<div class="row">
26063 amit.gupta 364
				<div class="col-lg-6">
365
					<div class="row col-lg-4">
366
						<h3 style="margin-top:-2px;margin-bottom:24px"><strong>Reports</strong></h3>
26010 amit.gupta 367
					</div>
26063 amit.gupta 368
					<div class="row col-lg-12 info-box white-bg">
26214 amit.gupta 369
						<table class="table table-striped reports-table" style="display:none">
26063 amit.gupta 370
						    <tbody>
371
					    		<div class="list-group">
372
					            #foreach($reporticoProjectEntry in $reporticoProjectMap.entrySet())
373
						            #foreach($reporticoUrlInfo in $reporticoProjectEntry.getValue())
374
										  <a href="${rc.contextPath}/reports/${reporticoProjectEntry.getKey()}${reporticoUrlInfo.getUrl()}" class="list-group-item"
375
											  #if($reporticoUrlInfo.getParamsList())
376
											  data-paramslist="$vmUtils.htmlJson($reporticoUrlInfo.getParamsList())"
377
											  #end
378
										  >
379
										    <h4 class="list-group-item-heading">$reporticoUrlInfo.getTitle()</h4>
380
										    <p class="list-group-item-text">$reporticoUrlInfo.getDescription()</p>
381
										  </a>
382
 
383
					    			#end
384
				    			#end
385
								</div>
386
						    </tbody>
387
						</table>
388
 
389
					</div>
390
				</div>
391
				<div class="col-lg-6">
392
					<div class="row col-lg-12 info-box white-bg">
393
						<div class="col-lg-4">
394
						<h3 style="margin-top:-2px;margin-bottom:24px"><strong>My Messages</strong>
395
						</h3>
26010 amit.gupta 396
						</div>
26063 amit.gupta 397
						<div class="col-lg-4">
398
							<div class="btn-group message-filter"> 
399
								<button data-messagetype="notification" type="button" class="btn btn-default" aria-label="Notifications" title="Notifications">
400
								<span class="glyphicon glyphicon-bell" aria-hidden="true"></span></button> 
401
								<button data-messagetype="announcement" type="button" class="btn btn-default" aria-label="Announcements" title="Announcements">
402
								<span class="glyphicon glyphicon-bullhorn" aria-hidden="true"></span></button> 
403
								<button data-messagetype="scheme" type="button" class="btn btn-default" aria-label="SmartDukaan Schemes" title="SmartDukaan Schemes">
404
									<span class="glyphicon glyphicon-tags" aria-hidden="true"></span>
405
								</button>
26446 tejbeer 406
								<button data-messagetype="marketing" type="button" class="btn btn-default" aria-label="SmartDukaan Schemes" title="SmartDukaan Schemes">
407
								 <span class="glyphicon glyphicon-picture" aria-hidden="true"></span>
408
							</button>
26063 amit.gupta 409
							</div>
410
						</div>
411
				    	<div class="col-lg-12 row notification-container" style="max-height: 500px;overflow-y: scroll;">
412
						</div>
26010 amit.gupta 413
					</div>
414
				</div>
415
			</div>
416
		</section>
417
    	<div class="text-center">
418
          <div class="credits">
419
          	<p>All rights reserved.&copy;2017, Smart Dukaan</p>
420
          </div>
421
		</div>
422
	</section>
423
 
424
	<script type="text/javascript">
425
		context="${rc.contextPath}";
426
		webApiScheme="$webApiScheme";
427
		webApiRoot="$webApiRoot";
428
		webApiHost="$webApiHost";
429
		webApiPort="$webApiPort";
26287 amit.gupta 430
		#if($authId)
26286 amit.gupta 431
			retailers = $retailers;
432
			warehouses = $warehouses;
26287 amit.gupta 433
	        authId = $authId;
26286 amit.gupta 434
		#end
26010 amit.gupta 435
	</script>
436
	#parse("include-scripts.vm")
437
 
438
  <script>
439
 
440
      //knob
441
      $(function() {
442
        /*$(".knob").knob({
443
          'draw' : function () { 
444
            $(this.i).val(this.cv + '%')
445
          }
446
        });*/
447
        $.fn.dataTable.moment( 'DD/MM/YYYY' );
448
        $.fn.dataTable.moment( 'DD/MM/YYYY hh:mm' );
449
        $('.currency').each(function(index, ele) {
450
			if (!isNaN(parseInt($(ele).html()))) {
451
				$(ele).html(numberToComma($(ele).html()));
452
			}
453
		});
454
      });
455
 
456
      $(function() {
457
    	 	var profile = localStorage.getItem('profile');
458
    	 	if (profile){
459
    			$("#photo").attr("src",JSON.parse(profile).image_url);
460
    			$("#fofo_name").text(JSON.parse(profile).name);
461
    	 	}
462
    	 	else{
463
    	 		$("#photo").attr("src","");
464
    			$("#fofo_name").text("Welcome, User");
465
    	 	}
466
    });
467
 
468
 
469
 
470
	$(function(){
471
		dateRangeCallback(moment(),moment());
472
		loaderDialogObj = bootbox.dialog({
473
		    message: '<div class="container text-center"><i class="fa fa-spin fa-spinner"></i>Loading...</div>',
27341 amit.gupta 474
		    show: false	
26010 amit.gupta 475
		});
476
	});
26062 tejbeer 477
 
26166 amit.gupta 478
	$(document).ready(function(){
26062 tejbeer 479
		 $('div.message-filter').on('click', 'button', function() {
480
			messageType = $(this).data("messagetype");
481
			if($(this).hasClass('btn-pressed')) {
482
				messageType="";
483
				$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
484
			} else {
485
				$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
486
				$(this).addClass('btn-pressed').removeClass('btn-default');
487
			}
488
			notifyTypeChange(messageType);
489
		});
490
		notifyTypeChange("");
26166 amit.gupta 491
	});
26062 tejbeer 492
 
26166 amit.gupta 493
	/*$(function(){
26062 tejbeer 494
		messageType = $(this).data("messagetype");
495
		if($(this).hasClass('btn-pressed')) {
496
			messageType="";
497
			$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
498
		} else {
499
			$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
500
			$(this).addClass('btn-pressed').removeClass('btn-default');
501
		}
502
		notifyTypeChange(messageType);
26166 amit.gupta 503
	});*/
26010 amit.gupta 504
</script>
26318 tejbeer 505
	<div id="report-modal" class="modal" role="dialog" data-backdrop="static" data-keyboard="false">
26063 amit.gupta 506
		<div class="modal-dialog">
507
 
508
		    <!-- Modal content-->
509
		    <div class="modal-content">
510
		      <div class="modal-header">
511
		        <button type="button" class="close" data-dismiss="modal">&times;</button>
512
		        <h4 class="modal-title"></h4>
513
		      </div>
514
		      <div class="modal-body">
515
			  </div>
516
			  <div class="modal-footer">
517
		        <button type="button" data-dismiss="modal" class="btn btn-default download-report">Download</button>
518
		      </div>
519
	    	</div>
520
		</div>
521
	</div>
26010 amit.gupta 522
 
523
  </body>
524
</html>