fix(rate-cards): wire /rate-cards/new to create form and explain disabled Add Rate #223

Merged
nrupard merged 2 commits from fix/mapps-217-rate-card-create-route-disabled-styling into main 2026-06-16 16:51:01 +02:00
Owner

Hitting /rate-cards/new previously matched the /rate-cards/:id detail route with id "new", which loaded nothing and rendered "Could not load rate card." Add a static /rate-cards/new route (declared before :id so it is not parsed as an id) that renders the list page with the create modal open via a new open_create prop, giving the URL a working create form. The route maps to the Rate Cards nav section so the sidebar stays highlighted.

The "Add Rate" button is disabled when there are no work types left to add, but nothing told the user why. Add an optional title tooltip prop to the shared Button component and set it on the disabled Add Rate button, explaining whether no work types are defined or every work type already has a rate. The Button base class already carries disabled:opacity-50 disabled:cursor-not-allowed, so the greyed-out look plus the tooltip now read as disabled rather than broken.

The create entry point on the list ("New Rate Card") and the disabled styling already existed; this fills the remaining navigation and affordance gaps from the issue.

#MAPPS-217

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Hitting `/rate-cards/new` previously matched the `/rate-cards/:id` detail route with id "new", which loaded nothing and rendered "Could not load rate card." Add a static `/rate-cards/new` route (declared before `:id` so it is not parsed as an id) that renders the list page with the create modal open via a new `open_create` prop, giving the URL a working create form. The route maps to the Rate Cards nav section so the sidebar stays highlighted. The "Add Rate" button is disabled when there are no work types left to add, but nothing told the user why. Add an optional `title` tooltip prop to the shared Button component and set it on the disabled Add Rate button, explaining whether no work types are defined or every work type already has a rate. The Button base class already carries `disabled:opacity-50 disabled:cursor-not-allowed`, so the greyed-out look plus the tooltip now read as disabled rather than broken. The create entry point on the list ("New Rate Card") and the disabled styling already existed; this fills the remaining navigation and affordance gaps from the issue. #MAPPS-217 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(rate-cards): wire /rate-cards/new to create form and explain disabled Add Rate
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 58s
1318bf6680
Hitting `/rate-cards/new` previously matched the `/rate-cards/:id` detail route with id "new", which loaded nothing and rendered "Could not load rate card." Add a static `/rate-cards/new` route (declared before `:id` so it is not parsed as an id) that renders the list page with the create modal open via a new `open_create` prop, giving the URL a working create form. The route maps to the Rate Cards nav section so the sidebar stays highlighted.

The "Add Rate" button is disabled when there are no work types left to add, but nothing told the user why. Add an optional `title` tooltip prop to the shared Button component and set it on the disabled Add Rate button, explaining whether no work types are defined or every work type already has a rate. The Button base class already carries `disabled:opacity-50 disabled:cursor-not-allowed`, so the greyed-out look plus the tooltip now read as disabled rather than broken.

The create entry point on the list ("New Rate Card") and the disabled styling already existed; this fills the remaining navigation and affordance gaps from the issue.

#MAPPS-217

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(rate-cards): show the disabled Add Rate reason as visible helper text
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m4s
Create release / Create release from merged PR (pull_request) Has been skipped
702f103589
The disabled reason was delivered only via a `title` tooltip on the disabled Add Rate button. Browsers such as Chrome suppress pointer events (and the title tooltip) on a disabled <button>, so the explanation never appeared exactly when it was needed. Render the reason as small helper text beneath the button whenever it is disabled, which works in every browser without a hover; keep the tooltip as a bonus for browsers that do show it.

#MAPPS-217
nrupard deleted branch fix/mapps-217-rate-card-create-route-disabled-styling 2026-06-16 16:51:01 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!223
No description provided.