-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into merge/main-staging-po…
…st-uu # Conflicts: # src/pages/reports/site-report/[uuid].page.tsx
- Loading branch information
Showing
29 changed files
with
1,828 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/components/elements/Inputs/TreeSpeciesInput/NonScientificConfirmationModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { useT } from "@transifex/react"; | ||
|
||
import Button from "@/components/elements/Button/Button"; | ||
import TreeSpeciesModal from "@/components/elements/Inputs/TreeSpeciesInput/TreeSpeciesModal"; | ||
import { ModalId } from "@/components/extensive/Modal/ModalConst"; | ||
import { useModalContext } from "@/context/modal.provider"; | ||
|
||
const NonScientificConfirmationModal = ({ onConfirm }: { onConfirm: () => void }) => { | ||
const t = useT(); | ||
const { closeModal } = useModalContext(); | ||
|
||
return ( | ||
<TreeSpeciesModal | ||
title={t("Your input is a not a scientific name")} | ||
content={t("You can add this species, but it will be pending review from Admin.")} | ||
buttons={ | ||
<> | ||
<Button variant="secondary" onClick={() => closeModal(ModalId.ERROR_MODAL)}> | ||
{t("CANCEL")} | ||
</Button> | ||
<Button | ||
variant="primary" | ||
onClick={() => { | ||
closeModal(ModalId.ERROR_MODAL); | ||
onConfirm(); | ||
}} | ||
> | ||
{t("CONFIRM")} | ||
</Button> | ||
</> | ||
} | ||
/> | ||
); | ||
}; | ||
|
||
export default NonScientificConfirmationModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/components/elements/Inputs/TreeSpeciesInput/SpeciesAlreadyExistsModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { useT } from "@transifex/react"; | ||
|
||
import Button from "@/components/elements/Button/Button"; | ||
import TreeSpeciesModal from "@/components/elements/Inputs/TreeSpeciesInput/TreeSpeciesModal"; | ||
import { ModalId } from "@/components/extensive/Modal/ModalConst"; | ||
import { useModalContext } from "@/context/modal.provider"; | ||
|
||
const SpeciesAlreadyExistsModal = ({ speciesName }: { speciesName: string }) => { | ||
const { closeModal } = useModalContext(); | ||
const t = useT(); | ||
|
||
return ( | ||
<TreeSpeciesModal | ||
title={t("Species {name} already included", { name: speciesName })} | ||
content={t("Please find species below to enter reported value.")} | ||
buttons={ | ||
<> | ||
<Button variant="secondary" onClick={() => closeModal(ModalId.ERROR_MODAL)}> | ||
{t("CONTINUE")} | ||
</Button> | ||
</> | ||
} | ||
/> | ||
); | ||
}; | ||
|
||
export default SpeciesAlreadyExistsModal; |
Oops, something went wrong.