Skip to content

Commit

Permalink
UCEM-782 : Added duplicate validation in update screen and updated lo…
Browse files Browse the repository at this point in the history
…calisation key for the error
  • Loading branch information
Tulika-eGov committed Aug 28, 2024
1 parent bf9a1a4 commit 44b21f4
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ const SORDetailsTemplate = (props) => {
const buttonClick = async () => {
if(formData?.find((ob) => ob?.sorCode === stateData?.selectedSor?.id))
{
setShowToast({ show: true, label: "SOR Already present", error: true });
setShowToast({ show: true, label: "RA_SOR_ALREADY_PRESENT_ERROR", error: true });
setSelectedSOR(null);
return;
}
if(window.location.href.includes("update") && SORDetails?.find((ob) => ob?.sorCode === stateData?.selectedSor?.id))
{
setShowToast({ show: true, label: "RA_SOR_ALREADY_PRESENT_ERROR", error: true });
setSelectedSOR(null);
return;
}
Expand Down

0 comments on commit 44b21f4

Please sign in to comment.