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

Feature/issue 1797 #1458

Open
wants to merge 3 commits into
base: release/1.1.0
Choose a base branch
from
Open

Feature/issue 1797 #1458

wants to merge 3 commits into from

Conversation

sashapanasiuk5
Copy link
Contributor

Github

Summary of issue

Currently, when an admin user adds a Wow-Fact or Chronology to a new street code using the respective modal window, the system displays a confirmation message indicating that the new entry has been added successfully. However, the modal window remains open with all fields still populated.

Summary of change

  • Changed the behavior of modals, so they close after successfully adding new entry
  • Removed old behavior that updates entry instead of creating new
  • Added check for title uniqueness

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
22.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@@ -62,6 +63,12 @@ const InterestingFactsAdminModal = ({ fact, open, setModalOpen, onChange }: Prop
setFileList([]);
};

const validateFact = uniquenessValidator(
() => (factsStore.getFactArray.map( (fact) => fact.title)),
() => (fact?.title),
Copy link
Contributor

@Michael-Kolpakov Michael-Kolpakov Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really necessary to wrap the right side of the expression in parentheses?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants