Subversion Repositories SmartDukaan

Rev

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

Rev 27755 Rev 28200
Line 95... Line 95...
95
 
95
 
96
 
96
 
97
	$(document).on('click', ".show-colowise-lead", function() {
97
	$(document).on('click', ".show-colowise-lead", function() {
98
		var status = $("#statusFilter").val();
98
		var status = $("#statusFilter").val();
99
		var color = $("#colorFilter").val();
99
		var color = $("#colorFilter").val();
100
		doGetAjaxRequestHandler(context + "/getOpenLead?leadStatus=" + status + "&color="  + color, function(response) {
100
		doGetAjaxRequestHandler(context + "/getOpenLead?leadStatus=" + status + "&color=" + color, function(response) {
101
			$('#' + 'main-content').html(response);
101
			$('#' + 'main-content').html(response);
102
		});
102
		});
103
	});
103
	});
104
 
104
 
105
 
105
 
Line 207... Line 207...
207
	$(document).on('click', ".lead-edit-request",
207
	$(document).on('click', ".lead-edit-request",
208
		function() {
208
		function() {
209
			var remark = $('input[name="remark"]').val();
209
			var remark = $('input[name="remark"]').val();
210
			var assignTo = $("#assignTo").val();
210
			var assignTo = $("#assignTo").val();
211
			var editStatus = $("#editStatus").val();
211
			var editStatus = $("#editStatus").val();
-
 
212
			var reason = $("#reason").val();
212
 
213
 
-
 
214
			console.log(editStatus)
-
 
215
			console.log(reason)
213
 
216
 
214
			if (remark === "" && assignTo === "" && editStatus === "") {
217
			if (remark === "" && assignTo === "" && editStatus === "") {
215
				alert("All fields is required");
218
				alert("All fields is required");
216
				return;
219
				return;
217
			}
220
			}
Line 224... Line 227...
224
			if (remark === "") {
227
			if (remark === "") {
225
				alert("Remark is required");
228
				alert("Remark is required");
226
				return;
229
				return;
227
			}
230
			}
228
 
231
 
-
 
232
 
229
			if (editStatus === "") {
233
			if (editStatus === "") {
230
				alert("status is required");
234
				alert("status is required");
231
				return;
235
				return;
232
			}
236
			}
233
 
237
 
-
 
238
			if (editStatus === "notInterested") {
-
 
239
				if (reason == null) {
-
 
240
					alert("Reason  is required");
-
 
241
					return;
-
 
242
				}
234
 
243
			}
235
			var leadActivityData = {}
244
			var leadActivityData = {}
236
			leadActivityData['id'] = leadId;
245
			leadActivityData['id'] = leadId;
237
			leadActivityData['remark'] = remark;
246
			leadActivityData['remark'] = remark;
238
			leadActivityData['assignTo'] = assignTo
247
			leadActivityData['assignTo'] = assignTo
239
			leadActivityData['status'] = editStatus
248
			leadActivityData['status'] = editStatus
-
 
249
			leadActivityData['reason'] = reason
240
			if (editStatus == "followUp") {
250
			if (editStatus == "followUp") {
241
				leadActivityData['scheldule'] = startDate
251
				leadActivityData['scheldule'] = startDate
242
			}
252
			}
243
 
253
 
244
			console.log(leadActivityData);
254
			console.log(leadActivityData);