Add quote-changed banner with re-sync to job details
When a source quote is edited after a job was created from it, the job details page now shows a warning banner with the date of the change and a link to the quote. Two actions are offered: - Re-sync from Quote: replaces all job items, coats, prep services, and pricing from the current quote. Only available while the job is still in a pre-production status (Pending, Quoted, Approved); hidden once shop work has started (InPreparation or beyond). - Dismiss: acknowledges the change without altering the job, clearing the banner by advancing the stored snapshot timestamp. Implemented via Job.QuoteSnapshotUpdatedAt (new nullable column), set at quote→job conversion time. The banner fires when quote.UpdatedAt exceeds this baseline. Migration: AddJobQuoteSnapshotUpdatedAt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,10 @@ public class Job : BaseEntity
|
||||
public int? IntakePartCount { get; set; }
|
||||
public string? IntakeCheckedByUserId { get; set; }
|
||||
|
||||
// Quote snapshot — UpdatedAt of the source quote at the moment this job was created from it.
|
||||
// Used to detect when the quote was subsequently edited so the job details page can warn the user.
|
||||
public DateTime? QuoteSnapshotUpdatedAt { get; set; }
|
||||
|
||||
// Rework tracking
|
||||
public bool IsReworkJob { get; set; }
|
||||
public int? OriginalJobId { get; set; } // Set when this job was created as a rework
|
||||
|
||||
Reference in New Issue
Block a user