Subversion Repositories SmartDukaan

Rev

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

Rev 29050 Rev 29051
Line 32... Line 32...
32
 
32
 
33
			});
33
			});
34
	$(document).on('click', ".add-brand", function() {
34
	$(document).on('click', ".add-brand", function() {
35
		loadaddBrandToService("main-content");
35
		loadaddBrandToService("main-content");
36
	});
36
	});
-
 
37
	$(document).on('click', ".activate-brand-service-modal", function() {
-
 
38
		console.log("activate-brand-service-modal clicked");
-
 
39
		serviceId = $(this).data('serviceid');
-
 
40
		fofoId = $("#partnerName").val();
-
 
41
		serviceBrandId = $(this).data('servicebrandid');
-
 
42
		console.log(fofoId);
-
 
43
		console.log(serviceId);
-
 
44
		console.log(serviceBrandId);
-
 
45
		var params = {
-
 
46
				"serviceId" : serviceId,
-
 
47
				"fofoId" : fofoId,
-
 
48
				"serviceBrandId" : serviceBrandId
-
 
49
 
-
 
50
			}
-
 
51
			doPostAjaxRequestWithParamsHandler(context
-
 
52
			+ "/activatePartnerbrandServiceModal", params, function(response) {
-
 
53
				
-
 
54
				$('#myServiceActivateBrand').html(response);
-
 
55
		
-
 
56
			});
-
 
57
		
-
 
58
 
-
 
59
	});
-
 
60
   $(document).on('click', ".reason-brand-service-not-activates", function() {
-
 
61
		
-
 
62
		console.log("reason-brand-service-not-activates clicked");
-
 
63
		serviceId = $(this).data('serviceid');
-
 
64
		fofoId = $("#partnerName").val();
-
 
65
		serviceBrandId = $(this).data('servicebrandid');
-
 
66
	  var serviceBrandComment = $('input[name="reasonBrandServiceNotActivate"]').val();
-
 
67
		console.log(fofoId);
-
 
68
		console.log(serviceId);
-
 
69
		console.log(serviceBrandId);
-
 
70
		console.log(serviceBrandComment);
-
 
71
		reasonPartnerbrandServiceNotActivate(fofoId, serviceId, serviceBrandId,serviceBrandComment);
-
 
72
	
-
 
73
	});
37
	
74
	
38
	$(document).on('click', ".markNA", function() {
75
	$(document).on('click', ".markNA", function() {
39
		let fofoId = $('#partnerName').val();
76
		let fofoId = $('#partnerName').val();
40
		let serviceId = $(this).data("serviceid");
77
		let serviceId = $(this).data("serviceid");
41
		bootbox.dialog({
78
		bootbox.dialog({
Line 216... Line 253...
216
		console.log(fofoId);
253
		console.log(fofoId);
217
		console.log(serviceId);
254
		console.log(serviceId);
218
		deActivatePartnerService(fofoId, serviceId);
255
		deActivatePartnerService(fofoId, serviceId);
219
	});
256
	});
220
	$(document).on('click', ".activate-brand-service", function() {
257
	$(document).on('click', ".activate-brand-service", function() {
221
		console.log("activate-brand-service clicked");
258
		console.log("activate-brand-servicel clicked");
222
		serviceId = $(this).data('serviceid');
259
		serviceId = $(this).data('serviceid');
223
		fofoId = $("#partnerName").val();
260
		fofoId = $("#partnerName").val();
224
		serviceBrandId = $(this).data('servicebrandid');
261
		serviceBrandId = $(this).data('servicebrandid');
225
		console.log(fofoId);
262
		console.log(fofoId);
226
		console.log(serviceId);
263
		console.log(serviceId);
Line 230... Line 267...
230
	});
267
	});
231
	$(document).on('click', ".deactivate-brand-service", function() {
268
	$(document).on('click', ".deactivate-brand-service", function() {
232
		console.log("activate-brand-service clicked");
269
		console.log("activate-brand-service clicked");
233
		serviceId = $(this).data('serviceid');
270
		serviceId = $(this).data('serviceid');
234
		fofoId = $("#partnerName").val();
271
		fofoId = $("#partnerName").val();
-
 
272
		 var serviceBrandComment = $('input[name="reasonBrandServiceNotActivate"]').val();
-
 
273
		serviceBrandId = $(this).data('servicebrandid');
-
 
274
		console.log(fofoId);
-
 
275
		console.log(serviceId);
-
 
276
		console.log(serviceBrandId);
-
 
277
		console.log(serviceBrandComment);
-
 
278
		deActivatePartnerBrandService(fofoId, serviceId, serviceBrandId,serviceBrandComment);
-
 
279
 
-
 
280
	});
-
 
281
	$(document).on('click', ".deactivate-brand-service-modal", function() {
-
 
282
		console.log("activate-brand-service clicked");
-
 
283
		serviceId = $(this).data('serviceid');
-
 
284
		fofoId = $("#partnerName").val();
235
		serviceBrandId = $(this).data('servicebrandid');
285
		serviceBrandId = $(this).data('servicebrandid');
236
		console.log(fofoId);
286
		console.log(fofoId);
237
		console.log(serviceId);
287
		console.log(serviceId);
238
		console.log(serviceBrandId);
288
		console.log(serviceBrandId);
-
 
289
		var params = {
-
 
290
				"serviceId" : serviceId,
-
 
291
				"fofoId" : fofoId,
239
		deActivatePartnerBrandService(fofoId, serviceId, serviceBrandId);
292
				"serviceBrandId" : serviceBrandId
240
 
293
 
-
 
294
			}
-
 
295
			doPostAjaxRequestWithParamsHandler(context
-
 
296
			+ "/deactivatePartnerbrandServiceModal", params, function(response) {
-
 
297
				
-
 
298
				$('#myServiceDeActivateBrand').html(response);
-
 
299
		
-
 
300
			});
241
	});
301
	});
242
 
302
 
-
 
303
 
243
	$(document).on('click', ".create-service-button",
304
	$(document).on('click', ".create-service-button",
244
					function() {
305
					function() {
245
						console.log("create-service-button clicked");
306
						console.log("create-service-button clicked");
246
						var serviceName = $('#createserviceName').val();
307
						var serviceName = $('#createserviceName').val();
247
						if (serviceName === "" || serviceName === undefined
308
						if (serviceName === "" || serviceName === undefined
Line 319... Line 380...
319
				loadaddPartnerServiceDetails("main-content");
380
				loadaddPartnerServiceDetails("main-content");
320
			}
381
			}
321
		});
382
		});
322
	}
383
	}
323
}
384
}
-
 
385
 
-
 
386
function reasonPartnerbrandServiceNotActivate(fofoId, serviceId, serviceBrandId,serviceBrandComment) {
-
 
387
	if (confirm("Are you sure you want to activate brand service!") == true) {
-
 
388
		var params = {
-
 
389
			"serviceId" : serviceId,
-
 
390
			"fofoId" : fofoId,
-
 
391
			"serviceBrandId" : serviceBrandId,
-
 
392
			"serviceBrandComment" : serviceBrandComment
-
 
393
 
-
 
394
		}
-
 
395
		doPostAjaxRequestWithParamsHandler(context
-
 
396
				+ "/reasonPartnerbrandServiceNotActivate", params, function(response) {
-
 
397
			if (response == "true") {
-
 
398
				alert("successfully set your Comment for brand service not activated");
-
 
399
				$('#myServiceActivateBrand').modal('hide');
-
 
400
				$('.modal-backdrop').remove();
-
 
401
				loadAdminPartnerService("main-content", fofoId);
-
 
402
			}
-
 
403
		});
-
 
404
	}
-
 
405
}
324
function addPartnerServiceBrandDetails(fofoId, serviceId, serviceBrandId,
406
function addPartnerServiceBrandDetails(fofoId, serviceId, serviceBrandId,
325
		applicableType, active, partnerStatus, na_comment,
407
		applicableType, active, partnerStatus, na_comment,
326
		partnerCommentStatus, code) {
408
		partnerCommentStatus, code) {
327
	if (confirm("Are you sure you want to add service brand details!") == true) {
409
	if (confirm("Are you sure you want to add service brand details!") == true) {
328
		var params = {
410
		var params = {
Line 663... Line 745...
663
				}
745
				}
664
			}
746
			}
665
		}
747
		}
666
	});
748
	});
667
}
749
}
-
 
750
 
668
function deActivatePartnerService(fofoId, serviceId) {
751
function deActivatePartnerService(fofoId, serviceId) {
669
	if (confirm("Are you sure you want to deactivate services!") == true) {
752
	if (confirm("Are you sure you want to deactivate services!") == true) {
670
		var params = {
753
		var params = {
671
			"serviceId" : serviceId,
754
			"serviceId" : serviceId,
672
			"fofoId" : fofoId
755
			"fofoId" : fofoId
Line 691... Line 774...
691
		}
774
		}
692
		doPostAjaxRequestWithParamsHandler(context
775
		doPostAjaxRequestWithParamsHandler(context
693
				+ "/activatePartnerbrandService", params, function(response) {
776
				+ "/activatePartnerbrandService", params, function(response) {
694
			if (response == "true") {
777
			if (response == "true") {
695
				alert("successfully activate");
778
				alert("successfully activate");
-
 
779
				$('#myServiceActivateBrand').modal('hide');
-
 
780
				$('.modal-backdrop').remove();
696
				loadAdminPartnerService("main-content", fofoId);
781
				loadAdminPartnerService("main-content", fofoId);
697
			}
782
			}
698
		});
783
		});
699
	}
784
	}
700
}
785
}
-
 
786
 
701
function deActivatePartnerBrandService(fofoId, serviceId, serviceBrandId) {
787
function deActivatePartnerBrandService(fofoId, serviceId, serviceBrandId,serviceBrandComment) {
702
	if (confirm("Are you sure you want to deactivate brand service!") == true) {
788
	if (confirm("Are you sure you want to deactivate brand service!") == true) {
703
		var params = {
789
		var params = {
704
			"serviceId" : serviceId,
790
			"serviceId" : serviceId,
705
			"fofoId" : fofoId,
791
			"fofoId" : fofoId,
706
			"serviceBrandId" : serviceBrandId
792
			"serviceBrandId" : serviceBrandId,
707
 
-
 
-
 
793
			"serviceBrandComment":serviceBrandComment
708
		}
794
		}
709
		doPostAjaxRequestWithParamsHandler(context
795
		doPostAjaxRequestWithParamsHandler(context
710
				+ "/deActivatePartnerbrandService", params, function(response) {
796
				+ "/deActivatePartnerbrandService", params, function(response) {
711
			if (response == "true") {
797
			if (response == "true") {
712
				alert("successfully deactivate");
798
				alert("successfully deactivate");
-
 
799
				$('#myServiceDeActivateBrand').modal('hide');
-
 
800
				$('.modal-backdrop').remove();
713
				loadAdminPartnerService("main-content", fofoId);
801
				loadAdminPartnerService("main-content", fofoId);
714
			}
802
			}
715
		});
803
		});
716
	}
804
	}
717
}
805
}