21 Commits

Author SHA1 Message Date
khwezi 4470c2cdb2 Merge pull request 'Generalised datetime picker into component for reuse' (#21) from products into master
Reviewed-on: #21
2026-05-20 17:14:48 +02:00
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 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 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 d8964da36f Merge pull request 'Started producer design' (#17) from products into master
Reviewed-on: #17
2026-05-18 19:20:08 +02:00
khwezi cf0d6ee62a Merge pull request 'Stable notifications page' (#16) from notifications into master
Reviewed-on: #16
2026-05-17 16:11:39 +02:00
khwezi 029f5b5d8a Merge pull request 'Refactored forced https redirection' (#15) from notifications into master
Reviewed-on: #15
2026-05-17 11:35:49 +02:00
khwezi 3e1b2eb48c Merge pull request 'Forcing https' (#14) from notifications into master
Reviewed-on: #14
2026-05-17 11:06:46 +02:00
khwezi 2d833d3a90 Merge pull request 'Forced proto callback' (#13) from notifications into master
Reviewed-on: #13
2026-05-17 09:01:04 +02:00
khwezi aa7b3f3d68 Merge pull request 'Added support for header forwarding' (#12) from notifications into master
Reviewed-on: #12
2026-05-17 08:48:01 +02:00
khwezi e24a0a3144 Merge pull request 'notifications' (#11) from notifications into master
Reviewed-on: #11
2026-05-17 08:29:51 +02:00
khwezi 76fe6886f2 Merge pull request 'notifications' (#10) from notifications into master
Reviewed-on: #10
2026-05-16 15:30:11 +02:00
khwezi bbc724957a Merge pull request 'styling' (#9) from styling into master
Reviewed-on: #9
2026-05-16 12:43:49 +02:00
khwezi 47418a60ad Merge pull request 'styling' (#8) from styling into master
Reviewed-on: #8
2026-05-16 12:02:16 +02:00
khwezi a5f397e388 Merge pull request 'Refactored Monitoring ID' (#7) from styling into master
Reviewed-on: #7
2026-05-16 02:10:30 +02:00
khwezi ea77dfa4af Merge pull request 'Refactored docker shop admin image name' (#6) from styling into master
Reviewed-on: #6
2026-05-16 02:02:21 +02:00
khwezi a002323d69 Merge pull request 'Fixed PVC reference' (#5) from styling into master
Reviewed-on: #5
2026-05-16 01:51:23 +02:00
khwezi 519ef68ef8 Merge pull request 'Refactored manifest ingressroute' (#4) from styling into master
Reviewed-on: #4
2026-05-16 01:43:10 +02:00
khwezi 98eefa89b4 Merge pull request 'Refactored dockerfile' (#3) from styling into master
Reviewed-on: #3
2026-05-16 01:34:04 +02:00
khwezi 3b632a5bc7 Merge pull request 'Run trigger' (#2) from styling into master
Reviewed-on: #2
2026-05-16 01:27:13 +02:00
khwezi f19eaa75ae Merge pull request 'styling' (#1) from styling into master
Reviewed-on: #1
2026-05-16 01:24:48 +02:00
3 changed files with 35 additions and 3 deletions
-1
View File
@@ -93,7 +93,6 @@
<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" />
<ValidationMessage For="@(() => ProductModel.ImageUrl)" style="color: #ff5722; font-size: 0.75rem;" />
@if (string.IsNullOrEmpty(ProductModel.ImageUrl))
{
+34 -1
View File
@@ -1,5 +1,4 @@
using LiteCharms.Features.S3.Abstractions;
using LiteCharms.Features.Shop.Products.Models;
using static LiteCharms.Features.S3.Constants;
namespace ShopAdmin.Components;
@@ -9,6 +8,7 @@ public partial class CreateProduct([FromKeyedServices(BookshopBucketName)] IS3Se
private bool isCalendarOpen = false;
private DateTime calendarViewingMonth = DateTime.Today;
private List<DateTime?> calendarDays = new();
private string currentCalendarMonthYearText => calendarViewingMonth.ToString("MMMM yyyy");
private readonly CancellationTokenSource cancellationTokenSource = new();
private CancellationToken cancellationToken;
@@ -185,4 +185,37 @@ public partial class CreateProduct([FromKeyedServices(BookshopBucketName)] IS3Se
isCalendarOpen = false; // Collapse popup smoothly on successful selection
StateHasChanged();
}
}
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 = "Author metadata is required.")]
public string? Author { get; set; }
[Required(ErrorMessage = "Publication Date is required.")]
public DateTime PublishDate { get; set; } = DateTime.Today;
[Required(ErrorMessage = "Copyright Information field is required.")]
public string? CopyrightInfo { get; set; }
[Required(ErrorMessage = "ISBN code is required.")]
[RegularExpression(@"^(?=(?:\D*\d){10}(?:(?:\D*\d){3})?$)[\d-]+$", ErrorMessage = "Please enter a valid ISBN-10 or ISBN-13 string.")]
public string? Isbn { get; set; }
[Required(ErrorMessage = "Primary image is required.")]
public string? ImageUrl { get; set; }
public List<string> Thumbnails { get; set; } = [];
}
+1 -1
View File
@@ -16,7 +16,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="LiteCharms.Features" Version="1.41.0" />
<PackageReference Include="LiteCharms.Features" Version="1.40.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid" Version="10.0.8" />
<PackageReference Include="Polly" Version="8.6.6" />
</ItemGroup>