BDMS-879: Well detail edit panel and project assignment#300
Conversation
…n live in one place.
Preview DeploymentPreview URL: https://preview-bdms-879-project-editing-panel-auejgdbofq-uc.a.run.app Note: This preview uses the staging API endpoints. |
…ews. Shared header layout for Projects, Contacts, and Wells; edit panel scrolls independently with sticky chrome; project dropdown is shorter and alphabetical; status chips sit tighter when they wrap.
…ile the panel stays fixed.
…simple flex column.
Preview DeploymentPreview URL: https://preview-bdms-879-project-editing-panel-auejgdbofq-uc.a.run.app Note: This preview uses the staging API endpoints. |
Show optimistic chip changes on add/remove and wait for the details query to refetch before clearing spinners, so the UI does not go idle while the list is still stale.
Preview DeploymentPreview URL: https://preview-bdms-879-project-editing-panel-auejgdbofq-uc.a.run.app Note: This preview uses the staging API endpoints. |
…appens visibly when refetch finishes
Preview DeploymentPreview URL: https://preview-bdms-879-project-editing-panel-auejgdbofq-uc.a.run.app Note: This preview uses the staging API endpoints. |
Project add/remove updates local draft state only; Save applies the diff, refetches well details, and closes the panel. Unsaved close prompts to discard.
|
Like the change you implemented, this looks great to me!
|
Preview DeploymentPreview URL: https://preview-bdms-879-project-editing-panel-auejgdbofq-uc.a.run.app Note: This preview uses the staging API endpoints. |
Add the alert-dialog UI component and swap the discard prompt in the well edit panel from Dialog to AlertDialog with a compact max width.
Preview DeploymentPreview URL: https://preview-bdms-879-project-editing-panel-auejgdbofq-uc.a.run.app Note: This preview uses the staging API endpoints. |
1 similar comment
Preview DeploymentPreview URL: https://preview-bdms-879-project-editing-panel-auejgdbofq-uc.a.run.app Note: This preview uses the staging API endpoints. |
|
@lizalino There are a few updates:
|
chasetmartin
left a comment
There was a problem hiding this comment.
Looks great! The behavior was as expected in my testing - great confirmation dialog when the user edits but hasn't saved. I just have one minor code comment that should not block merging.
|
|
||
| setIsSaving(true) | ||
|
|
||
| try { |
There was a problem hiding this comment.
To be consistent with our other new data mutation requests (the asset upload dialog), should we use Refine's useCustomMutation hook to hit the custom data provider endpoint? I believe the main advantage would be the ability to use the isPending state from the hook to manage some of the saving states that are hand-rolled here (they work just fine in my testing, nicely done)
There was a problem hiding this comment.
Fix that! Thank you for catching that.
Matches the attachment upload pattern and drives saving state from mutation.isPending instead of hand-rolled isSaving.
Preview DeploymentPreview URL: https://preview-bdms-879-project-editing-panel-auejgdbofq-uc.a.run.app Note: This preview uses the staging API endpoints. |


Relies on this API change to be out first: DataIntegrationGroup/OcotilloAPI#729
What is changing
useWellDetailsfor centralized well detail fetching and cache invalidation after project changesuseSidebarPanelSync)localStorage)OcotilloPageHeader(Projects, Contacts, Wells)0.75remfont, tighter padding, vertical alignment with the well ID)SHOW_EXAMPLE_NAVinconfig/navigation.ts(Data Grid routes remain; set flag totrueto restore sidebar link)useIsMobilefor CI/tests whenwindow.matchMediais unavailableThis branch also includes merged work from the projects list/navigation branch (BDMS-876), the Data Grid example page scaffold, and a merge from
staging(Tyler’s attachment upload on well detail).API dependency: Project add/remove calls
POST/DELETE /group/{group_id}/things/{thing_id}. Requires OcotilloAPI #729 deployed to staging before those mutations work in preview/staging.Test plan
AttachmentsCardwiththingId)npm run test:run -- src/test/pages/well-show.test.tsx