feat(assets): add add/delete credential UI to asset detail #245

Merged
David merged 2 commits from feat/MAPPS-231-asset-credential-add-delete into main 2026-06-17 12:46:59 +02:00
Owner

The Credentials card on the asset detail page rendered only a "Reveal" button per credential, so a technician could not add or remove an asset credential from the UI even though the vault endpoints support it. The server exposes create (POST /assets/{id}/credentials) and delete (DELETE /credentials/{id}); there is no update endpoint (the audit log records only credential_created / credential_deleted), so credentials are add/remove only and editing is intentionally out of scope.

Add an "Add" action in the Credentials card header that opens a modal posting name / type / username / password / optional url / optional notes to the create endpoint, validating a required, 100-char-capped Name and required type/username/password inline (mirroring the asset create/edit forms and the server's CreateCredentialRequest limits) and routing server-flagged name/url messages to their fields. Add a per-credential Delete button that opens the styled ConfirmDialog and fires the delete on confirm. Both actions refresh the credentials list and audit log on success.

#MAPPS-231

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

The Credentials card on the asset detail page rendered only a "Reveal" button per credential, so a technician could not add or remove an asset credential from the UI even though the vault endpoints support it. The server exposes create (POST /assets/{id}/credentials) and delete (DELETE /credentials/{id}); there is no update endpoint (the audit log records only credential_created / credential_deleted), so credentials are add/remove only and editing is intentionally out of scope. Add an "Add" action in the Credentials card header that opens a modal posting name / type / username / password / optional url / optional notes to the create endpoint, validating a required, 100-char-capped Name and required type/username/password inline (mirroring the asset create/edit forms and the server's CreateCredentialRequest limits) and routing server-flagged name/url messages to their fields. Add a per-credential Delete button that opens the styled ConfirmDialog and fires the delete on confirm. Both actions refresh the credentials list and audit log on success. #MAPPS-231 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(assets): add add/delete credential UI to asset detail
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 2m26s
c34130fdf4
The Credentials card on the asset detail page rendered only a "Reveal" button per credential, so a technician could not add or remove an asset credential from the UI even though the vault endpoints support it. The server exposes create (POST /assets/{id}/credentials) and delete (DELETE /credentials/{id}); there is no update endpoint (the audit log records only credential_created / credential_deleted), so credentials are add/remove only and editing is intentionally out of scope.

Add an "Add" action in the Credentials card header that opens a modal posting name / type / username / password / optional url / optional notes to the create endpoint, validating a required, 100-char-capped Name and required type/username/password inline (mirroring the asset create/edit forms and the server's CreateCredentialRequest limits) and routing server-flagged name/url messages to their fields. Add a per-credential Delete button that opens the styled ConfirmDialog and fires the delete on confirm. Both actions refresh the credentials list and audit log on success.

#MAPPS-231

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge branch 'main' into feat/MAPPS-231-asset-credential-add-delete
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 3m5s
0880c6ac39
David merged commit 1bef587b15 into main 2026-06-17 12:46:59 +02:00
David deleted branch feat/MAPPS-231-asset-credential-add-delete 2026-06-17 12:47:00 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
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!245
No description provided.