Subversion Repositories SmartDukaan

Rev

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

Rev 28452 Rev 28461
Line 199... Line 199...
199
				console.log(response)
199
				console.log(response)
200
			});
200
			});
201
	}
201
	}
202
	
202
	
203
	
203
	
-
 
204
	
-
 
205
	
-
 
206
	
204
</script>
207
</script>
205
 
208
 
206
 
209
 
207
<script type="text/javascript">
210
<script type="text/javascript">
208
	function getWarehouseWiseData(){
211
	function getWarehouseWiseData(){
Line 414... Line 417...
414
 
417
 
415
 
418
 
416
					</div>
419
					</div>
417
				</div>
420
				</div>
418
 
421
 
-
 
422
				#end
419
				#end #if($warehousePartnerDetailMap)
423
				<button class="btn btn-primary  clickshwograph"
-
 
424
					style="display: none" type="button">Submit</button>
420
 
425
 
421
				<div class="row col-lg-6">
426
				<div class="row">
422
					<ul class="nav nav-tabs" style="margin: 5px">
-
 
423
						<li class="brandlms"><a class="pa">Lms</a></li>
-
 
424
 
-
 
425
						<li class="mobile_based"><a class="ba">Mobile</a></li>
-
 
426
						<li class="accessories_based"><a class="la">Accessories</a></li>
-
 
427
 
-
 
428
					</ul>
-
 
429
 
-
 
430
					<div class="row" id="chart-filter">
-
 
431
						<div class="col-lg-2 form-group">
-
 
432
							<span><b> Warehouse </b> </span> <select
-
 
433
								class="form-control input-sm" id="warehouseId"
-
 
434
								name="warehouseMap" placeholder="Warehouse">
-
 
435
								<option value="" disabled selected>Warehouse</option>
-
 
436
								#if($warehouseId.contains(0))
427
					#if($warehousePartnerDetailMap)
437
								<option value="0" selected>All</option> #else
-
 
438
								<option value="0" selected>All</option> #end #foreach($wm
-
 
439
								in$warehouseMap.entrySet()))
-
 
440
								#if($warehouseId.contains($wm.getKey()))
-
 
441
								<option value="$wm.getKey()" selected>$wm.getValue()</option>
-
 
442
								#else
-
 
443
								<option value="$wm.getKey()">$wm.getValue()</option> #end #end
-
 
444
							</select>
-
 
445
						</div>
-
 
446
 
-
 
447
						<div class="col-lg-2 form-group">
-
 
448
 
-
 
449
							<div class="input-group">
-
 
450
								<span><b> From: </b> </span><input type="date"
-
 
451
									class="form-control date-set" value="${date}" />
-
 
452
 
428
 
453
							</div>
-
 
454
						</div>
-
 
455
 
429
 
456
						<div class="col-lg-2 form-group" style="margin-left: 49px">
-
 
457
							<span><b> Partners </b> </span><select
-
 
458
								class="form-control input-sm" id="fofo-users" name="fofo-users"
-
 
459
								placeholder="Partners" multiple="multiple">
-
 
460
								<option value="" disabled selected>Partners</option>
-
 
461
 
430
 
462
								#foreach($fofoId in $customRetailersMap.keySet())
-
 
463
								#if($fofoIds.contains($fofoId))
-
 
464
								<option value="$fofoId" selected>$customRetailersMap.get($fofoId).getBusinessName()</option>
-
 
465
								#else
-
 
466
								<option value="$fofoId">$customRetailersMap.get($fofoId).getBusinessName()</option>
-
 
467
								#end #end
-
 
468
							</select>
431
					<div class="col-lg-6">
469
						</div>
-
 
470
 
432
 
471
					</div>
-
 
472
 
433
 
-
 
434
						<div class="row chartfilterlmsContainer" style="margin: 5px"></div>
473
 
435
 
474
					<div class="row reportContainer" style="margin: 5px"></div>
-
 
475
 
436
 
476
				</div>
-
 
477
 
437
 
-
 
438
						<div class="row chartLmsContainer" style="margin: 5px"></div>
478
				#end
439
					</div>
479
 
440
 
480
 
441
 
481
 
442
 
-
 
443
					<div class="col-lg-6">
482
 
444
 
483
				<div class="col-lg-6">
-
 
484
 
445
 
485
					#if($authUserTicketCount)
-
 
486
					<div class="row col-lg-8">
-
 
487
						<h3 style="margin-top: -2px; margin-bottom: 24px">
446
						<div class="row chartfilterlmpContainer" style="margin: 5px"></div>
488
							<strong>Auth User Tickets</strong>
-
 
489
						</h3>
-
 
490
					</div>
-
 
491
 
447
 
492
					<table class="table table-striped table-advance table-hover"
-
 
493
						style="width: 65%">
-
 
494
						<tbody>
-
 
495
							<tr>
-
 
496
								<th>Auth User</th>
-
 
497
								<th>Tickets</th>
-
 
498
 
448
 
499
							</tr>
-
 
500
							#foreach($authUserTicket in $authUserTicketCount.entrySet())
-
 
501
 
449
 
-
 
450
						<div class="row chartLmpContainer" style="margin: 5px"></div>
502
							<tr>
451
					</div>
503
								<td>$authUserTicket.getKey().getName()</td>
-
 
504
								<td>$authUserTicket.getValue()</td>
-
 
505
 
452
 
506
							</tr>
453
					#end
507
 
454
 
508
							#end
455
				</div>
-
 
456
				<div class="row">
-
 
457
					#if($warehousePartnerDetailMap)
-
 
458
					<div class="col-lg-6">
-
 
459
						<ul class="nav nav-tabs" style="margin: 5px">
-
 
460
							<li class="mobile_based"><a class="ba">Mobile</a></li>
-
 
461
							<li class="accessories_based"><a class="la">Accessories</a></li>
509
 
462
 
-
 
463
						</ul>
510
 
464
 
511
						</tbody>
-
 
512
					</table>
-
 
513
 
465
 
514
					<div class="row col-lg-4">
-
 
515
						<h3 style="margin-top: -2px; margin-bottom: 24px">
466
						<div class="row reportContainer" style="margin: 5px"></div>
516
							<strong>Reports</strong>
-
 
517
						</h3>
467
 
518
					</div>
468
					</div>
-
 
469
 
-
 
470
 
-
 
471
 
-
 
472
					#end #if($authUserTicketCount)
-
 
473
 
-
 
474
 
-
 
475
					<div class="col-lg-6">
519
					<div class="row col-lg-12 info-box white-bg">
476
						<div class="row col-lg-8">
-
 
477
							<h3 style="margin-top: -2px; margin-bottom: 24px">
-
 
478
								<strong>Auth User Tickets</strong>
-
 
479
							</h3>
-
 
480
						</div>
-
 
481
 
520
						<table class="table table-striped reports-table"
482
						<table class="table table-striped table-advance table-hover"
521
							style="display: none">
483
							style="width: 65%">
522
							<tbody>
484
							<tbody>
523
								<div class="list-group">
485
								<tr>
524
									#foreach($reporticoProjectEntry in
486
									<th>Auth User</th>
525
									$reporticoProjectMap.entrySet()) #foreach($reporticoUrlInfo in
-
 
526
									$reporticoProjectEntry.getValue()) <a
487
									<th>Tickets</th>
527
										href="${rc.contextPath}/reports/${reporticoProjectEntry.getKey()}${reporticoUrlInfo.getUrl()}"
-
 
-
 
488
 
528
										class="list-group-item" #if($reporticoUrlInfo.getParamsList())
489
								</tr>
529
										data-paramslist="$vmUtils.htmlJson($reporticoUrlInfo.getParamsList())"
490
								#foreach($authUserTicket in $authUserTicketCount.entrySet())
-
 
491
 
530
										#end>
492
								<tr>
531
										<h4 class="list-group-item-heading">$reporticoUrlInfo.getTitle()</h4>
493
									<td>$authUserTicket.getKey().getName()</td>
532
										<p class="list-group-item-text">$reporticoUrlInfo.getDescription()</p>
494
									<td>$authUserTicket.getValue()</td>
-
 
495
 
533
									</a> #end #end
496
								</tr>
-
 
497
 
534
								</div>
498
								#end
-
 
499
 
-
 
500
 
535
							</tbody>
501
							</tbody>
536
						</table>
502
						</table>
537
 
503
 
538
					</div>
504
					</div>
-
 
505
					#end
-
 
506
				</div>
-
 
507
				#if($authUserTicketCount)
-
 
508
				<div class="row">
-
 
509
					<div class="col-lg-6">
539
 
510
 
540
 
511
 
541
					<div class="row col-lg-12 info-box white-bg">
-
 
542
						<div class="col-lg-4">
512
						<div class="row col-lg-4">
543
							<h3 style="margin-top: -2px; margin-bottom: 24px">
513
							<h3 style="margin-top: -2px; margin-bottom: 24px">
544
								<strong>My Messages</strong>
514
								<strong>Reports</strong>
545
							</h3>
515
							</h3>
546
						</div>
516
						</div>
547
						<div class="col-lg-4">
517
						<div class="row col-lg-12 info-box white-bg">
548
							<div class="btn-group message-filter">
518
							<table class="table table-striped reports-table"
549
								<button data-messagetype="notification" type="button"
-
 
550
									class="btn btn-default" aria-label="Notifications"
-
 
551
									title="Notifications">
519
								style="display: none">
552
									<span class="glyphicon glyphicon-bell" aria-hidden="true"></span>
-
 
553
								</button>
520
								<tbody>
554
								<button data-messagetype="announcement" type="button"
-
 
555
									class="btn btn-default" aria-label="Announcements"
521
									<div class="list-group">
556
									title="Announcements">
522
										#foreach($reporticoProjectEntry in
557
									<span class="glyphicon glyphicon-bullhorn" aria-hidden="true"></span>
523
										$reporticoProjectMap.entrySet()) #foreach($reporticoUrlInfo in
558
								</button>
524
										$reporticoProjectEntry.getValue()) <a
559
								<button data-messagetype="scheme" type="button"
525
											href="${rc.contextPath}/reports/${reporticoProjectEntry.getKey()}${reporticoUrlInfo.getUrl()}"
560
									class="btn btn-default" aria-label="SmartDukaan Schemes"
526
											class="list-group-item"
561
									title="SmartDukaan Schemes">
527
											#if($reporticoUrlInfo.getParamsList())
562
									<span class="glyphicon glyphicon-tags" aria-hidden="true"></span>
528
											data-paramslist="$vmUtils.htmlJson($reporticoUrlInfo.getParamsList())"
563
								</button>
529
											#end>
564
								<button data-messagetype="marketing" type="button"
-
 
565
									class="btn btn-default" aria-label="SmartDukaan Schemes"
530
											<h4 class="list-group-item-heading">$reporticoUrlInfo.getTitle()</h4>
566
									title="SmartDukaan Schemes">
-
 
567
									<span class="glyphicon glyphicon-picture" aria-hidden="true"></span>
531
											<p class="list-group-item-text">$reporticoUrlInfo.getDescription()</p>
568
								</button>
532
										</a> #end #end
569
							</div>
533
									</div>
570
						</div>
534
								</tbody>
571
						<div class="col-lg-12 row notification-container"
-
 
572
							style="max-height: 500px; overflow-y: scroll;"></div>
-
 
573
					</div>
535
							</table>
574
				</div>
-
 
575
 
-
 
576
				</div>
-
 
577
				</div>
-
 
578
				#end 
-
 
579
				
-
 
580
				#if(!$authUserTicketCount)
-
 
581
 
536
 
582
				<div class="row">
-
 
583
					<div class="row col-lg-4">
-
 
584
						<h3 style="margin-top: -2px; margin-bottom: 24px">
-
 
585
							<strong>Reports</strong>
-
 
586
						</h3>
537
						</div>
587
					</div>
538
					</div>
588
					<div class="row col-lg-12 info-box white-bg">
-
 
589
						<table class="table table-striped reports-table"
-
 
590
							style="display: none">
-
 
591
							<tbody>
-
 
592
								<div class="list-group">
539
					<div class="col-lg-6">
593
									#foreach($reporticoProjectEntry in
-
 
594
									$reporticoProjectMap.entrySet()) #foreach($reporticoUrlInfo in
-
 
595
									$reporticoProjectEntry.getValue()) <a
-
 
596
										href="${rc.contextPath}/reports/${reporticoProjectEntry.getKey()}${reporticoUrlInfo.getUrl()}"
-
 
597
										class="list-group-item" #if($reporticoUrlInfo.getParamsList())
-
 
598
										data-paramslist="$vmUtils.htmlJson($reporticoUrlInfo.getParamsList())"
-
 
599
										#end>
-
 
600
										<h4 class="list-group-item-heading">$reporticoUrlInfo.getTitle()</h4>
-
 
601
										<p class="list-group-item-text">$reporticoUrlInfo.getDescription()</p>
-
 
602
									</a> #end #end
-
 
603
								</div>
-
 
604
							</tbody>
-
 
605
						</table>
-
 
606
 
540
 
607
					</div>
-
 
608
 
541
 
609
				</div>
-
 
610
				<div>
-
 
611
					<div class="col-lg-12">
-
 
612
						<div class="row col-lg-12 info-box white-bg">
542
						<div class="row col-lg-12 info-box white-bg">
613
							<div class="col-lg-4">
543
							<div class="col-lg-4">
614
								<h3 style="margin-top: -2px; margin-bottom: 24px">
544
								<h3 style="margin-top: -2px; margin-bottom: 24px">
615
									<strong>My Messages</strong>
545
									<strong>My Messages</strong>
616
								</h3>
546
								</h3>
Line 641... Line 571...
641
							</div>
571
							</div>
642
							<div class="col-lg-12 row notification-container"
572
							<div class="col-lg-12 row notification-container"
643
								style="max-height: 500px; overflow-y: scroll;"></div>
573
								style="max-height: 500px; overflow-y: scroll;"></div>
644
						</div>
574
						</div>
645
					</div>
575
					</div>
-
 
576
 
-
 
577
				</div>
-
 
578
 
-
 
579
 
-
 
580
				#end #if(!$authUserTicketCount)
-
 
581
 
-
 
582
				<div class="row">
-
 
583
					<div class="col-lg-6">
-
 
584
						<div class="row col-lg-4">
-
 
585
							<h3 style="margin-top: -2px; margin-bottom: 24px">
-
 
586
								<strong>Reports</strong>
-
 
587
							</h3>
-
 
588
						</div>
-
 
589
						<div class="row col-lg-12 info-box white-bg">
-
 
590
							<table class="table table-striped reports-table"
-
 
591
								style="display: none">
-
 
592
								<tbody>
-
 
593
									<div class="list-group">
-
 
594
										#foreach($reporticoProjectEntry in
-
 
595
										$reporticoProjectMap.entrySet()) #foreach($reporticoUrlInfo in
-
 
596
										$reporticoProjectEntry.getValue()) <a
-
 
597
											href="${rc.contextPath}/reports/${reporticoProjectEntry.getKey()}${reporticoUrlInfo.getUrl()}"
-
 
598
											class="list-group-item"
-
 
599
											#if($reporticoUrlInfo.getParamsList())
-
 
600
											data-paramslist="$vmUtils.htmlJson($reporticoUrlInfo.getParamsList())"
-
 
601
											#end>
-
 
602
											<h4 class="list-group-item-heading">$reporticoUrlInfo.getTitle()</h4>
-
 
603
											<p class="list-group-item-text">$reporticoUrlInfo.getDescription()</p>
-
 
604
										</a> #end #end
-
 
605
									</div>
-
 
606
								</tbody>
-
 
607
							</table>
-
 
608
 
-
 
609
						</div>
-
 
610
 
-
 
611
					</div>
-
 
612
					<div class="col-lg-6">
-
 
613
						<div class="col-lg-12">
-
 
614
							<div class="row col-lg-12 info-box white-bg">
-
 
615
								<div class="col-lg-4">
-
 
616
									<h3 style="margin-top: -2px; margin-bottom: 24px">
-
 
617
										<strong>My Messages</strong>
-
 
618
									</h3>
-
 
619
								</div>
-
 
620
								<div class="col-lg-4">
-
 
621
									<div class="btn-group message-filter">
-
 
622
										<button data-messagetype="notification" type="button"
-
 
623
											class="btn btn-default" aria-label="Notifications"
-
 
624
											title="Notifications">
-
 
625
											<span class="glyphicon glyphicon-bell" aria-hidden="true"></span>
-
 
626
										</button>
-
 
627
										<button data-messagetype="announcement" type="button"
-
 
628
											class="btn btn-default" aria-label="Announcements"
-
 
629
											title="Announcements">
-
 
630
											<span class="glyphicon glyphicon-bullhorn" aria-hidden="true"></span>
-
 
631
										</button>
-
 
632
										<button data-messagetype="scheme" type="button"
-
 
633
											class="btn btn-default" aria-label="SmartDukaan Schemes"
-
 
634
											title="SmartDukaan Schemes">
-
 
635
											<span class="glyphicon glyphicon-tags" aria-hidden="true"></span>
-
 
636
										</button>
-
 
637
										<button data-messagetype="marketing" type="button"
-
 
638
											class="btn btn-default" aria-label="SmartDukaan Schemes"
-
 
639
											title="SmartDukaan Schemes">
-
 
640
											<span class="glyphicon glyphicon-picture" aria-hidden="true"></span>
-
 
641
										</button>
-
 
642
									</div>
-
 
643
								</div>
-
 
644
								<div class="col-lg-12 row notification-container"
-
 
645
									style="max-height: 500px; overflow-y: scroll;"></div>
-
 
646
							</div>
-
 
647
						</div>
-
 
648
					</div>
646
				</div>
649
				</div>
-
 
650
 
647
				#end
651
				#end
648
			</section>
652
			</section>
649
			<div class="text-center">
653
			<div class="text-center">
650
				<div class="credits">
654
				<div class="credits">
651
					<p>All rights reserved.&copy;2017, Smart Dukaan</p>
655
					<p>All rights reserved.&copy;2017, Smart Dukaan</p>
Line 711... Line 715...
711
		});
715
		});
712
	});
716
	});
713
	
717
	
714
	$(document).ready(function(){
718
	$(document).ready(function(){
715
		
719
		
-
 
720
		   $(".clickshwograph").click();
-
 
721
		  
716
	   $(".brandlms").click();
722
		   $(".mobile_based").click();
717
	    
723
			  
718
	    $('div.message-filter').on('click', 'button', function() {
724
	    $('div.message-filter').on('click', 'button', function() {
719
			messageType = $(this).data("messagetype");
725
			messageType = $(this).data("messagetype");
720
			if($(this).hasClass('btn-pressed')) {
726
			if($(this).hasClass('btn-pressed')) {
721
				messageType="";
727
				messageType="";
722
				$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
728
				$('div.message-filter').find('button').removeClass('btn-pressed').addClass('btn-default');
Line 730... Line 736...
730
	});
736
	});
731
		
737
		
732
	
738
	
733
    $(document).on("click", ".mobile_based",
739
    $(document).on("click", ".mobile_based",
734
            function () {  
740
            function () {  
735
    	 $("#chart-filter").hide();
741
    	
736
            $(".ba").css("color", "blue");
742
            $(".ba").css("color", "blue");
737
            $(".ba").css("background-color", "white");   
743
            $(".ba").css("background-color", "white");   
738
           $(".la").css("color", "white"); 
744
           $(".la").css("color", "white"); 
739
            $(".la").css("background-color", "#C0C0C0");
745
            $(".la").css("background-color", "#C0C0C0");
740
             $(".pa").css("color", "white"); 
-
 
741
            $(".pa").css("background-color", "#C0C0C0");  
-
 
742
             $(".pd").css("color", "white");
-
 
743
            $(".pd").css("background-color", "#C0C0C0");                   
-
 
744
             doGetAjaxRequestHandler(context + "/getMobileBrandWise", function (response) {
746
            doGetAjaxRequestHandler(context + "/getMobileBrandWise", function (response) {
745
                    $('.reportContainer').html(response);
747
                    $('.reportContainer').html(response);
746
                });              
748
                });              
747
        }); 
749
        }); 
748
    
750
    
749
    $(document).on("click", ".accessories_based",
751
    $(document).on("click", ".accessories_based",
750
            function () {
752
            function () {
751
    	   $("#chart-filter").hide();
753
    	
752
          $(".ba").css("color", "white"); 
754
          $(".ba").css("color", "white"); 
753
          $(".ba").css("background-color", "#C0C0C0");   
755
          $(".ba").css("background-color", "#C0C0C0");   
754
           $(".pa").css("color", "white"); 
756
           $(".pa").css("color", "white"); 
755
            $(".pa").css("background-color", "#C0C0C0");   
757
            $(".pa").css("background-color", "#C0C0C0");   
756
           $(".la").css("color", "blue"); 
-
 
757
            $(".la").css("background-color", "white");
-
 
758
            $(".pd").css("color", "white");
-
 
759
            $(".pd").css("background-color", "#C0C0C0");
-
 
760
             doGetAjaxRequestHandler(context + "/getAccessoriesBrandWise", function (response) {
758
             doGetAjaxRequestHandler(context + "/getAccessoriesBrandWise", function (response) {
761
                    $('.reportContainer').html(response);
759
                    $('.reportContainer').html(response);
762
                });    
760
                });    
763
   }); 
761
   }); 
764
    
762
    
765
    
763
    
766
    
764
    
767
    $(document).on("click", ".brandlms",
765
    $(document).on("click", ".clickshwograph",
768
            function () {
766
            function () {
769
            
767
    	
770
    	 $(".pa").css("color", "blue"); 
-
 
-
 
768
 
771
         $(".pa").css("background-color", "white");
769
   doGetAjaxRequestHandler(context + "/getMobileLMSFilter", function (response) {
772
       $(".ba").css("color", "white"); 
-
 
773
       $(".ba").css("background-color", "#C0C0C0");  
-
 
774
        $(".pd").css("color", "white"); 
-
 
775
         $(".pd").css("background-color", "#C0C0C0");  
770
          $('.chartfilterlmsContainer').html(response);
776
        $(".la").css("color", "white"); 
771
          $('.printlmsgraph').click();
777
         $(".la").css("background-color", "#C0C0C0");
-
 
-
 
772
 
778
         
773
      });
779
         $("#chart-filter").show();
-
 
780
  	   
774
   
781
     	var warehouseId = $('#warehouseId').val();
775
   doGetAjaxRequestHandler(context + "/getMobileLMPFilter", function (response) {
782
        	var date = $('.date-set').val();
776
       $('.chartfilterlmpContainer').html(response);
783
        	var fofoIds =    $('#fofo-users').val();
777
       $('.printlmpgraph').click();
784
        	console.log(warehouseId)
778
       console.log("helloo")
785
            
779
   }); 
786
        	console.log(date)
-
 
787
             doGetAjaxRequestHandler(context + "/getMobileLMSGraph?warehouseId="+warehouseId+"&date="+date+"&fofoIds="+fofoIds, function (response) {
-
 
788
                    $('.reportContainer').html(response);
-
 
789
                });    
-
 
790
   });
780
   });
-
 
781
    
-
 
782
    
-
 
783
 
791
        
784
        
792
	/*$(function(){
785
	/*$(function(){
793
		messageType = $(this).data("messagetype");
786
		messageType = $(this).data("messagetype");
794
		if($(this).hasClass('btn-pressed')) {
787
		if($(this).hasClass('btn-pressed')) {
795
			messageType="";
788
			messageType="";