From ef3c30b0955e5cf232757ee4a0a7170f0977fcaa Mon Sep 17 00:00:00 2001 From: shakun Date: Wed, 1 Nov 2023 23:15:13 +0545 Subject: [PATCH 1/2] merge --- .../HomeRepository/HomeRepository.cs | 2 + .../CustomerOnlineV2/Views/Home/Index.cshtml | 107 +++++++++++++----- .../Views/ReceiverInformation/Receiver.cshtml | 7 +- .../Views/Transaction/ViewAllTxn.cshtml | 24 ++-- .../Views/TransactionReport/TranReport.cshtml | 2 +- 5 files changed, 98 insertions(+), 44 deletions(-) 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/Views/Home/Index.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml index 9e2730a..19ad2f9 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml @@ -98,11 +98,14 @@ =============================== -->
+
S.N
Date
-
Description
-
Quick Send
-
Status
-
Amount
+
Payment Mode
+
Receiver Name
+
Reference Number
+
Status
+
Send Amount
+
Recieve Amount
@@ -209,11 +212,12 @@ =============================== -->
-
Name
-
Send Transaction
-
Country
-
Transaction Type
-
Actions
+
S.N
+
Name
+
Send Transaction
+
Country
+
Transaction Type
+
Actions
@@ -347,6 +351,7 @@ function PopulateReceiverData(response) { var result = response.receiverModel; if (response.responseCode == 0) { + let i = 1; let row = ''; $.each(result, function (i, d) { // row += '
'; @@ -360,59 +365,98 @@ // row += '
'; row += '
'; row += '
'; - - row += '
'; + row += `
${i + 1}
`; + row += '
'; row += '' + d['name'] + ''; row += '' + d['mobile'] + ''; row += '
'; - row += '
'; row += 'Send Transaction'; row += '
'; - row += '
'; row += d['country']; row += '
'; - row += '
'; row += '' + d['transactionType'] + ''; row += '
'; - row += '
'; row += ''; row += '
'; - row += '
'; row += '
'; - }); - $('#receiverList').html(row); $('#receiverListDiv').hide(); } } + // function PopulateTransactionData(response) { + // debugger; + // var result = response.customerTransaction; + + // // var Id = response.customerTransaction.Id; + // if (response.responseCode == 0) { + // let i = 1; + // let row = ''; + + // $.each(result, function (i, d) { + // debugger; + // row += '
'; + // row += '
'; + // row += '
{ i + 1 }
'; + // row += '
' + d['transactionDay'] + ' ' + d['transactionMonth'] + '
'; + // row += '
' + d['pBankName'] + ' ' + d['paymentMethod'] + '
'; + // if (d['status'].toLowerCase() == 'paid') { + // row += '
Paid
'; + // } + // else if (d['status'].toLowerCase() == 'cancel') { + // row += '
Cancel
'; + // } + // else if (d['status'].toLowerCase() == 'processing') { + // row += '
Processing
'; + // } + // row += '
-' + d['amount'] + ' (' + d['pCurrency'] + ')
'; + // row += '
'; + // row += '
'; + // row += '
'; + // }); + + // $('#transactionList').html(row); + // $('#transactionListDiv').hide(); + // } + // } + + function PopulateTransactionData(response) { + debugger; var result = response.customerTransaction; - // var Id = response.customerTransaction.Id; + if (response.responseCode == 0) { + let i = 1; let row = ''; + $.each(result, function (i, d) { - row += '
'; + debugger; + row += `
`; row += '
'; - row += '
' + d['transactionDay'] + ' ' + d['transactionMonth'] + '
'; - row += '
' + d['pBankName'] + ' ' + d['paymentMethod'] + '
'; + row += `
${i + 1}
`; + row += `
${d['transactionDay']}${d['transactionMonth']}
`; + row += `
${d['pBankName']}${d['paymentMethod']}
`; + row += `
${d['receiverName']}
`; + row += `
${d['controlNo']}
`; + if (d['status'].toLowerCase() == 'paid') { - row += '
Paid
'; + row += `
Paid
`; + } else if (d['status'].toLowerCase() == 'cancel') { + row += `
Cancel
`; + } else if (d['status'].toLowerCase() == 'processing') { + row += `
Processing
`; } - else if (d['status'].toLowerCase() == 'cancel') { - row += '
Cancel
'; - } - else if (d['status'].toLowerCase() == 'processing') { - row += '
Processing
'; - } - row += '
-' + d['amount'] + ' (' + d['pCurrency'] + ')
'; + row += `
${d['amount']}(${d['pCurrency']})
`; + // row += `
-${d['amount']}(${d['pCurrency']})
`; + //row += `
${d['amount']}(${d['pCurrency']})
`; + row += `
${d['amount']}(${d['pCurrency']})
`; row += '
'; row += '
'; row += '
'; @@ -446,6 +490,8 @@ $('#tranId').next().text(data.id); $('#paymentMethod').next().text(data.paymentMethod); $('#tstatus').next().text(data.status); + + // var statusIcon = ''; // if (data.Status.toLowerCase() === 'cancel') { // statusIcon = ''; @@ -498,5 +544,6 @@ window.location.href = '/ReceiverInformation/Receiver?id=' + id + '&edit=Y'; } + } \ No newline at end of file diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml index 1a1029f..2095c31 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)" 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..e30e47b 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml @@ -215,7 +215,7 @@ var row = `
-
${i+1}
+
${i+1}
${d.sendDate}
${d.id}
${d.controlNo}
From ce5e9275dfc646ad5ec882653b00da24dda20496 Mon Sep 17 00:00:00 2001 From: shakun Date: Thu, 2 Nov 2023 22:08:36 +0545 Subject: [PATCH 2/2] changes --- .../RegisterRepository/RegisterRepository.cs | 1 + .../TransactionRepository.cs | 2 +- .../Controllers/CustomerController.cs | 44 ++++++++++------ .../Views/Customer/CustomerProfile.cshtml | 36 +++++++++++-- .../Customer/CustomerRegistration.cshtml | 52 +++++++++++++------ .../Views/ReceiverInformation/Receiver.cshtml | 26 ++++++++++ .../ViewReceiverList.cshtml | 28 +++++----- .../Views/Transaction/SendMoney.cshtml | 8 +-- .../Views/TransactionReport/TranReport.cshtml | 8 ++- 9 files changed, 146 insertions(+), 59 deletions(-) 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 @@ + @* *@