diff --git a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/HomeRepository.cs b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/HomeRepository.cs index 3c6a43c..95dcaf7 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/HomeRepository.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/HomeRepository.cs @@ -100,7 +100,9 @@ namespace CustomerOnlineV2.Repository.Repository.HomeRepository { Id = Convert.ToString(item["Id"]), Amount = Convert.ToString(item["Amount"]), + receiverName = Convert.ToString(item["receiverName"]), PaymentMethod = Convert.ToString(item["PaymentMethod"]), + ControlNo = Convert.ToString(item["controlNo"]), PBankName = Convert.ToString(item["PBankName"]), PCurrency = Convert.ToString(item["PCurrency"]), TransactionDay = Convert.ToString(item["TransactionDay"]), diff --git a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs index 1995e36..ae57fbe 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs +++ b/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"]), diff --git a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/TransactionRepository.cs b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/TransactionRepository.cs index b16fe1b..cfd3a16 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/TransactionRepository/TransactionRepository.cs +++ b/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"]), diff --git a/CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs b/CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs index e476335..13a69a8 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs +++ b/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 { @@ -21,29 +23,37 @@ namespace CustomerOnlineV2.Controllers private readonly ILogger _logger; private readonly ITPApiService _tpApiService; - public CustomerController(ILogger logger, ITPApiService tpApiService, IRegisterBusiness registerBusiness) + public CustomerController(ILogger logger, ITPApiService tpApiService , IRegisterBusiness registerBusiness) { _logger = logger; _tpApiService = tpApiService; _registerBusiness = registerBusiness; } - //[BindProperty] - //public OnlineCustomerRegisterModel Input { get; set; } ///[Authorization("Customer")] public IActionResult CustomerRegistration() { return View(); } - [HttpPost] //[Authorization("AddCustomer")] [ValidateAntiForgeryToken] public async Task 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 Success() { + return View(); } - - public IActionResult CustomerProfile() + public async Task CustomerProfile(CustomerList customer) { return View(); } - [HttpGet] [Route("Customer/GetCustomerDetail")] public async Task GetCustomerDetail() @@ -85,8 +96,9 @@ namespace CustomerOnlineV2.Controllers var loginDetails = HttpContext.GetLoginDetails(); return await _registerBusiness.GetTranCustomerById(loginDetails); } - - [Authorization("Notifications")] + + + [Authorization("Notifications")] public IActionResult Notifications() { return View(); @@ -101,19 +113,18 @@ namespace CustomerOnlineV2.Controllers return await _registerBusiness.GetAllNotificationDetails(loginDetails); } - - [HttpPost] + [HttpPost] [Authorization("UpdateCustomer")] public async Task UpdateCustomer(CustomerListModel customer, string id) { var loginDetails = HttpContext.GetLoginDetails(); - + //ReceiverInformationModel _response = new ReceiverInformationModel(); var customer1 = await _registerBusiness.UpdateCustomers(customer, loginDetails.UserId); return customer1; } - - [Authorization("Refer")] + + [Authorization("Refer")] public IActionResult Refer() { return View(); @@ -124,18 +135,19 @@ namespace CustomerOnlineV2.Controllers public async Task GetRewardDetails() { var loginDetails = HttpContext.GetLoginDetails(); + return await _registerBusiness.GetRewardPoints(loginDetails); } - + [HttpPost] [Authorization("UpdateDocument")] public async Task 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 GetRewardAmount() diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml index 8dec9e8..5b08826 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml @@ -96,6 +96,11 @@

+
+ +

+

+

@@ -518,18 +523,35 @@ + @* *@ } \ No newline at end of file diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml index 1a1029f..bbef5f9 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml @@ -95,7 +95,7 @@

- +
@@ -140,7 +140,7 @@
- @* asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getIdType", true)" @@ -193,9 +193,10 @@
- @* + asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("rec-select-agent", true)" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("rec-select-agent", true)" @@ -370,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; diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/ViewReceiverList.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/ViewReceiverList.cshtml index 6e47e63..813ae2c 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/ViewReceiverList.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/ViewReceiverList.cshtml @@ -45,10 +45,11 @@ =============================== -->
-
Name
-
Re-Send
-
Country
-
Transaction Type
+
S.N
+
Name
+
Re-Send
+
Country
+
Transaction Type
@@ -57,10 +58,11 @@
-
- -
-
+
+
+ +
+
@@ -153,15 +155,17 @@ if (response.responseCode == 0) { var transactionList = $(".transaction-list"); transactionList.empty(); + let i = 1; $.each(result, function (i, d) { var row = `
-
${d.name}${d.mobile}
- -
${d.country}
-
${d.transactionType}
+
${i+1}
+
${d.name}${d.mobile}
+ +
${d.country}
+
${d.transactionType}
`; diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml index 17d3823..8a79d98 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml @@ -71,7 +71,6 @@
-
@@ -173,7 +172,7 @@ Total Sent Amount : - 0.00 GBP + 0.00 GBP @@ -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 diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/ViewAllTxn.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/ViewAllTxn.cshtml index 6b38380..7dcb294 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/ViewAllTxn.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/ViewAllTxn.cshtml @@ -42,11 +42,12 @@ =============================== -->
-
Receiver Details
-
Amount
-
Repeat
-
Country
-
Transaction Type
+
S.N
+
Receiver Details
+
Amount
+
Repeat
+
Country
+
Transaction Type
@@ -56,11 +57,12 @@
-
-
- -
-
+
+
+
+ +
+
@@ -173,11 +175,13 @@ if (response.responseCode == 0) { var transactionList = $(".transaction-list"); transactionList.empty(); + let i = 1; $.each(result, function (i, d) { var row = `
+
${i + 1}
${d.receiverName}${d.recAccountNum}
${d.amount}
diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml index f790907..9acd07a 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml @@ -61,10 +61,8 @@
Collected Amount
Total Sent Amount
Delivery Method
- - -
Action
+
Transaction Detail View
@*
Total Sent Amount
*@
@@ -83,7 +81,7 @@
-
+
@*
*@ @@ -215,14 +213,14 @@ var row = `
-
${i+1}
+
${i+1}
${d.sendDate}
${d.id}
${d.controlNo}
${d.collAmt}
${d.payoutAmt}
${d.payoutMode}
-
+
`;