-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
System Index // Uncharted Territory
-
Nothing was found in this search.
-
- Even with careful scrutiny, the requested volume remains elusive. It appears the shelf you are exploring is currently vacant.
-
-
Navigation.NavigateTo("/")'>Return to Collection
-
-
+
\ No newline at end of file
+
+
+
+
Page Not Found
+
+ The literary masterpiece or digital section you are trying to find doesn't exist or has been relocated to another shelf.
+
+
+
+
+
+ Return to Storefront
+
+
+
+
+@code {
+ [Parameter] public EventCallback OnBackToHome { get; set; }
+
+ private async Task HandleBackToHome()
+ {
+ await OnBackToHome.InvokeAsync();
+ }
+}
diff --git a/MidrandBookshop/Components/Pages/NotFound.razor.css b/MidrandBookshop/Components/Pages/NotFound.razor.css
deleted file mode 100644
index a372b49..0000000
--- a/MidrandBookshop/Components/Pages/NotFound.razor.css
+++ /dev/null
@@ -1,76 +0,0 @@
-.artistic-404-container {
- background-color: #ffffff;
- min-height: 70vh;
- display: flex;
- align-items: center;
- padding: 5rem 0;
-}
-
-.terrain-wrapper {
- display: flex;
- justify-content: center;
- align-items: center;
- /* Static, grounded look */
- border-bottom: 2px solid #f0f0f0;
- padding-bottom: 2rem;
-}
-
-.editorial-headline {
- font-family: 'Playfair Display', serif;
- font-size: 3.5rem;
- line-height: 1.1;
- letter-spacing: -0.02em;
- color: #111111;
-}
-
-.body-manifesto-text {
- font-size: 1.1rem;
- max-width: 400px;
- line-height: 1.7;
-}
-
-.meta-tag {
- font-size: 0.75rem;
- letter-spacing: 0.2em;
-}
-
-.btn-dark {
- transition: background 0.3s ease;
-}
-
- .btn-dark:hover {
- background: #444;
- }
-
-.artistic-404-container {
- background-color: #ffffff;
- min-height: 70vh;
- display: flex;
- align-items: center;
- padding: 5rem 0;
-}
-
-.artistic-svg-wrapper {
- display: flex;
- justify-content: center;
- align-items: center;
-}
-
-.editorial-headline {
- font-family: 'Playfair Display', serif;
- font-size: 3.5rem;
- line-height: 1.1;
- letter-spacing: -0.02em;
- color: #111111;
-}
-
-.body-manifesto-text {
- font-size: 1.1rem;
- max-width: 400px;
- line-height: 1.7;
-}
-
-.meta-tag {
- font-size: 0.75rem;
- letter-spacing: 0.2em;
-}
\ No newline at end of file
diff --git a/MidrandBookshop/Components/Pages/PaymentFailed.razor b/MidrandBookshop/Components/Pages/PaymentFailed.razor
deleted file mode 100644
index 7f51f1e..0000000
--- a/MidrandBookshop/Components/Pages/PaymentFailed.razor
+++ /dev/null
@@ -1,40 +0,0 @@
-@page "/payment-failed"
-@rendermode InteractiveServer
-@inject NavigationManager Navigation
-@attribute [Authorize]
-
-
-
-
-
-
-
-
-
-
-
-
-
Payment Cancelled
-
We couldn't process your transaction. Don't worry, no money was deducted from your account.
-
-
-
Common Causes
-
The order was cancelled / insufficient funds, incorrect card details, or a temporary bank gateway timeout.
-
-
-
-
-
-
If you noticed a charge or have any order questions, please contact our support desk with your account email shop@litecharms.co.za .
-
-
-
\ No newline at end of file
diff --git a/MidrandBookshop/Components/Pages/PaymentFailed.razor.cs b/MidrandBookshop/Components/Pages/PaymentFailed.razor.cs
deleted file mode 100644
index b6638f1..0000000
--- a/MidrandBookshop/Components/Pages/PaymentFailed.razor.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using LiteCharms.Features;
-using LiteCharms.Features.Hasher;
-using LiteCharms.Features.MidrandBooks.Customers;
-using LiteCharms.Features.MidrandBooks.Orders;
-using LiteCharms.Features.MidrandBooks.Payments;
-using LiteCharms.Features.MidrandBooks.Payments.Models;
-
-namespace MidrandBookshop.Components.Pages;
-
-public partial class PaymentFailed
-{
- [Inject] public CartService CartService { get; set; } = default!;
- [Inject] public OrderService OrderService { get; set; } = default!;
- [Inject] private CustomerService CustomerService { get; set; } = default!;
- [Inject] public PaymentService PaymentService { get; set; } = default!;
- [Inject] public HashService HashService { get; set; } = default!;
- [Inject] private AuthenticationStateProvider AuthStateProvider { get; set; } = default!;
- [Inject] private CancellationToken CancellationToken { get; set; } = default!;
-
- private ClaimsPrincipal? User { get; set; }
-
- [Parameter]
- [SupplyParameterFromQuery(Name = "reference")]
- public string? PaymentReference { get; set; }
-
- protected override async Task OnInitializedAsync()
- {
- var authState = await AuthStateProvider.GetAuthenticationStateAsync();
- User = authState!.User;
-
- if (User?.Identity?.IsAuthenticated == false) Navigation.NavigateTo("/login");
- }
-
- protected override async Task OnAfterRenderAsync(bool firstRender)
- {
- if (!firstRender) return;
-
- long orderId = HashService.DecodeLongIdHash(PaymentReference!).Value;
-
- var customerEmail = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Email)!.Value!;
-
- var customerFetch = await CustomerService.GetCustomerAsync(customerEmail, CancellationToken);
-
- if (customerFetch.IsFailed) return;
-
- long customerId = customerFetch.Value.Id;
-
- var orderUpdateResult = await OrderService.UpdateOrderStatusAsync(orderId, OrderStatus.Cancelled, CancellationToken);
-
- if (orderUpdateResult.IsFailed) return;
-
- var paymentIdFetch = await PaymentService.GetOrderPaymentAsync(orderId, CancellationToken);
-
- if (paymentIdFetch.IsFailed) return;
-
- await PaymentService.WriteLedgerEntryAsync(new CreateLedgerEntry
- {
- CustomerId = customerId,
- OrderId = orderId,
- PaymentGatewayId = 1,
- PaymentGatewayReference = PaymentReference,
- PaymentId = paymentIdFetch.Value.Id,
- Status = LedgerStatuses.Cancelled
-
- }, CancellationToken);
-
- CartService.Clear();
- CartService.ShoppingCart.OrderId = null;
- await CartService.SaveCartToStorageAsync();
- CartService.NotifyStateChanged();
- }
-}
diff --git a/MidrandBookshop/Components/Pages/PaymentSuccess.razor b/MidrandBookshop/Components/Pages/PaymentSuccess.razor
deleted file mode 100644
index bbe340c..0000000
--- a/MidrandBookshop/Components/Pages/PaymentSuccess.razor
+++ /dev/null
@@ -1,39 +0,0 @@
-@page "/payment-success"
-@rendermode InteractiveServer
-@inject NavigationManager Navigation
-@attribute [Authorize]
-
-
-
-
-
-
-
Order Confirmed
-
Thank you for shopping with Midrand Books. Your order has been received and is being processed.
-
-
Order Number
-
@PaymentReference
-
-
-
-
-
-
You will receive a confirmation email shortly at @CustomerEmail .
-
-
-
\ No newline at end of file
diff --git a/MidrandBookshop/Components/Pages/PaymentSuccess.razor.cs b/MidrandBookshop/Components/Pages/PaymentSuccess.razor.cs
deleted file mode 100644
index 7f37c53..0000000
--- a/MidrandBookshop/Components/Pages/PaymentSuccess.razor.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using LiteCharms.Features;
-using LiteCharms.Features.Hasher;
-using LiteCharms.Features.MidrandBooks.Customers;
-using LiteCharms.Features.MidrandBooks.Payments;
-using LiteCharms.Features.MidrandBooks.Payments.Models;
-
-namespace MidrandBookshop.Components.Pages;
-
-public partial class PaymentSuccess
-{
- [Inject] private CartService CartService { get; set; } = default!;
- [Inject] private CustomerService CustomerService { get; set; } = default!;
- [Inject] private PaymentService PaymentService { get; set; } = default!;
- [Inject] private HashService HashService { get; set; } = default!;
- [Inject] private AuthenticationStateProvider AuthStateProvider { get; set; } = default!;
- [Inject] private CancellationToken CancellationToken { get; set; } = default!;
- [Inject] public IToastService ToastService { get; set; } = default!;
-
- [Parameter]
- [SupplyParameterFromQuery(Name = "reference")]
- public string? PaymentReference { get; set; }
-
- private ClaimsPrincipal? User { get; set; }
-
- private string? CustomerEmail { get; set; }
-
- protected override async Task OnInitializedAsync()
- {
- var authState = await AuthStateProvider.GetAuthenticationStateAsync();
- User = authState!.User;
-
- if (User?.Identity?.IsAuthenticated == false) Navigation.NavigateTo("/login");
- }
-
- protected override async Task OnAfterRenderAsync(bool firstRender)
- {
- if (!firstRender) return;
-
- long orderId = HashService.DecodeLongIdHash(PaymentReference!).Value;
- string orderHash = HashService.HashEncodeLongId(orderId).Value;
-
- CustomerEmail = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Email)!.Value!;
-
- var customerFetch = await CustomerService.GetCustomerAsync(CustomerEmail, CancellationToken);
-
- if (customerFetch.IsFailed) return;
-
- long customerId = customerFetch.Value.Id;
-
- var paymentIdFetch = await PaymentService.GetOrderPaymentAsync(orderId, CancellationToken);
-
- if (paymentIdFetch.IsFailed) return;
-
- await PaymentService.WriteLedgerEntryAsync(new CreateLedgerEntry
- {
- CustomerId = customerId,
- OrderId = orderId,
- PaymentGatewayId = 1,
- PaymentGatewayReference = orderHash,
- PaymentId = paymentIdFetch.Value.Id,
- Status = LedgerStatuses.Changed
-
- }, CancellationToken);
-
- CartService.Clear();
- CartService.ShoppingCart.OrderId = null;
- await CartService.SaveCartToStorageAsync();
- CartService.NotifyStateChanged();
- }
-}
diff --git a/MidrandBookshop/Components/Pages/Privacy.razor b/MidrandBookshop/Components/Pages/Privacy.razor
index bae903c..c11affd 100644
--- a/MidrandBookshop/Components/Pages/Privacy.razor
+++ b/MidrandBookshop/Components/Pages/Privacy.razor
@@ -1,73 +1,118 @@
-@page "/privacy"
-@rendermode InteractiveServer
+@page "/privacy"
+@namespace MidrandBooks.Components.Pages
+@using Microsoft.AspNetCore.Components
@inject IJSRuntime JSRuntime
-
-