Browse Source

file upload

feature/19315_Customer-Registration-new
shakun 11 months ago
parent
commit
2f01aa8931
  1. 5
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/DocumentBusiness/DocumentBusiness.cs
  2. 2
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/DocumentBusiness/IDocumentBusiness.cs
  3. 15
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/TransactionBusiness/TransactionBusiness.cs
  4. 44
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/DocumentRepository.cs
  5. 1
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/IDocumentRepository.cs
  6. 63
      CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerDocumentController.cs
  7. 2
      CustomerOnlineV2/CustomerOnlineV2/Views/Account/ForceChangePassword.cshtml
  8. 2
      CustomerOnlineV2/CustomerOnlineV2/Views/Account/VerifyOTP.cshtml
  9. 57
      CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml
  10. 5
      CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerRegistration.cshtml
  11. 4
      CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Refer.cshtml
  12. 6
      CustomerOnlineV2/CustomerOnlineV2/Views/CustomerDocument/CustomerDocument.cshtml
  13. 8
      CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml
  14. 13
      CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml
  15. 2
      CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/ViewReceiverList.cshtml
  16. 38
      CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout.cshtml
  17. 4
      CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout2.cshtml
  18. 24
      CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml
  19. 2
      CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/ViewAllTxn.cshtml
  20. 6
      CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml
  21. BIN
      CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/profile-thumb.jpg
  22. BIN
      CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/profile-thumb1.jpg
  23. 2
      CustomerOnlineV2/CustomerOnlineV2/wwwroot/js/toast.js

5
CustomerOnlineV2/CustomerOnlineV2.Business/Business/DocumentBusiness/DocumentBusiness.cs

@ -39,5 +39,10 @@ namespace CustomerOnlineV2.Business.Business.DocumentBusiness
var model1 = await _docRepository.AddCustomerDocument(doc, Id, user);
return model1;
}
public async Task<CustomerDocumentModel> UploadProfilePic(CustomerDocumentModel doc, string url, string user)
{
var model1 = await _docRepository.UploadProfilePic(doc, url, user);
return model1;
}
}
}

2
CustomerOnlineV2/CustomerOnlineV2.Business/Business/DocumentBusiness/IDocumentBusiness.cs

@ -1,4 +1,5 @@
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Models.AccountModel;
using CustomerOnlineV2.Common.Models.DocumentModel;
namespace CustomerOnlineV2.Business.Business.DocumentBusiness
@ -8,5 +9,6 @@ namespace CustomerOnlineV2.Business.Business.DocumentBusiness
string WebRootPath { get; }
Task<CommonResponse> GetCustomerImageSavePath(string userId);
Task<CustomerDocumentModel> AddCustomerDocument(CustomerDocumentModel doc, string userId, string userName);
Task<CustomerDocumentModel> UploadProfilePic(CustomerDocumentModel doc, string url, string userName);
}
}

15
CustomerOnlineV2/CustomerOnlineV2.Business/Business/TransactionBusiness/TransactionBusiness.cs

@ -161,15 +161,15 @@ namespace CustomerOnlineV2.Business.Business.TransactionBusiness
_logger.LogError("TRANSACTIONBUSINESS | SENDMONEY.VALIDATEEXRATEREQUEST | REQUEST | " + JsonConvert.SerializeObject(_response));
}
else if (sendMoneyRequest.CalcBy != "c")
else if (sendMoneyRequest.CalcBy != "c" || (sendMoneyRequest.CalcBy != "p"))
{
if (sendMoneyRequest.CalcBy != "p")
{
_response.ResponseCode = ResponseHelper.FAILED;
_response.ResponseMessage = "Param calcBy have invalid value!";
_logger.LogError("TRANSACTIONBUSINESS | SENDMONEY.VALIDATEEXRATEREQUEST | REQUEST | " + JsonConvert.SerializeObject(_response));
}
}
else if (string.IsNullOrEmpty(sendMoneyRequest.ReceivingCountry))
{
@ -272,15 +272,14 @@ namespace CustomerOnlineV2.Business.Business.TransactionBusiness
_logger.LogError("TRANSACTIONBUSINESS | DOCALCULATION.VALIDATEEXRATEREQUEST | REQUEST | " + JsonConvert.SerializeObject(_response));
}
else if (calcRequest.CalcBy != "c")
else if (calcRequest.CalcBy != "c" || calcRequest.CalcBy != "p")
{
if (calcRequest.CalcBy != "p")
{
_response.ResponseCode = ResponseHelper.FAILED;
_response.ResponseMessage = "Param calcBy have invalid value!";
_logger.LogError("TRANSACTIONBUSINESS | DOCALCULATION.VALIDATEEXRATEREQUEST | REQUEST | " + JsonConvert.SerializeObject(_response));
}
}
else if (string.IsNullOrEmpty(calcRequest.ReceivingCountry))
{

44
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/DocumentRepository.cs

@ -1,6 +1,8 @@
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Helper;
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Models.DocumentModel;
using CustomerOnlineV2.Repository.ConnectionHelper;
using System;
namespace CustomerOnlineV2.Repository.Repository.DocumentRepository
{
@ -128,6 +130,46 @@ namespace CustomerOnlineV2.Repository.Repository.DocumentRepository
return await Task.FromResult(doc);
}
public async Task<CustomerDocumentModel> UploadProfilePic(CustomerDocumentModel doc, string url, string user)
{
try
{
var sql = "exec mobile_proc_customerMaster";
sql += " @flag = " + _connHelper.FilterString("save-profile");
sql += ", @username = " + _connHelper.FilterString(user);
sql += ", @url = " + _connHelper.FilterString(url);
sql += ", @fileType = " + _connHelper.FilterString(doc.fileType);
sql += ", @fileName = " + _connHelper.FilterString(doc.fileName);
var dt = _connHelper.ExecuteDataTable(sql);
if (dt == null || dt.Rows.Count <= 0)
{
doc.ResponseCode = ResponseHelper.FAILED;
doc.ResponseMessage = "DB Null Error!";
}
else
{
doc.ResponseCode = ResponseHelper.SUCCESS;
doc.ResponseMessage = ResponseMessageHelper.SUCCESS;
doc.Extra = dt.Rows[0]["Extra"].ToString();
// doc.Extra1 = ApplicationConfig.GetMobileApiUrl();
doc.Extra2 = url;
}
}
catch (Exception ex)
{
doc.ResponseCode = ResponseHelper.EXCEPTION;
doc.ResponseMessage = "Exception occured: " + ex.Message;
}
return await Task.FromResult(doc);
}
}

1
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/IDocumentRepository.cs

@ -8,5 +8,6 @@ namespace CustomerOnlineV2.Repository.Repository.DocumentRepository
//void ExecuteStoredProcedure(string fileName);
Task<CommonResponse> GetCustomerImageSavePath(string userId);
Task<CustomerDocumentModel> AddCustomerDocument(CustomerDocumentModel doc, string? id, string? user);
Task<CustomerDocumentModel> UploadProfilePic(CustomerDocumentModel doc, string url, string user);
}
}

63
CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerDocumentController.cs

@ -8,6 +8,7 @@ using System.Reflection;
using CustomerOnlineV2.Authorization;
using System.IO;
using Serilog;
using CustomerOnlineV2.Common.Models;
namespace CustomerOnlineV2.Controllers
{
@ -46,16 +47,40 @@ namespace CustomerOnlineV2.Controllers
if (file.Length > 0)
{
string filePath = Path.Combine(docUploadPath, file.FileName);
string filePath = Path.Combine(docUploadPath, fileName);
using (Stream fileStream = new FileStream(filePath, FileMode.Create))
{
file.CopyToAsync(fileStream);
file.CopyTo(fileStream);
}
}
Log.Debug("Done with Saving ");
return fileName;
}
private static string SaveCustomerProfile(IFormFile file, string user, string extension, string membershipId, string img, string type = null)
{
string fileName = "";
string profileUploadPath = ApplicationConfig.GetProfilePhotoUploadPath();
fileName = "upload-" + img + "-" + user + "-" + GetTimestamp(DateTime.Now) + extension;
profileUploadPath = profileUploadPath + membershipId;
Log.Debug("Preparing file to save in dir " + profileUploadPath);
if (!Directory.Exists(profileUploadPath))
Directory.CreateDirectory(profileUploadPath);
string fileToSave = Path.Combine(profileUploadPath, fileName);
using (Stream fileStream = new FileStream(fileToSave, FileMode.Create))
{
file.CopyTo(fileStream);
}
Log.Debug("Done with Saving ");
return $"{membershipId}/{fileName}";
}
[HttpPost]
[Authorization("AddDocument")]
public async Task<CustomerDocumentModel> AddDocument(CustomerDocumentModel doc, IFormFile MyUploader)
@ -97,6 +122,40 @@ namespace CustomerOnlineV2.Controllers
return Document;
}
[HttpPost]
[Authorization("UploadProfilePic")]
public async Task<CustomerDocumentModel> UploadProfilePic(CustomerDocumentModel doc, IFormFile file)
{
var extension = "";
string profileURL = "";
var fullPath = "";
var loginDetails = HttpContext.GetLoginDetails();
var cd = await _business.GetCustomerImageSavePath(loginDetails.Email);
doc.fileName = SaveFileToPath(file, cd.Id, Path.GetExtension(file.FileName), file.FileName, cd.Extra1);
if (cd.Id != null)
{
extension = Path.GetExtension(file.FileName);
profileURL = SaveCustomerProfile(file, loginDetails.UserId, extension, cd.Id, "profile", "");
var a = profileURL.Split('/');
var fileName = a[1];
if(profileURL != null)
{
string mobileJsonRxUrl = ApplicationConfig.GetMobileApiUrl();
fullPath = $"{mobileJsonRxUrl}/images/profile/{profileURL}";
var result = await _business.UploadProfilePic(doc, fullPath, loginDetails.UserName);
if(result.ResponseCode != 0)
{
Log.Debug("CustomerProfile.SaveProfile | Profile Upload : Failed");
result.SetResponse(result.ResponseCode, result.ResponseMessage);
}
}
}
return doc;
}
//[HttpPost]
//[ValidateAntiForgeryToken]
//public async Task<IActionResult> AddDocment(CustomerDocumentModel doc)

2
CustomerOnlineV2/CustomerOnlineV2/Views/Account/ForceChangePassword.cshtml

@ -265,7 +265,7 @@
event.stopPropagation();
}
else {
debugger
if ($('#NewPassword').val() != $('#ConfirmNewPassword').val()) {
ShowAlertMessage(1, 'Password are confirm password are not same!');
$('#NewPassword').focus();

2
CustomerOnlineV2/CustomerOnlineV2/Views/Account/VerifyOTP.cshtml

@ -234,7 +234,7 @@
},
async: true,
success: function (response) {
debugger;
if (response.errorCode == 0) {
iziToast.info({
title: 'OK',

57
CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml

@ -36,7 +36,7 @@
<!-- Profile Details -->
<div class="bg-white rounded text-center p-3 mb-4">
<div class="profile-thumb mt-3 mb-4">
@* <img class="rounded-circle" src="images/profile-thumb.jpg" alt=""> *@
<img id="profile_img_1" class="rounded-circle" height="90" width="100" alt="" src=@Url.Content("~/images/profile-thumb.jpg")>
<div class="profile-thumb-edit bg-primary text-white" data-bs-toggle="tooltip" title="Change Profile Picture">
<i class="fas fa-camera position-absolute"></i>
<input type="file" class="custom-file-input" id="customFile">
@ -318,12 +318,12 @@
<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 src="images/profile-thumb.jpg" class="img-fluid"> *@
<span class="mt-4">Front</span>
</div>
<div class="account-doc-overlay rounded">
<a href="#" data-bs-target="#edit-doc-details" data-bs-toggle="modal" class="text-light btn-link mx-2">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
<span class="me-1"><i class="fas fa-edit"></i></span>View
</a>
</div>
</div>
@ -331,7 +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 src="images/profile-thumb.jpg" class="img-fluid"> *@
<span class="mt-4">Back</span>
</div>
<div class="account-doc-overlay rounded">
@ -364,36 +364,17 @@
<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 src="images/profile-thumb.jpg" class="img-fluid"> *@
<span class="mt-4">Front</span>
</div>
<div class="account-doc-overlay rounded">
<a href="#" data-bs-target="#edit-doc-details1" data-bs-toggle="modal" class="text-light btn-link mx-2">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
<span class="me-1"><i class="fas fa-edit"></i></span>View
</a>
</div>
</div>
</div>
@* <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">
<span class="mt-2">Back</span>
</div>
<div class="account-doc-overlay rounded">
<a href="#" data-bs-target="#edit-doc-details1" data-bs-toggle="modal" class="text-light btn-link mx-2">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
</a>
</div>
</div>
</div> *@
@* <div class="col-12 col-md-6 col-lg-4">
<a href="" data-bs-target="#edit-doc-details1" data-bs-toggle="modal" class="account-doc-new d-flex align-items-center rounded h-100 p-3 mb-4 mb-lg-0">
<p class="w-100 text-center lh-base m-0">
<span class="text-3"><i class="fas fa-plus-circle"></i></span> <span class="d-block text-body text-3">Add New Document</span>
</p>
</a>
</div> *@
</div>
@ -517,6 +498,26 @@
getData();
});
$("#customFile").on('change', function () {
var formData = new FormData();
var fileInput = $("#customFile")[0].files[0];
formData.append("file", fileInput);
$.ajax({
url: "/CustomerDocument/UploadProfilePic",
type: "POST",
data: formData,
processData: false,
contentType: false,
success: function (response) {
if (response.responseCode != 0) {
ShowAlertMessageErrorOnly(response.responseCode, response.responseMessage);
return false;
}
$('#profile_img_1').attr('src', response.extra2);
// alert("Files Uploaded! " + response.extra);
}
});
});
$(document).on('click', '#btnSearch', function (e) {
e.preventDefault();
@ -645,7 +646,7 @@
}
function UpdateDocument() {
debugger;
$.ajax({
url: "/Customer/UpdateDocument",
type: "post",
@ -699,7 +700,7 @@
$("#IdBackUpload").hide();
});
$("#IdFrontUpload").on('change', function (e) {
debugger;
let idtype = $('#primary-IdType').val();
for (var i = 0; i < e.target.files.length; i++) {
var tmppath = URL.createObjectURL(e.target.files[i]);

5
CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerRegistration.cshtml

@ -508,7 +508,7 @@
function ValidateReferralCode() {
debugger;
$.ajax({
url: "ValidateReferralCode/" + $("#ReferralCode").val(),
ftype: "get",
@ -516,7 +516,6 @@
success: function (response) {
debugger;
if (response.responseCode != 0) {
ShowAlertMessageErrorOnly(response, response.responseMessage);
return false;
@ -559,7 +558,7 @@
function Register() {
debugger;
DisableRegisterButton();

4
CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Refer.cshtml

@ -224,7 +224,7 @@
});
$('#referrals-tab').click(function () {
// debugger
//
//GetRewardDetails();
$('#invite-content').hide();
$('#referrals-content').show();
@ -238,7 +238,7 @@
url: '/GetRewardAmount',
data: {},
success: function (response) {
debugger
var data = response.notificationModel;
var totalRewardPoints = data.length > 0 ? data[0].rewardPoints : 0;
$('#showRewardPoints').text(totalRewardPoints);

6
CustomerOnlineV2/CustomerOnlineV2/Views/CustomerDocument/CustomerDocument.cshtml

@ -32,7 +32,7 @@
<!-- Profile Details -->
<div class="bg-white rounded text-center p-3 mb-4">
<div class="profile-thumb mt-3 mb-4">
<img class="rounded-circle" src="images/profile-thumb.jpg" alt="">
<img class="rounded-circle" src="@Url.Content("~/images/profile-thumb.jpg")" alt="">
<div class="profile-thumb-edit bg-primary text-white" data-bs-toggle="tooltip" title="Change Profile Picture">
<i class="fas fa-camera position-absolute"></i>
<input type="file" class="custom-file-input" id="customFile">
@ -251,7 +251,7 @@
function FileUpload() {
debugger;
DisableDocumentButton();
@ -320,7 +320,7 @@
}
function EnableDocumentButton() {
debugger;
$('.ButtonTExt').show();
$('#btnUpload').css('cursor', 'pointer');
$('.loadingSend').hide();

8
CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml

@ -392,7 +392,7 @@
}
// function PopulateTransactionData(response) {
// debugger;
// ;
// var result = response.customerTransaction;
// // var Id = response.customerTransaction.Id;
@ -401,7 +401,7 @@
// let row = '';
// $.each(result, function (i, d) {
// debugger;
// ;
// row += '<div class="transaction-item px-4 py-3" data-bs-toggle="modal" data-bs-target="#transaction-detail" onclick="getData(' + d['id'] + ')">';
// row += '<div class="row align-items-center flex-row">';
// row += '<div class="col-1 col-sm-1" > { i + 1 } </div>';
@ -429,7 +429,7 @@
function PopulateTransactionData(response) {
debugger;
var result = response.customerTransaction;
if (response.responseCode == 0) {
@ -437,7 +437,7 @@
let row = '';
$.each(result, function (i, d) {
debugger;
row += `<div class="transaction-item px-4 py-3" data-bs-toggle="modal" data-bs-target="#transaction-detail" onclick="getData(${d['id']})">`;
row += '<div class="row align-items-center flex-row">';
row += `<div class="col-1 col-sm-1">${i + 1}</div>`;

13
CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml

@ -369,7 +369,7 @@
$('#paymentMode').change(function () {
debugger;
if ($(this).val() != '') {
@ -397,7 +397,7 @@
// $('#paymentMode').change(function () {
// debugger;
// ;
// if ($(this).val() != '') {
// // PopulateDDL('paymentMode', 'pMode', $(this).val(), true, '');
// //PopulateDDL('Relationship', 'getRelation', $(this).val(), true, '');
@ -418,7 +418,7 @@
function PopulateAgentDDL(id, flag, Country, pCountryid, value, countryId, showSelectOption, selectedVal) {
debugger;
;
let Data = {
Flag: flag,
Country: Country,
@ -447,7 +447,6 @@
};
function Receiver() {
debugger;
DisableReceiveButton();
@ -570,7 +569,7 @@
}
function EnableReceiveButton() {
debugger;
;
$('.btnTextReceive').show();
$('#btnReceive').css('cursor', 'pointer');
$('.loadingSend').hide();
@ -598,7 +597,7 @@
// });
function editReceiver(editFlag, receiverId) {
debugger;
if (editFlag === 'Y') {
$('#btnUpdateReceiver').show();
$('#btnReceive').hide();
@ -609,7 +608,7 @@
url: '/ReceiverInformation/EditReceiver/' + receiverId,
success: function (data) {
debugger
var result = data.receiverInformationModel[0];
let mobile = result.mobile;
const prefix = '+977';

2
CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/ViewReceiverList.cshtml

@ -136,7 +136,7 @@
},
async: false,
success: function (response) {
debugger;
// if (response.responsecode != 0) {
// showalertmessage(response.responsecode, response.responsemessage);
// }

38
CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout.cshtml

@ -115,7 +115,7 @@
</li>
<li class="dropdown profile ms-2">
<a class="px-0 dropdown-toggle" href="javascript:void(0)">
<img class="rounded-circle" src="images/profile-thumb.jpg" width="32" alt="" />
<img id="profile-img-top" class="rounded-circle" src=@Url.Content("~/images/profile-thumb.jpg") alt ="" width="32" alt="" />
</a>
<ul class="dropdown-menu">
<li class="text-center text-3 py-2">Hi, @firstName</li>
@ -154,10 +154,10 @@
<!-- Profile Details -->
<div class="bg-white rounded text-center p-3 mb-4">
<div class="profile-thumb mt-3 mb-4">
<img class="rounded-circle" src="images/profile-thumb.jpg" alt="">
<img id="profile_img" class="rounded-circle" height="90" width="100" alt ="" src=@Url.Content("~/images/profile-thumb.jpg")>
<div class="profile-thumb-edit bg-primary text-white" data-bs-toggle="tooltip" title="Change Profile Picture">
<i class="fas fa-camera position-absolute"></i>
<input type="file" class="custom-file-input" id="customFile">
<input type="file" class="custom-file-input" id="customFile" accept="image">
</div>
</div>
<p class="text-3 fw-500 mb-2">Hello, @firstName</p>
@ -238,6 +238,34 @@
GetNotificationList();
// GetRewardDetails();
});
$("#customFile").on('change', function () {
var formData = new FormData();
var fileInput = $("#customFile")[0].files[0];
formData.append("file", fileInput);
$.ajax({
url: "/CustomerDocument/UploadProfilePic",
type: "POST",
data: formData,
processData: false,
contentType: false,
success: function (response) {
if (response.responseCode != 0) {
ShowAlertMessageErrorOnly(response.responseCode, response.responseMessage);
return false;
}
$('#profile_img').attr('src', response.extra2);
// $('#profile-img-top').attr('src', response.extra2);
// alert("Files Uploaded! " + response.extra);
}
});
});
function GetNotificationList() {
$.ajax(
@ -271,7 +299,7 @@
url: '/GetRewardAmount',
data: {},
success: function (response) {
debugger
var data = response.notificationModel;
if (data.length > 0) {
var rewardPoints = data[0].rewardPoints;
@ -320,7 +348,7 @@
// }
// }
function PopulateNotificationData(response) {
debugger
var result = response.notificationModel;
if (response.responseCode == 0) {
var rewardPoints = response.rewardAmount;

4
CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout2.cshtml

@ -109,7 +109,7 @@
</li>
<li class="dropdown profile ms-2">
<a class="px-0 dropdown-toggle" href="#">
<img class="rounded-circle" src="images/profile-thumb.jpg" width="32" alt="" />
<img class="rounded-circle" src=@Url.Content("~/images/profile-thumb.jpg") width ="32" alt="" />
</a>
<ul class="dropdown-menu">
<li class="text-center text-3 py-2">Hi, @firstName</li>
@ -210,7 +210,7 @@
}
function PopulateNotificationData(response) {
// debugger
//
var result = response.notificationModel;
if (response.responseCode == 0) {

24
CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml

@ -243,11 +243,11 @@
}
});
$('#PayoutAmount').on('change', function () {
if (!isNaN(parseFloat($(this).val())) && parseFloat($(this).val()) > 0) {
$('#hdnCalcBy').val('p');
}
});
// $('#PayoutAmount').on('change', function () {
// console.log($(this).val());
// });
$("#CollectAmount").blur(function () {
@ -256,6 +256,10 @@
$("#PayoutAmount").blur(function () {
// checkdata($("#hdnCalcBy").val(), 'c');
if (!isNaN(parseFloat($(this).val())) && parseFloat($(this).val()) > 0) {
$('#hdnCalcBy').val('p');
DoCalcualtion();
}
});
$("#DiscountFee").blur(function () {
DoCalcualtion();
@ -272,7 +276,7 @@
url: '/GetRewardAmount',
data: {},
success: function (response) {
debugger;
$('#rewardValue').text(response.rewardAmount);
},
error: function (error) {
@ -327,7 +331,7 @@
function DoCalcualtion() {
DisableCalculateButton();
debugger
let receivingCountry = $('#ReceivingCountry').val();
let deliveryMethod = $('#DeliveryMethod').val();
let collectionAmount = parseFloat($('#CollectAmount').val());
@ -396,7 +400,7 @@
},
async: true,
success: function (response) {
debugger
EnableCalculateButton();
if (response.responseCode != 0) {
ShowAlertMessage(response.responseCode, response.responseMessage);
@ -437,7 +441,7 @@
function SendMoney() {
DisableSendButton();
debugger
let receivingCountry = $('#ReceivingCountry').val();
let deliveryMethod = $('#DeliveryMethod').val();
let collectionAmount = parseFloat($('#CollectAmount').val());
@ -532,7 +536,7 @@
},
async: true,
success: function (response) {
debugger
EnableSendButton();
if (response.responseCode != 0) {
ShowAlertMessage(response.responseCode, response.responseMessage);

2
CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/ViewAllTxn.cshtml

@ -157,7 +157,7 @@
},
async: false,
success: function (response) {
debugger;
// if (response.responsecode != 0) {
// showalertmessage(response.responsecode, response.responsemessage);
// }

6
CustomerOnlineV2/CustomerOnlineV2/Views/TransactionReport/TranReport.cshtml

@ -174,7 +174,7 @@
}
});
function GetTransactionList() {
debugger;
$.ajax(
{
type: 'POST',
@ -203,7 +203,7 @@
}
function PopulateTransactionReportData(response) {
debugger;
var result = response.customerTransaction;
//console.log('Received response:', result);
@ -234,7 +234,7 @@
// <div class="col-8 col-sm-2" id = "tranId" > <a href="/Transaction/ReceiptTran" > <i class="fa fa-eye" style = "font-size:30px" > </i></a > </div>
// function PopulateTransactionReportData(response) {
// debugger;
// ;
// var result = response.customerTransaction;
// if (response.responseCode == 0) {
// let row = '';

BIN
CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/profile-thumb.jpg

Before

Width: 100  |  Height: 100  |  Size: 4.8 KiB

After

Width: 100  |  Height: 100  |  Size: 51 KiB

BIN
CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/profile-thumb1.jpg

After

Width: 100  |  Height: 100  |  Size: 4.8 KiB

2
CustomerOnlineV2/CustomerOnlineV2/wwwroot/js/toast.js

@ -1,7 +1,7 @@

window.showToastr = (message, type) => {
debugger
toastr.options = {
positionClass: 'toast-bottom-right',
preventDuplicates: true,

Loading…
Cancel
Save