Subversion Repositories SmartDukaan

Rev

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

Rev 29026 Rev 29061
Line 1... Line 1...
1
$(function() {
1
$(function() {
-
 
2
 
-
 
3
	$(document).on('click', ".onboarding_timeline", function() {
-
 
4
		doGetAjaxRequestHandler(context + "/partnerStoreTimeline",
-
 
5
			function(response) {
-
 
6
				$('#' + 'main-content').html(response);
-
 
7
			});
-
 
8
	});
2
	$(document).on('click', '.submit1', function() {
9
	$(document).on('click', '.submit1', function() {
3
		var row = $(this).closest("tr");
10
		var row = $(this).closest("tr");
4
		console.log(row);
11
		console.log(row);
5
		var rowIndex = $(this).closest('tr').prevAll().length;
12
		var rowIndex = $(this).closest('tr').prevAll().length;
6
 
13
 
Line 49... Line 56...
49
		var data18 = $(row).find(".cancheque input[type=hidden]").val();
56
		var data18 = $(row).find(".cancheque input[type=hidden]").val();
50
		var data19 = $(row).find(".rent input[type=hidden]").val();
57
		var data19 = $(row).find(".rent input[type=hidden]").val();
51
		console.log("data19" + data19);
58
		console.log("data19" + data19);
52
		var data20 = $(row).find(".loi input[type=hidden]").val();
59
		var data20 = $(row).find(".loi input[type=hidden]").val();
53
		console.log("data18" + data18);
60
		console.log("data18" + data18);
54
		
61
 
55
		var  docCompleted = $(row).find("td:eq(22) option:selected").val();
62
		var docCompleted = $(row).find("td:eq(22) option:selected").val();
56
		
63
 
57
		
64
 
58
		var data21 = $(row).find("td:eq(23) input[type='text']").val();
65
		var data21 = $(row).find("td:eq(23) input[type='text']").val();
59
		console.log(data21);
66
		console.log(data21);
60
		var data22 = $(row).find("td:eq(24) input[type='date']").val();
67
		var data22 = $(row).find("td:eq(24) input[type='date']").val();
61
		if (data22 != "") {
68
		if (data22 != "") {
62
			data22 = data22 + "T00:00:00";
69
			data22 = data22 + "T00:00:00";
Line 333... Line 340...
333
				function(response) {
340
				function(response) {
334
 
341
 
335
					console.log("reponse" + response);
342
					console.log("reponse" + response);
336
					if (response == 'true') {
343
					if (response == 'true') {
337
						alert("successfully Done");
344
						alert("successfully Done");
338
						
345
 
339
						
346
 
340
						panelListing("main-content");
347
						panelListing("main-content");
341
					}
348
					}
342
				});
349
				});
343
		}		
350
		}
344
	});
351
	});
345
	
352
 
346
	
353
 
347
	
354
 
348
	$(document).on('click', ".holdPartnerOnboarding", function() {
355
	$(document).on('click', ".holdPartnerOnboarding", function() {
349
		var id = $(this).data('id');
356
		var id = $(this).data('id');
350
		console.log(id);
357
		console.log(id);
351
		if (confirm("Are you sure you want to hold this Partner") == true) {
358
		if (confirm("Are you sure you want to hold this Partner") == true) {
352
			doPostAjaxRequestHandler(context + "/partnerOnboardingHold?id=" + id,
359
			doPostAjaxRequestHandler(context + "/partnerOnboardingHold?id=" + id,
353
				function(response) {
360
				function(response) {
354
 
361
 
355
					console.log("reponse" + response);
362
					console.log("reponse" + response);
356
					if (response == 'true') {
363
					if (response == 'true') {
357
						alert("successfully Done");
364
						alert("successfully Done");
358
						
365
 
359
						
366
 
360
						panelListing("main-content");
367
						panelListing("main-content");
361
					}
368
					}
362
				});
369
				});
363
		}		
370
		}
364
	});
371
	});
365
	
372
 
366
	
373
 
367
	$(document).on('click', ".unHoldPartnerOnboarding", function() {
374
	$(document).on('click', ".unHoldPartnerOnboarding", function() {
368
		var id = $(this).data('id');
375
		var id = $(this).data('id');
369
		console.log(id);
376
		console.log(id);
370
		if (confirm("Are you sure you want to Unhold this Partner") == true) {
377
		if (confirm("Are you sure you want to Unhold this Partner") == true) {
371
			doPostAjaxRequestHandler(context + "/partnerOnboardingUnhold?id=" + id,
378
			doPostAjaxRequestHandler(context + "/partnerOnboardingUnhold?id=" + id,
Line 375... Line 382...
375
					if (response == 'true') {
382
					if (response == 'true') {
376
						alert("successfully Done");
383
						alert("successfully Done");
377
						panelListing("main-content");
384
						panelListing("main-content");
378
					}
385
					}
379
				});
386
				});
380
		}		
387
		}
381
	});
388
	});
382
	
389
 
383
	$(document).on('click', ".partner-onboarding-index", function() {
390
	$(document).on('click', ".partner-onboarding-index", function() {
384
		panelListing("main-content");
391
		panelListing("main-content");
385
	});
392
	});
386
 
393
 
387
 
394
 
Line 432... Line 439...
432
			}
439
			}
433
		} else {
440
		} else {
434
			// Do nothing!
441
			// Do nothing!
435
		}
442
		}
436
	});
443
	});
437
	
444
 
438
	
445
 
439
	$(document).on('input', 'table#partnerVerification input[type=file]', function() {
446
	$(document).on('input', 'table#partnerVerification input[type=file]', function() {
440
		if (confirm('Confirm upload ?')) {
447
		if (confirm('Confirm upload ?')) {
441
			var fileSelector = $(this)[0];
448
			var fileSelector = $(this)[0];
442
			if (fileSelector != undefined
449
			if (fileSelector != undefined
443
				&& fileSelector.files[0] != undefined) {
450
				&& fileSelector.files[0] != undefined) {
Line 462... Line 469...
462
			}
469
			}
463
		} else {
470
		} else {
464
			// Do nothing!
471
			// Do nothing!
465
		}
472
		}
466
	});
473
	});
467
	
474
 
468
	
475
 
469
	
476
 
470
	$(document).on('input', 'table#OnboardingDesign input[type=file]', function() {
477
	$(document).on('input', 'table#OnboardingDesign input[type=file]', function() {
471
		if (confirm('Confirm upload ?')) {
478
		if (confirm('Confirm upload ?')) {
472
			var fileSelector = $(this)[0];
479
			var fileSelector = $(this)[0];
473
			if (fileSelector != undefined
480
			if (fileSelector != undefined
474
				&& fileSelector.files[0] != undefined) {
481
				&& fileSelector.files[0] != undefined) {
Line 495... Line 502...
495
			// Do nothing!
502
			// Do nothing!
496
		}
503
		}
497
	});
504
	});
498
 
505
 
499
	$(document).on('click', '#newmodal', function() {
506
	$(document).on('click', '#newmodal', function() {
500
		 
507
 
501
		 
508
 
502
		var prebookingListingObject = {};
509
		var prebookingListingObject = {};
503
		var outletName = $('#outLetName1').val();
510
		var outletName = $('#outLetName1').val();
504
		var phoneNumber =$('#number1').val();
511
		var phoneNumber = $('#number1').val();
505
		 
512
 
506
		   if (outletName == "") {
513
		if (outletName == "") {
507
			   
514
 
508
			   alert("outletName is required ");
515
			alert("outletName is required ");
509
				return;
516
			return;
510
	    }
517
		}
511
	  prebookingListingObject['outletName'] = $('#outLetName1').val();
518
		prebookingListingObject['outletName'] = $('#outLetName1').val();
512
		  
519
 
513
		   if (phoneNumber == "") {
520
		if (phoneNumber == "") {
514
			   alert("Phone Number is required ");
521
			alert("Phone Number is required ");
515
				return false;
522
			return false;
516
				
523
 
517
			    }
524
		}
518
		   if(phoneNumber.length > 6 && phoneNumber.length < 11) {  
525
		if (phoneNumber.length > 6 && phoneNumber.length < 11) {
519
			   
526
 
520
			   prebookingListingObject['phoneNumber'] = $('#number1').val();
527
			prebookingListingObject['phoneNumber'] = $('#number1').val();
521
			   
528
 
522
		   }
529
		}
523
		   else
-
 
524
		   {
530
		else {
525
			   alert("Number should be greater then 6 and less then 11");
531
			alert("Number should be greater then 6 and less then 11");
526
				return false;
532
			return false;
527
			   
533
 
528
		   }
534
		}
529
		
535
 
530
		acquireddate1 = $('#acquireddate1').val();
536
		acquireddate1 = $('#acquireddate1').val();
531
		if (acquireddate1 != "") {
537
		if (acquireddate1 != "") {
532
			acquireddate1 = acquireddate1 + "T00:00:00";
538
			acquireddate1 = acquireddate1 + "T00:00:00";
533
		}
539
		}
534
		prebookingListingObject['authId'] = $('#authUserOnboarding').val();
540
		prebookingListingObject['authId'] = $('#authUserOnboarding').val();
535
 
541
 
536
		prebookingListingObject['acquiredDate'] = acquireddate1
542
		prebookingListingObject['acquiredDate'] = acquireddate1
537
		 
543
 
538
 
544
 
539
		var json = JSON.stringify(prebookingListingObject);
545
		var json = JSON.stringify(prebookingListingObject);
540
		console.log(json);
546
		console.log(json);
541
		doAjaxRequestWithJsonHandler(
547
		doAjaxRequestWithJsonHandler(
542
			context
548
			context
Line 553... Line 559...
553
 
559
 
554
	var table = $('#example').DataTable();
560
	var table = $('#example').DataTable();
555
	$(document).on('dblclick', '#example tbody tr', function() {
561
	$(document).on('dblclick', '#example tbody tr', function() {
556
 
562
 
557
		var data = table.row(this).data();
563
		var data = table.row(this).data();
558
		 var statusHold= $(this).find("td:eq(37) button[type='submit']").val();
564
		var statusHold = $(this).find("td:eq(37) button[type='submit']").val();
559
		
565
 
560
		 console.log("statusHold"+statusHold);
566
		console.log("statusHold" + statusHold);
561
		 if(statusHold.localeCompare("hold") )
567
		if (statusHold.localeCompare("hold")) {
562
	     		 {
-
 
563
			 $(this).find(":input").attr('disabled', true);
568
			$(this).find(":input").attr('disabled', true);
564
			 $(this).find("td:eq(37) button[type='submit']").attr('disabled', false);
569
			$(this).find("td:eq(37) button[type='submit']").attr('disabled', false);
565
			 $(this).find("td:eq(36) button[type='submit']").attr('disabled', false);
570
			$(this).find("td:eq(36) button[type='submit']").attr('disabled', false);
566
            }
571
		}
567
			else{
572
		else {
568
				$(this).find(":input").attr('disabled', false).show();
573
			$(this).find(":input").attr('disabled', false).show();
569
				$(this).find(":selected").attr('disabled', false).show();
574
			$(this).find(":selected").attr('disabled', false).show();
570
				
575
 
571
			}
576
		}
572
		$(this).find("input[name=rbmAuthId]").attr('disabled', true);
577
		$(this).find("input[name=rbmAuthId]").attr('disabled', true);
573
		$(this).find("input[name=verificationStatusOnboarding]").attr('disabled', true);
578
		$(this).find("input[name=verificationStatusOnboarding]").attr('disabled', true);
574
		
579
 
575
		$(this).css("background-color", "#87d3f8");
580
		$(this).css("background-color", "#87d3f8");
576
		let a=12;
581
		let a = 12;
577
		let b=12;
582
		let b = 12;
578
		console.log("yes"+a==b);
583
		console.log("yes" + a == b);
579
		
584
 
580
	});
585
	});
581
 
586
 
582
	var table = $('#OnboardingDesign').DataTable();
587
	var table = $('#OnboardingDesign').DataTable();
583
	$(document).on('dblclick', '#OnboardingDesign tbody tr', function() {
588
	$(document).on('dblclick', '#OnboardingDesign tbody tr', function() {
584
 
589
 
Line 646... Line 651...
646
		}
651
		}
647
		var twoDBoqdate = $(row).find("td:eq(17) input[type='date']").val();
652
		var twoDBoqdate = $(row).find("td:eq(17) input[type='date']").val();
648
		if (twoDBoqdate != "") {
653
		if (twoDBoqdate != "") {
649
			twoDBoqdate = twoDBoqdate + "T00:00:00";
654
			twoDBoqdate = twoDBoqdate + "T00:00:00";
650
		}
655
		}
651
		
656
 
652
		var poVenderDate = $(row).find("td:eq(23) input[type='date']").val();
657
		var poVenderDate = $(row).find("td:eq(23) input[type='date']").val();
653
		if (poVenderDate != "") {
658
		if (poVenderDate != "") {
654
			poVenderDate = poVenderDate + "T00:00:00";
659
			poVenderDate = poVenderDate + "T00:00:00";
655
		}
660
		}
656
		var briefingPartner = $(row).find("td:eq(25) input[type='date']").val();
661
		var briefingPartner = $(row).find("td:eq(25) input[type='date']").val();
657
		if (briefingPartner != "") {
662
		if (briefingPartner != "") {
658
			briefingPartner = briefingPartner + "T00:00:00";
663
			briefingPartner = briefingPartner + "T00:00:00";
659
		}
664
		}
660
		
665
 
661
		var deploymentDate = $(row).find("td:eq(27) input[type='date']").val();
666
		var deploymentDate = $(row).find("td:eq(27) input[type='date']").val();
662
		if (deploymentDate != "") {
667
		if (deploymentDate != "") {
663
			deploymentDate = deploymentDate + "T00:00:00";
668
			deploymentDate = deploymentDate + "T00:00:00";
664
		}
669
		}
665
		
670
 
666
		var nocDate = $(row).find("td:eq(31) input[type='date']").val();
671
		var nocDate = $(row).find("td:eq(31) input[type='date']").val();
667
		if (nocDate != "") {
672
		if (nocDate != "") {
668
			nocDate = nocDate + "T00:00:00";
673
			nocDate = nocDate + "T00:00:00";
669
		}
674
		}
670
		
675
 
671
		if(receeActual =="")
676
		if (receeActual == "") {
672
		{
-
 
673
			alert("Please Fill The Recee Actual Date");
677
			alert("Please Fill The Recee Actual Date");
674
			return
678
			return
675
			
679
 
676
		}
680
		}
677
		if(twoDBoqdate =="")
681
		if (twoDBoqdate == "") {
678
		{
-
 
679
			alert("Please Fill The 2D with BOQ Actual Date");
682
			alert("Please Fill The 2D with BOQ Actual Date");
680
			return
683
			return
681
			
684
 
682
		}
685
		}
683
		if(poVenderDate =="")
686
		if (poVenderDate =="") {
684
		{
-
 
685
			alert("Please Fill The PO To Vendor Actual Date");
687
			alert("Please Fill The PO To Vendor Actual Date");
686
			return
688
			return
687
			
689
 
688
		}
690
		}
689
		if(briefingPartner=="")
691
		if (briefingPartner == "") {
690
		{
-
 
691
			alert("Please Fill The Briefing Partner Actual Date ");
692
			alert("Please Fill The Briefing Partner Actual Date ");
692
			return
693
			return
693
			
694
 
694
		}
695
		}
695
		
696
 
696
		if(deploymentDate=="")
697
		if (deploymentDate == "") {
697
		{
-
 
698
			alert("Please Fill The Deployment Actual Date ");
698
			alert("Please Fill The Deployment Actual Date ");
699
			return
699
			return
700
			
700
 
701
		}
701
		}
702
		if(nocDate =="")
702
		if (nocDate == "") {
703
		{
-
 
704
			alert("Please Fill The NOC Actual Date ");
703
			alert("Please Fill The NOC Actual Date ");
705
			return
704
			return
706
			
705
 
707
		}
706
		}
708
		
707
 
709
		
708
 
710
		
709
 
711
		var id = $(this).data('id');
710
		var id = $(this).data('id');
712
		console.log(id);
711
		console.log(id);
713
		if (confirm("Are you sure your Design TAT is Complete") == true) {
712
		if (confirm("Are you sure your Design TAT is Complete") == true) {
714
			doPostAjaxRequestHandler(context + "/partnerDesignTatCompleted?id=" + id,
713
			doPostAjaxRequestHandler(context + "/partnerDesignTatCompleted?id=" + id,
715
				function(response) {
714
				function(response) {
716
 
715
 
717
					console.log("reponse" + response);
716
					console.log("reponse" + response);
718
					if (response == 'true') {
717
					if (response == 'true') {
719
						alert("congratulations your Desiging is successfully Done");
718
						alert("congratulations your Desiging is successfully Done");
720
     				partnerOnboardingDesign("main-content");
719
						partnerOnboardingDesign("main-content");
721
					}
720
					}
722
				});
721
				});
723
		}
722
		}
724
 
723
 
725
	});
724
	});