Subversion Repositories SmartDukaan

Rev

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

Rev 27187 Rev 27682
Line 127... Line 127...
127
			alert("First Name is required");
127
			alert("First Name is required");
128
			return false;
128
			return false;
129
		}
129
		}
130
		customerObj['firstName'] = $("input.firstName").val();
130
		customerObj['firstName'] = $("input.firstName").val();
131
		customerObj['lastName'] = $("input.lastName").val();
131
		customerObj['lastName'] = $("input.lastName").val();
132
		customerObj['emailId'] = $("#email").val();
132
		customerObj['emailId'] = $("#emailIds").val();
-
 
133
		
-
 
134
		console.log(first);
-
 
135
		console.log(last);
-
 
136
		console.log(customerObj['emailId']);
133
		customerObj['mobileNumber'] = $("input.phone").val();
137
		customerObj['mobileNumber'] = $("input.phone").val();
134
		doPostAjaxRequestWithJsonHandler(`${context}/customer/add`, JSON.stringify(customerObj), function(response){
138
		doPostAjaxRequestWithJsonHandler(`${context}/customer/add`, JSON.stringify(customerObj), function(response){
135
			alert("Customer added");
139
			alert("Customer added");
136
			$( "input.search-phone").val(customerObj['mobileNumber']).change();
140
			$( "input.search-phone").val(customerObj['mobileNumber']).change();
137
		});
141
		});
Line 380... Line 384...
380
		}
384
		}
381
		$('input.firstName').attr('value', customer.firstName).attr('readonly', true);
385
		$('input.firstName').attr('value', customer.firstName).attr('readonly', true);
382
		$('input.lastName').attr('value', customer.lastName).attr('readonly', true);
386
		$('input.lastName').attr('value', customer.lastName).attr('readonly', true);
383
		$('input.phone').attr('value', customer.mobileNumber).attr('readonly', true);
387
		$('input.phone').attr('value', customer.mobileNumber).attr('readonly', true);
384
		if(customer.emailId!=null) {
388
		if(customer.emailId!=null) {
385
			$('#email').attr('value', customer.emailId).attr('readonly', true);
389
			$('#emailIds').attr('value', customer.emailId).attr('readonly', true);
-
 
390
			console.log('helo');
386
		}
391
		}
387
		$('#firstName').attr('value', customer.firstName);
392
		$('#firstName').attr('value', customer.firstName);
388
		$('#lastName').attr('value', customer.lastName);
393
		$('#lastName').attr('value', customer.lastName);
389
		$('#alternatePhone').attr('value', customer.mobileNumber);
394
		$('#alternatePhone').attr('value', customer.mobileNumber);
390
	    customerId = customer.customerId;
395
	    customerId = customer.customerId;