feat: add undo toast for skip, apply, and status moves
Accidental skips and status changes can be reversed within a few seconds via toast Undo, including bulk actions and keyboard shortcuts.
This commit is contained in:
@@ -322,7 +322,8 @@ export interface UpdateJobInput {
|
||||
selectedProjectIds?: string;
|
||||
pdfPath?: string;
|
||||
tracerLinksEnabled?: boolean;
|
||||
appliedAt?: string;
|
||||
/** Pass `null` to clear (e.g. undo mark-as-applied). */
|
||||
appliedAt?: string | null;
|
||||
coverLetter?: string | null;
|
||||
sponsorMatchScore?: number;
|
||||
sponsorMatchNames?: string;
|
||||
|
||||
@@ -66,11 +66,22 @@ export type JobActionRequest =
|
||||
};
|
||||
};
|
||||
|
||||
/** Snapshot used by client Undo toasts after skip / apply / move. */
|
||||
export type JobStatusRestore = {
|
||||
jobId: string;
|
||||
status: Job["status"];
|
||||
};
|
||||
|
||||
export type JobActionResult =
|
||||
| {
|
||||
jobId: string;
|
||||
ok: true;
|
||||
job: Job;
|
||||
/** Present when the action can be reversed (e.g. skip). */
|
||||
undo?: {
|
||||
previousStatus: Job["status"];
|
||||
alsoSkipped?: JobStatusRestore[];
|
||||
};
|
||||
}
|
||||
| {
|
||||
jobId: string;
|
||||
|
||||
Reference in New Issue
Block a user