mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-03 02:13:31 +00:00
* fix(migrations): make Phase6 completion slide-over migration idempotent Use IF EXISTS / IF COL_LENGTH guards and explicit EF migration metadata so partial environments can apply Phase 6 safely. * feat(locations): add sites options endpoint and vendor contactName Expose GET /api/locations/sites for the WO create wizard and include vendor contactName on dropdown responses. * feat(work-orders): add structured service notes POC and vendor fields Persist primary/extra services, service notes, free-text POC, and tech/vendor notes on create/patch/board/detail instead of embedding them in description. * fix(work-orders): make stacked tip build for CI quality gates * fix(work-orders): align stacked services with CI build * fix(work-orders): keep FlagColor out of structured-notes slice Remove FlagColor model/API/tests from this PR so schema and EF model stay aligned with the structured-fields migration. FlagColor remains in the follow-on PR that adds its migration. --------- Co-authored-by: Arthur Bassi <arthur.winiarski.ranger@outlook.com>
63 lines
2.9 KiB
C#
63 lines
2.9 KiB
C#
using Data.SeaHavenIndustries.Enums;
|
|
using SeaHaven.Services.Helpers;
|
|
|
|
namespace SeaHaven.Services.DTOs
|
|
{
|
|
/// <summary>
|
|
/// Payload for creating a board work order (SHOC create wizard).
|
|
/// FE follow-up: extend WorkOrderBoardCreatePayload + mapper with PrimaryService,
|
|
/// ExtraServices, ServiceNotes, PocName, PocPhone, VendorNotes, TechPhone; stop embedding
|
|
/// POC/vendor/service notes in description (pocNotes already exists). Prefer structured
|
|
/// fields; keep Trade+Description temporarily for legacy clients.
|
|
/// </summary>
|
|
public class WorkOrderBoardCreateRequestDto
|
|
{
|
|
public string? WoNumber { get; set; }
|
|
public WorkOrderType WorkOrderType { get; set; }
|
|
public string? SiteCode { get; set; }
|
|
public string? Description { get; set; }
|
|
/// <summary>Legacy alias for primary service; prefer <see cref="PrimaryService"/>.</summary>
|
|
public string? Trade { get; set; }
|
|
/// <summary>Primary service label; persisted as Trade / board pm.</summary>
|
|
public string? PrimaryService { get; set; }
|
|
public List<string>? ExtraServices { get; set; }
|
|
public string? ServiceNotes { get; set; }
|
|
public int? LocationId { get; set; }
|
|
public DateTime? DueDate { get; set; }
|
|
public string? AssignTo { get; set; }
|
|
public DateTime? ScheduledDate { get; set; }
|
|
public DateOnly? TargetWeek { get; set; }
|
|
public bool? ScheduleWeekOnly { get; set; }
|
|
public DocStatus? DocStatus { get; set; }
|
|
public int? VendorId { get; set; }
|
|
public DateTime? ApptDate { get; set; }
|
|
public string? ApptTime { get; set; }
|
|
public int? PocContactId { get; set; }
|
|
public string? PocName { get; set; }
|
|
public string? PocPhone { get; set; }
|
|
public string? PocNotes { get; set; }
|
|
public string? TechPhone { get; set; }
|
|
public string? VendorNotes { get; set; }
|
|
}
|
|
|
|
/// <summary>Advanced search / filter query for the board.</summary>
|
|
public class WorkOrderAdvancedSearchQueryDto
|
|
{
|
|
public int Page { get; set; } = 0;
|
|
public int PageSize { get; set; } = 100;
|
|
public string? Search { get; set; }
|
|
public WorkOrderAdvancedSearchDatePreset? DatePreset { get; set; }
|
|
public DateOnly? DateFrom { get; set; }
|
|
public DateOnly? DateTo { get; set; }
|
|
public List<string>? Sites { get; set; }
|
|
public List<WorkOrderType>? Types { get; set; }
|
|
public List<string>? Dispatchers { get; set; }
|
|
public List<LifecycleStatus>? Statuses { get; set; }
|
|
public List<string>? PmTypes { get; set; }
|
|
public List<int>? VendorIds { get; set; }
|
|
public List<DocStatus>? DocStatuses { get; set; }
|
|
public bool MyWorkOrders { get; set; }
|
|
public string? SortBy { get; set; }
|
|
public string? SortDir { get; set; }
|
|
}
|
|
}
|