|
|
@ -1,6 +1,9 @@ |
|
|
|
@layout MainLayout |
|
|
|
@page "/dashboard" |
|
|
|
@attribute [Authorize] |
|
|
|
@inject IJSRuntime JSRuntime |
|
|
|
@inherits LayoutComponentBase |
|
|
|
|
|
|
|
|
|
|
|
<!-- Profile Completeness --> |
|
|
|
<div class="bg-white rounded p-4 mb-4"> |
|
|
@ -77,191 +80,101 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- Profile Completeness End --> |
|
|
|
<!-- Recent Activity |
|
|
|
=============================== --> |
|
|
|
<div class="bg-white rounded py-4 mb-4"> |
|
|
|
<h3 class="text-5 fw-400 d-flex align-items-center px-4 mb-4">My Transactions</h3> |
|
|
|
|
|
|
|
<!-- Title |
|
|
|
=============================== --> |
|
|
|
<div class="transaction-title py-2 px-4"> |
|
|
|
<div class="row fw-00"> |
|
|
|
<div class="col-2 col-sm-1 text-center"><span class="">Date</span></div> |
|
|
|
<div class="col-3 col-sm-4">Description</div> |
|
|
|
<div class="col-4 col-sm-2">Quick Send </div> |
|
|
|
<div class="col-5 col-sm-2 d-none d-sm-block text-center">Status</div> |
|
|
|
<div class="col-6 col-sm-2 text-end">Amount</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- Title End --> |
|
|
|
<!-- Transaction List |
|
|
|
=============================== --> |
|
|
|
<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-2 col-sm-1 text-center"> <span class="d-block text-1 fw-300">16</span> <span class="d-block text-1 fw-300 text-uppercase">APR</span> </div> |
|
|
|
<div class="col-3 col-sm-4"> <span class="d-block text-1">HDFC Bank</span> <span class="text-muted">Cash collection</span> </div> |
|
|
|
<div class="col-4 col-sm-2"> <span class="d-block text-2"><a href="send-money.html?transactionId=23423423">Repeat Transaction </a></span></div> |
|
|
|
|
|
|
|
<div class="col-5 col-sm-2 d-none d-sm-block text-center text-1"> <span class="text-warning" data-bs-toggle="tooltip" title="In Progress"><i class="fas fa-ellipsis-h"></i>Processing</span> </div> |
|
|
|
<div class="col-6 col-sm-2 text-end text-1"> <span class="text-nowrap">- $562</span> <span class="text-2 text-uppercase">(USD)</span> </div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<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-2 col-sm-1 text-center"> <span class="d-block text-1 fw-300">16</span> <span class="d-block text-1 fw-300 text-uppercase">APR</span> </div> |
|
|
|
<div class="col-3 col-sm-4"> <span class="d-block text-1">Global IME Bank</span> <span class="text-muted">Bank Deposit</span> </div> |
|
|
|
<div class="col-4 col-sm-2"> <span class="d-block text-2"><a href="send-money.html?transactionId=23423423">Repeat Transaction </a></span></div> |
|
|
|
|
|
|
|
<div class="col-5 col-sm-2 d-none d-sm-block text-center text-1"> <span class="text-success" data-bs-toggle="tooltip" title="Completed"><i class="fas fa-check-circle"></i>Paid</span> </div> |
|
|
|
<div class="col-6 col-sm-2 text-end text-1"> <span class="text-nowrap">- $562</span> <span class="text-2 text-uppercase">(USD)</span> </div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<!-- Transaction List End --> |
|
|
|
<!-- Transaction Item Details Modal |
|
|
|
=========================================== --> |
|
|
|
<div id="transaction-detail" class="modal fade" role="dialog" aria-hidden="true"> |
|
|
|
<div class="modal-dialog modal-dialog-centered transaction-details" role="document"> |
|
|
|
<div class="modal-content"> |
|
|
|
<div class="modal-body"> |
|
|
|
<div class="row g-0"> |
|
|
|
<div class="col-sm-5 d-flex justify-content-center bg-primary rounded-start py-4"> |
|
|
|
<div class="my-auto text-center"> |
|
|
|
<div class="text-17 text-white my-3"><i class="fas fa-building"></i></div> |
|
|
|
<h3 class="text-4 text-white fw-400 my-3">Global IME Bank Ltd</h3> |
|
|
|
<div class="text-8 fw-500 text-white my-4">$557.20</div> |
|
|
|
<p class="text-white">15 March 2021</p> |
|
|
|
</div> |
|
|
|
<TransactionListComponent ShowAll="false"></TransactionListComponent> |
|
|
|
<ReceiverListComponent ShowAll="false"></ReceiverListComponent> |
|
|
|
<div id="transaction-detail" class="modal fade" role="dialog" aria-hidden="true"> |
|
|
|
<div class="modal-dialog modal-dialog-centered transaction-details" role="document"> |
|
|
|
<div class="modal-content"> |
|
|
|
<div class="modal-body"> |
|
|
|
<div class="row g-0"> |
|
|
|
<div class="col-sm-5 d-flex justify-content-center bg-primary rounded-start py-4"> |
|
|
|
<div class="my-auto text-center"> |
|
|
|
<div class="text-17 text-white my-3"><i class="fas fa-building"></i></div> |
|
|
|
<h3 class="text-4 text-white fw-400 my-3">Global IME Bank Ltd</h3> |
|
|
|
<div class="text-8 fw-500 text-white my-4">$557.20</div> |
|
|
|
<p class="text-white">15 March 2021</p> |
|
|
|
</div> |
|
|
|
<div class="col-sm-7"> |
|
|
|
<h5 class="text-5 fw-400 m-3"> |
|
|
|
Transaction Details |
|
|
|
<button type="button" class="btn-close text-2 float-end" data-bs-dismiss="modal" aria-label="Close"></button> |
|
|
|
</h5> |
|
|
|
<hr> |
|
|
|
<div class="px-3"> |
|
|
|
<ul class="list-unstyled"> |
|
|
|
<li class="mb-2">Payment Amount <span class="float-end text-3">$562.00</span></li> |
|
|
|
<li class="mb-2">Fee <span class="float-end text-3">-$4.80</span></li> |
|
|
|
</ul> |
|
|
|
<hr class="mb-2"> |
|
|
|
<p class="d-flex align-items-center fw-500 mb-0">Total Amount <span class="text-3 ms-auto">$557.20</span></p> |
|
|
|
<hr class="mb-2"> |
|
|
|
<p class="d-flex align-items-center fw-500 mb-0">Total Amount NPR <span class="text-3 ms-auto">Rs. 70000</span></p> |
|
|
|
<hr class="mb-4 mt-2"> |
|
|
|
<ul class="list-unstyled"> |
|
|
|
<li class="fw-500">Paid By:</li> |
|
|
|
<li class="text-muted">Global IME Bank Ltd</li> |
|
|
|
</ul> |
|
|
|
<ul class="list-unstyled"> |
|
|
|
<li class="fw-500">Country:</li> |
|
|
|
<li class="text-muted">Nepal</li> |
|
|
|
</ul> |
|
|
|
<ul class="list-unstyled"> |
|
|
|
<li class="fw-500">Transaction ID:</li> |
|
|
|
<li class="text-muted">26566689645685976589</li> |
|
|
|
</ul> |
|
|
|
<ul class="list-unstyled"> |
|
|
|
<li class="fw-500">Description:</li> |
|
|
|
<li class="text-muted">GBIME March 2021 Member Payment</li> |
|
|
|
</ul> |
|
|
|
<ul class="list-unstyled"> |
|
|
|
<li class="fw-500">Status:</li> |
|
|
|
<li class="text-muted">Completed<span class="text-success text-3 ms-1"><i class="fas fa-check-circle"></i></span></li> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-sm-7"> |
|
|
|
<h5 class="text-5 fw-400 m-3"> |
|
|
|
Transaction Details |
|
|
|
<button type="button" class="btn-close text-2 float-end" data-bs-dismiss="modal" aria-label="Close"></button> |
|
|
|
</h5> |
|
|
|
<hr> |
|
|
|
<div class="px-3"> |
|
|
|
<ul class="list-unstyled"> |
|
|
|
<li class="mb-2">Payment Amount <span class="float-end text-3">$562.00</span></li> |
|
|
|
<li class="mb-2">Fee <span class="float-end text-3">-$4.80</span></li> |
|
|
|
</ul> |
|
|
|
<hr class="mb-2"> |
|
|
|
<p class="d-flex align-items-center fw-500 mb-0">Total Amount <span class="text-3 ms-auto">$557.20</span></p> |
|
|
|
<hr class="mb-2"> |
|
|
|
<p class="d-flex align-items-center fw-500 mb-0">Total Amount NPR <span class="text-3 ms-auto">Rs. 70000</span></p> |
|
|
|
<hr class="mb-4 mt-2"> |
|
|
|
<ul class="list-unstyled"> |
|
|
|
<li class="fw-500">Paid By:</li> |
|
|
|
<li class="text-muted">Global IME Bank Ltd</li> |
|
|
|
</ul> |
|
|
|
<ul class="list-unstyled"> |
|
|
|
<li class="fw-500">Country:</li> |
|
|
|
<li class="text-muted">Nepal</li> |
|
|
|
</ul> |
|
|
|
<ul class="list-unstyled"> |
|
|
|
<li class="fw-500">Transaction ID:</li> |
|
|
|
<li class="text-muted">26566689645685976589</li> |
|
|
|
</ul> |
|
|
|
<ul class="list-unstyled"> |
|
|
|
<li class="fw-500">Description:</li> |
|
|
|
<li class="text-muted">GBIME March 2021 Member Payment</li> |
|
|
|
</ul> |
|
|
|
<ul class="list-unstyled"> |
|
|
|
<li class="fw-500">Status:</li> |
|
|
|
<li class="text-muted">Completed<span class="text-success text-3 ms-1"><i class="fas fa-check-circle"></i></span></li> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- Transaction Item Details Modal End --> |
|
|
|
<!-- View all Link |
|
|
|
=============================== --> |
|
|
|
<div class="text-center mt-4"> |
|
|
|
<a href="transaction-history.html" class="btn-link text-3">View all Transactions<i class="fas fa-chevron-right text-2 ms-2 text-link"></i></a> |
|
|
|
</div> |
|
|
|
<!-- View all Link End --> |
|
|
|
</div> |
|
|
|
<!-- Recent Activity End --> |
|
|
|
<!-- My Receiver Activity |
|
|
|
=============================== --> |
|
|
|
<div class="bg-white rounded py-4 mb-4"> |
|
|
|
|
|
|
|
<div class="text-left"> |
|
|
|
<h3 class="text-5 fw-400 d-flex align-items-center px-4 mb-4">My Receivers</h3> |
|
|
|
</div> |
|
|
|
<div class="text-right"> |
|
|
|
<h5 class="text-3 fw-400 d-flex align-items-right px-4 mb-4"> <a href="add-receiver.html"> Add Receivers</a></h5> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- Title |
|
|
|
=============================== --> |
|
|
|
<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">Send Transaction</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> |
|
|
|
</div> |
|
|
|
<!-- Title End --> |
|
|
|
<!-- My Receiver List |
|
|
|
=============================== --> |
|
|
|
<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">Ram Bahadur</span> <span class="text-muted">980403234234</span> </div> |
|
|
|
<div class="col-2 col-sm-2"> <span class="d-block text-1"><a href="send-money.html?receiverid=123123123">Send Transaction</a></span></div> |
|
|
|
<div class="col-3 col-sm-2 d-none d-sm-block text-center text-1"> Nepal</div> |
|
|
|
<div class="col-4 col-sm-2 text-end text-1"> <span class="text-nowrap">Cash collection</span></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<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">Ram Bahadur</span> <span class="text-muted">980403234234</span> </div> |
|
|
|
<div class="col-2 col-sm-2"> <span class="d-block text-1"><a href="send-money.html?receiverid=123123123">Send Transaction</a></span></div> |
|
|
|
<div class="col-3 col-sm-2 d-none d-sm-block text-center text-1"> Nepal</div> |
|
|
|
<div class="col-4 col-sm-2 text-end text-1"> <span class="text-nowrap">Cash collection</span></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@code { |
|
|
|
private string currentLocation = string.Empty; |
|
|
|
private Dictionary<string, string> QueryParameters { get; set; } |
|
|
|
|
|
|
|
protected override void OnInitialized() |
|
|
|
{ |
|
|
|
currentLocation = NavigationManager.Uri; |
|
|
|
|
|
|
|
</div> |
|
|
|
<!-- My Receiver List End --> |
|
|
|
<!-- View all Link |
|
|
|
=============================== --> |
|
|
|
<div class="text-center mt-4"> |
|
|
|
<a href="receivers.html" class="btn-link text-3">View all Receivers<i class="fas fa-chevron-right text-2 ms-2 text-link"></i></a> |
|
|
|
</div> |
|
|
|
<!-- View all Link End --> |
|
|
|
</div> |
|
|
|
<!-- MY Receiver Activity End --> |
|
|
|
@*<AuthorizeView> |
|
|
|
<Authorized> |
|
|
|
|
|
|
|
</Authorized> |
|
|
|
<NotAuthorized> |
|
|
|
<h1>You are not authorized to view this page</h1> |
|
|
|
</NotAuthorized> |
|
|
|
</AuthorizeView>*@ |
|
|
|
NavigationManager.LocationChanged += OnLocationChanged; |
|
|
|
} |
|
|
|
|
|
|
|
@code { |
|
|
|
string userAuthenticated; |
|
|
|
protected override async Task OnInitializedAsync() |
|
|
|
private async void OnLocationChanged(object sender, LocationChangedEventArgs e) |
|
|
|
{ |
|
|
|
var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); |
|
|
|
var user = authState.User; |
|
|
|
if (user.Identity.IsAuthenticated) |
|
|
|
if (e.Location != currentLocation) |
|
|
|
{ |
|
|
|
userAuthenticated = $"{user.Identity.Name} is authenticated."; |
|
|
|
currentLocation = e.Location; |
|
|
|
if (HasReloadQueryParam(e.Location)) |
|
|
|
{ |
|
|
|
await JSRuntime.InvokeVoidAsync("location.reload"); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
} |
|
|
|
|
|
|
|
private bool HasReloadQueryParam(string url) |
|
|
|
{ |
|
|
|
var uri = new Uri(url); |
|
|
|
var queryParams = System.Web.HttpUtility.ParseQueryString(uri.Query); |
|
|
|
|
|
|
|
if (queryParams.Count <= 0) |
|
|
|
return false; |
|
|
|
|
|
|
|
QueryParameters = queryParams.AllKeys.ToDictionary(key => key, key => queryParams[key]); |
|
|
|
if (QueryParameters["login"].ToLower() == "success") |
|
|
|
{ |
|
|
|
userAuthenticated = "The user is NOT authenticated."; |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |