Browse Source

changes

feature/19315_Customer-Registration
shakun 11 months ago
parent
commit
ce5e9275df
  1. 1
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs
  2. 2
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/TransactionRepository.cs
  3. 30
      CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs
  4. 36
      CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml
  5. 48
      CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerRegistration.cshtml
  6. 26
      CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml
  7. 28
      CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/ViewReceiverList.cshtml
  8. 8
      CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml
  9. 8
      CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml

1
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs

@ -128,6 +128,7 @@ namespace CustomerOnlineV2.Repository.Repository.RegisterRepository
email = Convert.ToString(item["email"]),
mobile = Convert.ToString(item["mobile"]),
dob = Convert.ToString(item["dob"]),
occupation = Convert.ToString(item["occupation"]),
zipCode = Convert.ToString(item["zipCode"]),
city = Convert.ToString(item["city"]),
country = Convert.ToString(item["countryName"]),

2
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/TransactionRepository.cs

@ -355,7 +355,7 @@ namespace CustomerOnlineV2.Repository.Repository.TransactionRepository
//User = Convert.ToString(item["userId"]),
TranId = Convert.ToString(item["tranId"]),
ControlNo = Convert.ToString(item["controlNo"]),
CollAmt = Convert.ToString(item["collAmount"]),
CollAmt = Utilities.ShowDecimal(Convert.ToString(item["collAmount"])),
PayoutAmt = Utilities.ShowDecimal(Convert.ToString(item["payoutAmt"])),
PCurr = Convert.ToString(item["pCurr"]),
CollCurr = Convert.ToString(item["collCurr"]),

30
CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs

@ -3,6 +3,7 @@ using CustomerOnlineV2.Authorization;
using CustomerOnlineV2.Business.Business.RegisterBusiness;
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Helper;
using CustomerOnlineV2.Common.Models.ReceiverModel;
using CustomerOnlineV2.Common.Models.RegisterModel;
using CustomerOnlineV2.Common.Models.TransactionModel;
@ -12,6 +13,7 @@ using Newtonsoft.Json;
using CustomerOnlineV2.Common.Helper;
using CustomerOnlineV2.Common.Models.HomeModel;
using CustomerOnlineV2.Common.Models.ReceiverModel;
using CustomerOnlineV2.Common.Models.AccountModel;
namespace CustomerOnlineV2.Controllers
{
@ -28,22 +30,30 @@ namespace CustomerOnlineV2.Controllers
_registerBusiness = registerBusiness;
}
//[BindProperty]
//public OnlineCustomerRegisterModel Input { get; set; }
///[Authorization("Customer")]
public IActionResult CustomerRegistration()
{
return View();
}
[HttpPost]
//[Authorization("AddCustomer")]
[ValidateAntiForgeryToken]
public async Task<JsonRxResponse> AddCustomer(OnlineCustomerRegisterModel register)
{
// AddressListResponse _response = new AddressListResponse();
// addressRequest.IpAddress = Utilities.GetIpAddressv2(HttpContext);
// addressRequest.ProcessId = Convert.ToString(Guid.NewGuid());
// using (LogContext.PushProperty("DebugId", addressRequest.ProcessId))
// {
// _logger.LogInformation($"GETADDRESSLIST | ADDRESSLIST | REQUEST | {JsonConvert.SerializeObject(addressRequest)}");
var register1 = await _registerBusiness.AddCustomers(register);
return register1;
// }
// return _response;
}
[HttpPost]
@ -68,16 +78,17 @@ namespace CustomerOnlineV2.Controllers
return Json(jsonResponse);
}
public async Task<IActionResult> Success()
{
return View();
}
public IActionResult CustomerProfile()
public async Task <IActionResult> CustomerProfile(CustomerList customer)
{
return View();
}
[HttpGet]
[Route("Customer/GetCustomerDetail")]
public async Task<CustomerList> GetCustomerDetail()
@ -86,6 +97,7 @@ namespace CustomerOnlineV2.Controllers
return await _registerBusiness.GetTranCustomerById(loginDetails);
}
[Authorization("Notifications")]
public IActionResult Notifications()
{
@ -101,14 +113,13 @@ namespace CustomerOnlineV2.Controllers
return await _registerBusiness.GetAllNotificationDetails(loginDetails);
}
[HttpPost]
[Authorization("UpdateCustomer")]
public async Task<CustomerListModel> UpdateCustomer(CustomerListModel customer, string id)
{
var loginDetails = HttpContext.GetLoginDetails();
//ReceiverInformationModel _response = new ReceiverInformationModel();
var customer1 = await _registerBusiness.UpdateCustomers(customer, loginDetails.UserId);
return customer1;
}
@ -124,6 +135,7 @@ namespace CustomerOnlineV2.Controllers
public async Task<CustomerNotificationModel> GetRewardDetails()
{
var loginDetails = HttpContext.GetLoginDetails();
return await _registerBusiness.GetRewardPoints(loginDetails);
}
@ -132,10 +144,10 @@ namespace CustomerOnlineV2.Controllers
public async Task<CustomerListModel> UpdateDocument(CustomerListModel customer, string id)
{
var loginDetails = HttpContext.GetLoginDetails();
//ReceiverInformationModel _response = new ReceiverInformationModel();
var customer1 = await _registerBusiness.UpdateDocuments(customer, loginDetails.UserId);
return customer1;
}
[HttpGet]
[Route("GetRewardAmount")]
public async Task<CustomerNotificationModel> GetRewardAmount()

36
CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml

@ -96,6 +96,11 @@
</p>
</div>
<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">
<label class="col-sm-3 text-muted text-sm-end mb-0 mb-sm-3">Language :</label>
<p class="col-sm-9 text-3">
@ -518,18 +523,35 @@
<script>
$(document).ready(function () {
getData();
// if ('@ViewBag.ResponseCode' == '0') {
// iziToast.success({
// title: 'OK',
// message: '@ViewBag.ResponseMessage'
// });
// }
// else if ('@ViewBag.ResponseCode' == '103') {
// iziToast.info({
// title: 'Info',
// message: '@ViewBag.ResponseMessage'
// });
// }
// else if ('@ViewBag.ResponseCode' == '1') {
// iziToast.error({
// title: 'Error',
// message: '@ViewBag.ResponseMessage'
// });
// }
});
// function pageLoad() {
// getData(id);
// getData();
// }
// $(document).ready(function () {
// // getData();
// });
$(document).on('click', '#btnSearch', function (e) {
@ -591,10 +613,11 @@
console.error(error);
}
});
});
function getData() {
debugger;
$.ajax({
//var id;
type: 'GET',
@ -614,6 +637,7 @@
$('#address2').text(data.address2);
$('#nationality').text(data.country);
$('#idtype').text(data.idType);
$('#occupation').text(data.occupation);
$('#idnumber').text(data.idNumber);
$('#idIssuecountry').text(data.nativeCountry);
$('#idissueDate').text(data.idIssueDate);
@ -647,6 +671,7 @@
return false;
}
ShowAlertMessage("0", "Address Updated successfully.");
//getData();
},
error: function (data) {
ShowAlertMessageErrorOnly(1, "Error ocurred during update!");
@ -680,6 +705,7 @@
return false;
}
ShowAlertMessage("0", "Document Updated successfully.");
//getData();
},
error: function (data) {
ShowAlertMessageErrorOnly(1, "Error ocurred during update!");
@ -691,9 +717,13 @@
}
function FileUpload() {
debugger;
let documentType = $('#documentType').val();
let fileName = $('#fileName').val();
// if (documentType === '10997') {
// onpagehide.IdBack;
// }
let Data = {
documentType: documentType,

48
CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerRegistration.cshtml

@ -251,11 +251,22 @@
</div>
</div>
</div>
<div class="col-md-4">
<div class="mb-4">
<div class="form-floating">
<input type="number" class="form-control" asp-for="mobile" required>
<label for="Mobile">Mobile Number</label>
<input type="text" class="form-control" name="mobile" asp-for="mobile" placeholder="(+44) 99-000-00-00" value="+44" required>
<label for="mobile">Mobile Number</label>
</div>
</div>
</div>
<div class="col-md-4">
<div class="mb-4">
<div class="form-floating">
<select class="form-select" asp-for="occupation" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getOccuptttion", true)" aria-label="Floating label select example">
</select>
<label for="occupation">Occupation</label>
</div>
</div>
</div>
@ -350,19 +361,18 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.16/jquery.mask.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
@* <script src="~/js/register-validation.js"></script> *@
<script type="text/javascript">
$(document).ready(function () {
// $('#mobile').mask('+44 999999999', {
// placeholder: " ",
// });
$(document).on('click', '#btnSearch', function (e) {
e.preventDefault();
var postalCode = $('#postalCode').val();
@ -422,8 +432,10 @@
console.error(error);
}
});
});
});
// Select the password and confirmPassword input fields
var passwordField = $("#Password");
var confirmPasswordField = $("#ConfirmPassword");
@ -458,15 +470,23 @@
confirmPasswordValidation.text("Passwords do not match").removeClass("text-success").addClass("text-danger");
}
});
$('#mobile').keyup(function () {
var oldvalue = $(this).val();
var field = this;
setTimeout(function () {
if (field.value.indexOf('44') !== 0) {
$(field).val("44" + oldvalue);
}
}, 1);
document.getElementById('mobile').addEventListener('input', function (e) {
var x = e.target.value.replace(/\D/g, '').match(/(\d{0,2})(\d{0,3})(\d{0,3})(\d{0,2})(\d{0,2})/);
e.target.value = '+(' + x[1] + ') ' + x[2] + '' + x[3] + '' + x[4] + '' + x[5];
});
// $('#mobile').keyup(function () {
// var oldvalue = $(this).val();
// var field = this;
// setTimeout(function () {
// if (field.value.indexOf('+44') !== 0) {
// $(field).val("44" + oldvalue);
// }
// }, 1);
// });
});

26
CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml

@ -371,6 +371,32 @@
}
});
function addCountryCode() {
$("#Mobile").intlTelInput({
nationalMode: true,
utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/12.1.3/js/utils.js" // just for formatting/placeholders etc
});
}
$('#<%=register.ClientID%>').click(function () {
return CheckFormValidation();
});
addCountryCode();
$(document).on('change', '#<%=Mobile.ClientID%>', function () {
var input = $("#<%=txtSenderMobileNo.ClientID%>");
var mobileNo = input.val();
var countryCode = $('.country.active .dial-code').text();
var maxLength = input.attr('maxLength');
if (mobileNo.indexOf(countryCode) < 0) {
mobileNo = countryCode + mobileNo;
}
if ((mobileNo).length > maxLength) {
alert('Mobile No. Can allow input maxmum ' + maxLength + ' digit only');
return $(this).val('');
}
//var intlNumber = input.intlTelInput("getNumber", intlTelInputUtils.numberFormat.E164);
$(this).val(mobileNo);
CheckForMobileNumber(this, 'Mobile No.');
});
// $('#paymentMode').change(function () {
// debugger;

28
CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/ViewReceiverList.cshtml

@ -45,10 +45,11 @@
=============================== -->
<div class="transaction-title py-2 px-4">
<div class="row fw-00">
<div class="col-1 col-sm-4">Name</div>
<div class="col-2 col-sm-2">Re-Send </div>
<div class="col-3 col-sm-2 d-none d-sm-block text-center">Country</div>
<div class="col-4 col-sm-2 text-end">Transaction Type</div>
<div class="col-1 col-sm-1">S.N</div>
<div class="col-2 col-sm-3">Name</div>
<div class="col-3 col-sm-2">Re-Send </div>
<div class="col-4 col-sm-2">Country</div>
<div class="col-5 col-sm-2 text-end">Transaction Type</div>
</div>
</div>
<!-- Title End -->
@ -57,10 +58,11 @@
<div class="transaction-list">
<div class="transaction-item px-4 py-3" data-bs-toggle="modal" data-bs-target="#transaction-detail">
<div class="row align-items-center flex-row">
<div class="col-1 col-sm-4"> <span class="d-block text-1" id="recName"></span> <span class="text-muted" id="recMobile"></span> </div>
<div class="col-2 col-sm-2"> <span class="d-block text-1" id="tranId"><a href="send-money.html">Re-Send </a></span></div>
<div class="col-3 col-sm-2 d-none d-sm-block text-center text-1" id="pCountry"></div>
<div class="col-4 col-sm-2 text-end text-1" id="paymentMethod"> <span class="text-nowrap"></span></div>
<div class="col-1 col-sm-1 " id="sn"></div>
<div class="col-2 col-sm-3"> <span class="d-block text-1" id="recName"></span> <span class="text-muted" id="recMobile"></span> </div>
<div class="col-3 col-sm-2"> <span class="d-block text-1" id="tranId"><a href="send-money.html">Re-Send </a></span></div>
<div class="col-4 col-sm-2" id="pCountry"></div>
<div class="col-5 col-sm-2 text-end text-1" id="paymentMethod"> <span class="text-nowrap"></span></div>
</div>
</div>
</div>
@ -153,15 +155,17 @@
if (response.responseCode == 0) {
var transactionList = $(".transaction-list");
transactionList.empty();
let i = 1;
$.each(result, function (i, d) {
var row = `
<div class="transaction-item px-4 py-2" data-bs-toggle="modal" data-bs-target="#transaction-detail">
<div class="row align-items-center flex-row">
<div class="col-1 col-sm-3"><span class="d-block text-1">${d.name}</span><span class="text-muted">${d.mobile}</span></div>
<div class="col-2 col-sm-2" id="tranId"><a href="send-money.html?transactionId=${d.id}">Repeat Send</a></div>
<div class="col-3 col-sm-2" id="pCountry">${d.country}</div>
<div class="col-4 col-sm-2 text-end" id="paymentMethod">${d.transactionType}</div>
<div class="col-1 col-sm-1" id="pCountry">${i+1}</div>
<div class="col-2 col-sm-3"><span class="d-block text-1">${d.name}</span><span class="text-muted">${d.mobile}</span></div>
<div class="col-3 col-sm-2" id="tranId"><a href="send-money.html?transactionId=${d.id}">Repeat Send</a></div>
<div class="col-4 col-sm-2" id="pCountry">${d.country}</div>
<div class="col-5 col-sm-2 text-end" id="paymentMethod">${d.transactionType}</div>
</div>
</div>`;

8
CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml

@ -71,7 +71,6 @@
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-5">
@ -173,7 +172,7 @@
<tr>
<td>Total Sent Amount :</td>
<td>
<strong><span id="tamt">0.00 GBP</span></strong>
<strong><span id="sAmt">0.00 GBP</span></strong>
</td>
</tr>
<tr>
@ -238,10 +237,7 @@
$('#hdnCalcBy').val('c');
}
});
});
function GetRewardDetails() {
$.ajax({
type: 'GET',
@ -394,7 +390,7 @@
$('#collAmount').text(NumberWithCommas(response.collAmt) + ' ' + response.collCurr);
$('#exRate').text(response.exRateDisplay);
$('#sCharge').text(NumberWithCommas(response.scCharge));
$('#tAmt').text(NumberWithCommas(response.sAmt) + ' ' + response.collCurr);
$('#sAmt').text(NumberWithCommas(response.sAmt) + ' ' + response.collCurr);
$('#pCurrency').text(response.pCurr);
//set hiddend fields for send money

8
CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml

@ -62,9 +62,7 @@
<div class="col-6 col-sm-1">Total Sent Amount</div>
<div class="col-7 col-sm-1">Delivery Method</div>
<div class="col-10 col-sm-1 text-end">Action</div>
<div class="col-8 col-sm-1 text-end">Transaction Detail View</div>
@* <div class="col-7 col-sm-1 text-end">Total Sent Amount</div> *@
</div>
@ -83,7 +81,7 @@
<div class="col-5 col-sm-1" id="collAmt"></div>
<div class="col-6 col-sm-1" id="PayoutAmt"></div>
<div class="col-7 col-sm-1" id="PayoutMode"></div>
<div class="col-8 col-sm-1"> <span class="d-block text-1" id="tranId"><a href="/transaction/receipt"><i class="fa fa-eye" style="font-size:30px"></i></a></span></div>
<div class="col-8 col-sm-2"> <span class="d-block text-1" id="tranId"><a href="/transaction/receipt"><i class="fa fa-eye" style="font-size:30px"></i></a></span></div>
@* <div class="col-11 col-sm-1" id="SendDate"></div> *@
@ -222,7 +220,7 @@
<div class="col-5 col-sm-1" id="collAmt">${d.collAmt}</div>
<div class="col-6 col-sm-1" id="PayoutAmt">${d.payoutAmt}</div>
<div class="col-7 col-sm-1" id="PayoutMode">${d.payoutMode}</div>
<div class="col-8 col-sm-1" id="tranId"><a href="/transaction/receipt"><i class="fa fa-eye" style="font-size:30px"></i></a></div>
<div class="col-8 col-sm-2" id="tranId"><a href="/transaction/receipt"><i class="fa fa-eye" style="font-size:30px"></i></a></div>
</div>
</div>`;

Loading…
Cancel
Save