Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) O3 4541 : Fix identifier deletion modal handling in registration form #1528

Merged
merged 3 commits into from
Mar 17, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: Refactor identifier deletion modal handling in IdentifierInput c…
…omponent
  • Loading branch information
Muppasanipraneeth authored and denniskigen committed Mar 17, 2025
commit c78bab33252efeb77fd13cbeb91a3e909e81036d
Original file line number Diff line number Diff line change
@@ -71,14 +71,15 @@ const IdentifierInput: React.FC<IdentifierInputProps> = ({ patientIdentifier, fi

if (initialValue) {
const confirmDeleteIdentifierModal = showModal('delete-identifier-confirmation-modal', {
deleteIdentifier: (deleteIdentifier) => {
if (deleteIdentifier) {
closeModal: () => confirmDeleteIdentifierModal(),
deleteIdentifier: (confirmed) => {
if (confirmed) {
setFieldValue('identifiers', deleteIdentifierType(values.identifiers, fieldName));
}
confirmDeleteIdentifierModal();
},
identifierName,
initialValue,
identifierValue: initialValue,
});
} else {
setFieldValue('identifiers', deleteIdentifierType(values.identifiers, fieldName));