Commit remaining unstaged changes from this session

- Platform settings service: IPlatformSettingsService, PlatformSettingKeys,
  PlatformSettingsService, SubscriptionService, AppConstants,
  SubscriptionExpiryBackgroundService, SubscriptionMiddleware
- JobTimeEntry entity, DTOs, AutoMapper profile (ShopWorker → UserId migration)
- InventoryDtos: SourceTransactionId on PowderUsageLogDto
- InventoryTransactionRepository: include Job.Customer in ledger query
- InventoryAiLookupService: @graph unwrap + HTML price fallback
- ApplicationDbContextModelSnapshot: reflect migration changes
- launchSettings.json, publish profile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-05 21:20:30 -04:00
parent 4c070e7487
commit 20ae11be03
16 changed files with 177 additions and 35 deletions
@@ -258,6 +258,8 @@ public class PowderUsageLogDto
public decimal VarianceLbs { get; set; }
public DateTime RecordedAt { get; set; }
public string? Notes { get; set; }
/// <summary>Set only for rows synthesized from a scan-based InventoryTransaction (no PowderUsageLog record).</summary>
public int? SourceTransactionId { get; set; }
}
public class InventoryLedgerViewModel
@@ -404,9 +404,8 @@ public class JobTimeEntryDto
{
public int Id { get; set; }
public int JobId { get; set; }
public int ShopWorkerId { get; set; }
public string? UserId { get; set; }
public string WorkerName { get; set; } = string.Empty;
public string WorkerRole { get; set; } = string.Empty;
public DateTime WorkDate { get; set; }
public decimal HoursWorked { get; set; }
public string? Stage { get; set; }
@@ -417,7 +416,7 @@ public class JobTimeEntryDto
public class CreateJobTimeEntryDto
{
public int JobId { get; set; }
public int ShopWorkerId { get; set; }
public string UserId { get; set; } = string.Empty;
public DateTime WorkDate { get; set; }
public decimal HoursWorked { get; set; }
public string? Stage { get; set; }
@@ -427,7 +426,7 @@ public class CreateJobTimeEntryDto
public class UpdateJobTimeEntryDto
{
public int Id { get; set; }
public int ShopWorkerId { get; set; }
public string UserId { get; set; } = string.Empty;
public DateTime WorkDate { get; set; }
public decimal HoursWorked { get; set; }
public string? Stage { get; set; }
@@ -6,6 +6,7 @@ public interface IPlatformSettingsService
{
Task<string?> GetAsync(string key);
Task<bool> GetBoolAsync(string key, bool defaultValue = false);
Task<int> GetIntAsync(string key, int defaultValue);
Task SetAsync(string key, string? value, string? updatedBy = null);
Task<IReadOnlyList<PlatformSetting>> GetAllAsync();
}
@@ -67,8 +67,8 @@ public class JobProfile : Profile
// JobTimeEntry → JobTimeEntryDto
CreateMap<JobTimeEntry, JobTimeEntryDto>()
.ForMember(dest => dest.WorkerName, opt => opt.MapFrom(src => src.Worker != null ? src.Worker.Name : string.Empty))
.ForMember(dest => dest.WorkerRole, opt => opt.MapFrom(src => src.Worker != null ? FormatEnumName(src.Worker.Role.ToString()) : string.Empty));
.ForMember(dest => dest.WorkerName, opt => opt.MapFrom(src =>
src.UserDisplayName ?? (src.Worker != null ? src.Worker.Name : string.Empty)));
// CreateJobDto to Job
CreateMap<CreateJobDto, Job>()