8 Commits

Author SHA1 Message Date
khwezi 66081eead5 Merge pull request 'Added image deletion functionality to product creation' (#20) from products into master
Reviewed-on: #20
2026-05-20 16:12:55 +02:00
Khwezi Mngoma 530b8ffea2 Added image deletion functionality to product creation
continuous-integration/drone/pr Build is passing
2026-05-20 16:12:10 +02:00
khwezi b8a5d81856 Merge pull request 'Fixed manifest ev variable reference syntax' (#19) from products into master
Reviewed-on: #19
2026-05-20 13:42:27 +02:00
Khwezi Mngoma 5c34663617 Fixed manifest ev variable reference syntax
continuous-integration/drone/pr Build is passing
2026-05-20 13:41:31 +02:00
khwezi 184ce1854e Merge pull request 'Completed create product component' (#18) from products into master
Reviewed-on: #18
2026-05-20 12:02:14 +02:00
Khwezi Mngoma 8f26d5fbfa Completed create product component
continuous-integration/drone/pr Build is failing
2026-05-20 11:59:58 +02:00
khwezi d8964da36f Merge pull request 'Started producer design' (#17) from products into master
Reviewed-on: #17
2026-05-18 19:20:08 +02:00
Khwezi Mngoma 51946a1388 Started producer design
continuous-integration/drone/pr Build is passing
2026-05-18 19:19:26 +02:00
12 changed files with 1070 additions and 4 deletions
+147
View File
@@ -0,0 +1,147 @@
@using Microsoft.AspNetCore.Components.Forms
<div class="create-product-shell">
<div class="book-preview-drawer @(string.IsNullOrEmpty(ActivePreviewUrl) ? "" : "is-open")">
@if (!string.IsNullOrEmpty(ActivePreviewUrl))
{
<button type="button" class="btn-close-preview-floating" title="Collapse Frame" @onclick="ClosePreviewDrawer">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
<div class="drawer-portrait-frame">
<img src="@ActivePreviewUrl" alt="Active Book Design Preview" />
</div>
}
</div>
<div class="create-product-container">
<EditForm Model="@ProductModel" OnValidSubmit="HandleValidSubmit" class="form-entry-canvas">
<DataAnnotationsValidator />
<div class="form-scroll-viewport">
<div class="form-section-header">
<span class="field-accent-tag">PRODUCT MASTER LEDGER</span>
<p>Provision catalog items metadata, book cover assets, and supplementary chapter telemetry designs.</p>
</div>
<div class="form-text-inputs-section">
<div class="console-field-group">
<label class="console-field-label">Book Title</label>
<InputText @bind-Value="ProductModel.Name" class="console-input" placeholder="e.g., Neuromancer" />
<ValidationMessage For="@(() => ProductModel.Name)" style="color: #ff5722; font-size: 0.75rem;" />
</div>
<div class="console-field-group">
<label class="console-field-label">Short Summary</label>
<InputText @bind-Value="ProductModel.Summary" class="console-input" placeholder="Brief catchphrase description metadata line..." />
<ValidationMessage For="@(() => ProductModel.Summary)" style="color: #ff5722; font-size: 0.75rem;" />
</div>
<div class="console-field-group">
<label class="console-field-label">Base Ledger Price (ZAR)</label>
<InputNumber @bind-Value="ProductModel.Price" class="console-input" placeholder="0.00" />
<ValidationMessage For="@(() => ProductModel.Price)" style="color: #ff5722; font-size: 0.75rem;" />
</div>
<div class="console-field-group">
<label class="console-field-label">Full Catalog Description</label>
<InputTextArea @bind-Value="ProductModel.Description" class="console-textarea" rows="4" placeholder="Enter extended markdown contents..." />
<ValidationMessage For="@(() => ProductModel.Description)" style="color: #ff5722; font-size: 0.75rem;" />
</div>
</div>
<div class="form-media-deck-section">
<div class="form-section-header" style="margin-bottom: 1rem; padding-bottom: 0.5rem;">
<p style="text-transform: uppercase; font-weight: 600; color: #cbd5e1; font-size: 0.8rem; letter-spacing: 0.05em;">Media Assets Node Array</p>
</div>
<div class="media-deck-row">
<div class="console-field-group">
<label class="console-field-label">Primary Cover</label>
<div class="book-cover-dropzone">
<InputFile OnChange="HandleMainImageUpload" accept=".png,.jpg,.jpeg,.webp" class="hidden-file-input" id="main-image-file" />
@if (string.IsNullOrEmpty(ProductModel.ImageUrl))
{
/* Clicking anywhere inside this label launches the file system picker */
<label for="main-image-file" class="dropzone-interactive-layer">
<div class="empty-slot-blueprint">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
<span style="font-size: 0.7rem; font-family: monospace; color: #475569; margin-top: 0.5rem;">UPLOAD COVER</span>
</div>
</label>
}
else
{
<div class="dropzone-active-preview">
<img src="@ProductModel.ImageUrl" alt="Main Book Cover" />
<div class="image-actions-overlay">
<button type="button" class="btn-micro-action" title="Preview Image" @onclick="() => SetPreviewActive(ProductModel.ImageUrl)">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>
</button>
<button type="button" class="btn-micro-action danger" title="Remove Asset" @onclick="ClearMainImage">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
</button>
</div>
</div>
}
</div>
</div>
<div class="console-field-group">
<label class="console-field-label">Additional Media Slots</label>
<div class="thumbnail-deck-grid">
@for (int i = 0; i < 5; i++)
{
var index = i;
<div class="thumbnail-slot-node @(HasAssetAt(index) ? "populated" : "empty")">
@if (HasAssetAt(index))
{
<img src="@ProductModel.Thumbnails[index]" alt="Slot @(index + 1)" />
<div class="image-actions-overlay">
<button type="button" class="btn-micro-action" title="Preview Image" @onclick="() => SetPreviewActive(ProductModel.Thumbnails[index])">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>
</button>
<button type="button" class="btn-micro-action danger" title="Remove Asset" @onclick="() => RemoveThumbnailAt(index)">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
</button>
</div>
}
else
{
/* Clean hidden execution context matched back to label action surfaces */
<InputFile OnChange="@(e => HandleThumbnailUpload(e, index))" accept=".png,.jpg,.jpeg,.webp" class="hidden-file-input" id="@($"thumb-file-{index}")" />
<label for="@($"thumb-file-{index}")" class="empty-slot-blueprint">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
<span style="font-size: 0.65rem; font-family: monospace; margin-top: 0.25rem;">0@(index + 1)</span>
</label>
}
</div>
}
</div>
</div>
</div>
</div>
</div>
<div class="form-action-footer">
<button type="submit" class="btn-apply-filters">Commit Record Ledger</button>
</div>
</EditForm>
</div>
</div>
+167
View File
@@ -0,0 +1,167 @@
using LiteCharms.Features.S3.Abstractions;
using static LiteCharms.Features.S3.Constants;
namespace ShopAdmin.Components;
public partial class CreateProduct([FromKeyedServices(BookshopBucketName)] IS3Service s3Service)
{
private readonly CancellationTokenSource cancellationTokenSource = new();
private CancellationToken cancellationToken;
protected string? ActivePreviewUrl { get; set; }
protected CreateProductModel ProductModel { get; set; } = new();
private const long MaxAllowedFileSize = 1024 * 1024 * 5;
private readonly Func<string, string> GetFileKeyFromUrl = url => url.Split('/').Last();
protected override void OnInitialized()
{
base.OnInitialized();
cancellationToken = cancellationTokenSource.Token;
if (ProductModel.Thumbnails.Count == 0)
ProductModel.Thumbnails = [.. Enumerable.Repeat(string.Empty, 5)];
}
public Task HandleValidSubmit() => Task.CompletedTask;
public bool HasAssetAt(int index) => (ProductModel?.Thumbnails) != null && index < ProductModel.Thumbnails.Count &&
!string.IsNullOrWhiteSpace(ProductModel.Thumbnails[index]);
private async Task HandleMainImageUpload(InputFileChangeEventArgs e)
{
try
{
var file = e.File;
if (file == null) return;
using var stream = new MemoryStream();
await file.OpenReadStream(MaxAllowedFileSize).CopyToAsync(stream, cancellationToken);
stream.Seek(0, SeekOrigin.Begin);
var result = await s3Service.UploadFileAsync(file.Name, stream,
MimeTypes.GetMimeType(file.Name), cancellationToken);
if (result.IsSuccess)
{
ProductModel.ImageUrl = result.Value;
StateHasChanged();
}
}
catch (Exception ex)
{
Console.WriteLine($"Main Image Upload Exception: {ex.Message}");
}
}
public void SetPreviewActive(string? url)
{
if (string.IsNullOrWhiteSpace(url)) return;
ActivePreviewUrl = url;
StateHasChanged();
}
public void ClosePreviewDrawer()
{
ActivePreviewUrl = null;
StateHasChanged();
}
private async Task HandleThumbnailUpload(InputFileChangeEventArgs e, int index)
{
try
{
var file = e.File;
if (file == null) return;
using var stream = new MemoryStream();
await file.OpenReadStream(MaxAllowedFileSize, cancellationToken).CopyToAsync(stream, cancellationToken);
stream.Seek(0, SeekOrigin.Begin);
var result = await s3Service.UploadFileAsync(file.Name, stream,
MimeTypes.GetMimeType(file.Name), cancellationToken);
if (result.IsSuccess && index < ProductModel.Thumbnails.Count)
{
ProductModel.Thumbnails[index] = result.Value;
StateHasChanged();
}
}
catch (Exception ex)
{
Console.WriteLine($"Thumbnail Slot {index} Upload Exception: {ex.Message}");
}
}
public async Task ClearMainImage()
{
if (string.IsNullOrEmpty(ProductModel.ImageUrl)) return;
var targetUrl = ProductModel.ImageUrl;
if (ActivePreviewUrl == targetUrl) ActivePreviewUrl = null;
ProductModel.ImageUrl = null;
StateHasChanged();
var result = await s3Service.DeleteFileAsync(GetFileKeyFromUrl(targetUrl));
if (!result.IsSuccess)
Console.WriteLine($"[S3 Orphan Cleanup Failure]: {result.Errors[0].Message}");
}
public async Task RemoveThumbnailAt(int index)
{
if (index < 0 || index >= ProductModel.Thumbnails.Count) return;
var targetUrl = ProductModel.Thumbnails[index];
if (string.IsNullOrEmpty(targetUrl)) return;
if (ActivePreviewUrl == targetUrl) ActivePreviewUrl = null;
ProductModel.Thumbnails[index] = string.Empty;
StateHasChanged();
var result = await s3Service.DeleteFileAsync(GetFileKeyFromUrl(targetUrl));
if (result.IsFailed)
Console.WriteLine($"[S3 Thumbnail Cleanup Failure]: {result.Errors[0].Message}");
}
}
public class CreateProductModel
{
[Required(ErrorMessage = "Product name is required.")]
public string? Name { get; set; }
[Required(ErrorMessage = "Summary is required.")]
public string? Summary { get; set; }
[Required(ErrorMessage = "Description is required.")]
public string? Description { get; set; }
[Range(0.01, double.MaxValue, ErrorMessage = "Price must be greater than zero.")]
public decimal Price { get; set; }
[Required(ErrorMessage = "Primary image is required.")]
public string? ImageUrl { get; set; }
public List<string> Thumbnails { get; set; } = [];
}
@@ -0,0 +1,364 @@
/* ==========================================================================
Shell & Outer Layout Container
========================================================================== */
.create-product-shell {
display: flex;
width: 100%;
height: 100%;
overflow: hidden;
position: relative;
background: #02060d;
}
.create-product-container {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
box-sizing: border-box;
}
.form-entry-canvas {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
}
.form-scroll-viewport {
padding: 2.5rem;
flex: 1 1 auto;
overflow-y: auto;
}
.form-section-header {
margin-bottom: 2rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
padding-bottom: 1.25rem;
}
.field-accent-tag {
font-size: 1.2rem;
letter-spacing: 0.02em;
color: #ffffff;
font-weight: 600;
display: block;
}
.form-section-header p {
margin-top: 0.5rem;
font-size: 0.88rem;
color: #64748b;
}
/* ==========================================================================
Stacked Sub-Section Layout Blocks
========================================================================== */
.form-text-inputs-section {
display: flex;
flex-direction: column;
gap: 1.5rem;
width: 100%;
margin-bottom: 3rem; /* Generates clear space before the media controls block */
}
.form-media-deck-section {
display: flex;
flex-direction: column;
gap: 1.5rem;
width: 100%;
}
/* Horizontal alignment grid for cover upload & thumbnail array side-by-side */
.media-deck-row {
display: grid;
grid-template-columns: 240px 1fr;
gap: 2.5rem;
align-items: start;
width: 100%;
}
.console-field-group {
display: flex;
flex-direction: column;
gap: 0.6rem;
width: 100%;
}
.console-field-label {
font-size: 0.85rem;
font-weight: 500;
color: #cbd5e1;
letter-spacing: 0.03em;
text-transform: uppercase;
}
/* ==========================================================================
Input Form Elements
========================================================================== */
::deep .console-input,
::deep .console-textarea {
width: 100%;
box-sizing: border-box;
background: #060b13 !important;
border: 1px solid #1e293b !important;
border-radius: 4px;
padding: 0.85rem 1rem;
color: #f8fafc !important;
font-size: 0.9rem;
outline: none;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
::deep .console-input:focus,
::deep .console-textarea:focus {
border-color: #00f2fe !important;
box-shadow: 0 0 0 1px rgba(0, 242, 254, 0.2), 0 0 12px rgba(0, 242, 254, 0.1) !important;
background: #02060d !important;
}
::deep .console-textarea {
resize: none;
line-height: 1.5;
}
/* ==========================================================================
Image Slots & Cloud Upload Dropzones
========================================================================== */
::deep .hidden-file-input,
.hidden-file-input {
position: absolute !important;
top: 0 !important;
left: 0 !important;
width: 0 !important;
height: 0 !important;
opacity: 0 !important;
overflow: hidden !important;
pointer-events: none !important;
display: none !important; /* Forces layout removal */
}
/* Book Cover - Enforced Portrait Display Frame Aspect Ratio */
.book-cover-dropzone {
width: 240px;
aspect-ratio: 2 / 3;
background: #060b13;
border: 1px dashed #1e293b;
border-radius: 4px;
position: relative;
overflow: hidden;
transition: all 0.25s ease;
}
.book-cover-dropzone:hover {
border-color: #00f2fe;
}
.dropzone-interactive-layer,
.thumbnail-slot-node.empty label {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
cursor: pointer;
margin: 0;
padding: 1rem;
box-sizing: border-box;
user-select: none;
}
/* Thumbnails Grid */
.thumbnail-deck-grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 1rem;
width: 100%;
}
.thumbnail-slot-node {
aspect-ratio: 2 / 3; /* Matches portrait layout format smoothly */
background: #060b13;
border: 1px solid #1e293b;
border-radius: 4px;
position: relative;
overflow: hidden;
}
.thumbnail-slot-node.empty {
border: 1px dashed #1e293b;
background: #060b13;
transition: all 0.2s ease;
}
.thumbnail-slot-node.empty:hover {
border-color: #00f2fe;
background: rgba(0, 242, 254, 0.02);
}
.thumbnail-slot-node img,
.dropzone-active-preview img {
width: 100%;
height: 100%;
object-fit: cover;
}
.empty-slot-blueprint {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
color: #334155;
gap: 0.5rem;
cursor: pointer;
}
/* ==========================================================================
Minimalist Floating Action Micro-Icons
========================================================================== */
.image-actions-overlay {
position: absolute;
inset: 0;
background: rgba(4, 8, 15, 0.4);
backdrop-filter: blur(1px);
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
opacity: 0;
transition: opacity 0.2s ease;
}
/* Show floating control node buttons cleanly on hover state */
.book-cover-dropzone:hover .image-actions-overlay,
.thumbnail-slot-node:hover .image-actions-overlay {
opacity: 1;
}
.btn-micro-action {
background: #060b13;
border: 1px solid #1e293b;
color: #cbd5e1;
width: 32px;
height: 32px;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
padding: 0;
}
.btn-micro-action:hover {
border-color: #00f2fe;
color: #00f2fe;
box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}
.btn-micro-action.danger:hover {
border-color: #ff5722;
color: #ff5722;
box-shadow: 0 0 8px rgba(255, 87, 34, 0.3);
}
/* ==========================================================================
Sliding Preview System (Left Panel Drawer)
========================================================================== */
.book-preview-drawer {
width: 0px;
height: 100%;
background: #04080f;
border-right: 0 solid #1e293b;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 0;
transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
flex-shrink: 0;
position: relative;
}
.book-preview-drawer.is-open {
width: 340px;
padding: 2rem;
border-right: 1px solid #1e293b;
}
.drawer-portrait-frame {
width: 100%;
aspect-ratio: 2 / 3;
background: #060b13;
border: 1px solid #1e293b;
border-radius: 4px;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
overflow: hidden;
position: relative;
}
.drawer-portrait-frame img {
width: 100%;
height: 100%;
object-fit: cover;
}
/* Floating Close Action Icon sitting directly on top inside the drawer viewport frame */
.btn-close-preview-floating {
position: absolute;
top: 12px;
right: 12px;
background: rgba(6, 11, 19, 0.85);
border: 1px solid #1e293b;
color: #64748b;
width: 28px;
height: 28px;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
z-index: 10;
}
.btn-close-preview-floating:hover {
border-color: #ff5722;
color: #ff5722;
}
/* ==========================================================================
Footer Action Dashboard Bar
========================================================================= */
.form-action-footer {
padding: 0.85rem 2.5rem;
background: #04080f;
border-top: 1px solid #1e293b;
display: flex;
justify-content: flex-end;
gap: 1.25rem;
align-items: center;
}
.btn-apply-filters {
background: rgba(0, 242, 254, 0.05);
border: 1px solid #00f2fe;
color: #00f2fe;
font-family: 'JetBrains Mono', monospace;
font-weight: 600;
font-size: 0.85rem;
padding: 0.55rem 1.5rem;
border-radius: 4px;
cursor: pointer;
letter-spacing: 0.02em;
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-apply-filters:hover {
background: #00f2fe;
color: #060b13;
box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}
@@ -5,6 +5,8 @@
<PageTitle>Notifications | Shop Console</PageTitle> <PageTitle>Notifications | Shop Console</PageTitle>
<div class="workspace-ambient-backdrop"></div>
@if (NotificationQueryable == null && IsLoading) @if (NotificationQueryable == null && IsLoading)
{ {
<div class="initial-page-fullscreen-loader"> <div class="initial-page-fullscreen-loader">
@@ -90,7 +92,7 @@
<div class="filter-grid-form"> <div class="filter-grid-form">
<div class="input-wrapper full-width"> <div class="input-wrapper full-width">
<label>Search Text</label> <label>Search Text</label>
<input type="text" placeholder="Search subject, sender or recipient..." @bind="SearchFilter" @bind:event="oninput" /> <input type="text" placeholder="Search subject, sender or recipient..." @bind-value="SearchFilter" @bind-value:event="oninput" />
</div> </div>
<div class="input-wrapper"> <div class="input-wrapper">
@@ -1,4 +1,5 @@
/* ==========================================================================
/* ==========================================================================
1. WORKSPACE LAYOUT & LAYOUT ENGINE BOUNDS 1. WORKSPACE LAYOUT & LAYOUT ENGINE BOUNDS
========================================================================== */ ========================================================================== */
@@ -686,3 +687,40 @@
opacity: 1; opacity: 1;
} }
} }
/* ==========================================================================
X. BROAD VIEWPORT TELEMETRY CANVASES (Circuit Matrix Backdrop)
========================================================================== */
.workspace-ambient-backdrop {
position: fixed; /* Securely locks backdrop layer behind all scroll surfaces */
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 0;
pointer-events: none;
user-select: none;
/* PERCENT-ENCODED INLINE SVG CIRCUIT GRID ENGINE:
- Uses a highly diluted telemetry orange mix matching your #ff6b35 accent tags.
- Built out of interlocking data nodes, traces, and measurement crosshairs.
*/
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='rgba(255, 107, 53, 0.11)' stroke-width='1.2'%3E%3C!-- Core Element 1: Center Tech Microprocessor Node --%3E%3Crect x='70' y='70' width='40' height='40' rx='3' stroke-width='1.5'/%3E%3Ccircle cx='90' cy='90' r='10' stroke-dasharray='2 2'/%3E%3Ccircle cx='90' cy='90' r='3' fill='rgba(255, 107, 53, 0.05)'/%3E%3C!-- Core Element 2: Radiating Bus Traces %26 Corner Trunks --%3E%3Cpath d='M 90,70 L 90,40 L 70,40 M 90,110 L 90,140 L 110,140 M 70,90 L 40,90 L 40,110 M 110,90 L 140,90 L 140,70'/%3E%3Ccircle cx='70' cy='40' r='2.5' fill='rgba(255, 107, 53, 0.15)'/%3E%3Ccircle cx='110' cy='140' r='2.5' fill='rgba(255, 107, 53, 0.15)'/%3E%3Ccircle cx='40' cy='110' r='2.5' fill='rgba(255, 107, 53, 0.15)'/%3E%3Ccircle cx='140' cy='70' r='2.5' fill='rgba(255, 107, 53, 0.15)'/%3E%3C!-- Core Element 3: Peripheral Data Junctions (Interlocking Corners) --%3E%3Ccircle cx='0' cy='0' r='35' stroke-width='0.8'/%3E%3Ccircle cx='0' cy='0' r='20' stroke-dasharray='4 3'/%3E%3Ccircle cx='180' cy='0' r='35' stroke-width='0.8'/%3E%3Ccircle cx='180' cy='0' r='20' stroke-dasharray='4 3'/%3E%3Ccircle cx='0' cy='180' r='35' stroke-width='0.8'/%3E%3Ccircle cx='0' cy='180' r='20' stroke-dasharray='4 3'/%3E%3Ccircle cx='180' cy='180' r='35' stroke-width='0.8'/%3E%3Ccircle cx='180' cy='180' r='20' stroke-dasharray='4 3'/%3E%3C!-- Target Scope Crosshairs --%3E%3Cpath d='M 0,90 L 15,90 M 180,90 L 165,90 M 90,0 L 90,15 M 90,180 L 90,165' stroke-width='0.8' opacity='0.7'/%3E%3Cpath d='M 25,25 L 35,25 M 25,25 L 25,35 M 155,25 L 145,25 M 155,25 L 155,35 M 25,155 L 35,155 M 25,155 L 25,145 M 155,155 L 145,155 M 155,155 L 155,145' stroke-width='0.9' opacity='0.5'/%3E%3C/g%3E%3C/svg%3E");
background-repeat: repeat;
background-size: 180px 180px;
/* Radial Mask: Blends perfectly out into your dark layout edges while
keeping text components crisp and legible in the foreground */
mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.12) 15%, black 80%);
-webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.12) 15%, black 80%);
}
/* Deep contextual underglow to give your glassmorphism cards an illuminated orange edge */
.workspace-ambient-backdrop::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient( circle at 50% 45%, rgba(255, 107, 53, 0.04) 0%, rgba(0, 0, 0, 0) 75% );
}
+114
View File
@@ -0,0 +1,114 @@
@page "/products"
@rendermode RenderMode.InteractiveServer
<PageTitle>Products & Pricing | Shop Console</PageTitle>
<div class="workspace-ambient-backdrop"></div>
<div class="console-workspace">
<div class="page-header">
<div>
<h2>Product Master Ledger</h2>
<p class="text-muted">Manage catalog inventory item nodes, price matrixing, and currency variations.</p>
</div>
</div>
<div class="split-workspace-deck shadow-card">
<nav class="workspace-wing left-wing domain-nav">
<span class="panel-title-lbl">Product Domain</span>
<div class="domain-menu-list">
<div class="domain-nav-item @(ActiveView == ProductView.Create ? "active" : "")"
@onclick="() => SwitchView(ProductView.Create)">
<div class="nav-status-node"></div>
<div class="domain-details">
<span class="domain-name">Create Product</span>
<span class="domain-desc">Provision new inventory nodes</span>
</div>
</div>
<div class="domain-nav-item @(ActiveView == ProductView.ViewAll ? "active" : "")"
@onclick="() => SwitchView(ProductView.ViewAll)">
<div class="nav-status-node"></div>
<div class="domain-details">
<span class="domain-name">View Products</span>
<span class="domain-desc">Browse & modify active catalog</span>
</div>
</div>
<div class="domain-nav-item @(ActiveView == ProductView.Prices ? "active" : "")"
@onclick="() => SwitchView(ProductView.Prices)">
<div class="nav-status-node"></div>
<div class="domain-details">
<span class="domain-name">Product Prices</span>
<span class="domain-desc">Matrix values & currency rates</span>
</div>
</div>
<div class="domain-nav-item @(ActiveView == ProductView.Packages ? "active" : "")"
@onclick="() => SwitchView(ProductView.Packages)">
<div class="nav-status-node"></div>
<div class="domain-details">
<span class="domain-name">Product Packages</span>
<span class="domain-desc">Bundles, kits, and group logic</span>
</div>
</div>
</div>
</nav>
<div class="central-divider-axis">
<div class="camel-glow-left"></div>
<div class="divider-core-line"></div>
<div class="camel-glow-right"></div>
</div>
<div class="workspace-wing right-wing content-canvas">
@switch (ActiveView)
{
case ProductView.Create:
<CreateProduct />
break;
case ProductView.ViewAll:
<div class="workspace-placeholder-state" style="padding: 2rem;">
<span class="panel-title-lbl">Active Item Ledger</span>
<p class="text-muted">Awaiting product lookup parameters...</p>
</div>
break;
case ProductView.Prices:
<div class="workspace-placeholder-state" style="padding: 2rem;">
<span class="panel-title-lbl">Pricing Matrices</span>
<p class="text-muted">Awaiting exchange rates configuration profiles...</p>
</div>
break;
case ProductView.Packages:
<div class="workspace-placeholder-state" style="padding: 2rem;">
<span class="panel-title-lbl">Kit & Bundle Registers</span>
<p class="text-muted">Awaiting relational node definitions...</p>
</div>
break;
}
</div>
</div>
</div>
@code {
// Enum declaration to rigidly manage split view panel state mapping safely
private enum ProductView
{
Create,
ViewAll,
Prices,
Packages
}
// Default runtime tracking state variables
private ProductView ActiveView { get; set; } = ProductView.Create;
private void SwitchView(ProductView targetView)
{
ActiveView = targetView;
}
}
@@ -0,0 +1,5 @@
namespace ShopAdmin.Components.Pages;
public partial class Products
{
}
@@ -0,0 +1,205 @@
/* ==========================================================================
1. BROAD VIEWPORT KALEIDOSCOPE BACKDROP (The Arrow Targets)
========================================================================= */
.workspace-ambient-backdrop {
position: fixed; /* Securely locks backdrop layer behind all scroll surfaces */
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 0;
pointer-events: none;
user-select: none;
/* ENHANCED INLINE SVG EXOTIC FRUIT KALEIDOSCOPE
- Increased stroke values from 0.035 up to 0.14 for striking visibility.
- Clean, un-broken cross-browser safe rendering framework.
*/
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='rgba(0, 163, 224, 0.14)' stroke-width='1.2'%3E%3Ccircle cx='80' cy='80' r='75'/%3E%3Ccircle cx='80' cy='80' r='50'/%3E%3Ccircle cx='80' cy='80' r='25'/%3E%3Cpath d='M80,0 L80,160 M0,80 L160,80 M23.43,23.43 L136.57,136.57 M23.43,136.57 L136.57,23.43' stroke-dasharray='3 3' opacity='0.6'/%3E%3Cpolygon points='80,15 95,65 145,80 95,95 80,145 65,95 15,80 65,65' stroke-width='0.8'/%3E%3Ccircle cx='0' cy='0' r='20'/%3E%3Ccircle cx='160' cy='0' r='20'/%3E%3Ccircle cx='0' cy='160' r='20'/%3E%3Ccircle cx='160' cy='160' r='20'/%3E%3C/g%3E%3C/svg%3E");
background-repeat: repeat;
background-size: 160px 160px;
/* RADIAL VIGNETTE MASK OPTIMIZATION:
Allows the shapes to render significantly sharper as they approach
the outer screen margins.
*/
mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.15) 20%, black 80%);
-webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.15) 20%, black 80%);
}
/* Vivid ambient brand cyan underglow backing layout layers */
.workspace-ambient-backdrop::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient( circle at 50% 45%, rgba(0, 163, 224, 0.05) 0%, rgba(0, 0, 0, 0) 80% );
}
/* ==========================================================================
2. MAIN INTERFACE WORKSPACE (The Master Deck Card Block)
========================================================================== */
.console-workspace {
position: relative;
z-index: 1; /* Keeps user actions and console content layers strictly on top */
max-width: 1340px;
width: 100%;
margin: 0 auto;
padding: 2rem 1.5rem;
box-sizing: border-box;
}
.split-workspace-deck {
display: grid;
grid-template-columns: 280px auto 1fr;
min-height: 620px;
width: 100%;
position: relative;
}
/* Translucent Obsidian Glassmorphism panel block */
.shadow-card {
background: rgba(10, 14, 20, 0.75);
border: 1px solid rgba(255, 255, 255, 0.03);
box-shadow: 0 24px 60px 0 rgba(0, 0, 0, 0.85);
/* Fully separates workspace views from the outer geometric cyan fruit array */
backdrop-filter: blur(20px);
border-radius: 12px;
}
/* ==========================================================================
3. DOMAIN SUB-NAVIGATION CONTROL
========================================================================== */
.domain-menu-list {
display: flex;
flex-direction: column;
gap: 1.75rem;
margin-top: 2rem;
}
.domain-nav-item {
display: flex;
align-items: flex-start;
gap: 1rem;
cursor: pointer;
transition: all 0.22s ease-in-out;
opacity: 0.45;
user-select: none;
position: relative;
}
.domain-nav-item:hover {
opacity: 0.85;
transform: translateX(4px);
}
.domain-nav-item.active {
opacity: 1;
}
.domain-nav-item .nav-status-node {
width: 6px;
height: 6px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.15);
margin-top: 0.45rem;
flex-shrink: 0;
transition: all 0.25s ease-in-out;
}
.domain-nav-item.active .nav-status-node {
background: #ff6b35; /* Crisp orange interaction state highlight */
box-shadow: 0 0 8px 2px rgba(255, 107, 53, 0.4);
}
.domain-details {
display: flex;
flex-direction: column;
gap: 0.15rem;
}
.domain-name {
font-size: 0.95rem;
font-weight: 500;
color: #ffffff;
letter-spacing: -0.1px;
}
.domain-desc {
font-size: 0.76rem;
color: rgba(255, 255, 255, 0.38);
line-height: 1.2;
}
/* ==========================================================================
4. CENTRAL SHIELD ARCHITECTURAL DIVIDER AXIS
========================================================================== */
.workspace-wing {
padding: 2.5rem 2rem;
display: flex;
flex-direction: column;
}
.left-wing.domain-nav {
padding-right: 0.5rem;
}
.central-divider-axis {
position: relative;
width: 60px;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.divider-core-line {
width: 1px;
height: 100%;
background: linear-gradient( to bottom, rgba(255, 107, 53, 0) 0%, rgba(255, 107, 53, 0.12) 20%, rgba(255, 107, 53, 0.8) 50%, rgba(255, 107, 53, 0.12) 80%, rgba(255, 107, 53, 0) 100% );
}
.camel-glow-left {
position: absolute;
right: 50%;
top: 50%;
transform: translateY(-50%);
width: 45px;
height: 280px;
border-radius: 50% 0 0 50%;
background: radial-gradient( ellipse at right, rgba(255, 107, 53, 0.07) 0%, rgba(255, 107, 53, 0.02) 55%, rgba(0, 0, 0, 0) 85% );
filter: blur(6px);
pointer-events: none;
}
.camel-glow-right {
position: absolute;
left: 50%;
top: 50%;
transform: translateY(-50%);
width: 45px;
height: 280px;
border-radius: 0 50% 50% 0;
background: radial-gradient( ellipse at left, rgba(255, 107, 53, 0.07) 0%, rgba(255, 107, 53, 0.02) 55%, rgba(0, 0, 0, 0) 85% );
filter: blur(6px);
pointer-events: none;
}
.page-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
}
.panel-title-lbl {
font-size: 0.72rem;
color: #ff6b35;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1.5px;
}
+1
View File
@@ -17,6 +17,7 @@ builder.Services.AddBlazoredToast();
builder.Services.AddEndpointsApiExplorer(); builder.Services.AddEndpointsApiExplorer();
builder.Services.AddMediator(); builder.Services.AddMediator();
builder.Services.AddGarageS3(builder.Configuration);
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(TelemetryPipelineBehavior<,>)); builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(TelemetryPipelineBehavior<,>));
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingPipelineBehavior<,>)); builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingPipelineBehavior<,>));
+4 -1
View File
@@ -16,7 +16,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="LiteCharms.Features" Version="1.34.0" /> <PackageReference Include="LiteCharms.Features" Version="1.40.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid" Version="10.0.8" /> <PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid" Version="10.0.8" />
<PackageReference Include="Polly" Version="8.6.6" /> <PackageReference Include="Polly" Version="8.6.6" />
</ItemGroup> </ItemGroup>
@@ -58,6 +58,9 @@
<!-- Shared Global Usings --> <!-- Shared Global Usings -->
<ItemGroup> <ItemGroup>
<Using Include="MimeKit" />
<Using Include="System.ComponentModel.DataAnnotations" />
<Using Include="Microsoft.AspNetCore.Components.Forms" />
<Using Include="Microsoft.AspNetCore.Components.QuickGrid" /> <Using Include="Microsoft.AspNetCore.Components.QuickGrid" />
<Using Include="Microsoft.AspNetCore.HttpOverrides" /> <Using Include="Microsoft.AspNetCore.HttpOverrides" />
<Using Include="Microsoft.AspNetCore.Authentication" /> <Using Include="Microsoft.AspNetCore.Authentication" />
+6
View File
@@ -1,4 +1,10 @@
{ {
"BookshopS3Settings": {
"ServiceUrl": "http://192.168.1.177:30900",
"Region": "garage",
"BucketName": "bookshop",
"CdnBaseUrl": "https://bookshop.cdn.khongisa.co.za"
},
"IdKongisa": { "IdKongisa": {
"Authority": "https://id.khongisa.co.za/application/o/litecharms-shopadmin" "Authority": "https://id.khongisa.co.za/application/o/litecharms-shopadmin"
}, },
+14
View File
@@ -15,6 +15,8 @@ data:
Monitoring__Address: "http://aspire-dashboard-service.aspire.svc.cluster.local:18889" Monitoring__Address: "http://aspire-dashboard-service.aspire.svc.cluster.local:18889"
Monitoring__ServiceName: "LiteCharms.ShopAdmin.Uat" Monitoring__ServiceName: "LiteCharms.ShopAdmin.Uat"
IdKongisa__Authority: "https://id.khongisa.co.za/application/o/litecharms-shopadmin" IdKongisa__Authority: "https://id.khongisa.co.za/application/o/litecharms-shopadmin"
BooshopS3Settings__ServiceUrl: "http://garage.garage.svc.cluster.local:3900"
BooshopS3Settings__Region: "garage"
--- ---
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@@ -28,6 +30,8 @@ data:
aspire-apikey: bWMzRzYzSzJqNVpPRXNpMEFqTW9qTFRYbTFLRVpGY3R6SUlqU3dEaVRHdXQ4cUdTa1B1V3d4R1AxUmJzY0pVbw== aspire-apikey: bWMzRzYzSzJqNVpPRXNpMEFqTW9qTFRYbTFLRVpGY3R6SUlqU3dEaVRHdXQ4cUdTa1B1V3d4R1AxUmJzY0pVbw==
auth-clientid: NUxldE5hSERsUlhOWXo1N3FkMVV1RWN4R01uUDNmT3FXc0RHcWdjUg== auth-clientid: NUxldE5hSERsUlhOWXo1N3FkMVV1RWN4R01uUDNmT3FXc0RHcWdjUg==
auth-clientsecret: a3ZxN3k1anc0M0g4WDRjQW91eGRqRDhNNXdxVUhUQ2I4UjNSVjNVWjI4TUZjTk51NWxhM3g3V1ZZRzQ2QnJFMjVPMnhXRmhoeEk0VXNSaFlMTHRqSGRhWWVrUTBmdHpIQ3ZNczV5TXdRdERpcDBkM3QzTkNDa0RtN1JXeW1XSTg= auth-clientsecret: a3ZxN3k1anc0M0g4WDRjQW91eGRqRDhNNXdxVUhUQ2I4UjNSVjNVWjI4TUZjTk51NWxhM3g3V1ZZRzQ2QnJFMjVPMnhXRmhoeEk0VXNSaFlMTHRqSGRhWWVrUTBmdHpIQ3ZNczV5TXdRdERpcDBkM3QzTkNDa0RtN1JXeW1XSTg=
bookshop-s3-accesskey: R0s1MTRkMmNlOGRjNjkyMzdhMDVjMDFlZWY=
bookshop-s3-secretkey: ZWFhZmVkYTFhZWQ0MDllY2ZlNjA3MTRlY2RhNTQ5YjgyYmRmNWEzZGFmOWYxOGRkNjFmNjZiNDk3M2E2NDgyZQ==
--- ---
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
@@ -80,6 +84,16 @@ spec:
- configMapRef: - configMapRef:
name: shopadmin-config name: shopadmin-config
env: env:
- name: BookshopS3Settings__AccessKey
valueFrom:
secretKeyRef:
name: shopadmin-secrets
key: bookshop-s3-accesskey
- name: BookshopS3Settings__SecretKey
valueFrom:
secretKeyRef:
name: shopadmin-secrets
key: bookshop-s3-secretkey
- name: ConnectionStrings__PostgresScheduler - name: ConnectionStrings__PostgresScheduler
valueFrom: valueFrom:
secretKeyRef: secretKeyRef: