refactor: remove unused classes and consolidate ViewModels in Core
Remove 9 unused types from Core (duplicate extension classes, TableSpec, ColumnSpec, LotLocation), move ComponentLotViewModel and OperatorViewModel from Client to Core, and refactor DataSync.Dev to use pipeline-based configuration. Fix Login.razor to use UserInfoDto directly.
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
namespace JdeScoping.Client.Models;
|
||||
|
||||
/// <summary>
|
||||
/// View model for component lot filter.
|
||||
/// </summary>
|
||||
public class ComponentLotViewModel
|
||||
{
|
||||
public string LotNumber { get; set; } = string.Empty;
|
||||
public string ItemNumber { get; set; } = string.Empty;
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj is ComponentLotViewModel other)
|
||||
{
|
||||
return LotNumber == other.LotNumber && ItemNumber == other.ItemNumber;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode() => HashCode.Combine(LotNumber, ItemNumber);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
namespace JdeScoping.Client.Models;
|
||||
|
||||
/// <summary>
|
||||
/// View model for operator filter.
|
||||
/// </summary>
|
||||
public class OperatorViewModel
|
||||
{
|
||||
public int AddressNumber { get; set; }
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
public string FullName { get; set; } = string.Empty;
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj is OperatorViewModel other)
|
||||
{
|
||||
return UserId == other.UserId;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode() => UserId.GetHashCode();
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace JdeScoping.Client.Models;
|
||||
|
||||
/// <summary>
|
||||
/// SignalR message for search status updates.
|
||||
/// </summary>
|
||||
public record SearchUpdate
|
||||
{
|
||||
public int Id { get; init; }
|
||||
public string Name { get; init; } = string.Empty;
|
||||
public string UserName { get; init; } = string.Empty;
|
||||
public string Status { get; init; } = string.Empty;
|
||||
public DateTime? SubmitDt { get; init; }
|
||||
public DateTime? StartDt { get; init; }
|
||||
public DateTime? EndDt { get; init; }
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace JdeScoping.Client.Models;
|
||||
|
||||
/// <summary>
|
||||
/// SignalR message for processor status updates.
|
||||
/// </summary>
|
||||
public record StatusUpdate
|
||||
{
|
||||
public string Message { get; init; } = string.Empty;
|
||||
public DateTime? Timestamp { get; init; }
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
namespace JdeScoping.Client.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Client-side view model for authenticated user information.
|
||||
/// Mirrors the server-side UserInfo model returned by /api/auth/login and /api/auth/me.
|
||||
/// </summary>
|
||||
public class UserInfoViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// User's login username.
|
||||
/// </summary>
|
||||
public string Username { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// User's first name.
|
||||
/// </summary>
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// User's last name.
|
||||
/// </summary>
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// User's display name (computed on server, provided here for convenience).
|
||||
/// </summary>
|
||||
public string DisplayName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// User's organization title.
|
||||
/// </summary>
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// User's email address.
|
||||
/// </summary>
|
||||
public string EmailAddress { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -6,17 +6,17 @@ namespace JdeScoping.Client.Models;
|
||||
/// </summary>
|
||||
public class ValidCombination
|
||||
{
|
||||
public int Id { get; init; }
|
||||
public string Name { get; init; } = string.Empty;
|
||||
public bool Timespan { get; init; }
|
||||
public bool WorkOrder { get; init; }
|
||||
public bool ItemNumber { get; init; }
|
||||
public bool ProfitCenter { get; init; }
|
||||
public bool WorkCenter { get; init; }
|
||||
public bool ComponentLot { get; init; }
|
||||
public bool Operator { get; init; }
|
||||
public bool ItemOperationMis { get; init; }
|
||||
public bool ExtractMis { get; init; }
|
||||
public int Id { get; private init; }
|
||||
public string Name { get; private init; } = string.Empty;
|
||||
public bool Timespan { get; private init; }
|
||||
public bool WorkOrder { get; private init; }
|
||||
public bool ItemNumber { get; private init; }
|
||||
public bool ProfitCenter { get; private init; }
|
||||
public bool WorkCenter { get; private init; }
|
||||
public bool ComponentLot { get; private init; }
|
||||
public bool Operator { get; private init; }
|
||||
public bool ItemOperationMis { get; private init; }
|
||||
public bool ExtractMis { get; private init; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the given filter flags match this combination.
|
||||
@@ -48,7 +48,7 @@ public class ValidCombination
|
||||
/// </summary>
|
||||
public static IReadOnlyList<ValidCombination> GetAll() =>
|
||||
[
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 10,
|
||||
Name = "Work Order",
|
||||
@@ -62,7 +62,7 @@ public class ValidCombination
|
||||
ItemOperationMis = false,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 20,
|
||||
Name = "Component Lot",
|
||||
@@ -76,7 +76,7 @@ public class ValidCombination
|
||||
ItemOperationMis = false,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 30,
|
||||
Name = "Time Span + Profit Center",
|
||||
@@ -90,7 +90,7 @@ public class ValidCombination
|
||||
ItemOperationMis = false,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 40,
|
||||
Name = "Time Span + Work Center",
|
||||
@@ -104,7 +104,7 @@ public class ValidCombination
|
||||
ItemOperationMis = false,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 50,
|
||||
Name = "Time Span + Operator",
|
||||
@@ -118,7 +118,7 @@ public class ValidCombination
|
||||
ItemOperationMis = false,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 60,
|
||||
Name = "Time Span + Profit Center + Item Number",
|
||||
@@ -132,7 +132,7 @@ public class ValidCombination
|
||||
ItemOperationMis = false,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 70,
|
||||
Name = "Time Span + Profit Center + Item/Operation/MIS",
|
||||
@@ -146,7 +146,7 @@ public class ValidCombination
|
||||
ItemOperationMis = true,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 80,
|
||||
Name = "Time Span + Profit Center + Work Order + Item/Operation/MIS",
|
||||
@@ -160,7 +160,7 @@ public class ValidCombination
|
||||
ItemOperationMis = true,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 90,
|
||||
Name = "Time Span + Profit Center + Extract MIS",
|
||||
@@ -174,7 +174,7 @@ public class ValidCombination
|
||||
ItemOperationMis = false,
|
||||
ExtractMis = true
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 100,
|
||||
Name = "Time Span + Work Center + Item Number",
|
||||
@@ -188,7 +188,7 @@ public class ValidCombination
|
||||
ItemOperationMis = false,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 110,
|
||||
Name = "Time Span + Work Center + Extract MIS",
|
||||
@@ -202,7 +202,7 @@ public class ValidCombination
|
||||
ItemOperationMis = false,
|
||||
ExtractMis = true
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 120,
|
||||
Name = "Time Span + Work Center + Item/Operation/MIS",
|
||||
@@ -216,7 +216,7 @@ public class ValidCombination
|
||||
ItemOperationMis = true,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 130,
|
||||
Name = "Time Span + Work Center + Work Order + Item/Operation/MIS",
|
||||
@@ -230,7 +230,7 @@ public class ValidCombination
|
||||
ItemOperationMis = true,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 140,
|
||||
Name = "Time Span + Item Number",
|
||||
@@ -244,7 +244,7 @@ public class ValidCombination
|
||||
ItemOperationMis = false,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 150,
|
||||
Name = "Time Span + Work Center + Operator",
|
||||
@@ -258,7 +258,7 @@ public class ValidCombination
|
||||
ItemOperationMis = false,
|
||||
ExtractMis = false
|
||||
},
|
||||
new ValidCombination
|
||||
new()
|
||||
{
|
||||
Id = 160,
|
||||
Name = "Time Span + Profit Center + Operator",
|
||||
|
||||
Reference in New Issue
Block a user