Subversion Repositories SmartDukaan

Rev

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

Rev 29058 Rev 29064
Line 5... Line 5...
5
	
5
	
6
	$(document).on('click', ".add-brand", function() {
6
	$(document).on('click', ".add-brand", function() {
7
		loadaddBrandToService("main-content");
7
		loadaddBrandToService("main-content");
8
	});
8
	});
9
 
9
 
10
	$(document).on('click', ".notApplicableService",
-
 
11
			function() {
-
 
12
				naCommentService = $(this).data('nacommentservice');
-
 
13
				console.log(naCommentService);
-
 
14
				var dialog = bootbox.dialog({
-
 
15
					message : "<h4 style='color:red'>NOTAPPLICABLE</h4><p>"
-
 
16
							+ naCommentService + "</p>",
-
 
17
					closeButton : true
-
 
18
				});
-
 
19
				dialog.modal('show');
-
 
20
 
-
 
21
			});
-
 
22
	$(document).on('click', ".notApplicableBrandService",
10
	$(document).on('click', ".notApplicableBrandService",
23
			function() {
11
			function() {
24
				naCommentService = $(this).data('nacommentservice');
12
				naCommentService = $(this).data('nacommentservice');
25
				console.log(naCommentService);
13
				console.log(naCommentService);
26
				var dialog = bootbox.dialog({
14
				var dialog = bootbox.dialog({
Line 55... Line 43...
55
		
43
		
56
			});
44
			});
57
		
45
		
58
 
46
 
59
	});
47
	});
-
 
48
	$(document).on('click', ".notApplicableService",
-
 
49
			function() {
-
 
50
				
60
	
51
		
-
 
52
		
-
 
53
 
-
 
54
			});
61
$(document).on('click', ".submit-brand-not-available", function() {
55
$(document).on('click', ".submit-brand-not-available", function() {
62
		
56
		
63
	console.log("submit-brand-not-available");
57
	console.log("submit-brand-not-available");
64
	serviceId = $(this).data('serviceid');
58
	serviceId = $(this).data('serviceid');
65
	   fofoId = $("#partnerName").val();
59
	   fofoId = $("#partnerName").val();
Line 301... Line 295...
301
		console.log(serviceBrandId);
295
		console.log(serviceBrandId);
302
		console.log(serviceBrandComment);
296
		console.log(serviceBrandComment);
303
		deActivatePartnerBrandService(fofoId, serviceId, serviceBrandId,serviceBrandComment);
297
		deActivatePartnerBrandService(fofoId, serviceId, serviceBrandId,serviceBrandComment);
304
 
298
 
305
	});
299
	});
-
 
300
	$(document).on('click', ".partner-not-interested-service", function() {
-
 
301
		
-
 
302
		serviceId = $(this).data('serviceid');
-
 
303
		fofoId = $("#partnerName").val();
-
 
304
		 var partnerNotInterestedComment = $('input[name="reasonPartnerNotInterested"]').val();
-
 
305
		
-
 
306
		console.log(fofoId);
-
 
307
		console.log(serviceId);
-
 
308
		console.log(partnerNotInterestedComment);
-
 
309
		
-
 
310
		if (partnerNotInterestedComment == "" || partnerNotInterestedComment == undefined) {
-
 
311
			alert("Comment Should Be Filled");
-
 
312
			return;
-
 
313
		}
-
 
314
		
-
 
315
		
-
 
316
		deActivatePartnerServiceByPartner(fofoId, serviceId,partnerNotInterestedComment);
-
 
317
 
-
 
318
	});
-
 
319
	
306
	$(document).on('click', ".deactivate-brand-service-modal", function() {
320
	$(document).on('click', ".deactivate-brand-service-modal", function() {
307
		console.log("activate-brand-service clicked");
321
		console.log("activate-brand-service clicked");
308
		serviceId = $(this).data('serviceid');
322
		serviceId = $(this).data('serviceid');
309
		fofoId = $("#partnerName").val();
323
		fofoId = $("#partnerName").val();
310
		serviceBrandId = $(this).data('servicebrandid');
324
		serviceBrandId = $(this).data('servicebrandid');
Line 322... Line 336...
322
				
336
				
323
				$('#myServiceDeActivateBrand').html(response);
337
				$('#myServiceDeActivateBrand').html(response);
324
		
338
		
325
			});
339
			});
326
	});
340
	});
-
 
341
	
-
 
342
	$(document).on('click', ".notApplicableByPartner", function() {
-
 
343
		console.log("notApplicableByPartner");
-
 
344
		
-
 
345
		serviceId = $(this).data('serviceid');
-
 
346
		fofoId = $("#partnerName").val();
-
 
347
		
-
 
348
		console.log(fofoId);
-
 
349
		console.log(serviceId);
-
 
350
		
-
 
351
		var params = {
-
 
352
				"serviceId" : serviceId,
-
 
353
				"fofoId" : fofoId,
-
 
354
 
-
 
355
			}
-
 
356
			doPostAjaxRequestWithParamsHandler(context
-
 
357
			+ "/deactivatePartnerbrandServiceModal", params, function(response) {
-
 
358
				
-
 
359
				$('#serviceDeactivateByPartnerModal').html(response);
-
 
360
		
-
 
361
			});
-
 
362
	});
327
 
363
 
328
 
364
 
329
	$(document).on('click', ".create-service-button",
365
	$(document).on('click', ".create-service-button",
330
					function() {
366
					function() {
331
						console.log("create-service-button clicked");
367
						console.log("create-service-button clicked");
Line 807... Line 843...
807
				loadAdminPartnerService("main-content", fofoId);
843
				loadAdminPartnerService("main-content", fofoId);
808
			}
844
			}
809
		});
845
		});
810
	}
846
	}
811
}
847
}
-
 
848
	
-
 
849
	function deActivatePartnerServiceByPartner(fofoId, serviceId, partnerNotInterestedComment) {
-
 
850
		if (confirm("Are you sure you want to Deactivate service!") == true) {
-
 
851
			var params = {
-
 
852
				"serviceId" : serviceId,
-
 
853
				"fofoId" : fofoId,
-
 
854
				"partnerNotInterestedComment" : partnerNotInterestedComment
-
 
855
 
-
 
856
			}
-
 
857
			doPostAjaxRequestWithParamsHandler(context
-
 
858
					+ "/deActivatePartnerBrandServiceByPartner", params, function(response) {
-
 
859
				if (response == "true") {
-
 
860
					alert("successfully activate");
-
 
861
					$('#serviceDeactivateByPartnerModal').modal('hide');
-
 
862
					$('.modal-backdrop').remove();
-
 
863
					loadAdminPartnerService("main-content", fofoId);
-
 
864
				}
-
 
865
			});
-
 
866
		}
-
 
867
}
812
 
868
 
813
function deActivatePartnerBrandService(fofoId, serviceId, serviceBrandId,serviceBrandComment) {
869
function deActivatePartnerBrandService(fofoId, serviceId, serviceBrandId,serviceBrandComment) {
814
	if (confirm("Are you sure you want to deactivate brand service!") == true) {
870
	if (confirm("Are you sure you want to deactivate brand service!") == true) {
815
		var params = {
871
		var params = {
816
			"serviceId" : serviceId,
872
			"serviceId" : serviceId,