TidyLinker.com
TypeScript
Pull Request Merged
PR #163 merged: feat: Rebook button on completed jobs
Summary
- Surface the existing repost-as-draft flow as a one-click Rebook action on both the client job listing (
Client/Jobs/Index.tsx) and detail page (Client/Jobs/Show.tsx), so repeat clients can duplicate a previous booking without re-entering everything. - Underlying
RepostJobPostingaction is unchanged except it now also clearspreferred_date,preferred_timeandflexible_dateson the new draft so the client picks a fresh slot (carrying the old date over never makes sense for a rebook). ClientJobDataDTO now exposescan_repostwhenever a user is supplied (not just whendetailed: true), andJobController@indexpasses the user through so the listing rows know whether to show the button.
This is the surfacing-only interpretation of "Rebook" per Stu's clarification — a one-click duplicate of a completed booking that drops the client at wizard step six to review and republish. We did not add a "book the same cleaner directly, skip the quote stage" path — that's a separate, much larger ticket.
Test plan
-
php artisan test --filter=repost(15 passing — existing repost coverage + 2 new tests for date clearing and detail preservation) -
php artisan test tests/Feature/DataTransferObjects/ClientJobDataTest.php tests/Feature/Client/JobControllerTest.php(44 passing — confirms exposingcan_reposton the listing didn't break the existing JobController/DTO behaviour) -
vendor/bin/pint --dirtyclean -
prettier --checkclean -
eslintclean - Manual smoke: completed job in
My Jobsshows the Rebook button, click takes you to the post-job wizard at step six with services / address / property details copied and date fields blank - Manual smoke: cancelled job behaves the same (policy already allows repost for both Completed and Cancelled)
+147
additions
-5
deletions
8
files changed