diff --git a/NEW/src/JdeScoping.Api/Controllers/AuthController.cs b/NEW/src/JdeScoping.Api/Controllers/AuthController.cs
index c8bd356..cc94c4a 100644
--- a/NEW/src/JdeScoping.Api/Controllers/AuthController.cs
+++ b/NEW/src/JdeScoping.Api/Controllers/AuthController.cs
@@ -2,7 +2,6 @@ using System.Security.Claims;
using System.Text.Json;
using JdeScoping.Api.Extensions;
using JdeScoping.Core.ApiContracts;
-using JdeScoping.Core.ApiContracts.Auth;
using JdeScoping.Core.Interfaces;
using JdeScoping.Core.Models;
using JdeScoping.Core.Models.Auth;
diff --git a/NEW/src/JdeScoping.Api/Controllers/PipelineController.cs b/NEW/src/JdeScoping.Api/Controllers/PipelineController.cs
index c102ab5..92b0cb2 100644
--- a/NEW/src/JdeScoping.Api/Controllers/PipelineController.cs
+++ b/NEW/src/JdeScoping.Api/Controllers/PipelineController.cs
@@ -1,5 +1,5 @@
using JdeScoping.Core.ApiContracts;
-using JdeScoping.Core.ApiContracts.Pipelines;
+using JdeScoping.Core.Models.Pipelines;
using JdeScoping.Core.Models.Enums;
using JdeScoping.DataSync.Configuration;
using JdeScoping.DataSync.Contracts;
diff --git a/NEW/src/JdeScoping.Api/Controllers/RefreshStatusController.cs b/NEW/src/JdeScoping.Api/Controllers/RefreshStatusController.cs
new file mode 100644
index 0000000..58b8fbf
--- /dev/null
+++ b/NEW/src/JdeScoping.Api/Controllers/RefreshStatusController.cs
@@ -0,0 +1,71 @@
+using JdeScoping.Core.ApiContracts;
+using JdeScoping.Core.Models.Infrastructure;
+using JdeScoping.Core.Interfaces;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+
+namespace JdeScoping.Api.Controllers;
+
+///
+/// API endpoints for data refresh/cache sync status.
+///
+[Route(ApiRoutes.RefreshStatus.Base)]
+[ApiController]
+[Authorize]
+public class RefreshStatusController : ApiControllerBase
+{
+ private readonly ILotFinderRepository _repository;
+
+ public RefreshStatusController(ILotFinderRepository repository)
+ {
+ _repository = repository;
+ }
+
+ ///
+ /// Gets aggregated refresh status records within the specified date range.
+ ///
+ /// Start date filter.
+ /// End date filter.
+ /// Cancellation token.
+ [HttpGet]
+ [ProducesResponseType(typeof(List), StatusCodes.Status200OK)]
+ public async Task>> GetRefreshStatus(
+ [FromQuery] DateTime minDT,
+ [FromQuery] DateTime maxDT,
+ CancellationToken ct)
+ {
+ // Get raw data updates from repository
+ var updates = await _repository.GetLastDataUpdatesAsync(ct);
+
+ // Filter by date range
+ var filtered = updates
+ .Where(u => u.StartDt >= minDT && u.StartDt <= maxDT.AddDays(1))
+ .ToList();
+
+ // Group by StartDt (rounded to minute) to aggregate multiple table updates into single rows
+ var aggregated = filtered
+ .GroupBy(u => new DateTime(u.StartDt.Year, u.StartDt.Month, u.StartDt.Day, u.StartDt.Hour, u.StartDt.Minute, 0))
+ .Select(g => new DataUpdateDto
+ {
+ StartDt = g.Key,
+ EndDt = g.Max(u => u.EndDt),
+ WasSuccessful = g.All(u => u.WasSuccessful),
+ BranchRecords = (int)(g.FirstOrDefault(u => u.TableName == "Branch")?.NumberRecords ?? 0),
+ ProfitCenterRecords = (int)(g.FirstOrDefault(u => u.TableName == "ProfitCenter")?.NumberRecords ?? 0),
+ WorkCenterRecords = (int)(g.FirstOrDefault(u => u.TableName == "WorkCenter")?.NumberRecords ?? 0),
+ OrgHierarchyRecords = (int)(g.FirstOrDefault(u => u.TableName == "OrgHierarchy")?.NumberRecords ?? 0),
+ StatusCodeRecords = (int)(g.FirstOrDefault(u => u.TableName == "StatusCode")?.NumberRecords ?? 0),
+ UserRecords = (int)(g.FirstOrDefault(u => u.TableName == "JdeUser")?.NumberRecords ?? 0),
+ ItemRecords = (int)(g.FirstOrDefault(u => u.TableName == "Item")?.NumberRecords ?? 0),
+ LotRecords = (int)(g.FirstOrDefault(u => u.TableName == "Lot")?.NumberRecords ?? 0),
+ WorkOrderRecords = (int)(g.FirstOrDefault(u => u.TableName.Contains("WorkOrder_"))?.NumberRecords ?? 0),
+ WorkOrderStepRecords = (int)(g.FirstOrDefault(u => u.TableName.Contains("WorkOrderStep"))?.NumberRecords ?? 0),
+ WorkOrderComponentRecords = (int)(g.FirstOrDefault(u => u.TableName.Contains("WorkOrderComponent"))?.NumberRecords ?? 0)
+ })
+ .OrderByDescending(d => d.StartDt)
+ .ToList();
+
+ return Ok(aggregated);
+ }
+}
diff --git a/NEW/src/JdeScoping.Api/Hubs/StatusHub.cs b/NEW/src/JdeScoping.Api/Hubs/StatusHub.cs
index 6d8af25..fcb38fd 100644
--- a/NEW/src/JdeScoping.Api/Hubs/StatusHub.cs
+++ b/NEW/src/JdeScoping.Api/Hubs/StatusHub.cs
@@ -1,4 +1,4 @@
-using JdeScoping.Core.ApiContracts.SignalR;
+using JdeScoping.Core.ViewModels;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Logging;
@@ -9,7 +9,7 @@ namespace JdeScoping.Api.Hubs;
///
public class StatusHub : Hub
{
- private static StatusUpdateDto _cachedStatus = new()
+ private static StatusUpdateViewModel _cachedStatus = new()
{
Message = "Unknown",
Timestamp = DateTime.UtcNow
@@ -27,7 +27,7 @@ public class StatusHub : Hub
/// Caches the update and broadcasts to all clients.
///
/// Status update to broadcast
- public async Task SetStatus(StatusUpdateDto statusUpdate)
+ public async Task SetStatus(StatusUpdateViewModel statusUpdate)
{
_cachedStatus = statusUpdate;
await Clients.All.SendAsync("statusUpdate", statusUpdate);
@@ -38,7 +38,7 @@ public class StatusHub : Hub
/// Called by clients to get initial cached status on connection.
///
/// The most recent status update
- public StatusUpdateDto GetCachedStatus()
+ public StatusUpdateViewModel GetCachedStatus()
{
return _cachedStatus;
}
@@ -47,7 +47,7 @@ public class StatusHub : Hub
/// Called by controllers/services to broadcast search updates.
///
/// Search update to broadcast
- public async Task PublishSearchUpdate(SearchUpdateDto searchUpdate)
+ public async Task PublishSearchUpdate(SearchUpdateViewModel searchUpdate)
{
await Clients.All.SendAsync("searchUpdate", searchUpdate);
_logger.LogDebug("Search update published: ID={Id}, Status={Status}", searchUpdate.Id, searchUpdate.Status);
diff --git a/NEW/src/JdeScoping.Api/Services/SearchNotificationService.cs b/NEW/src/JdeScoping.Api/Services/SearchNotificationService.cs
index 45e6d52..169ba96 100644
--- a/NEW/src/JdeScoping.Api/Services/SearchNotificationService.cs
+++ b/NEW/src/JdeScoping.Api/Services/SearchNotificationService.cs
@@ -1,7 +1,7 @@
using JdeScoping.Api.Hubs;
-using JdeScoping.Core.ApiContracts.SignalR;
using JdeScoping.Core.Interfaces;
using JdeScoping.Core.Models.Search;
+using JdeScoping.Core.ViewModels;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Logging;
@@ -34,7 +34,7 @@ public class SearchNotificationService : ISearchNotificationService
{
try
{
- var update = SearchUpdateDto.FromSearch(search);
+ var update = SearchUpdateViewModel.FromSearch(search);
await _hubContext.Clients.All.SendAsync("searchUpdate", update, ct);
_logger.LogDebug(
"Search update notification sent: Id={SearchId}, Status={Status}",
@@ -56,7 +56,7 @@ public class SearchNotificationService : ISearchNotificationService
{
try
{
- var update = StatusUpdateDto.Create(status);
+ var update = StatusUpdateViewModel.Create(status);
await _hubContext.Clients.All.SendAsync("statusUpdate", update, ct);
_logger.LogDebug("Status notification sent: {Status}", status);
}
diff --git a/NEW/src/JdeScoping.Client/Auth/AuthStateProvider.cs b/NEW/src/JdeScoping.Client/Auth/AuthStateProvider.cs
index ce39beb..e43d902 100644
--- a/NEW/src/JdeScoping.Client/Auth/AuthStateProvider.cs
+++ b/NEW/src/JdeScoping.Client/Auth/AuthStateProvider.cs
@@ -1,6 +1,6 @@
using System.Net.Http.Json;
using System.Security.Claims;
-using JdeScoping.Core.ApiContracts.Auth;
+using JdeScoping.Core.Models.Auth;
using Microsoft.AspNetCore.Components.Authorization;
namespace JdeScoping.Client.Auth;
diff --git a/NEW/src/JdeScoping.Client/Auth/IUserStorageService.cs b/NEW/src/JdeScoping.Client/Auth/IUserStorageService.cs
index 1cc9eb5..2eaa4e0 100644
--- a/NEW/src/JdeScoping.Client/Auth/IUserStorageService.cs
+++ b/NEW/src/JdeScoping.Client/Auth/IUserStorageService.cs
@@ -1,4 +1,4 @@
-using JdeScoping.Core.ApiContracts.Auth;
+using JdeScoping.Core.Models.Auth;
namespace JdeScoping.Client.Auth;
diff --git a/NEW/src/JdeScoping.Client/Auth/UserStorageService.cs b/NEW/src/JdeScoping.Client/Auth/UserStorageService.cs
index 11cf690..e365ba3 100644
--- a/NEW/src/JdeScoping.Client/Auth/UserStorageService.cs
+++ b/NEW/src/JdeScoping.Client/Auth/UserStorageService.cs
@@ -1,5 +1,5 @@
using System.Text.Json;
-using JdeScoping.Core.ApiContracts.Auth;
+using JdeScoping.Core.Models.Auth;
using Microsoft.JSInterop;
namespace JdeScoping.Client.Auth;
diff --git a/NEW/src/JdeScoping.Client/Components/Admin/PipelineScheduleSection.razor b/NEW/src/JdeScoping.Client/Components/Admin/PipelineScheduleSection.razor
index 1786111..818ea12 100644
--- a/NEW/src/JdeScoping.Client/Components/Admin/PipelineScheduleSection.razor
+++ b/NEW/src/JdeScoping.Client/Components/Admin/PipelineScheduleSection.razor
@@ -1,5 +1,5 @@
@namespace JdeScoping.Client.Components.Admin
-@using JdeScoping.Core.ApiContracts.Pipelines
+@using JdeScoping.Core.Models.Pipelines
@using JdeScoping.Core.Models.Enums
diff --git a/NEW/src/JdeScoping.Client/Pages/Admin/PipelineViewer.razor b/NEW/src/JdeScoping.Client/Pages/Admin/PipelineViewer.razor
index 7549519..c0101c0 100644
--- a/NEW/src/JdeScoping.Client/Pages/Admin/PipelineViewer.razor
+++ b/NEW/src/JdeScoping.Client/Pages/Admin/PipelineViewer.razor
@@ -1,7 +1,7 @@
@page "/admin/pipeline-viewer"
@attribute [Authorize]
@using JdeScoping.Core.ApiContracts
-@using JdeScoping.Core.ApiContracts.Pipelines
+@using JdeScoping.Core.Models.Pipelines
@using JdeScoping.Core.Models.Enums
@inject IPipelineApiClient PipelineApi
diff --git a/NEW/src/JdeScoping.Client/Pages/RefreshStatus.razor b/NEW/src/JdeScoping.Client/Pages/RefreshStatus.razor
index 0370678..9ab81f8 100644
--- a/NEW/src/JdeScoping.Client/Pages/RefreshStatus.razor
+++ b/NEW/src/JdeScoping.Client/Pages/RefreshStatus.razor
@@ -31,31 +31,31 @@
}
else
{
-
-
+
@item.StartDt.ToString("MM/dd/yyyy hh:mm tt")
-
+
@(item.EndDt?.ToString("MM/dd/yyyy hh:mm tt") ?? "")
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@if (item.WasSuccessful)
{
@@ -72,7 +72,7 @@ else
}
@code {
- private List _results = [];
+ private List _results = [];
private bool _isLoading = true;
// Default to last 7 days
diff --git a/NEW/src/JdeScoping.Client/Pages/SearchEdit.razor b/NEW/src/JdeScoping.Client/Pages/SearchEdit.razor
index ca7d087..7e79521 100644
--- a/NEW/src/JdeScoping.Client/Pages/SearchEdit.razor
+++ b/NEW/src/JdeScoping.Client/Pages/SearchEdit.razor
@@ -315,7 +315,7 @@ else
await HubConnection.StartAsync();
}
- private void HandleSearchUpdate(SearchUpdateDto update)
+ private void HandleSearchUpdate(SearchUpdateViewModel update)
{
if (update.Id == _search.Id)
{
diff --git a/NEW/src/JdeScoping.Client/Pages/SearchQueue.razor b/NEW/src/JdeScoping.Client/Pages/SearchQueue.razor
index 58a7ebc..94a0c58 100644
--- a/NEW/src/JdeScoping.Client/Pages/SearchQueue.razor
+++ b/NEW/src/JdeScoping.Client/Pages/SearchQueue.razor
@@ -120,7 +120,7 @@ else
}
}
- private void HandleSearchUpdate(SearchUpdateDto update)
+ private void HandleSearchUpdate(SearchUpdateViewModel update)
{
InvokeAsync(() =>
{
@@ -162,7 +162,7 @@ else
});
}
- private void HandleStatusUpdate(StatusUpdateDto update)
+ private void HandleStatusUpdate(StatusUpdateViewModel update)
{
InvokeAsync(() =>
{
diff --git a/NEW/src/JdeScoping.Client/Pages/Searches.razor b/NEW/src/JdeScoping.Client/Pages/Searches.razor
index af8119e..2d77f2b 100644
--- a/NEW/src/JdeScoping.Client/Pages/Searches.razor
+++ b/NEW/src/JdeScoping.Client/Pages/Searches.razor
@@ -93,7 +93,7 @@ else
await HubConnection.StartAsync();
}
- private void HandleSearchUpdate(SearchUpdateDto update)
+ private void HandleSearchUpdate(SearchUpdateViewModel update)
{
InvokeAsync(() =>
{
diff --git a/NEW/src/JdeScoping.Client/Services/AuthApiClient.cs b/NEW/src/JdeScoping.Client/Services/AuthApiClient.cs
index 1350f13..63dc5cf 100644
--- a/NEW/src/JdeScoping.Client/Services/AuthApiClient.cs
+++ b/NEW/src/JdeScoping.Client/Services/AuthApiClient.cs
@@ -1,5 +1,4 @@
using JdeScoping.Core.ApiContracts;
-using JdeScoping.Core.ApiContracts.Auth;
using JdeScoping.Core.ApiContracts.Results;
using JdeScoping.Core.Models.Auth;
diff --git a/NEW/src/JdeScoping.Client/Services/HubConnectionService.cs b/NEW/src/JdeScoping.Client/Services/HubConnectionService.cs
index 1e48266..e96e2e6 100644
--- a/NEW/src/JdeScoping.Client/Services/HubConnectionService.cs
+++ b/NEW/src/JdeScoping.Client/Services/HubConnectionService.cs
@@ -1,4 +1,4 @@
-using JdeScoping.Core.ApiContracts.SignalR;
+using JdeScoping.Core.ViewModels;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.SignalR.Client;
@@ -13,8 +13,8 @@ public class HubConnectionService : IHubConnectionService, IAsyncDisposable
private readonly NavigationManager _navigationManager;
private HubConnection? _hubConnection;
- public event Action? OnSearchUpdate;
- public event Action? OnStatusUpdate;
+ public event Action? OnSearchUpdate;
+ public event Action? OnStatusUpdate;
public bool IsConnected => _hubConnection?.State == HubConnectionState.Connected;
@@ -43,12 +43,12 @@ public class HubConnectionService : IHubConnectionService, IAsyncDisposable
])
.Build();
- _hubConnection.On("searchUpdate", update =>
+ _hubConnection.On("searchUpdate", update =>
{
OnSearchUpdate?.Invoke(update);
});
- _hubConnection.On("statusUpdate", update =>
+ _hubConnection.On("statusUpdate", update =>
{
OnStatusUpdate?.Invoke(update);
});
@@ -92,7 +92,7 @@ public class HubConnectionService : IHubConnectionService, IAsyncDisposable
}
}
- public async Task GetCachedStatusAsync()
+ public async Task GetCachedStatusAsync()
{
if (_hubConnection == null || _hubConnection.State != HubConnectionState.Connected)
{
@@ -101,7 +101,7 @@ public class HubConnectionService : IHubConnectionService, IAsyncDisposable
try
{
- return await _hubConnection.InvokeAsync("GetCachedStatus");
+ return await _hubConnection.InvokeAsync("GetCachedStatus");
}
catch (Exception ex)
{
diff --git a/NEW/src/JdeScoping.Client/Services/IHubConnectionService.cs b/NEW/src/JdeScoping.Client/Services/IHubConnectionService.cs
index 7e35f5b..7e8b5de 100644
--- a/NEW/src/JdeScoping.Client/Services/IHubConnectionService.cs
+++ b/NEW/src/JdeScoping.Client/Services/IHubConnectionService.cs
@@ -1,4 +1,4 @@
-using JdeScoping.Core.ApiContracts.SignalR;
+using JdeScoping.Core.ViewModels;
namespace JdeScoping.Client.Services;
@@ -10,12 +10,12 @@ public interface IHubConnectionService
///
/// Event fired when a search update is received.
///
- event Action? OnSearchUpdate;
+ event Action? OnSearchUpdate;
///
/// Event fired when a processor status update is received.
///
- event Action? OnStatusUpdate;
+ event Action? OnStatusUpdate;
///
/// Starts the SignalR connection.
@@ -30,7 +30,7 @@ public interface IHubConnectionService
///
/// Gets the cached processor status from the server.
///
- Task GetCachedStatusAsync();
+ Task GetCachedStatusAsync();
///
/// Gets the current connection state.
diff --git a/NEW/src/JdeScoping.Client/Services/IRefreshStatusService.cs b/NEW/src/JdeScoping.Client/Services/IRefreshStatusService.cs
index b61aca3..ae9e5b6 100644
--- a/NEW/src/JdeScoping.Client/Services/IRefreshStatusService.cs
+++ b/NEW/src/JdeScoping.Client/Services/IRefreshStatusService.cs
@@ -1,4 +1,4 @@
-using JdeScoping.Client.Models;
+using JdeScoping.Core.Models.Infrastructure;
namespace JdeScoping.Client.Services;
@@ -10,5 +10,5 @@ public interface IRefreshStatusService
///
/// Gets refresh status records within the specified date range.
///
- Task> GetRefreshStatusAsync(DateTime minDt, DateTime maxDt);
+ Task> GetRefreshStatusAsync(DateTime minDt, DateTime maxDt);
}
diff --git a/NEW/src/JdeScoping.Client/Services/PipelineApiClient.cs b/NEW/src/JdeScoping.Client/Services/PipelineApiClient.cs
index 19e46a7..4dccd85 100644
--- a/NEW/src/JdeScoping.Client/Services/PipelineApiClient.cs
+++ b/NEW/src/JdeScoping.Client/Services/PipelineApiClient.cs
@@ -1,5 +1,5 @@
using JdeScoping.Core.ApiContracts;
-using JdeScoping.Core.ApiContracts.Pipelines;
+using JdeScoping.Core.Models.Pipelines;
using JdeScoping.Core.ApiContracts.Results;
namespace JdeScoping.Client.Services;
diff --git a/NEW/src/JdeScoping.Client/Services/RefreshStatusService.cs b/NEW/src/JdeScoping.Client/Services/RefreshStatusService.cs
index 34b5163..61cf94e 100644
--- a/NEW/src/JdeScoping.Client/Services/RefreshStatusService.cs
+++ b/NEW/src/JdeScoping.Client/Services/RefreshStatusService.cs
@@ -1,5 +1,5 @@
using System.Net.Http.Json;
-using JdeScoping.Client.Models;
+using JdeScoping.Core.Models.Infrastructure;
namespace JdeScoping.Client.Services;
@@ -16,13 +16,13 @@ public class RefreshStatusService : IRefreshStatusService
_httpClient = httpClient;
}
- public async Task> GetRefreshStatusAsync(DateTime minDt, DateTime maxDt)
+ public async Task> GetRefreshStatusAsync(DateTime minDt, DateTime maxDt)
{
try
{
var minDtStr = minDt.ToString("yyyy-MM-dd");
var maxDtStr = maxDt.ToString("yyyy-MM-dd");
- var result = await _httpClient.GetFromJsonAsync>(
+ var result = await _httpClient.GetFromJsonAsync>(
$"api/refresh-status?minDT={minDtStr}&maxDT={maxDtStr}");
return result ?? [];
}
diff --git a/NEW/src/JdeScoping.Client/_Imports.razor b/NEW/src/JdeScoping.Client/_Imports.razor
index a99a000..b81152f 100644
--- a/NEW/src/JdeScoping.Client/_Imports.razor
+++ b/NEW/src/JdeScoping.Client/_Imports.razor
@@ -21,7 +21,9 @@
@using JdeScoping.Client.Models
@using JdeScoping.Client.Pages
@using JdeScoping.Client.Services
-@using JdeScoping.Core.ApiContracts.Auth
-@using JdeScoping.Core.ApiContracts.SignalR
+@using JdeScoping.Core.ApiContracts
+@using JdeScoping.Core.Models.Auth
+@using JdeScoping.Core.Models.Infrastructure
+@using JdeScoping.Core.Models.Pipelines
@using JdeScoping.Core.ViewModels
@using ClientSearchViewModel = JdeScoping.Client.Models.SearchViewModel
diff --git a/NEW/src/JdeScoping.Core/ApiContracts/ApiRoutes.cs b/NEW/src/JdeScoping.Core/ApiContracts/ApiRoutes.cs
index d40296a..dd94a54 100644
--- a/NEW/src/JdeScoping.Core/ApiContracts/ApiRoutes.cs
+++ b/NEW/src/JdeScoping.Core/ApiContracts/ApiRoutes.cs
@@ -122,6 +122,19 @@ public static class ApiRoutes
public const string UploadPartOperations = "api/fileio/partoperations/upload";
}
+ ///
+ /// Routes for data refresh status API endpoints.
+ ///
+ public static class RefreshStatus
+ {
+ /// Base route for refresh status endpoints.
+ public const string Base = "api/refresh-status";
+
+ /// Builds the route to get refresh status with date range.
+ public static string Get(DateTime minDt, DateTime maxDt) =>
+ $"api/refresh-status?minDT={minDt:yyyy-MM-dd}&maxDT={maxDt:yyyy-MM-dd}";
+ }
+
///
/// Routes for pipeline configuration API endpoints.
///
diff --git a/NEW/src/JdeScoping.Core/ApiContracts/IAuthApiClient.cs b/NEW/src/JdeScoping.Core/ApiContracts/IAuthApiClient.cs
index 7570a1d..82e3df1 100644
--- a/NEW/src/JdeScoping.Core/ApiContracts/IAuthApiClient.cs
+++ b/NEW/src/JdeScoping.Core/ApiContracts/IAuthApiClient.cs
@@ -1,4 +1,3 @@
-using JdeScoping.Core.ApiContracts.Auth;
using JdeScoping.Core.ApiContracts.Results;
using JdeScoping.Core.Models.Auth;
diff --git a/NEW/src/JdeScoping.Core/ApiContracts/IPipelineApiClient.cs b/NEW/src/JdeScoping.Core/ApiContracts/IPipelineApiClient.cs
index e1ba6f5..7671f76 100644
--- a/NEW/src/JdeScoping.Core/ApiContracts/IPipelineApiClient.cs
+++ b/NEW/src/JdeScoping.Core/ApiContracts/IPipelineApiClient.cs
@@ -1,4 +1,4 @@
-using JdeScoping.Core.ApiContracts.Pipelines;
+using JdeScoping.Core.Models.Pipelines;
using JdeScoping.Core.ApiContracts.Results;
namespace JdeScoping.Core.ApiContracts;
diff --git a/NEW/src/JdeScoping.Core/Models/Auth/LoginResultModel.cs b/NEW/src/JdeScoping.Core/Models/Auth/LoginResultModel.cs
index 5f054f9..0e66781 100644
--- a/NEW/src/JdeScoping.Core/Models/Auth/LoginResultModel.cs
+++ b/NEW/src/JdeScoping.Core/Models/Auth/LoginResultModel.cs
@@ -1,5 +1,3 @@
-using JdeScoping.Core.ApiContracts.Auth;
-
namespace JdeScoping.Core.Models.Auth;
///
diff --git a/NEW/src/JdeScoping.Core/ApiContracts/Auth/UserInfoDto.cs b/NEW/src/JdeScoping.Core/Models/Auth/UserInfoDto.cs
similarity index 91%
rename from NEW/src/JdeScoping.Core/ApiContracts/Auth/UserInfoDto.cs
rename to NEW/src/JdeScoping.Core/Models/Auth/UserInfoDto.cs
index 16b9b19..bc4360f 100644
--- a/NEW/src/JdeScoping.Core/ApiContracts/Auth/UserInfoDto.cs
+++ b/NEW/src/JdeScoping.Core/Models/Auth/UserInfoDto.cs
@@ -1,6 +1,4 @@
-using JdeScoping.Core.Models;
-
-namespace JdeScoping.Core.ApiContracts.Auth;
+namespace JdeScoping.Core.Models.Auth;
///
/// API response DTO for authenticated user information.
diff --git a/NEW/src/JdeScoping.Client/Models/DataUpdateViewModel.cs b/NEW/src/JdeScoping.Core/Models/Infrastructure/DataUpdateDto.cs
similarity index 75%
rename from NEW/src/JdeScoping.Client/Models/DataUpdateViewModel.cs
rename to NEW/src/JdeScoping.Core/Models/Infrastructure/DataUpdateDto.cs
index 4a6446f..ce07eb5 100644
--- a/NEW/src/JdeScoping.Client/Models/DataUpdateViewModel.cs
+++ b/NEW/src/JdeScoping.Core/Models/Infrastructure/DataUpdateDto.cs
@@ -1,9 +1,10 @@
-namespace JdeScoping.Client.Models;
+namespace JdeScoping.Core.Models.Infrastructure;
///
-/// View model for data refresh/sync status display.
+/// DTO for data refresh/sync status display.
+/// Aggregates record counts from multiple table updates into a single row.
///
-public class DataUpdateViewModel
+public class DataUpdateDto
{
public DateTime StartDt { get; set; }
public DateTime? EndDt { get; set; }
diff --git a/NEW/src/JdeScoping.Core/ApiContracts/Pipelines/PipelineConfigDto.cs b/NEW/src/JdeScoping.Core/Models/Pipelines/PipelineConfigDto.cs
similarity index 92%
rename from NEW/src/JdeScoping.Core/ApiContracts/Pipelines/PipelineConfigDto.cs
rename to NEW/src/JdeScoping.Core/Models/Pipelines/PipelineConfigDto.cs
index 00c72bf..fd81c04 100644
--- a/NEW/src/JdeScoping.Core/ApiContracts/Pipelines/PipelineConfigDto.cs
+++ b/NEW/src/JdeScoping.Core/Models/Pipelines/PipelineConfigDto.cs
@@ -1,4 +1,4 @@
-namespace JdeScoping.Core.ApiContracts.Pipelines;
+namespace JdeScoping.Core.Models.Pipelines;
///
/// Pipeline configuration DTO for display.
diff --git a/NEW/src/JdeScoping.Core/ApiContracts/Pipelines/PipelineExecutionDto.cs b/NEW/src/JdeScoping.Core/Models/Pipelines/PipelineExecutionDto.cs
similarity index 77%
rename from NEW/src/JdeScoping.Core/ApiContracts/Pipelines/PipelineExecutionDto.cs
rename to NEW/src/JdeScoping.Core/Models/Pipelines/PipelineExecutionDto.cs
index b0edc98..dd948a4 100644
--- a/NEW/src/JdeScoping.Core/ApiContracts/Pipelines/PipelineExecutionDto.cs
+++ b/NEW/src/JdeScoping.Core/Models/Pipelines/PipelineExecutionDto.cs
@@ -1,6 +1,6 @@
-namespace JdeScoping.Core.ApiContracts.Pipelines;
+namespace JdeScoping.Core.Models.Pipelines;
-using Models.Enums;
+using JdeScoping.Core.Models.Enums;
///
/// Pipeline execution history.
diff --git a/NEW/src/JdeScoping.Core/ApiContracts/Pipelines/PipelineListResponse.cs b/NEW/src/JdeScoping.Core/Models/Pipelines/PipelineListResponse.cs
similarity index 73%
rename from NEW/src/JdeScoping.Core/ApiContracts/Pipelines/PipelineListResponse.cs
rename to NEW/src/JdeScoping.Core/Models/Pipelines/PipelineListResponse.cs
index 1ad66e1..a08a2e0 100644
--- a/NEW/src/JdeScoping.Core/ApiContracts/Pipelines/PipelineListResponse.cs
+++ b/NEW/src/JdeScoping.Core/Models/Pipelines/PipelineListResponse.cs
@@ -1,4 +1,4 @@
-namespace JdeScoping.Core.ApiContracts.Pipelines;
+namespace JdeScoping.Core.Models.Pipelines;
///
/// Response containing list of available pipeline names.
diff --git a/NEW/src/JdeScoping.Core/ApiContracts/Pipelines/PipelineStatusDto.cs b/NEW/src/JdeScoping.Core/Models/Pipelines/PipelineStatusDto.cs
similarity index 80%
rename from NEW/src/JdeScoping.Core/ApiContracts/Pipelines/PipelineStatusDto.cs
rename to NEW/src/JdeScoping.Core/Models/Pipelines/PipelineStatusDto.cs
index 8488db5..8263f6b 100644
--- a/NEW/src/JdeScoping.Core/ApiContracts/Pipelines/PipelineStatusDto.cs
+++ b/NEW/src/JdeScoping.Core/Models/Pipelines/PipelineStatusDto.cs
@@ -1,6 +1,6 @@
-namespace JdeScoping.Core.ApiContracts.Pipelines;
+namespace JdeScoping.Core.Models.Pipelines;
-using Models.Enums;
+using JdeScoping.Core.Models.Enums;
///
/// Pipeline schedule status for each update type.
diff --git a/NEW/src/JdeScoping.Core/ApiContracts/SignalR/SearchUpdateDto.cs b/NEW/src/JdeScoping.Core/ViewModels/SearchUpdateViewModel.cs
similarity index 76%
rename from NEW/src/JdeScoping.Core/ApiContracts/SignalR/SearchUpdateDto.cs
rename to NEW/src/JdeScoping.Core/ViewModels/SearchUpdateViewModel.cs
index bfa3de4..6ddb6cb 100644
--- a/NEW/src/JdeScoping.Core/ApiContracts/SignalR/SearchUpdateDto.cs
+++ b/NEW/src/JdeScoping.Core/ViewModels/SearchUpdateViewModel.cs
@@ -1,11 +1,11 @@
using JdeScoping.Core.Models.Search;
-namespace JdeScoping.Core.ApiContracts.SignalR;
+namespace JdeScoping.Core.ViewModels;
///
-/// SignalR message DTO for search status updates.
+/// SignalR message view model for search status updates.
///
-public record SearchUpdateDto
+public record SearchUpdateViewModel
{
///
/// Search PK ID.
@@ -43,11 +43,11 @@ public record SearchUpdateDto
public DateTime? EndDt { get; init; }
///
- /// Creates a SearchUpdateDto from a Search entity.
+ /// Creates a SearchUpdateViewModel from a Search entity.
///
/// The Search entity to convert.
- /// A new SearchUpdateDto instance.
- public static SearchUpdateDto FromSearch(Search search) => new()
+ /// A new SearchUpdateViewModel instance.
+ public static SearchUpdateViewModel FromSearch(Search search) => new()
{
Id = search.Id,
Name = search.Name,
diff --git a/NEW/src/JdeScoping.Core/ApiContracts/SignalR/StatusUpdateDto.cs b/NEW/src/JdeScoping.Core/ViewModels/StatusUpdateViewModel.cs
similarity index 55%
rename from NEW/src/JdeScoping.Core/ApiContracts/SignalR/StatusUpdateDto.cs
rename to NEW/src/JdeScoping.Core/ViewModels/StatusUpdateViewModel.cs
index 85fdf1f..b2d494b 100644
--- a/NEW/src/JdeScoping.Core/ApiContracts/SignalR/StatusUpdateDto.cs
+++ b/NEW/src/JdeScoping.Core/ViewModels/StatusUpdateViewModel.cs
@@ -1,9 +1,9 @@
-namespace JdeScoping.Core.ApiContracts.SignalR;
+namespace JdeScoping.Core.ViewModels;
///
-/// SignalR message DTO for processor status updates.
+/// SignalR message view model for processor status updates.
///
-public record StatusUpdateDto
+public record StatusUpdateViewModel
{
///
/// Status message to display.
@@ -16,11 +16,11 @@ public record StatusUpdateDto
public DateTime? Timestamp { get; init; }
///
- /// Creates a StatusUpdateDto with the current timestamp.
+ /// Creates a StatusUpdateViewModel with the current timestamp.
///
/// Status message.
- /// A new StatusUpdateDto instance.
- public static StatusUpdateDto Create(string message) => new()
+ /// A new StatusUpdateViewModel instance.
+ public static StatusUpdateViewModel Create(string message) => new()
{
Message = message,
Timestamp = DateTime.UtcNow
diff --git a/NEW/tests/JdeScoping.Api.Tests/Controllers/AuthControllerTests.cs b/NEW/tests/JdeScoping.Api.Tests/Controllers/AuthControllerTests.cs
index 96a9082..77f796b 100644
--- a/NEW/tests/JdeScoping.Api.Tests/Controllers/AuthControllerTests.cs
+++ b/NEW/tests/JdeScoping.Api.Tests/Controllers/AuthControllerTests.cs
@@ -4,7 +4,6 @@ using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
using JdeScoping.Api.Controllers;
-using JdeScoping.Core.ApiContracts.Auth;
using JdeScoping.Core.Interfaces;
using JdeScoping.Core.Models;
using JdeScoping.Core.Models.Auth;
diff --git a/NEW/tests/JdeScoping.Api.Tests/Hubs/StatusHubTests.cs b/NEW/tests/JdeScoping.Api.Tests/Hubs/StatusHubTests.cs
index 28cf249..4936dec 100644
--- a/NEW/tests/JdeScoping.Api.Tests/Hubs/StatusHubTests.cs
+++ b/NEW/tests/JdeScoping.Api.Tests/Hubs/StatusHubTests.cs
@@ -1,5 +1,5 @@
using JdeScoping.Api.Hubs;
-using JdeScoping.Core.ApiContracts.SignalR;
+using JdeScoping.Core.ViewModels;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Logging;
using NSubstitute;
@@ -33,7 +33,7 @@ public class StatusHubTests
var clientsProperty = typeof(Hub).GetProperty("Clients");
clientsProperty?.SetValue(_hub, hubClients);
- var statusUpdate = new StatusUpdateDto
+ var statusUpdate = new StatusUpdateViewModel
{
Message = "Processing",
Timestamp = DateTime.UtcNow
@@ -90,7 +90,7 @@ public class StatusHubTests
var clientsProperty = typeof(Hub).GetProperty("Clients");
clientsProperty?.SetValue(_hub, hubClients);
- var searchUpdate = new SearchUpdateDto
+ var searchUpdate = new SearchUpdateViewModel
{
Id = 42,
UserName = "testuser",
diff --git a/NEW/tests/JdeScoping.Client.Tests/Services/AuthApiClientTests.cs b/NEW/tests/JdeScoping.Client.Tests/Services/AuthApiClientTests.cs
index af46a6e..fc8745c 100644
--- a/NEW/tests/JdeScoping.Client.Tests/Services/AuthApiClientTests.cs
+++ b/NEW/tests/JdeScoping.Client.Tests/Services/AuthApiClientTests.cs
@@ -2,7 +2,6 @@ using System.Net;
using System.Text.Json;
using JdeScoping.Client.Services;
using JdeScoping.Core.ApiContracts;
-using JdeScoping.Core.ApiContracts.Auth;
using JdeScoping.Core.ApiContracts.Results;
using JdeScoping.Core.Models.Auth;
using RichardSzalay.MockHttp;