Subversion Repositories SmartDukaan

Rev

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

Rev 33081 Rev 34913
Line 182... Line 182...
182
			if (confirm("Are you sure you want to change ticket!") == true) {
182
			if (confirm("Are you sure you want to change ticket!") == true) {
183
				changeTicket(ticketId, subCategory, authUserId,
183
				changeTicket(ticketId, subCategory, authUserId,
184
					categoryId, escalationType);
184
					categoryId, escalationType);
185
			}
185
			}
186
		});
186
		});
-
 
187
 
-
 
188
	$(document).on('click', ".change-partner-ticket-button",
-
 
189
		function () {
-
 
190
			var ticketId = $("#ticketId").val();
-
 
191
			var subCategory = $("#subCategory").val();
-
 
192
			var authUserId;
-
 
193
			var categoryId = $("#category").val();
-
 
194
 
-
 
195
			var escalationType = $("#escalationType").val();
-
 
196
			console.log(ticketId);
-
 
197
			if (subCategory == null || subCategory == ""
-
 
198
				|| subCategory == undefined) {
-
 
199
				alert("Choose appropriate subCategory");
-
 
200
				return false;
-
 
201
			}
-
 
202
 
-
 
203
			console.log(subCategory);
-
 
204
 
-
 
205
			console.log(categoryId);
-
 
206
			console.log(authUserId);
-
 
207
			if (confirm("Are you sure you want to change ticket!") == true) {
-
 
208
				changeMyPartnerTicket(ticketId, subCategory, authUserId,
-
 
209
					categoryId, escalationType);
-
 
210
			}
-
 
211
		});
187
	$(document).on('click', "#edit-ticket", function() {
212
	$(document).on('click', "#edit-ticket", function() {
188
		var ticketId = $(this).data('ticketid1');
213
		var ticketId = $(this).data('ticketid1');
189
		loadEditTicket(ticketId);
214
		loadEditTicket(ticketId);
190
	});
215
	});
-
 
216
 
-
 
217
	$(document).on('click', "#edit-ticket-partner", function () {
-
 
218
		var ticketId = $(this).data('ticketid1');
-
 
219
		loadMyPartnerEditTicket(ticketId);
-
 
220
	});
-
 
221
 
191
	$(document).on('click', ".manager-ticket", function() {
222
	$(document).on('click', ".manager-ticket", function() {
192
		loadManagerTicket("main-content", null, null);
223
		loadManagerTicket("main-content", null, null);
193
	});
224
	});
194
	$(document).on('click', ".access-management", function() {
225
	$(document).on('click', ".access-management", function() {
195
		loadAccessManagement("main-content", null, null);
226
		loadAccessManagement("main-content", null, null);
Line 460... Line 491...
460
		loadCreatePartnerRegion("main-content");
491
		loadCreatePartnerRegion("main-content");
461
	});
492
	});
462
	$(document).on('click', ".create-ticket", function() {
493
	$(document).on('click', ".create-ticket", function() {
463
		loadCreateTicket("main-content");
494
		loadCreateTicket("main-content");
464
	});
495
	});
-
 
496
 
-
 
497
	$(document).on('click', ".my-partner-ticket", function () {
-
 
498
		loadMyPartnerTicket("main-content");
-
 
499
	});
465
	$(document).on('click', ".create-ticket-button",
500
	$(document).on('click', ".create-ticket-button",
466
		function() {
501
		function() {
467
			var categoryId = $('#category').val();
502
			var categoryId = $('#category').val();
468
			var subCategoryId = $('#subCategory').val();
503
			var subCategoryId = $('#subCategory').val();
469
			if (categoryId == "" || categoryId == null
504
			if (categoryId == "" || categoryId == null
Line 1006... Line 1041...
1006
				loadManagerTicket("main-content", null, null, null, null,
1041
				loadManagerTicket("main-content", null, null, null, null,
1007
					null);
1042
					null);
1008
			}
1043
			}
1009
		});
1044
		});
1010
}
1045
}
-
 
1046
 
-
 
1047
function changeMyPartnerTicket(ticketId, subCategoryId, authUserId, categoryId, escalationType) {
-
 
1048
	var params = {
-
 
1049
		"ticketId": ticketId,
-
 
1050
		"subCategoryId": subCategoryId,
-
 
1051
		"authUserId": authUserId,
-
 
1052
		"categoryId": categoryId,
-
 
1053
		"escalationType": escalationType
-
 
1054
	}
-
 
1055
	doPostAjaxRequestWithParamsHandler(context + "/cs/edit-partner-ticket", params,
-
 
1056
		function (response) {
-
 
1057
			if (response == "true") {
-
 
1058
				alert("Ticket changed successfully");
-
 
1059
				loadMyPartnerTicket("main-content", null, null, null, null,
-
 
1060
					null);
-
 
1061
			}
-
 
1062
		});
-
 
1063
}
-
 
1064
 
-
 
1065
 
1011
function createRegion(domId, name, description) {
1066
function createRegion(domId, name, description) {
1012
	var params = {
1067
	var params = {
1013
		"name": name,
1068
		"name": name,
1014
		"description": description
1069
		"description": description
1015
	}
1070
	}
Line 1061... Line 1116...
1061
function loadCreateTicket(domId) {
1116
function loadCreateTicket(domId) {
1062
	doGetAjaxRequestHandler(context + "/cs/createTicket", function(response) {
1117
	doGetAjaxRequestHandler(context + "/cs/createTicket", function(response) {
1063
		$('#' + domId).html(response);
1118
		$('#' + domId).html(response);
1064
	});
1119
	});
1065
}
1120
}
-
 
1121
 
-
 
1122
function loadMyPartnerTicket(domId) {
-
 
1123
	doGetAjaxRequestHandler(context + "/cs/myPartyTicketTicket", function (response) {
-
 
1124
		$('#' + domId).html(response);
-
 
1125
	});
-
 
1126
}
1066
function loadticketSubCategoryById(ticketCategoryId) {
1127
function loadticketSubCategoryById(ticketCategoryId) {
1067
	doGetAjaxRequestHandler(context
1128
	doGetAjaxRequestHandler(context
1068
		+ "/cs/getSubCategoryByCategoryId?ticketCategoryId="
1129
		+ "/cs/getSubCategoryByCategoryId?ticketCategoryId="
1069
		+ ticketCategoryId, function(response) {
1130
		+ ticketCategoryId, function(response) {
1070
		console.log('response', response);
1131
		console.log('response', response);
Line 1164... Line 1225...
1164
		function(response) {
1225
		function(response) {
1165
			$("#theModal .modal-content").html(response);
1226
			$("#theModal .modal-content").html(response);
1166
 
1227
 
1167
		});
1228
		});
1168
}
1229
}
-
 
1230
 
-
 
1231
function loadMyPartnerEditTicket(ticketId) {
-
 
1232
	doGetAjaxRequestHandler(context + "/cs/edit-partner-ticket?ticketId=" + ticketId,
-
 
1233
		function (response) {
-
 
1234
			$("#theModal2 .modal-content").html(response);
-
 
1235
 
-
 
1236
		});
-
 
1237
}
1169
function loadPartnerForRegion(regionId) {
1238
function loadPartnerForRegion(regionId) {
1170
	doGetAjaxRequestHandler(context + "/cs/getPartners?regionId=" + regionId,
1239
	doGetAjaxRequestHandler(context + "/cs/getPartners?regionId=" + regionId,
1171
		function(response) {
1240
		function(response) {
1172
			$("#partner-region-container").html(response);
1241
			$("#partner-region-container").html(response);
1173
		});
1242
		});