fix pubilsh job posting

This commit is contained in:
2026-08-14 18:01:43 +05:30
parent 4fdfb90326
commit b349f2db61
3 changed files with 76 additions and 13 deletions

View File

@@ -462,7 +462,9 @@ export function positionCreatedReply(position) {
const isDraft = position.status === 'draft';
return doc(
text(isDraft ? 'Saved as a draft.' : 'Position created successfully.'),
/* Draft and published are different outcomes, so they are named
differently: one was saved, the other went live. */
text(isDraft ? 'Saved as a draft.' : 'Position published successfully.'),
list([
position.company,
position.title,
@@ -493,9 +495,17 @@ export function positionFailedReply() {
* no navigation, and the same answer as asking it by hand.
*/
export const createdFollowUp = (position) => (position.status === 'draft'
/* A draft is unfinished, so the way on is the form that finishes it — the
same route the Positions card's Continue uses. */
? [{ label: 'Continue to save', route: `/admin/positions/new?draft=${encodeURIComponent(position.id)}` }]
/**
* A saved draft offers no action, and that is the fix.
*
* This used to offer "Continue to save", routing back to the Create Position
* form. It made the completed state look unfinished: the reader had just been
* told the position was saved, and was immediately asked to save it again —
* by a button that put them back in the form they had just left. The write
* has happened, the record exists with `status: draft`, and the way to finish
* a draft later is its own card on the Positions list.
*/
? []
: [
{ label: 'View position', route: `/admin/positions/${position.id}` },
{ label: 'Match candidates', prompt: `Who matches ${position.title}?` },