Subversion Repositories SmartDukaan

Rev

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

Rev 30649 Rev 31249
Line 15... Line 15...
15
 
15
 
16
	$(document).on('click', ".submitCommitment",
16
	$(document).on('click', ".submitCommitment",
17
		function() {
17
		function() {
18
			var startDateTime = getDatesFromPicker('input[name="commitmentDate"]').startDate;
18
			var startDateTime = getDatesFromPicker('input[name="commitmentDate"]').startDate;
19
			doGetAjaxRequestHandler(context + "/getTeamCommitment?date="
19
			doGetAjaxRequestHandler(context + "/getTeamCommitment?date="
20
				+ startDateTime, function (response) {
20
				+ startDateTime, function(response) {
21
				$('.teamcommitmentcontainer').html(response);
21
					$('.teamcommitmentcontainer').html(response);
22
 
22
 
23
			});
23
				});
24
		});
24
		});
25
 
25
 
26
 
26
 
-
 
27
 
27
	$(document).on('click', ".submitDateWiseLead", function() {
28
	$(document).on('click', ".submitDateWiseLead", function() {
28
 
29
 
29
 
30
 
30
		var leadDate = $("#dateWiseLead").val();
31
		var leadDate = $("#dateWiseLead").val();
31
		var status = $("#statusFilter").val();
32
		var status = $("#statusFilter").val();
Line 40... Line 41...
40
 
41
 
41
		doGetAjaxRequestHandler(context + "/getOpenLead?leadStatus=" + status + "&color=" + color + "&leadDate=" + leadDate, function(response) {
42
		doGetAjaxRequestHandler(context + "/getOpenLead?leadStatus=" + status + "&color=" + color + "&leadDate=" + leadDate, function(response) {
42
			$('#' + 'main-content').html(response);
43
			$('#' + 'main-content').html(response);
43
		});
44
		});
44
 
45
 
-
 
46
 
-
 
47
	});
-
 
48
 
-
 
49
 
-
 
50
	$(document).on('click', ".visit-request-plan", function() {
-
 
51
 
-
 
52
		doGetAjaxRequestHandler(context + "/visitPlan", function(response) {
-
 
53
			$('#' + 'main-content').html(response);
-
 
54
		});
-
 
55
 
-
 
56
	});
-
 
57
 
-
 
58
	$(document).on('click', ".visitPlan", function() {
-
 
59
 
-
 
60
		let dateWisePlan = $("#dateVisitSearch").val();
-
 
61
 
-
 
62
		doGetAjaxRequestHandler(context + "/visit/getVisitPlan?date=" + dateWisePlan, function(response) {
-
 
63
			$('#' + 'main-content').html(response);
-
 
64
		});
-
 
65
 
45
	});
66
	});
46
 
67
 
47
	$(document).on('click', ".lead-close", function() {
68
	$(document).on('click', ".lead-close", function() {
48
		loadClosedLead("main-content");
69
		loadClosedLead("main-content");
49
	});
70
	});
Line 193... Line 214...
193
			var city = $('input[name="city"]').val();
214
			var city = $('input[name="city"]').val();
194
			var state = $("#state").val();
215
			var state = $("#state").val();
195
			var remark = $("#createRemark").val();
216
			var remark = $("#createRemark").val();
196
			var assignTo = $("#createAssignTo").val();
217
			var assignTo = $("#createAssignTo").val();
197
			var source = $("#leadSource").val();
218
			var source = $("#leadSource").val();
-
 
219
			var communicationType = $("#communicationTye").val();
198
 
220
 
199
			console.log(remark);
221
			console.log(communicationType);
200
			if (firstName === "" && lastName === "" && mobile === ""
222
			if (firstName === "" && lastName === "" && mobile === ""
201
				&& address === "" && status === "" && city === ""
223
				&& address === "" && status === "" && city === ""
202
				&& state === "" && remark === "" && source === "") {
224
				&& state === "" && remark === "" && source === "") {
203
				alert("Field can't be empty");
225
				alert("Field can't be empty");
204
				return;
226
				return;
Line 254... Line 276...
254
			leaddetailData['remark'] = remark
276
			leaddetailData['remark'] = remark
255
			leaddetailData['assignTo'] = assignTo
277
			leaddetailData['assignTo'] = assignTo
256
			leaddetailData['source'] = source
278
			leaddetailData['source'] = source
257
			if (status == "followUp") {
279
			if (status == "followUp") {
258
				leaddetailData['schelduleTimestamp'] = getDatesFromPicker('#scheduleTime').startDate;
280
				leaddetailData['schelduleTimestamp'] = getDatesFromPicker('#scheduleTime').startDate;
-
 
281
 
-
 
282
				leaddetailData['communicationType'] = communicationType
259
			}
283
			}
260
			console.log(leaddetailData);
284
			console.log(leaddetailData);
261
 
285
 
262
			if (confirm("Are you sure you want to add lead!") == true) {
286
			if (confirm("Are you sure you want to add lead!") == true) {
263
				doPostAjaxRequestWithJsonHandler(context + "/createLead",
287
				doPostAjaxRequestWithJsonHandler(context + "/createLead",
Line 306... Line 330...
306
			var reason = $("#reason").val();
330
			var reason = $("#reason").val();
307
 
331
 
308
			var leadDate = $("#dateWiseLead").val();
332
			var leadDate = $("#dateWiseLead").val();
309
			var leadStatus = $("#statusFilter").val();
333
			var leadStatus = $("#statusFilter").val();
310
			var color = $("#colorFilter").val();
334
			var color = $("#colorFilter").val();
-
 
335
			var communicationType = $("#communicationType").val();
311
 
336
 
312
 
337
 
313
			console.log(leadDate)
338
			console.log(leadDate)
314
			console.log(leadStatus)
339
			console.log(leadStatus)
315
 
340
 
Line 350... Line 375...
350
			leadActivityData['status'] = editStatus
375
			leadActivityData['status'] = editStatus
351
			leadActivityData['reason'] = reason
376
			leadActivityData['reason'] = reason
352
 
377
 
353
			if (editStatus == "followUp") {
378
			if (editStatus == "followUp") {
354
				leadActivityData['scheldule'] = getDatesFromPicker('input[name="editScheduleTime"]').startDate
379
				leadActivityData['scheldule'] = getDatesFromPicker('input[name="editScheduleTime"]').startDate
-
 
380
				leadActivityData['communicationType'] = communicationType
-
 
381
 
355
			}
382
			}
356
 
383
 
357
			console.log(leadActivityData);
384
			console.log(leadActivityData);
358
			if (confirm("Are you sure you want to add lead!") == true) {
385
			if (confirm("Are you sure you want to add lead!") == true) {
359
				doPostAjaxRequestWithJsonHandler(context + "/editLead", JSON.stringify(leadActivityData), function(response) {
386
				doPostAjaxRequestWithJsonHandler(context + "/editLead", JSON.stringify(leadActivityData), function(response) {