Subversion Repositories SmartDukaan

Rev

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

Rev 28757 Rev 28830
Line 31... Line 31...
31
 
31
 
32
			});
32
			});
33
	$(document).on('click', ".add-brand", function() {
33
	$(document).on('click', ".add-brand", function() {
34
		loadaddBrandToService("main-content");
34
		loadaddBrandToService("main-content");
35
	});
35
	});
-
 
36
	
-
 
37
	$(document).on('click', ".markNA", function() {
-
 
38
		let fofoId = $('#partnerName').val();
-
 
39
		let serviceId = $(this).data("serviceid");
-
 
40
		bootbox.dialog({
-
 
41
			title : "Mark Not Applicable!",
-
 
42
			message : "<div class=form-inline'>"
-
 
43
					+ "<label for='code'>Not Applicable Reason:</label>"
-
 
44
					+ "<input class='form-control' type='text' id='naText'/>"
-
 
45
					+ "</div>",
-
 
46
			buttons : {
-
 
47
				cancel : {
-
 
48
					label : "CANCEL",
-
 
49
					className : 'btn-danger',
-
 
50
					callback : function() {
-
 
51
						return;
-
 
52
					}
-
 
53
				},
-
 
54
				ok : {
-
 
55
					label : "OK",
-
 
56
					className : 'btn-info',
-
 
57
					callback : function() {
-
 
58
						naText = $('#naText').val();
-
 
59
						if(naText==""||naText==undefined||naText==null){
-
 
60
								alert("NA text can't be empty");
-
 
61
								return;
-
 
62
							}
-
 
63
						var params = {
-
 
64
								"serviceId" : serviceId,
-
 
65
								"fofoId" : fofoId,
-
 
66
								"naText":naText
-
 
67
							}
-
 
68
							doPostAjaxRequestWithJsonHandler(context + "/partnerservice/applicable",
-
 
69
									JSON.stringify(params), function(response) {
-
 
70
										alert("Successfully Marked NA");
-
 
71
										loadAdminPartnerService("main-content", fofoId);
-
 
72
									});
-
 
73
					}
-
 
74
				}
-
 
75
			}
-
 
76
		});
-
 
77
	});
-
 
78
	$(document).on('click', ".markApplicable", function() {
-
 
79
		let serviceId = $(this).data("serviceid");
-
 
80
		if(confirm("Confirm?")) {
-
 
81
		let fofoId = $('#partnerName').val();
-
 
82
			var params = {
-
 
83
				"serviceId" : serviceId,
-
 
84
				"fofoId" : fofoId,
-
 
85
				"naText":null
-
 
86
			}
-
 
87
			doPostAjaxRequestWithJsonHandler(context + "/partnerservice/applicable", JSON.stringify(params), function(response) {
-
 
88
				alert("successfully Marked Applicable");
-
 
89
				loadAdminPartnerService("main-content", fofoId);
-
 
90
			});
-
 
91
			
-
 
92
		}
-
 
93
	});
-
 
94
	
36
	$(document).on('click', ".add-service-details-for-partner",
95
	$(document).on('click', ".add-service-details-for-partner",
37
			function() {
96
			function() {
38
				fofoId = $("#partnerName").val();
97
				fofoId = $("#partnerName").val();
39
				serviceId = $("#serviceName").val();
98
				serviceId = $("#serviceName").val();
40
				applicableType = $("#applicableService").val();
99
				applicableType = $("#applicableService").val();
Line 560... Line 619...
560
 
619
 
561
	});
620
	});
562
}
621
}
563
function activatePartnerService(fofoId, serviceId) {
622
function activatePartnerService(fofoId, serviceId) {
564
	console.log(fofoId);
623
	console.log(fofoId);
565
	var dialog = bootbox
-
 
566
	.dialog({
624
	bootbox.dialog({
567
		title : "Are you sure you want to activate services!",
625
		title : "Are you sure you want to activate services!",
568
		message : "<div class=form-inline'>"
626
		message : "<div class=form-inline'>"
569
				+ "<label for='code'>Code:</label>"
627
				+ "<label for='code'>Code:</label>"
570
				+ "<input class='form-control' type='text' id='code'/>"
628
				+ "<input class='form-control' type='text' id='code'/>"
571
				+ "</div>",
629
				+ "</div>",
572
		buttons : {
630
		buttons : {
573
			cancel : {
631
			cancel : {
574
				label : "cancel",
632
				label : "cancel",
575
				className : 'btn-danger',
633
				className : 'btn-danger',
576
				callback : function() {
634
				callback : function() {
577
					loadAdminPartnerService("main-content", fofoId);
635
					return;
578
				}
636
				}
579
			},
637
			},
580
			ok : {
638
			ok : {
581
				label : "ok",
639
				label : "ok",
582
				className : 'btn-info',
640
				className : 'btn-info',