Subversion Repositories SmartDukaan

Rev

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

Rev 32885 Rev 33081
Line 670... Line 670...
670
		console.log(categoryId)
670
		console.log(categoryId)
671
		loadAuthSubCategories(categoryId, authId);
671
		loadAuthSubCategories(categoryId, authId);
672
	});
672
	});
673
 
673
 
674
 
674
 
675
	$(document).on('click', ".create-ticket-category-button",
675
	$(document).on('click', ".create-ticket-category-button", function () {
676
		function() {
-
 
677
			console
-
 
678
				.log("create-ticket-category-button clicked......");
676
		console.log("create-ticket-category-button clicked......");
-
 
677
 
679
			var name = $("#categoryName").val();
678
		var name = $("#categoryName").val();
680
			var description = $("#categorydescription").val();
679
		var description = $("#categorydescription").val();
-
 
680
		var categoryType = $("#categoryType").is(":checked") ? 1 : 0;
-
 
681
 
681
			console.log(name, description);
682
		console.log('cccccccccccccc', name, description, categoryType);
-
 
683
 
682
			if (name == "" || name == null || name == undefined) {
684
		if (name === "" || name === null || name === undefined) {
683
				alert("Name field can't be empty");
685
			alert("Name field can't be empty");
684
				return false;
686
			return false;
685
			}
687
		}
-
 
688
 
686
			if (description == "" || description == null
689
		if (description === "" || description === null || description === undefined) {
687
				|| description == undefined) {
-
 
688
				alert("Description field can't be empty");
690
			alert("Description field can't be empty");
689
				return false;
691
			return false;
690
			}
692
		}
-
 
693
 
691
			if (confirm("Are you sure you want to create ticket category!") == true) {
694
		if (confirm("Are you sure you want to create a ticket category?")) {
692
				createCategory("main-content", name, description);
695
			createCategory("main-content", name, description, categoryType);
693
			}
696
		}
694
		});
697
	});
-
 
698
 
695
	$(document).on('click', ".create-region-button",
699
	$(document).on('click', ".create-region-button",
696
		function() {
700
		function() {
697
			var name = $("#regionName").val();
701
			var name = $("#regionName").val();
698
			var description = $("#regiondescription").val();
702
			var description = $("#regiondescription").val();
699
			if (name == "" || name == null || name == undefined) {
703
			if (name == "" || name == null || name == undefined) {
Line 972... Line 976...
972
		});
976
		});
973
 
977
 
974
 
978
 
975
}
979
}
976
 
980
 
977
function createCategory(domId, name, description) {
981
function createCategory(domId, name, description, categoryType) {
978
	var params = {
982
	var params = {
979
		"name": name,
983
		"name": name,
980
		"description": description
984
		"description": description,
-
 
985
		"categoryType": categoryType,
981
	}
986
	};
-
 
987
 
982
	doPostAjaxRequestWithParamsHandler(context + "/cs/createCategory", params,
988
	doPostAjaxRequestWithParamsHandler(context + "/cs/createCategory", params, function (response) {
983
		function(response) {
-
 
984
			alert("Category created successfully");
989
		alert("Category created successfully");
985
			loadCreateCategory(domId);
990
		loadCreateCategory(domId);
986
		});
991
	});
987
}
992
}
-
 
993
 
988
function changeTicket(ticketId, subCategoryId, authUserId, categoryId, escalationType) {
994
function changeTicket(ticketId, subCategoryId, authUserId, categoryId, escalationType) {
989
	var params = {
995
	var params = {
990
		"ticketId": ticketId,
996
		"ticketId": ticketId,
991
		"subCategoryId": subCategoryId,
997
		"subCategoryId": subCategoryId,
992
		"authUserId": authUserId,
998
		"authUserId": authUserId,
Line 1059... Line 1065...
1059
}
1065
}
1060
function loadticketSubCategoryById(ticketCategoryId) {
1066
function loadticketSubCategoryById(ticketCategoryId) {
1061
	doGetAjaxRequestHandler(context
1067
	doGetAjaxRequestHandler(context
1062
		+ "/cs/getSubCategoryByCategoryId?ticketCategoryId="
1068
		+ "/cs/getSubCategoryByCategoryId?ticketCategoryId="
1063
		+ ticketCategoryId, function(response) {
1069
		+ ticketCategoryId, function(response) {
-
 
1070
		console.log('response', response);
1064
			$(".ticket-sub-category-container").html(response);
1071
			$(".ticket-sub-category-container").html(response);
1065
		});
1072
		});
1066
}
1073
}
1067
function createPartnerRegion(domId, regionId, fofoIds) {
1074
function createPartnerRegion(domId, regionId, fofoIds) {
1068
	doPostAjaxRequestWithJsonHandler(context
1075
	doPostAjaxRequestWithJsonHandler(context