Planning page for the first real draft-shift save phase. This phase still does not save anything. The draft-save gate remains the safety control.
Generated: Jun 5, 2026 12:14 AM
| Table | hd_draft_shifts |
| Exists | Yes |
| Rows | 5 |
| Score | 205 |
| Confidence | High |
| Note | Selected as the first-save target candidate for the implementation plan. 26A-4 does not write to it. |
| Step | Title | Status | Detail |
|---|---|---|---|
| 1 | Keep the save gate disabled by default | Required | Do not allow real writes unless HD_EMPLOYEE_SCHEDULE_DRAFT_SAVE_ENABLED is intentionally enabled later. |
| 2 | Reuse 26A-2 validation rules | Required | Validate employee_id, shift_date, start_time, end_time, period_id, role_position, and notes before any insert. |
| 3 | Insert only one draft shift | Ready to plan | The first real save phase should insert exactly one draft shift row and return a review result. |
| 4 | Never publish during draft save | Required | Draft save must not write to published tables or employee self-view data. |
| 5 | No employee notifications | Required | No texts or emails should be sent during draft save. |
| 6 | Add first-save audit after the first save works | Later | Audit can follow after the simplest save path is confirmed. |
| 7 | Add soft-conflict warning after first save | Later | Conflicts should remain review-only warnings until a later blocking module is intentionally approved. |
| Logical Field | Mapped Column | Status | Request Field | First Save Value | Action | Would Write Now? |
|---|---|---|---|---|---|---|
| employee_id | employee_id | Mapped | employee_id | validated integer employee_id | Include in first-save payload when gate is intentionally enabled. | No |
| shift_date | work_date | Mapped | shift_date | validated date shift_date | Include in first-save payload when gate is intentionally enabled. | No |
| start_time | starts_at | Mapped | start_time | validated HH:MM start_time | Include in first-save payload when gate is intentionally enabled. | No |
| end_time | ends_at | Mapped | end_time | validated HH:MM end_time | Include in first-save payload when gate is intentionally enabled. | No |
| period_id | schedule_period_id | Mapped | period_id | nullable validated integer period_id | Include in first-save payload when gate is intentionally enabled. | No |
| status | status | Mapped | system | draft | Include in first-save payload when gate is intentionally enabled. | No |
| role_position | role | Mapped | role_position | nullable validated string max 80 | Include in first-save payload when gate is intentionally enabled. | No |
| notes | Not detected | Optional Missing | notes | nullable validated string max 500 | Skip optional field in first real save. | No |
| created_by | created_by | Mapped | system | current authenticated user id when available | Include in first-save payload when gate is intentionally enabled. | No |
| updated_by | updated_by | Mapped | system | current authenticated user id when available | Include in first-save payload when gate is intentionally enabled. | No |
| Implementation plan only | Passed | 26A-4 creates no saving behavior. |
| No insert/update/delete | Passed | Controller performs no database write statements. |
| No publish action | Passed | Employee-facing schedule is not changed. |
| No employee notifications | Passed | No text/email behavior is introduced. |
| Gate remains disabled by default | Passed | HD_EMPLOYEE_SCHEDULE_DRAFT_SAVE_ENABLED remains the safety gate. |
| No hard conflict blocking | Passed | Soft conflicts remain review-only. |
| No production override | Passed | This is a separate builder implementation-plan route. |
| Table | Status | Rows | Score | Columns | Purpose | Note |
|---|---|---|---|---|---|---|
| hd_draft_shifts | Present | 5 | 205 | id, schedule_period_id, employee_id, work_date, starts_at, ends_at, role, location, area, status, has_soft_conflict, soft_conflict_summary, manager_notes, created_by, updated_by, created_at, updated_at, deleted_at | Preferred first real draft shift target. | Candidate inspected read-only. |
| hd_employee_schedule_shifts | Present | 2 | 80 | id, company_id, employee_id, role_id, schedule_date, starts_at, ends_at, scheduled_hours, shift_title, work_area, station_note, status, notes, created_by, updated_by, settings, created_at, updated_at | Possible employee schedule shift table. | Candidate inspected read-only. |
| hd_schedule_periods | Present | 2 | 40 | id, title, starts_on, ends_on, status, source, notes, created_by, updated_by, created_at, updated_at, deleted_at | Possible schedule period table, not a shift target. | Period table may support week selection but should not store individual draft shifts. |
| hd_schedule_shifts | Missing | 0 | 0 | Not detected | Possible generic schedule shift table. | Table missing. |
| hd_employee_schedules | Missing | 0 | 0 | Not detected | Possible schedule header/shift table. | Table missing. |
| hd_employee_schedule_periods | Missing | 0 | 0 | Not detected | Possible employee schedule period table, not a shift target. | Table missing. |
| hd_published_shifts | Present | 1 | 0 | id, published_schedule_period_id, source_schedule_period_id, source_draft_shift_id, employee_id, work_date, starts_at, ends_at, role, location, area, published_shift_status, source_had_soft_conflict, source_soft_conflict_summary, manager_notes, source_shift_payload, created_at, updated_at, deleted_at | Published shift table; should not be used by draft save. | Published table is not a draft-save target. |
| URI | Status | Action | Open |
|---|---|---|---|
| hd/employee-schedules/builder/draft-shift-implementation-plan | Found | GET App\Http\Controllers\Hd\EmployeeSchedules\EmployeeScheduleDraftShiftImplementationPlanController@index | Open |
| hd/employee-schedules/builder/draft-shift-column-mapping | Found | GET App\Http\Controllers\Hd\EmployeeSchedules\EmployeeScheduleDraftShiftColumnMappingController@index | Open |
| hd/employee-schedules/builder/draft-shift-validation | Found | GET App\Http\Controllers\Hd\EmployeeSchedules\EmployeeScheduleDraftShiftValidationController@index | Open |
| hd/employee-schedules/builder/draft-shifts/validate-no-write | Found | POST App\Http\Controllers\Hd\EmployeeSchedules\EmployeeScheduleDraftShiftValidationController@validateNoWrite | Open |
| hd/employee-schedules/builder/draft-shift-save-gate | Found | GET App\Http\Controllers\Hd\EmployeeSchedules\EmployeeScheduleDraftShiftSaveGateController@index | Open |
| hd/employee-schedules/builder/draft-shifts/disabled-save-stub | Found | POST App\Http\Controllers\Hd\EmployeeSchedules\EmployeeScheduleDraftShiftSaveGateController@disabledStore | Open |
| hd/employee-schedules/production | Found | GET App\Http\Controllers\Hd\EmployeeSchedules\EmployeeScheduleProductionRouteRescueController@index | Open |