feat(time): editable time entries (MAPPS-166) #159
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/mapps-166-editable-time-entries"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
MAPPS-166: time entries were read-only on the list. The server already supports
PUT/DELETE /time-entries/{id}, so this wires up the client.TimeEntryEditModal.DELETE /time-entries/{id}.RemoteTimeEntrygainsid/work_type_id/task_id(andPartialEq) so a row can be edited; the list stores the selected entry by value.Work item left fixed (deliberate)
The server's update SQL direct-sets
ticket_id/project_id/task_id(noCOALESCE) and never recomputescompany_id. So:company_id), andticket_id/project_id/task_idon every save, so the partial-looking update doesn't null them.To move an entry to a different work item, delete it and log again. (
start_time/end_time/hourly_rateare preserved server-side via.or(current), so they're not sent.)Notes
cargo clippy --all-targets -- -D warnings) gates. A reviewer pass found no compile/clippy issues.Test plan
MAPPS-166. Time entries were read-only on the list (the server already supports PUT/DELETE /time-entries/{id}). Make list rows click-to-edit, opening a modal that edits the common fields - work type, hours, date, description, billable - plus delete. The modal reuses the server's update endpoint. Because that PUT direct-sets ticket_id/project_id/task_id (no COALESCE) and never recomputes company_id, the edit form intentionally keeps the work item and task fixed and re-sends their ids so a partial-looking update does not null them; to move an entry to a different work item, delete it and log again. RemoteTimeEntry gains id/work_type_id/task_id (and PartialEq) so a row can be edited. Not compiled locally (no Rust toolchain in this environment); mirrors the existing Log Time form and the task/rate-card edit modals, and is gated by CI (cargo clippy --all-targets -- -D warnings). #MAPPS-166 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>