|
|
@ -1,5 +1,4 @@ |
|
|
|
@model CustomerOnlineV2.Common.Models.RegisterModel.OnlineCustomerRegisterModel |
|
|
|
|
|
|
|
@using CustomerOnlineV2.Common.Helper |
|
|
|
@{ |
|
|
|
Layout = "_Layout2"; |
|
|
@ -100,7 +99,6 @@ |
|
|
|
<div class="row gx-3 align-items-baseline"> |
|
|
|
<label class="col-sm-3 text-muted text-sm-end mb-0 mb-sm-3">Occupation :</label> |
|
|
|
<p class="col-sm-9 text-3" id="occupation"> |
|
|
|
|
|
|
|
</p> |
|
|
|
</div> |
|
|
|
<div class="row gx-3 align-items-baseline"> |
|
|
@ -117,7 +115,6 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- Edit Details Modal --> |
|
|
|
|
|
|
|
<!-- Personal Details End --> |
|
|
|
<!-- Account Settings --> |
|
|
|
<div class="bg-white shadow-sm rounded p-4 mb-4"> |
|
|
@ -171,7 +168,6 @@ |
|
|
|
<div class="row g-3"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<input asp-for="customerId" hidden /> |
|
|
|
<div class="col-12 col-sm-6"> |
|
|
|
<label for="postalCode" class="form-label">Zip Code</label> |
|
|
@ -209,6 +205,7 @@ |
|
|
|
<div class="col-12 col-sm-6"> |
|
|
|
<label for="city" class="form-label">City</label> |
|
|
|
<input type="text" id="pCity" class="form-control" required placeholder="City" readonly /> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="col-12 col-sm-6"> |
|
|
|
<label for="input-zone" class="form-label">Address1</label> |
|
|
@ -279,7 +276,6 @@ |
|
|
|
<div class="col-12 col-sm-6"> |
|
|
|
<label for="zipCode" class="form-label">Id Type</label> |
|
|
|
<select class="form-select" id="idType" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getIdType", true)" required> |
|
|
|
|
|
|
|
</select> |
|
|
|
</div> |
|
|
|
<div class="col-12 col-sm-6"> |
|
|
@ -289,7 +285,6 @@ |
|
|
|
<div class="col-12 col-sm-6"> |
|
|
|
<label for="input-zone" class="form-label">Id Issue Country</label> |
|
|
|
<select class="form-select" id="nativeCountry" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("allCountrylist", true)" required> |
|
|
|
|
|
|
|
</select> |
|
|
|
</div> |
|
|
|
<div class="col-12 col-sm-6"> |
|
|
@ -323,8 +318,7 @@ |
|
|
|
<div class="col-12 col-md-6 col-lg-4"> |
|
|
|
<div class="account-doc rounded p-3"> |
|
|
|
<div class="front"> |
|
|
|
@* <img src="images/profile-thumb.jpg" class="img-fluid"> *@ |
|
|
|
<img class="img-fluid" src="@Url.Content("~/images/profile-thumb.jpg")" /> |
|
|
|
<img src="images/profile-thumb.jpg" class="img-fluid"> |
|
|
|
<span class="mt-4">Front</span> |
|
|
|
</div> |
|
|
|
<div class="account-doc-overlay rounded"> |
|
|
@ -337,8 +331,7 @@ |
|
|
|
<div class="col-12 col-md-6 col-lg-4"> |
|
|
|
<div class="account-doc rounded p-3"> |
|
|
|
<div class="front"> |
|
|
|
@* <img src="images/profile-thumb.jpg" class="img-fluid"> *@ |
|
|
|
<img class="img-fluid" src="@Url.Content("~/images/profile-thumb.jpg")" /> |
|
|
|
<img src="images/profile-thumb.jpg" class="img-fluid"> |
|
|
|
<span class="mt-4">Back</span> |
|
|
|
</div> |
|
|
|
<div class="account-doc-overlay rounded"> |
|
|
@ -356,12 +349,7 @@ |
|
|
|
</a> |
|
|
|
</div> *@ |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="bg-white shadow-sm rounded p-4 mb-4"> |
|
|
|
<h3 class="text-5 fw-400 mb-4">Proof of address<span class="text-muted text-2 ms-2">(Bank Statement / Utility Bills / Driving License)</span></h3> |
|
|
|
|
|
|
@ -376,8 +364,7 @@ |
|
|
|
<div class="col-12 col-md-6 col-lg-4"> |
|
|
|
<div class="account-doc rounded p-3"> |
|
|
|
<div class="front"> |
|
|
|
@* <img src="images/profile-thumb.jpg" class="img-fluid"> *@ |
|
|
|
<img class="img-fluid" src="@Url.Content("~/images/profile-thumb.jpg")" /> |
|
|
|
<img src="images/profile-thumb.jpg" class="img-fluid"> |
|
|
|
<span class="mt-4">Front</span> |
|
|
|
</div> |
|
|
|
<div class="account-doc-overlay rounded"> |
|
|
@ -424,7 +411,7 @@ |
|
|
|
<form id="updateCard" method="post"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label for="IdFront" class="form-label">Document Type</label> |
|
|
|
<select class="form-select" id="documentType" aria-label="Floating label select example" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getIdType", true)" required> |
|
|
|
<select class="form-select" id="primary-IdType" aria-label="Floating label select example" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getIdType", true)" required> |
|
|
|
@* <select class="form-select" id="doc" name=""> *@ |
|
|
|
@* <option value="0" selected>-- Select --</option> |
|
|
|
<option value="1">Id Card</option> |
|
|
@ -435,8 +422,9 @@ |
|
|
|
<div class="mb-3"> |
|
|
|
<label for="IdFront" class="form-label">Document Front</label> |
|
|
|
<div class="input-group flex-nowrap"> |
|
|
|
<div class="flex-grow-1 input-file"> |
|
|
|
<input type="text" id="fileName" class="form-control" placeholder="Chose File..." /> |
|
|
|
<div class="flex-grow-1"> |
|
|
|
|
|
|
|
<input type="file" id="IdFrontUpload" class="form-control" placeholder="Chose File..." /> |
|
|
|
@* <img id="myUploadedImg" alt="Photo" style="width:180px;" /> *@ |
|
|
|
</div> |
|
|
|
@* <span class="input-group-text px-2"> |
|
|
@ -449,8 +437,9 @@ |
|
|
|
<div class="mb-3"> |
|
|
|
<label for="IdBack" class="form-label">Document Back</label> |
|
|
|
<div class="input-group flex-nowrap"> |
|
|
|
<div class="flex-grow-1 input-file"> |
|
|
|
<input type="text" id="IdBack" class="form-control" placeholder="Chose File..."> |
|
|
|
<div class="flex-grow-1"> |
|
|
|
|
|
|
|
<input type="file" id="IdBackUpload" class="form-control" placeholder="Chose File..."> |
|
|
|
</div> |
|
|
|
@* <span class="input-group-text px-2"> |
|
|
|
<button class="btn-choose bg-transparent text-white border-0" type="button">Upload</button> |
|
|
@ -461,9 +450,9 @@ |
|
|
|
<div class="d-grid mt-4"> |
|
|
|
@* <button class="btn btn-primary" onclick="btnUpload" type="submit">Update Document </button> *@ |
|
|
|
|
|
|
|
<button type="submit" onclick="FileUpload()" class="btn btn-lg btn-primary" style="width: 250px;"> |
|
|
|
@* <button type="submit" onclick="FileUpload()" class="btn btn-lg btn-primary" style="width: 250px;"> |
|
|
|
<span class="ButtonTExt">Update Document</span> <div class="spinner-border text-success loading" role="status" style="display:none;"></div> |
|
|
|
</button> |
|
|
|
</button> *@ |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
@ -476,47 +465,33 @@ |
|
|
|
<div class="modal-dialog modal-dialog-centered" role="document"> |
|
|
|
<div class="modal-content"> |
|
|
|
<div class="modal-header"> |
|
|
|
<h5 class="modal-title fw-400">Update Document</h5> |
|
|
|
<h5 class="modal-title fw-400">Update Proof of address</h5> |
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
|
|
|
</div> |
|
|
|
<div class="modal-body p-4"> |
|
|
|
<form id="updateCard" method="post"> |
|
|
|
<div class="mb-3"> |
|
|
|
<label for="IdFront" class="form-label">Document Type</label> |
|
|
|
<select class="form-select" id="documentType" aria-label="Floating label select example" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getIdType", true)" required> |
|
|
|
@* <select class="form-select" id="doc" name=""> *@ |
|
|
|
@* <option value="0" selected>-- Select --</option> |
|
|
|
<option value="1">Id Card</option> |
|
|
|
<option value="2">Passport </option> |
|
|
|
<option value="3">License</option> *@ |
|
|
|
<label for="IdFront" class="form-label">Address Document Type</label> |
|
|
|
<select class="form-select" id="Add-IdType" aria-label="Floating label select example" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getAdditional-IdType", true)" required> |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
<div class="mb-3"> |
|
|
|
<label for="IdFront" class="form-label">Document Front</label> |
|
|
|
<label for="IdFront" class="form-label">Document</label> |
|
|
|
<div class="input-group flex-nowrap"> |
|
|
|
<div class="flex-grow-1 input-file"> |
|
|
|
<input type="text" id="fileName" class="form-control" placeholder="Chose File..." /> |
|
|
|
<div class="flex-grow-1 "> |
|
|
|
|
|
|
|
<input type="file" id="add_idUpload" class="form-control" placeholder="Chose File..." /> |
|
|
|
@* <img id="myUploadedImg" alt="Photo" style="width:180px;" /> *@ |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@* <div class="mb-3"> |
|
|
|
<label for="IdBack" class="form-label">Document Back</label> |
|
|
|
<div class="input-group flex-nowrap"> |
|
|
|
<div class="flex-grow-1 input-file"> |
|
|
|
<input type="text" id="IdBack" class="form-control" placeholder="Chose File..."> |
|
|
|
</div> |
|
|
|
<span class="input-group-text px-2"> |
|
|
|
<button class="btn-choose bg-transparent text-white border-0" type="button">Upload</button> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> *@ |
|
|
|
|
|
|
|
|
|
|
|
<div class="d-grid mt-4"> |
|
|
|
@* <button class="btn btn-primary" onclick="btnUpload" type="submit">Update Document </button> *@ |
|
|
|
|
|
|
|
<button type="submit" onclick="FileUpload()" class="btn btn-lg btn-primary" style="width: 250px;"> |
|
|
|
@* onclick="FileUpload('', '11396', 'Additional_ID_Front', 'add_idUpload')"; *@ |
|
|
|
<button type="button" class="btn btn-lg btn-primary" style="width: 250px;"> |
|
|
|
<span class="ButtonTExt">Update Document</span> <div class="spinner-border text-success loading" role="status" style="display:none;"></div> |
|
|
|
</button> |
|
|
|
</div> |
|
|
@ -537,10 +512,8 @@ |
|
|
|
$(document).ready(function () { |
|
|
|
getData(); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$(document).on('click', '#btnSearch', function (e) { |
|
|
|
e.preventDefault(); |
|
|
|
var postalCode = $('#postalCode').val(); |
|
|
@ -576,12 +549,12 @@ |
|
|
|
.addClass('btn btn-primary') |
|
|
|
.text('Select') |
|
|
|
.click(function (event) { |
|
|
|
|
|
|
|
var Address1 = item.Address1; |
|
|
|
var city = item.City; |
|
|
|
|
|
|
|
|
|
|
|
$('#pCity').val(city); |
|
|
|
|
|
|
|
$('#pAddress1').val(Address1); |
|
|
|
$('#apiDataPopup').modal('hide'); |
|
|
|
event.preventDefault(); |
|
|
@ -601,12 +574,9 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
function getData() { |
|
|
|
debugger; |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
//var id; |
|
|
@ -706,48 +676,93 @@ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function FileUpload() { |
|
|
|
function img_pathUrl(id, e) { |
|
|
|
// $('#' + id)[0].src = (window.URL ? URL : webkitURL).createObjectURL(input.files[0]); |
|
|
|
|
|
|
|
$('.loadImg').remove(); |
|
|
|
for (var i = 0; i < e.target.files.length; i++) { |
|
|
|
var tmppath = URL.createObjectURL(e.target.files[i]); |
|
|
|
$(this).after('<span class="loadImg"><img src="' + tmppath + '" alt=""></span>'); |
|
|
|
$(".loadImg img").fadeIn("fast"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$("#IdFrontUpload").on('change', function (e) { |
|
|
|
debugger; |
|
|
|
let documentType = $('#documentType').val(); |
|
|
|
let fileName = $('#fileName').val(); |
|
|
|
// if (documentType === '10997') { |
|
|
|
let idtype = $('#primary-IdType').val(); |
|
|
|
for (var i = 0; i < e.target.files.length; i++) { |
|
|
|
var tmppath = URL.createObjectURL(e.target.files[i]); |
|
|
|
$(this).after('<span class="loadImg"><img height=120 width=200 src="' + tmppath + '" alt=""></span>'); |
|
|
|
$(".loadImg img").fadeIn("fast"); |
|
|
|
} |
|
|
|
FileUpload(idtype, '11394', 'ID_Front', 'IdFrontUpload'); |
|
|
|
}); |
|
|
|
|
|
|
|
// onpagehide.IdBack; |
|
|
|
$("#IdBackUpload").on('change', function (e) { |
|
|
|
|
|
|
|
// } |
|
|
|
let Data = { |
|
|
|
let idtype = $('#primary-IdType').val(); |
|
|
|
for (var i = 0; i < e.target.files.length; i++) { |
|
|
|
var tmppath = URL.createObjectURL(e.target.files[i]); |
|
|
|
$(this).after('<span class="loadImg1"><img height=120 width=200 src="' + tmppath + '" alt=""></span>'); |
|
|
|
$(".loadImg1 img").fadeIn("fast"); |
|
|
|
} |
|
|
|
FileUpload(idtype, '11395', 'ID_Back', 'IdBackUpload'); |
|
|
|
}); |
|
|
|
|
|
|
|
documentType: documentType, |
|
|
|
fileName: fileName, |
|
|
|
$("#add_idUpload").on('change', function (e) { |
|
|
|
|
|
|
|
}; |
|
|
|
let idtype = $('#primary-IdType').val(); |
|
|
|
for (var i = 0; i < e.target.files.length; i++) { |
|
|
|
var tmppath = URL.createObjectURL(e.target.files[i]); |
|
|
|
$(this).after('<span class="loadImg3"><img height=120 width=200 src="' + tmppath + '" alt=""></span>'); |
|
|
|
$(".loadImg1 img").fadeIn("fast"); |
|
|
|
} |
|
|
|
FileUpload(idtype, '11396', 'Additional_ID_Front', 'add_idUpload'); |
|
|
|
}); |
|
|
|
|
|
|
|
function FileUpload(idtype, documentType,desc, id) { |
|
|
|
|
|
|
|
const formData = new FormData(); |
|
|
|
let file = $('#' + id).prop("files")[0]; |
|
|
|
formData.append('MyUploader', file); |
|
|
|
|
|
|
|
formData.append('fileType', idtype); |
|
|
|
formData.append('documentType', documentType); |
|
|
|
formData.append('description', desc); |
|
|
|
$.ajax( |
|
|
|
{ |
|
|
|
|
|
|
|
type: 'POST', |
|
|
|
url: '/CustomerDocument/AddDocment', |
|
|
|
data: Data, |
|
|
|
processData: true, |
|
|
|
headers: { |
|
|
|
"RequestVerificationToken": |
|
|
|
$('input[name="__RequestVerificationToken"]').val() |
|
|
|
}, |
|
|
|
url: '/CustomerDocument/AddDocument', |
|
|
|
data: formData, |
|
|
|
cache: false, |
|
|
|
contentType: false, |
|
|
|
processData: false, |
|
|
|
async: true, |
|
|
|
beforeSend: function (xhr) { |
|
|
|
xhr.setRequestHeader("RequestVerificationToken", |
|
|
|
$('input:hidden[name="__RequestVerificationToken"]').val()); |
|
|
|
}, |
|
|
|
success: function (response) { |
|
|
|
|
|
|
|
if (response.responseCode != 0) { |
|
|
|
ShowAlertMessageErrorOnly(data, response.responseMessage); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ShowAlertMessage("0", "Document Add successfully."); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
error: function (data) { |
|
|
|
ShowAlertMessageErrorOnly(1, "Error ocurred during update!"); |
|
|
|
alert("Error occurs"); |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
} |