mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-05 14:12:09 +00:00
Add vendor scheduled date to dispatch workflow
- Add ScheduledDate field to Dispatch model and DTO - Save scheduled date when dispatching to vendor - Include ScheduledDate in dispatch response projections
This commit is contained in:
parent
d24c4643f5
commit
ee69a1863a
6 changed files with 2517 additions and 0 deletions
|
|
@ -648,6 +648,7 @@ namespace Api.SeaHavenIndustries.Controllers
|
||||||
d.NTEAmount,
|
d.NTEAmount,
|
||||||
d.Description,
|
d.Description,
|
||||||
d.Status,
|
d.Status,
|
||||||
|
d.ScheduledDate,
|
||||||
d.DispatchedAt,
|
d.DispatchedAt,
|
||||||
d.EmailSent,
|
d.EmailSent,
|
||||||
vendorName = d.Vendor != null ? d.Vendor.CompanyName : "",
|
vendorName = d.Vendor != null ? d.Vendor.CompanyName : "",
|
||||||
|
|
@ -1034,6 +1035,7 @@ namespace Api.SeaHavenIndustries.Controllers
|
||||||
NTEAmount = model.NTEAmount,
|
NTEAmount = model.NTEAmount,
|
||||||
Description = model.Description,
|
Description = model.Description,
|
||||||
Status = "Sent",
|
Status = "Sent",
|
||||||
|
ScheduledDate = model.ScheduledDate,
|
||||||
DispatchedAt = DateTime.UtcNow,
|
DispatchedAt = DateTime.UtcNow,
|
||||||
ReplyToAddress = replyTo
|
ReplyToAddress = replyTo
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ namespace Api.SeaHavenIndustries.DTOs
|
||||||
public int WorkOrderId { get; set; }
|
public int WorkOrderId { get; set; }
|
||||||
public List<int> VendorIds { get; set; } = new();
|
public List<int> VendorIds { get; set; } = new();
|
||||||
public decimal? NTEAmount { get; set; }
|
public decimal? NTEAmount { get; set; }
|
||||||
|
public DateTime? ScheduledDate { get; set; }
|
||||||
public string? Description { get; set; }
|
public string? Description { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2481
Data.SeaHavenIndustries/Migrations/20260417154641_AddDispatchScheduledDate.Designer.cs
generated
Normal file
2481
Data.SeaHavenIndustries/Migrations/20260417154641_AddDispatchScheduledDate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,29 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Data.SeaHavenIndustries.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddDispatchScheduledDate : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "ScheduledDate",
|
||||||
|
table: "Dispatches",
|
||||||
|
type: "datetime2",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ScheduledDate",
|
||||||
|
table: "Dispatches");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -671,6 +671,9 @@ namespace Data.SeaHavenIndustries.Migrations
|
||||||
b.Property<string>("ReplyToAddress")
|
b.Property<string>("ReplyToAddress")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("ScheduledDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<string>("Status")
|
b.Property<string>("Status")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ namespace Data.SeaHavenIndustries
|
||||||
public decimal? NTEAmount { get; set; }
|
public decimal? NTEAmount { get; set; }
|
||||||
public string? Description { get; set; }
|
public string? Description { get; set; }
|
||||||
public string? Status { get; set; }
|
public string? Status { get; set; }
|
||||||
|
public DateTime? ScheduledDate { get; set; }
|
||||||
public DateTime? DispatchedAt { get; set; }
|
public DateTime? DispatchedAt { get; set; }
|
||||||
public bool EmailSent { get; set; }
|
public bool EmailSent { get; set; }
|
||||||
public string? ReplyToAddress { get; set; }
|
public string? ReplyToAddress { get; set; }
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue