Subversion Repositories SmartDukaan

Rev

Rev 27541 | Rev 27548 | 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">
27545 tejbeer 145
	function getWarehousePartners(warehouseId){
26418 tejbeer 146
 
27545 tejbeer 147
		doGetAjaxRequestHandler(context + "/getWarehousePartners?warehouseId="+warehouseId,
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>
27545 tejbeer 286
	    				<th>W/H Location</th>
287
	    				<th>Partners</th>
288
                         <th>lmtd</th>
289
	    				 <th>mtd</th>
290
	    				 <th>Tickets</th>
26418 tejbeer 291
	    				</tr>
27545 tejbeer 292
	    				#foreach($name in $warehousePartnerDetailMap.keySet())
293
	    				<tr onclick="getWarehousePartners($name)">
294
	    	 		     <td>$warehouseMap.get($name)</td>
295
	    	 		     <td>$warehousePartnerDetailMap.get($name).getCount()</td>
296
	    	 		     <td class="currency">$warehousePartnerDetailMap.get($name).getLmtd()</td>
297
	    	 		     <td class="currency">$warehousePartnerDetailMap.get($name).getMtd()</td>
298
 
299
	    	 		     <td>$warehousePartnerDetailMap.get($name).getTicket()</td>
300
 
301
	    	 		   </tr>
26418 tejbeer 302
	    				 #end
303
 
304
	    		    </tbody>
305
	    		</table>
306
						</div>
307
 
27529 tejbeer 308
				<div class="col-lg-4">
309
 
310
				<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>
311
						     </div>
312
				<table class="table table-striped table-advance table-hover">
26418 tejbeer 313
	    			<tbody>
314
	    				<tr>
27333 amit.gupta 315
	    				<th>W/H Location</th>
316
	    				<th>Total Stock</th>
317
	    				<th>Total Value</th>
27529 tejbeer 318
	    				<th>Pending Indent</th>
27541 tejbeer 319
	    				<th>Tertiary</th>
26418 tejbeer 320
	    				</tr>
27509 tejbeer 321
	    				#foreach($key in $warehouseMap.keySet())
322
 
323
	    				<tr onclick="getWarehouseBrandStock($warehouseStockMap.get($key).getWarehouseId())">
324
	    					<td>$warehouseMap.get($key)</td>
325
	    					#if($warehouseStockMap.get($key).getStockQty())
326
	    					<td>$warehouseStockMap.get($key).getStockQty()</td>
327
	    					<td class="currency">$warehouseStockMap.get($key).getStockValue()</td>
328
	    					#else
329
	    					<td>0</td>
330
	    					<td>0</td>
331
	    					#end
27529 tejbeer 332
	    					#if($warehouseStockMap.get($key).getPendingIndent())
333
	    				    <td>$warehouseStockMap.get($key).getPendingIndent()</td>
334
	    				    #else
335
	    				    <td>0</td>
336
	    					#end
27509 tejbeer 337
 
27541 tejbeer 338
	    					<td>$warehouseStockMap.get($key).getTertiary()</td>
339
 
27509 tejbeer 340
 
341
 
27541 tejbeer 342
 
26418 tejbeer 343
		                  </tr>
27509 tejbeer 344
 
26418 tejbeer 345
	    				 #end
346
 
347
 
348
	    		    </tbody>
349
	    		</table>
350
 
351
			 </div>
352
			</div>
353
 
354
			#end
355
 
26010 amit.gupta 356
			<div class="row">
26063 amit.gupta 357
				<div class="col-lg-6">
358
					<div class="row col-lg-4">
359
						<h3 style="margin-top:-2px;margin-bottom:24px"><strong>Reports</strong></h3>
26010 amit.gupta 360
					</div>
26063 amit.gupta 361
					<div class="row col-lg-12 info-box white-bg">
26214 amit.gupta 362
						<table class="table table-striped reports-table" style="display:none">
26063 amit.gupta 363
						    <tbody>
364
					    		<div class="list-group">
365
					            #foreach($reporticoProjectEntry in $reporticoProjectMap.entrySet())
366
						            #foreach($reporticoUrlInfo in $reporticoProjectEntry.getValue())
367
										  <a href="${rc.contextPath}/reports/${reporticoProjectEntry.getKey()}${reporticoUrlInfo.getUrl()}" class="list-group-item"
368
											  #if($reporticoUrlInfo.getParamsList())
369
											  data-paramslist="$vmUtils.htmlJson($reporticoUrlInfo.getParamsList())"
370
											  #end
371
										  >
372
										    <h4 class="list-group-item-heading">$reporticoUrlInfo.getTitle()</h4>
373
										    <p class="list-group-item-text">$reporticoUrlInfo.getDescription()</p>
374
										  </a>
375
 
376
					    			#end
377
				    			#end
378
								</div>
379
						    </tbody>
380
						</table>
381
 
382
					</div>
383
				</div>
384
				<div class="col-lg-6">
385
					<div class="row col-lg-12 info-box white-bg">
386
						<div class="col-lg-4">
387
						<h3 style="margin-top:-2px;margin-bottom:24px"><strong>My Messages</strong>
388
						</h3>
26010 amit.gupta 389
						</div>
26063 amit.gupta 390
						<div class="col-lg-4">
391
							<div class="btn-group message-filter"> 
392
								<button data-messagetype="notification" type="button" class="btn btn-default" aria-label="Notifications" title="Notifications">
393
								<span class="glyphicon glyphicon-bell" aria-hidden="true"></span></button> 
394
								<button data-messagetype="announcement" type="button" class="btn btn-default" aria-label="Announcements" title="Announcements">
395
								<span class="glyphicon glyphicon-bullhorn" aria-hidden="true"></span></button> 
396
								<button data-messagetype="scheme" type="button" class="btn btn-default" aria-label="SmartDukaan Schemes" title="SmartDukaan Schemes">
397
									<span class="glyphicon glyphicon-tags" aria-hidden="true"></span>
398
								</button>
26446 tejbeer 399
								<button data-messagetype="marketing" type="button" class="btn btn-default" aria-label="SmartDukaan Schemes" title="SmartDukaan Schemes">
400
								 <span class="glyphicon glyphicon-picture" aria-hidden="true"></span>
401
							</button>
26063 amit.gupta 402
							</div>
403
						</div>
404
				    	<div class="col-lg-12 row notification-container" style="max-height: 500px;overflow-y: scroll;">
405
						</div>
26010 amit.gupta 406
					</div>
407
				</div>
408
			</div>
409
		</section>
410
    	<div class="text-center">
411
          <div class="credits">
412
          	<p>All rights reserved.&copy;2017, Smart Dukaan</p>
413
          </div>
414
		</div>
415
	</section>
416
 
417
	<script type="text/javascript">
418
		context="${rc.contextPath}";
419
		webApiScheme="$webApiScheme";
420
		webApiRoot="$webApiRoot";
421
		webApiHost="$webApiHost";
422
		webApiPort="$webApiPort";
26287 amit.gupta 423
		#if($authId)
26286 amit.gupta 424
			retailers = $retailers;
425
			warehouses = $warehouses;
26287 amit.gupta 426
	        authId = $authId;
26286 amit.gupta 427
		#end
26010 amit.gupta 428
	</script>
429
	#parse("include-scripts.vm")
430
 
431
  <script>
432
 
433
      //knob
434
      $(function() {
435
        /*$(".knob").knob({
436
          'draw' : function () { 
437
            $(this.i).val(this.cv + '%')
438
          }
439
        });*/
440
        $.fn.dataTable.moment( 'DD/MM/YYYY' );
441
        $.fn.dataTable.moment( 'DD/MM/YYYY hh:mm' );
442
        $('.currency').each(function(index, ele) {
443
			if (!isNaN(parseInt($(ele).html()))) {
444
				$(ele).html(numberToComma($(ele).html()));
445
			}
446
		});
447
      });
448
 
449
      $(function() {
450
    	 	var profile = localStorage.getItem('profile');
451
    	 	if (profile){
452
    			$("#photo").attr("src",JSON.parse(profile).image_url);
453
    			$("#fofo_name").text(JSON.parse(profile).name);
454
    	 	}
455
    	 	else{
456
    	 		$("#photo").attr("src","");
457
    			$("#fofo_name").text("Welcome, User");
458
    	 	}
459
    });
460
 
461
 
462
 
463
	$(function(){
464
		dateRangeCallback(moment(),moment());
465
		loaderDialogObj = bootbox.dialog({
466
		    message: '<div class="container text-center"><i class="fa fa-spin fa-spinner"></i>Loading...</div>',
27341 amit.gupta 467
		    show: false	
26010 amit.gupta 468
		});
469
	});
26062 tejbeer 470
 
26166 amit.gupta 471
	$(document).ready(function(){
26062 tejbeer 472
		 $('div.message-filter').on('click', 'button', function() {
473
			messageType = $(this).data("messagetype");
474
			if($(this).hasClass('btn-pressed')) {
475
				messageType="";
476
				$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
477
			} else {
478
				$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
479
				$(this).addClass('btn-pressed').removeClass('btn-default');
480
			}
481
			notifyTypeChange(messageType);
482
		});
483
		notifyTypeChange("");
26166 amit.gupta 484
	});
26062 tejbeer 485
 
26166 amit.gupta 486
	/*$(function(){
26062 tejbeer 487
		messageType = $(this).data("messagetype");
488
		if($(this).hasClass('btn-pressed')) {
489
			messageType="";
490
			$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
491
		} else {
492
			$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
493
			$(this).addClass('btn-pressed').removeClass('btn-default');
494
		}
495
		notifyTypeChange(messageType);
26166 amit.gupta 496
	});*/
26010 amit.gupta 497
</script>
26318 tejbeer 498
	<div id="report-modal" class="modal" role="dialog" data-backdrop="static" data-keyboard="false">
26063 amit.gupta 499
		<div class="modal-dialog">
500
 
501
		    <!-- Modal content-->
502
		    <div class="modal-content">
503
		      <div class="modal-header">
504
		        <button type="button" class="close" data-dismiss="modal">&times;</button>
505
		        <h4 class="modal-title"></h4>
506
		      </div>
507
		      <div class="modal-body">
508
			  </div>
509
			  <div class="modal-footer">
510
		        <button type="button" data-dismiss="modal" class="btn btn-default download-report">Download</button>
511
		      </div>
512
	    	</div>
513
		</div>
514
	</div>
26010 amit.gupta 515
 
516
  </body>
517
</html>