Browse Source

add membership id

feature/19315_Customer-Registration
shakun 11 months ago
parent
commit
0eb37b1c3b
  1. 1
      CustomerOnlineV2/CustomerOnlineV2.Common/Helper/LoginUserInfo.cs
  2. 1
      CustomerOnlineV2/CustomerOnlineV2.Common/Models/HomeModel/HomeModel.cs
  3. 1
      CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/ExrateResponse.cs
  4. 3
      CustomerOnlineV2/CustomerOnlineV2/Controllers/AccountController.cs
  5. 2
      CustomerOnlineV2/CustomerOnlineV2/Controllers/ReceiverInformationController.cs
  6. 199
      CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml
  7. 17
      CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml
  8. 4
      CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout.cshtml
  9. 28
      CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml
  10. 1
      CustomerOnlineV2/CustomerOnlineV2/wwwroot/js/Custom.js

1
CustomerOnlineV2/CustomerOnlineV2.Common/Helper/LoginUserInfo.cs

@ -17,6 +17,7 @@ namespace CustomerOnlineV2.Common.Helper
model.FullName = claimIdentity.FindFirst(x => x.Type == "FullName").Value;
model.ForceChangePassword = Convert.ToBoolean(claimIdentity.FindFirst(x => x.Type == "ForceChangePassword").Value);
model.MobileNumber = claimIdentity.FindFirst(x => x.Type == "MobileNumber").Value;
model.MembershipId = claimIdentity.FindFirst(x => x.Type == "MembershipId").Value;
model.Email = claimIdentity.FindFirst(x => x.Type == "Email").Value;
model.RememberMe = Convert.ToBoolean(claimIdentity.FindFirst(x => x.Type == "RememberMe").Value);
model.SessionId = claimIdentity.FindFirst(x => x.Type == "SessionId").Value;

1
CustomerOnlineV2/CustomerOnlineV2.Common/Models/HomeModel/HomeModel.cs

@ -52,6 +52,7 @@
public string? acAmt { get; set; }
public string? pCountry { get; set;}
public string? receiverName { get; set;}
public string? Rate { get; set; }
public string? recAccountNum { get; set;}
}

1
CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/ExrateResponse.cs

@ -128,6 +128,7 @@ namespace CustomerOnlineV2.Common.Models.TransactionModel
public string? ForexSessionId { get; set; }
public string? SchemeId { get; set; }
public string? TpExRate { get; set; }
public string? DiscountFee { get; set; }
}
public class SendMoneyRequestModel

3
CustomerOnlineV2/CustomerOnlineV2/Controllers/AccountController.cs

@ -73,7 +73,8 @@ namespace CustomerOnlineV2.Controllers
new Claim("Email", result.Email),
new Claim("RememberMe", loginModel.RememberMe.ToString()),
new Claim("SessionId", result.SessionId),
new Claim("UserId", result.UserId)
new Claim("UserId", result.UserId),
new Claim("MembershipId", result.MembershipId)
};
var claimsIdentity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme);

2
CustomerOnlineV2/CustomerOnlineV2/Controllers/ReceiverInformationController.cs

@ -73,7 +73,7 @@ namespace CustomerOnlineV2.Controllers
{
var loginDetails = HttpContext.GetLoginDetails();
return await _receiverBusiness.UpdateReceiverById(model, id, loginDetails.UserName);
return await _receiverBusiness.UpdateReceiverById(model, id, loginDetails.UserId);
}
}
}

199
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 class="rounded-circle" src="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">
@ -70,8 +70,8 @@
<div class="bg-white shadow-sm rounded p-4 mb-4">
<h3 class="text-5 fw-400 d-flex align-items-center mb-4">
Personal Details
@* <a href="#edit-personal-details" data-bs-toggle="modal" class="ms-auto text-2 text-uppercase btn-link">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
@* <a href="#edit-personal-details" data-bs-toggle="modal" class="ms-auto text-2 text-uppercase btn-link">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
</a> *@
</h3>
<hr class="mx-n4 mb-4" />
@ -83,17 +83,17 @@
<label class="col-sm-3 text-muted text-sm-end mb-0 mb-sm-3" id="">Date of Birth:</label>
<p class="col-sm-9 text-3" id="dob"></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">Email Address:</label>
<p class="col-sm-9 text-3" id="email">
</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">Mobile :</label>
<p class="col-sm-9 text-3" id="mobile">
</p>
</div>
<div class="row gx-3 align-items-baseline">
@ -110,14 +110,13 @@
</div>
</div>
<!-- Edit Details Modal -->
<!-- Personal Details End -->
<!-- Account Settings -->
<div class="bg-white shadow-sm rounded p-4 mb-4">
<h3 class="text-5 fw-400 d-flex align-items-center mb-4">
Personal Address
@* <a href="#edit-personal-details" data-bs-toggle="modal" class="ms-auto text-2 text-uppercase btn-link">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
@* <a href="#edit-personal-details" data-bs-toggle="modal" class="ms-auto text-2 text-uppercase btn-link">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
</a> *@
<a href="#edit-personal-details" data-bs-toggle="modal" class="ms-auto text-1 text-uppercase btn-link">
<span class="me-1"><i class="fas fa-edit"></i></span>Edit
@ -127,10 +126,10 @@
<div class="row gx-3 align-items-center">
<p class="col-sm-3 text-muted text-sm-end mb-0 mb-sm-3">ZipCode:</p>
<p class="col-sm-9 text-3" id="zipCode"></p>
@* <a href="#edit-personal-details" data-bs-toggle="modal" class="ms-auto text-1 text-uppercase btn-link" >
<span class="me-1" style="text-align:right"><i class="fas fa-edit"></i></span>Edit
@* <a href="#edit-personal-details" data-bs-toggle="modal" class="ms-auto text-1 text-uppercase btn-link" >
<span class="me-1" style="text-align:right"><i class="fas fa-edit"></i></span>Edit
</a> *@
</div>
<div class="row gx-3 align-items-center">
<P class="col-sm-3 text-muted text-sm-end mb-0 mb-sm-3">City:</P>
@ -139,7 +138,7 @@
<div class="row gx-3 align-items-center">
<p class="col-sm-3 text-muted text-sm-end mb-0 mb-sm-3">Address1:</p>
<p class="col-sm-9 text-3" id="address1">
</p>
</div>
<div class="row gx-3 align-items-center">
@ -159,18 +158,18 @@
</div>
<div class="modal-body p-4">
<form id="AddressDetails" method="post">
<div class="row g-3">
<input asp-for="customerId" hidden/>
<input asp-for="customerId" hidden />
<div class="col-12 col-sm-6">
<label for="postalCode" class="form-label">Zip Code</label>
<input asp-for="postalCode" type="text" class="form-control" required placeholder="Zip Code" />
<input asp-for="postalCode" type="text" class="form-control" required placeholder="Zip Code" />
<button class="btn btn-secondary" id="btnSearch" type="button">Lookup <i class="fa fa-search"></i></button>
</div>
<div id="apiDataPopup" class="modal" role="dialog">
<div class="modal-dialog">
@ -200,7 +199,7 @@
</div>
<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 />
<input type="text" id="pCity" class="form-control" required placeholder="City" readonly />
</div>
<div class="col-12 col-sm-6">
@ -211,7 +210,7 @@
<label for="input-zone" class="form-label">Address2</label>
<input type="text" class="form-control" id="pAddress2" />
</div>
<div class="col-12 mt-4 d-grid"><button class="btn btn-primary" type="submit" onclick="UpdateAddress()">Update Changes</button></div>
</div>
</form>
@ -219,7 +218,7 @@
</div>
</div>
</div>
<div class="bg-white shadow-sm rounded p-4 mb-4">
<h3 class="text-5 fw-400 d-flex align-items-center mb-4">
Account Setting
@ -266,35 +265,33 @@
<div class="row g-3">
@*<div class="col-12 col-sm-6">
<label for="city" class="form-label">Nationality</label>
<input id="city" value="Nepal" type="text" class="form-control" placeholder="City" readonly />
<label for="city" class="form-label">Nationality</label>
<input id="city" value="Nepal" type="text" class="form-control" placeholder="City" readonly />
</div> *@
<div class="col-12 col-sm-6">
<label for="zipCode" class="form-label">Id Type</label>
<select class="form-select" asp-for="idType" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getIdType", true)">
<select class="form-select" id="idType" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("getIdType", true)" required>
</select>
</div>
<div class="col-12 col-sm-6">
<label for="input-zone" class="form-label">Id Number</label>
<input type="text" class="form-control" asp-for="idNumber"/>
<input type="text" class="form-control" id="idNumber"/>
</div>
<div class="col-12 col-sm-6">
<label for="input-zone" class="form-label">Id Issue Country</label>
<select class="form-select" asp-for="nativeCountry" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("allCountrylist", true)">
<select class="form-select" id="nativeCountry" asp-items="@CustomerOnlineV2.Helper.HelperClass.GetDropdownData("allCountrylist", true)" required>
</select>
</div>
<div class="col-12 col-sm-6">
<label for="input-zone" class="form-label">Id Issue Date</label>
<input type="date" class="form-control" asp-for="idIssueDate"/>
<input type="date" class="form-control" id="idIssueDate" required/>
</div>
<div class="col-12 col-sm-6">
<label for="input-zone" class="form-label">Id Expiry Date</label>
<input type="date" class="form-control"asp-for="idExpiryDate"/>
<input type="date" class="form-control" id="idExpiryDate" required/>
</div>
</div>
<div class="d-grid w-100"><button class="btn btn-primary" type="submit" onclick="UpdateDocument()">Save Changes</button></div>
</form>
@ -305,13 +302,13 @@
<!-- Email Addresses End -->
<div class="bg-white shadow-sm rounded p-4 mb-4">
<h3 class="text-5 fw-400 mb-4">Valid ID Card<span class="text-muted text-2 ms-2">(BRP Card / Passport / Driving License)</span></h3>
<a href="" data-bs-target="#edit-doc-details" data-bs-toggle="modal" >
<a href="" data-bs-target="#edit-doc-details" data-bs-toggle="modal">
<p class="w-100 text-left 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</span>
</p>
</a>
<hr class="mb-4 mx-n4" />
<div class="row g-3">
<div class="col-12 col-md-6 col-lg-4">
<div class="account-doc rounded p-3">
@ -339,12 +336,12 @@
</div>
</div>
</div>
@* <div class="col-12 col-md-6 col-lg-4">
<a href="" data-bs-target="#edit-doc-details" 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 class="col-12 col-md-6 col-lg-4">
<a href="" data-bs-target="#edit-doc-details" 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>
</div>
@ -372,25 +369,25 @@
</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 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 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>
@ -437,8 +434,8 @@
<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 class="input-group-text px-2">
<button class="btn-choose bg-transparent text-white border-0" type="button">Upload</button>
</span> *@
</div>
</div>
@ -483,19 +480,19 @@
<input type="text" id="fileName" 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 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">
@ -518,24 +515,24 @@
@section Scripts {
<script>
<script>
$(document).ready(function () {
getData();
});
// function pageLoad() {
// getData(id);
// }
// $(document).ready(function () {
// // getData();
// });
$(document).on('click', '#btnSearch',function (e) {
$(document).on('click', '#btnSearch', function (e) {
e.preventDefault();
var postalCode = $('#postalCode').val();
@ -570,13 +567,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();
@ -598,14 +594,14 @@
});
function getData() {
$.ajax({
//var id;
type: 'GET',
contentType: 'application/json; charset=utf-8',
url: '/Customer/GetCustomerDetail',
success: function (response) {
var data = response.customerListModel[0];
$('#fullName').text(data.fullName);
@ -632,11 +628,11 @@
function UpdateAddress() {
$.ajax({
url: "/Customer/UpdateCustomer",
type: "post",
anync: false,
data: {
//CustomerId: $("#customerId").val(),
@ -644,9 +640,6 @@
city: $("#pCity").val(),
address: $("#pAddress1").val(),
address2: $("#pAddress2").val(),
},
success: function (response) {
if (response.responseCode != 0) {
@ -668,7 +661,7 @@
url: "/Customer/UpdateDocument",
type: "post",
anync: false,
data: {
//CustomerId: $("#customerId").val(),
idType: $("#idType").val(),
@ -681,18 +674,17 @@
},
success: function (data) {
debugger;
if (data === 1) {
alert("Updated Successfully");
success: function (response) {
if (response.responseCode != 0) {
ShowAlertMessageErrorOnly(data, response.responseMessage);
return false;
}
ShowAlertMessage("0", "Document Updated successfully.");
},
error: function (data) {
alert("Sorry Couldn't be updated");
ShowAlertMessageErrorOnly(1, "Error ocurred during update!");
}
}
);
@ -722,28 +714,25 @@
},
async: true,
success: function (response) {
if (response.responseCode != 0) {
ShowAlertMessage(response.responseCode, response.responseMessage);
//ShowAlertMessage("Receiver Successfully created")
ShowAlertMessageErrorOnly(data, response.responseMessage);
return;
return false;
}
// clearFields();
// $('#Country').focus();
$('#message').text('Data successfully submitted');
ShowAlertMessage("0", "Document Add successfully.");
// window.location.replace("/home");
},
error: function () {
return null;
error: function (data) {
ShowAlertMessageErrorOnly(1, "Error ocurred during update!");
}
});
}
</script>
</script>
}

17
CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml

@ -30,6 +30,14 @@
</a>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="border rounded text-center">
<a href="/ReceiverInformation/Receiver">
<span class="d-block text-10 text-light mt-1 mb-1"><img src="images/menu7.jpg" height="80"></span>
<p class="text-2 text-strong">Add Receiver</p>
</a>
</div>
</div>
@* <div class="col-sm-6 col-md-3">
<div class="border rounded text-center">
<a href="#">
@ -70,14 +78,7 @@
</a>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="border rounded text-center">
<a href="#">
<span class="d-block text-10 text-light mt-1 mb-1"><img src="images/menu7.jpg" height="80"></span>
<p class="text-2 text-strong">Bill Payment</p>
</a>
</div>
</div> *@
*@
<div class="col-sm-6 col-md-3">
<div class="border rounded text-center">
<a href="#">

4
CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout.cshtml

@ -28,7 +28,7 @@
var mobileNumber = userInfo.MobileNumber;
var email = userInfo.Email;
var userId = userInfo.UserId;
var membershipId = userInfo.MembershipId;
var errorMessage = Context.Request.Cookies["ErrorMessage"];
var errorCode = Context.Request.Cookies["ErrorCode"];
@ -150,7 +150,7 @@
</div>
</div>
<p class="text-3 fw-500 mb-2">Hello, @firstName</p>
<p class="text-3 fw-500 mb-2">User Id : <span>@userId</span></p>
<p class="text-3 fw-500 mb-2">User Id : <span><strong>@membershipId</strong></span></p>

28
CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/SendMoney.cshtml

@ -72,7 +72,7 @@
<div class="mb-3">
<div class="form-floating mb-3">
<input type="text" asp-for="PromoCode" maxlength="10" class="form-control" placeholder="">
<label for="floatingInput">I Have Promo Code (Optional)</label>
<label id="lblReward"></label>
</div>
</div>
</div>
@ -132,35 +132,43 @@
</div>
<table class="table">
<tr>
<td>Send Amount :</td>
<td>Collected Amount :</td>
<td>
<strong><span id="collAmount">0.00 GBP</span></strong>
</td>
</tr>
<tr>
<td>Exchange Rate :</td>
<td>Service Fee :</td>
<td>
<strong><span id="exRate">0.00</span></strong>
<strong><span id="sCharge">0.00 GBP</span></strong>
</td>
</tr>
<tr>
<td>Transfer Fee :</td>
<td>Reward Amount Used :</td>
<td>
<strong><span id="sCharge">0.00 GBP</span></strong>
<strong><span id="rewardPoint">0.00 GBP</span></strong>
</td>
</tr>
<tr>
<td>Reveiver will get (<label id="pCurrency">XXX</label>) :</td>
<td>Total Sent Amount :</td>
<td>
<strong><span id="payoutAmount">0.00</span></strong>
<strong><span id="tamt">0.00 GBP</span></strong>
</td>
</tr>
<tr>
<td>Exchange Rate :</td>
<td>
<strong><span id="exRate">0.00</span></strong>
</td>
</tr>
<tr>
<td>Total to Pay :</td>
<td>Total Payout Amount(<label id="pCurrency">XXX</label>) :</td>
<td>
<strong><span id="tAmt">0.00 GBP</span></strong>
<strong><span id="payoutAmount">0.00</span></strong>
</td>
</tr>
</table>
</div>
</div>

1
CustomerOnlineV2/CustomerOnlineV2/wwwroot/js/Custom.js

@ -110,6 +110,7 @@ function ShowAlertMessageErrorOnly(errorCode, errorMessage) {
else {
iziToast.info({
title: 'Info',
timeout: 1000,
message: errorMessage
});
}

Loading…
Cancel
Save