fix(settings): drop obsolete label arg from RMM delete_lookup calls #234
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/mapps-227-ci-check"
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?
PR #198 (ConfirmDialog) reduced
delete_lookupto(id, base)by removing the nativeconfirm_delete(kind)step, while PR #211 (RMM admin UI) was branched off older main and still passes a third label argument ("connection", "device mapping", "alert rule"). Both landed on main, producing a semantic merge conflict: three RMM call sites in src/pages/settings.rs invoke the 2-argdelete_lookupwith 3 arguments, so the lib fails to compile (E0061) and breakscargo clippy/cargo testin check.yml. This branch inherited the breakage when it merged main.The label was only ever consumed by the now-deleted
confirm_delete; confirmation is handled by the ConfirmDialog component, so the argument is dead. Remove it from the three RMM call sites to match the other ten 2-arg callers. fmt, clippy (-D warnings), wasm32 check, and the 133 lib tests all pass.#MAPPS-227
Contract line items had full backend CRUD (POST /contracts/{id}/items, PUT/DELETE /contract-items/{id}) but the detail page's Line Items card was read-only: no Add, Edit, or Delete affordance. Combined with the edit form intentionally hiding its own item editor, there was no way to add, correct, or remove a contract's line items after creation, and the derived contract Value could not be adjusted. Add an "Add Item" action to the Line Items card header and make each row clickable, both opening a shared ContractItemFormModal that mirrors the create form's fields (name, type, quantity, unit price). New items POST to /contracts/{id}/items; editing an existing row PUTs to /contract-items/{id}; the modal retains the unexposed fields of the original row (description, included hours, rollover settings, sort_order) so a full-replace PUT does not wipe them. Delete uses the in-app ConfirmDialog (MAPPS-189), not window.confirm. On save or delete both the items table and the contract resource refresh so per-row totals and the Summary Value reflect the change. item_type options now come from a shared contract_item_type_options() helper used by both the create form and the detail modal so they stay in sync with the server's item_type CHECK set (MAPPS-190). The stale "edit flow manages items from the detail page" comment on ContractFormValues.items is corrected to describe the now-real detail-page management. #MAPPS-196Superseded: this PR bundles two things that are both already handled elsewhere - the RMM delete_lookup arity fix landed on main via #237, and the contracts line-items work here is byte-identical to the dedicated PR #209 (MAPPS-196). Closing in favour of #209 for the feature.
Pull request closed