docs: add XML documentation and ConfigManager implementation plans
Add comprehensive XML documentation (param/returns tags) across 132 source files to improve IntelliSense and API discoverability. Include ConfigManager design documents and implementation plans for phases 1-9.
This commit is contained in:
@@ -26,12 +26,18 @@ public static class ApiRoutes
|
||||
public const string Results = "{id:int}/results";
|
||||
|
||||
/// <summary>Builds the route to get a specific search.</summary>
|
||||
/// <param name="id">The search ID.</param>
|
||||
/// <returns>The formatted route.</returns>
|
||||
public static string GetById(int id) => $"api/search/{id}";
|
||||
|
||||
/// <summary>Builds the route to copy a search.</summary>
|
||||
/// <param name="id">The search ID to copy.</param>
|
||||
/// <returns>The formatted route.</returns>
|
||||
public static string GetCopy(int id) => $"api/search/{id}/copy";
|
||||
|
||||
/// <summary>Builds the route to get search results.</summary>
|
||||
/// <param name="id">The search ID.</param>
|
||||
/// <returns>The formatted route.</returns>
|
||||
public static string GetResults(int id) => $"api/search/{id}/results";
|
||||
}
|
||||
|
||||
@@ -56,15 +62,23 @@ public static class ApiRoutes
|
||||
public const string Operators = "api/lookup/operators";
|
||||
|
||||
/// <summary>Builds the route to find items with URL-encoded query.</summary>
|
||||
/// <param name="query">The search query to URL-encode.</param>
|
||||
/// <returns>The formatted route.</returns>
|
||||
public static string FindItems(string query) => $"{Items}?q={Uri.EscapeDataString(query)}";
|
||||
|
||||
/// <summary>Builds the route to find profit centers with URL-encoded query.</summary>
|
||||
/// <param name="query">The search query to URL-encode.</param>
|
||||
/// <returns>The formatted route.</returns>
|
||||
public static string FindProfitCenters(string query) => $"{ProfitCenters}?q={Uri.EscapeDataString(query)}";
|
||||
|
||||
/// <summary>Builds the route to find work centers with URL-encoded query.</summary>
|
||||
/// <param name="query">The search query to URL-encode.</param>
|
||||
/// <returns>The formatted route.</returns>
|
||||
public static string FindWorkCenters(string query) => $"{WorkCenters}?q={Uri.EscapeDataString(query)}";
|
||||
|
||||
/// <summary>Builds the route to find operators with URL-encoded query.</summary>
|
||||
/// <param name="query">The search query to URL-encode.</param>
|
||||
/// <returns>The formatted route.</returns>
|
||||
public static string FindOperators(string query) => $"{Operators}?q={Uri.EscapeDataString(query)}";
|
||||
}
|
||||
|
||||
@@ -131,6 +145,9 @@ public static class ApiRoutes
|
||||
public const string Base = "api/refresh-status";
|
||||
|
||||
/// <summary>Builds the route to get refresh status with date range.</summary>
|
||||
/// <param name="minDt">The minimum date (inclusive).</param>
|
||||
/// <param name="maxDt">The maximum date (inclusive).</param>
|
||||
/// <returns>The formatted route.</returns>
|
||||
public static string Get(DateTime minDt, DateTime maxDt) =>
|
||||
$"api/refresh-status?minDT={minDt:yyyy-MM-dd}&maxDT={maxDt:yyyy-MM-dd}";
|
||||
}
|
||||
@@ -153,12 +170,19 @@ public static class ApiRoutes
|
||||
public const string Executions = "{name}/executions";
|
||||
|
||||
/// <summary>Builds the route to get a specific pipeline config.</summary>
|
||||
/// <param name="name">The pipeline name to URL-encode.</param>
|
||||
/// <returns>The formatted route.</returns>
|
||||
public static string GetByName(string name) => $"api/pipelines/{Uri.EscapeDataString(name)}";
|
||||
|
||||
/// <summary>Builds the route to get pipeline status.</summary>
|
||||
/// <param name="name">The pipeline name to URL-encode.</param>
|
||||
/// <returns>The formatted route.</returns>
|
||||
public static string GetStatus(string name) => $"api/pipelines/{Uri.EscapeDataString(name)}/status";
|
||||
|
||||
/// <summary>Builds the route to get pipeline executions.</summary>
|
||||
/// <param name="name">The pipeline name to URL-encode.</param>
|
||||
/// <param name="count">The number of recent executions to retrieve.</param>
|
||||
/// <returns>The formatted route.</returns>
|
||||
public static string GetExecutions(string name, int count = 10) =>
|
||||
$"api/pipelines/{Uri.EscapeDataString(name)}/executions?count={count}";
|
||||
}
|
||||
|
||||
@@ -9,14 +9,19 @@ namespace JdeScoping.Core.ApiContracts;
|
||||
public interface IAuthApiClient
|
||||
{
|
||||
/// <summary>Gets the server's RSA public key for encrypting login credentials.</summary>
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
Task<ApiResult<PublicKeyResponse>> GetPublicKeyAsync(CancellationToken ct = default);
|
||||
|
||||
/// <summary>Authenticates with encrypted credentials.</summary>
|
||||
/// <param name="request">The encrypted login request containing credentials.</param>
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
Task<ApiResult<LoginResultModel>> LoginAsync(EncryptedLoginRequest request, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Logs out the current user.</summary>
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
Task<ApiResult<Unit>> LogoutAsync(CancellationToken ct = default);
|
||||
|
||||
/// <summary>Gets the current authenticated user's information.</summary>
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
Task<ApiResult<UserInfoDto>> GetCurrentUserAsync(CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -12,28 +12,48 @@ public interface IFileApiClient
|
||||
// Downloads (POST with existing data, returns Excel bytes)
|
||||
|
||||
/// <summary>Downloads work orders template, optionally pre-filled with existing data.</summary>
|
||||
/// <param name="existingData">Optional existing data to pre-fill the template.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<byte[]>> DownloadWorkOrdersTemplateAsync(IReadOnlyList<WorkOrderViewModel>? existingData = null, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Downloads items template, optionally pre-filled with existing data.</summary>
|
||||
/// <param name="existingData">Optional existing data to pre-fill the template.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<byte[]>> DownloadItemsTemplateAsync(IReadOnlyList<ItemViewModel>? existingData = null, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Downloads component lots template, optionally pre-filled with existing data.</summary>
|
||||
/// <param name="existingData">Optional existing data to pre-fill the template.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<byte[]>> DownloadComponentLotsTemplateAsync(IReadOnlyList<LotViewModel>? existingData = null, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Downloads part operations template, optionally pre-filled with existing data.</summary>
|
||||
/// <param name="existingData">Optional existing data to pre-fill the template.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<byte[]>> DownloadPartOperationsTemplateAsync(IReadOnlyList<PartOperationViewModel>? existingData = null, CancellationToken ct = default);
|
||||
|
||||
// Uploads (multipart form, returns parsed data)
|
||||
|
||||
/// <summary>Uploads work orders Excel file and returns parsed data.</summary>
|
||||
/// <param name="fileStream">The file stream to upload.</param>
|
||||
/// <param name="fileName">The name of the file being uploaded.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<IReadOnlyList<WorkOrderViewModel>>> UploadWorkOrdersAsync(Stream fileStream, string fileName, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Uploads items Excel file and returns parsed data.</summary>
|
||||
/// <param name="fileStream">The file stream to upload.</param>
|
||||
/// <param name="fileName">The name of the file being uploaded.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<IReadOnlyList<ItemViewModel>>> UploadItemsAsync(Stream fileStream, string fileName, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Uploads component lots Excel file and returns parsed data.</summary>
|
||||
/// <param name="fileStream">The file stream to upload.</param>
|
||||
/// <param name="fileName">The name of the file being uploaded.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<IReadOnlyList<LotViewModel>>> UploadComponentLotsAsync(Stream fileStream, string fileName, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Uploads part operations Excel file and returns parsed data.</summary>
|
||||
/// <param name="fileStream">The file stream to upload.</param>
|
||||
/// <param name="fileName">The name of the file being uploaded.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<IReadOnlyList<PartOperationViewModel>>> UploadPartOperationsAsync(Stream fileStream, string fileName, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -9,14 +9,22 @@ namespace JdeScoping.Core.ApiContracts;
|
||||
public interface ILookupApiClient
|
||||
{
|
||||
/// <summary>Finds items matching the search query.</summary>
|
||||
/// <param name="query">The search query to match against item data.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<IReadOnlyList<ItemViewModel>>> FindItemsAsync(string query, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Finds profit centers matching the search query.</summary>
|
||||
/// <param name="query">The search query to match against profit center data.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<IReadOnlyList<ProfitCenterViewModel>>> FindProfitCentersAsync(string query, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Finds work centers matching the search query.</summary>
|
||||
/// <param name="query">The search query to match against work center data.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<IReadOnlyList<WorkCenterViewModel>>> FindWorkCentersAsync(string query, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Finds operators (JDE users) matching the search query.</summary>
|
||||
/// <param name="query">The search query to match against operator data.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<IReadOnlyList<JdeUserViewModel>>> FindOperatorsAsync(string query, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -9,14 +9,22 @@ namespace JdeScoping.Core.ApiContracts;
|
||||
public interface IPipelineApiClient
|
||||
{
|
||||
/// <summary>Gets list of all available pipeline names.</summary>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<PipelineListResponse>> GetPipelineNamesAsync(CancellationToken ct = default);
|
||||
|
||||
/// <summary>Gets configuration for a specific pipeline.</summary>
|
||||
/// <param name="name">The pipeline name.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<PipelineConfigDto>> GetPipelineAsync(string name, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Gets schedule status for a pipeline.</summary>
|
||||
/// <param name="name">The pipeline name.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<PipelineStatusResponse>> GetStatusAsync(string name, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Gets recent execution history for a pipeline.</summary>
|
||||
/// <param name="name">The pipeline name.</param>
|
||||
/// <param name="count">The maximum number of executions to return.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<PipelineExecutionsResponse>> GetExecutionsAsync(string name, int count = 30, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -9,20 +9,30 @@ namespace JdeScoping.Core.ApiContracts;
|
||||
public interface ISearchApiClient
|
||||
{
|
||||
/// <summary>Gets all searches for the current user.</summary>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<IReadOnlyList<SearchViewModel>>> GetUserSearchesAsync(CancellationToken ct = default);
|
||||
|
||||
/// <summary>Gets all queued searches.</summary>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<IReadOnlyList<SearchViewModel>>> GetQueuedSearchesAsync(CancellationToken ct = default);
|
||||
|
||||
/// <summary>Gets a specific search by ID.</summary>
|
||||
/// <param name="id">The search identifier.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<SearchViewModel>> GetSearchAsync(int id, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Copies an existing search to create a new one (returns copy without persisting).</summary>
|
||||
/// <param name="id">The search identifier to copy.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<SearchViewModel>> CopySearchAsync(int id, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Creates and submits a new search.</summary>
|
||||
/// <param name="search">The search to create.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<int>> CreateSearchAsync(SearchViewModel search, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Downloads the results for a completed search as Excel bytes.</summary>
|
||||
/// <param name="id">The search identifier.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
Task<ApiResult<byte[]>> GetResultsAsync(int id, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ public readonly record struct ValidationError(IReadOnlyDictionary<string, string
|
||||
/// <summary>
|
||||
/// Creates a ValidationError from a dictionary of field errors.
|
||||
/// </summary>
|
||||
/// <param name="errors">Dictionary mapping field names to error message arrays.</param>
|
||||
/// <returns>A ValidationError containing the field errors.</returns>
|
||||
public static ValidationError FromDictionary(Dictionary<string, string[]> errors)
|
||||
=> new(errors);
|
||||
}
|
||||
|
||||
@@ -7,9 +7,15 @@ namespace JdeScoping.Core.Models.Auth;
|
||||
/// </summary>
|
||||
public class LoginModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the user's login username.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "Username is required")]
|
||||
public string Username { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user's login password.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "Password is required")]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
@@ -6,20 +6,34 @@ namespace JdeScoping.Core.Models.Infrastructure;
|
||||
/// </summary>
|
||||
public class DataUpdateDto
|
||||
{
|
||||
/// <summary>The start time of the data update.</summary>
|
||||
public DateTime StartDt { get; set; }
|
||||
/// <summary>The end time of the data update.</summary>
|
||||
public DateTime? EndDt { get; set; }
|
||||
|
||||
/// <summary>The number of branch records updated.</summary>
|
||||
public int BranchRecords { get; set; }
|
||||
/// <summary>The number of profit center records updated.</summary>
|
||||
public int ProfitCenterRecords { get; set; }
|
||||
/// <summary>The number of work center records updated.</summary>
|
||||
public int WorkCenterRecords { get; set; }
|
||||
/// <summary>The number of organizational hierarchy records updated.</summary>
|
||||
public int OrgHierarchyRecords { get; set; }
|
||||
/// <summary>The number of status code records updated.</summary>
|
||||
public int StatusCodeRecords { get; set; }
|
||||
/// <summary>The number of user records updated.</summary>
|
||||
public int UserRecords { get; set; }
|
||||
/// <summary>The number of item records updated.</summary>
|
||||
public int ItemRecords { get; set; }
|
||||
/// <summary>The number of lot records updated.</summary>
|
||||
public int LotRecords { get; set; }
|
||||
/// <summary>The number of work order records updated.</summary>
|
||||
public int WorkOrderRecords { get; set; }
|
||||
/// <summary>The number of work order step records updated.</summary>
|
||||
public int WorkOrderStepRecords { get; set; }
|
||||
/// <summary>The number of work order component records updated.</summary>
|
||||
public int WorkOrderComponentRecords { get; set; }
|
||||
|
||||
/// <summary>Whether the data update was successful.</summary>
|
||||
public bool WasSuccessful { get; set; }
|
||||
}
|
||||
|
||||
@@ -5,16 +5,28 @@ namespace JdeScoping.Core.Models.SearchResults;
|
||||
/// </summary>
|
||||
public sealed class MisNonMatchSearchResult
|
||||
{
|
||||
/// <summary>The work center code.</summary>
|
||||
public string WorkCenterCode { get; init; } = string.Empty;
|
||||
/// <summary>The work order number.</summary>
|
||||
public long WorkOrderNumber { get; init; }
|
||||
/// <summary>The work order start date.</summary>
|
||||
public DateTime WorkOrderStartDate { get; init; }
|
||||
/// <summary>The job step number.</summary>
|
||||
public decimal JobStepNumber { get; init; }
|
||||
/// <summary>The job step description.</summary>
|
||||
public string JobStepDescription { get; init; } = string.Empty;
|
||||
/// <summary>The job step end date.</summary>
|
||||
public DateTime? JobStepEndDate { get; init; }
|
||||
/// <summary>The function code.</summary>
|
||||
public string FunctionCode { get; init; } = string.Empty;
|
||||
/// <summary>Indicates whether the job step was added.</summary>
|
||||
public bool WasJobStepAdded { get; init; }
|
||||
/// <summary>The matched job step number, if any.</summary>
|
||||
public decimal? MatchedJobStepNumber { get; init; }
|
||||
/// <summary>The item number.</summary>
|
||||
public string ItemNumber { get; init; } = string.Empty;
|
||||
/// <summary>The item description.</summary>
|
||||
public string ItemDescription { get; init; } = string.Empty;
|
||||
/// <summary>The routing type.</summary>
|
||||
public string RoutingType { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
@@ -5,23 +5,42 @@ namespace JdeScoping.Core.Models.SearchResults;
|
||||
/// </summary>
|
||||
public sealed class MisSearchResult
|
||||
{
|
||||
/// <summary>The item number.</summary>
|
||||
public string ItemNumber { get; init; } = string.Empty;
|
||||
/// <summary>The item description.</summary>
|
||||
public string ItemDescription { get; init; } = string.Empty;
|
||||
/// <summary>The sequence number.</summary>
|
||||
public string SequenceNumber { get; init; } = string.Empty;
|
||||
/// <summary>The MIS (Manufacturing Instruction Sheet) number.</summary>
|
||||
public string MisNumber { get; init; } = string.Empty;
|
||||
/// <summary>The revision ID.</summary>
|
||||
public string RevId { get; init; } = string.Empty;
|
||||
/// <summary>The status.</summary>
|
||||
public string Status { get; init; } = string.Empty;
|
||||
/// <summary>The release date.</summary>
|
||||
public DateTime? ReleaseDate { get; init; }
|
||||
/// <summary>The branch code.</summary>
|
||||
public string BranchCode { get; init; } = string.Empty;
|
||||
/// <summary>The job step sequence number.</summary>
|
||||
public decimal JobStepSequenceNumber { get; init; }
|
||||
/// <summary>The matched sequence number.</summary>
|
||||
public decimal? MatchedSequenceNumber { get; init; }
|
||||
/// <summary>Whether the routing matches.</summary>
|
||||
public bool RoutingMatch { get; init; }
|
||||
/// <summary>Whether the master matches.</summary>
|
||||
public bool MasterMatch { get; init; }
|
||||
/// <summary>The function operation description.</summary>
|
||||
public string FunctionOperationDescription { get; init; } = string.Empty;
|
||||
/// <summary>The character number.</summary>
|
||||
public string CharNumber { get; init; } = string.Empty;
|
||||
/// <summary>The test description.</summary>
|
||||
public string TestDescription { get; init; } = string.Empty;
|
||||
/// <summary>The sampling type.</summary>
|
||||
public string SamplingType { get; init; } = string.Empty;
|
||||
/// <summary>The sampling value.</summary>
|
||||
public string SamplingValue { get; init; } = string.Empty;
|
||||
/// <summary>The tools and gauges required.</summary>
|
||||
public string ToolsGauges { get; init; } = string.Empty;
|
||||
/// <summary>The work instructions.</summary>
|
||||
public string WorkInstructions { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
@@ -5,15 +5,25 @@ namespace JdeScoping.Core.Models.SearchResults;
|
||||
/// </summary>
|
||||
public class SearchModel
|
||||
{
|
||||
/// <summary>The unique identifier for the search.</summary>
|
||||
public int Id { get; set; }
|
||||
/// <summary>The username of the user who submitted the search.</summary>
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
/// <summary>The name of the search.</summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
/// <summary>The date and time the search was submitted.</summary>
|
||||
public DateTime? SubmitDt { get; set; }
|
||||
/// <summary>The date and time when search execution started.</summary>
|
||||
public DateTime? StartDt { get; set; }
|
||||
/// <summary>The date and time when search execution ended.</summary>
|
||||
public DateTime? EndDt { get; set; }
|
||||
/// <summary>Indicates whether MIS data extraction is enabled for this search.</summary>
|
||||
public bool ExtractMisData { get; set; }
|
||||
|
||||
/// <summary>The main search results.</summary>
|
||||
public List<SearchResult> Results { get; set; } = [];
|
||||
/// <summary>The MIS-specific search results.</summary>
|
||||
public List<MisSearchResult> MisResults { get; set; } = [];
|
||||
/// <summary>The MIS non-match investigation results.</summary>
|
||||
public List<MisNonMatchSearchResult> MisNonMatchResults { get; set; } = [];
|
||||
}
|
||||
|
||||
@@ -5,30 +5,119 @@ namespace JdeScoping.Core.Models.SearchResults;
|
||||
/// </summary>
|
||||
public sealed class SearchResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Work order number.
|
||||
/// </summary>
|
||||
public long WorkOrderNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Branch code for the work order.
|
||||
/// </summary>
|
||||
public string WorkOrderBranchCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Lot number.
|
||||
/// </summary>
|
||||
public string LotNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Item number.
|
||||
/// </summary>
|
||||
public string ItemNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Planning family.
|
||||
/// </summary>
|
||||
public string PlanningFamily { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Stocking type.
|
||||
/// </summary>
|
||||
public string StockingType { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Order quantity.
|
||||
/// </summary>
|
||||
public decimal OrderQuantity { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Held quantity.
|
||||
/// </summary>
|
||||
public decimal HeldQuantity { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Scrapped quantity.
|
||||
/// </summary>
|
||||
public decimal ScrappedQuantity { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Shipped quantity.
|
||||
/// </summary>
|
||||
public decimal ShippedQuantity { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Branch code for the step.
|
||||
/// </summary>
|
||||
public string StepBranchCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Step number.
|
||||
/// </summary>
|
||||
public decimal StepNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Description of the step.
|
||||
/// </summary>
|
||||
public string StepDescription { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Function operation description.
|
||||
/// </summary>
|
||||
public string FunctionOperationDescription { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Step update date and time.
|
||||
/// </summary>
|
||||
public DateTime StepUpdateDt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Status code.
|
||||
/// </summary>
|
||||
public string StatusCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Status description.
|
||||
/// </summary>
|
||||
public string StatusDescription { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Status update date and time.
|
||||
/// </summary>
|
||||
public DateTime? StatusUpdateDt { get; init; }
|
||||
|
||||
// Inclusion flags
|
||||
/// <summary>
|
||||
/// Indicates if manually specified in search criteria.
|
||||
/// </summary>
|
||||
public bool ManuallySpecified { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if part of a split order.
|
||||
/// </summary>
|
||||
public bool SplitOrder { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if flagged for cardex inclusion.
|
||||
/// </summary>
|
||||
public bool Cardex { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if included via parts list.
|
||||
/// </summary>
|
||||
public bool PartsList { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if flagged for inclusion.
|
||||
/// </summary>
|
||||
public bool Flagged { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -8,9 +8,17 @@ namespace JdeScoping.Core.ViewModels;
|
||||
/// </summary>
|
||||
public class ComponentLotViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the lot number.
|
||||
/// </summary>
|
||||
public string LotNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the item number.
|
||||
/// </summary>
|
||||
public string ItemNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj is ComponentLotViewModel other)
|
||||
@@ -20,5 +28,6 @@ public class ComponentLotViewModel
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override int GetHashCode() => HashCode.Combine(LotNumber, ItemNumber);
|
||||
}
|
||||
|
||||
@@ -5,10 +5,22 @@ namespace JdeScoping.Core.ViewModels;
|
||||
/// </summary>
|
||||
public class OperatorViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the operator's address number.
|
||||
/// </summary>
|
||||
public long AddressNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the operator's user ID.
|
||||
/// </summary>
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the operator's full name.
|
||||
/// </summary>
|
||||
public string FullName { get; set; } = string.Empty;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj is OperatorViewModel other)
|
||||
@@ -18,5 +30,6 @@ public class OperatorViewModel
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override int GetHashCode() => UserId.GetHashCode();
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ public static class ViewModelExtensions
|
||||
/// <summary>
|
||||
/// Converts an Item to ItemViewModel
|
||||
/// </summary>
|
||||
/// <param name="item">The item to convert.</param>
|
||||
/// <returns>An ItemViewModel containing the item data.</returns>
|
||||
public static ItemViewModel ToViewModel(this Item item)
|
||||
{
|
||||
return new ItemViewModel
|
||||
@@ -25,6 +27,8 @@ public static class ViewModelExtensions
|
||||
/// <summary>
|
||||
/// Converts a ProfitCenter to ProfitCenterViewModel
|
||||
/// </summary>
|
||||
/// <param name="profitCenter">The profit center to convert.</param>
|
||||
/// <returns>A ProfitCenterViewModel containing the profit center data.</returns>
|
||||
public static ProfitCenterViewModel ToViewModel(this ProfitCenter profitCenter)
|
||||
{
|
||||
return new ProfitCenterViewModel
|
||||
@@ -37,6 +41,8 @@ public static class ViewModelExtensions
|
||||
/// <summary>
|
||||
/// Converts a WorkCenter to WorkCenterViewModel
|
||||
/// </summary>
|
||||
/// <param name="workCenter">The work center to convert.</param>
|
||||
/// <returns>A WorkCenterViewModel containing the work center data.</returns>
|
||||
public static WorkCenterViewModel ToViewModel(this WorkCenter workCenter)
|
||||
{
|
||||
return new WorkCenterViewModel
|
||||
@@ -49,6 +55,8 @@ public static class ViewModelExtensions
|
||||
/// <summary>
|
||||
/// Converts a JdeUser to JdeUserViewModel
|
||||
/// </summary>
|
||||
/// <param name="user">The JDE user to convert.</param>
|
||||
/// <returns>A JdeUserViewModel containing the user data.</returns>
|
||||
public static JdeUserViewModel ToViewModel(this JdeUser user)
|
||||
{
|
||||
return new JdeUserViewModel
|
||||
@@ -62,6 +70,8 @@ public static class ViewModelExtensions
|
||||
/// <summary>
|
||||
/// Converts a WorkOrder to WorkOrderViewModel
|
||||
/// </summary>
|
||||
/// <param name="workOrder">The work order to convert.</param>
|
||||
/// <returns>A WorkOrderViewModel containing the work order data.</returns>
|
||||
public static WorkOrderViewModel ToViewModel(this WorkOrder workOrder)
|
||||
{
|
||||
return new WorkOrderViewModel
|
||||
@@ -74,6 +84,8 @@ public static class ViewModelExtensions
|
||||
/// <summary>
|
||||
/// Converts a Lot to LotViewModel
|
||||
/// </summary>
|
||||
/// <param name="lot">The lot to convert.</param>
|
||||
/// <returns>A LotViewModel containing the lot data.</returns>
|
||||
public static LotViewModel ToViewModel(this Lot lot)
|
||||
{
|
||||
return new LotViewModel
|
||||
|
||||
Reference in New Issue
Block a user