feat: add edit and delete functionality for custom extensions with mo… - #137
Conversation
…dals for user interaction
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Uh oh!
There was an error while loading. Please reload this page.
Caution Review failedThe pull request is closed. WalkthroughAdds edit and delete workflows for manual contacts on the extension page using new modals, state, handlers, and mutations; integrates action icons into the contact list. Also modifies the complete profile modal by adding a duplicate "Comercial" option in the setores list. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant P as ExtensionPage
participant M as EditModal
participant Mu as updateCustomExtension (mutation)
participant S as Server/API
participant T as Toast
U->>P: Click "Edit" on manual contact
P->>M: Open modal with prefilled contact
U->>M: Edit fields and Save
M->>Mu: Trigger mutation with form data
Mu->>S: PUT update custom extension
alt Success
S-->>Mu: 200 OK
Mu-->>P: onSuccess
P->>T: Show success toast
P->>M: Close modal and reset form
else Error
S-->>Mu: Error
Mu-->>P: onError
P->>T: Show error toast
end
sequenceDiagram
autonumber
actor U as User
participant P as ExtensionPage
participant C as DeleteConfirmModal
participant Md as deleteCustomExtension (mutation)
participant S as Server/API
participant T as Toast
U->>P: Click "Delete" on manual contact
P->>C: Open confirmation modal (details shown)
U->>C: Confirm delete
C->>Md: Trigger delete mutation
Md->>S: DELETE custom extension
alt Success
S-->>Md: 200 OK
Md-->>P: onSuccess
P->>T: Success toast
P->>C: Close modal
else Error
S-->>Md: Error
Md-->>P: onError
P->>T: Error toast
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…dals for user interaction
Summary by CodeRabbit