-
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.
- Loading branch information
1 parent
fc667b4
commit 4735cb1
Showing
4 changed files
with
105 additions
and
21 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
74 changes: 74 additions & 0 deletions
74
...ps/registration/app/components/operations/registration/ChangeRegistrationPurposeModal.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,74 @@ | ||
"use client"; | ||
|
||
import { useState } from "react"; | ||
import { Box, Button } from "@mui/material"; | ||
import Modal from "@bciers/components/modal/Modal"; | ||
import React from "react"; | ||
|
||
const ChangeRegistrationPurposeModal = () => { | ||
const [modalState, setModalState] = useState("" as string); | ||
|
||
const resetFormData = () => { | ||
return; | ||
}; | ||
|
||
const handleCloseModal = () => { | ||
setModalState(""); | ||
}; | ||
const handleConfirmChange = () => { | ||
resetFormData(); | ||
setModalState(""); | ||
return; | ||
}; | ||
|
||
return ( | ||
<Box> | ||
<Modal | ||
title="Confirmation" | ||
open={Boolean(modalState)} | ||
onClose={handleCloseModal} | ||
> | ||
<Box | ||
sx={{ | ||
fontSize: "20px", | ||
minWidth: "100%", | ||
margin: "8px 0", | ||
}} | ||
> | ||
Are you sure you want to change your registration purpose? If you | ||
proceed, all of the form data you have entered will be lost. | ||
</Box> | ||
<Box | ||
sx={{ | ||
width: "100%", | ||
display: "flex", | ||
flexDirection: "row", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
marginTop: "24px", | ||
}} | ||
> | ||
<Button | ||
onClick={handleCloseModal} | ||
color="secondary" | ||
variant="contained" | ||
aria-label="Cancel" | ||
sx={{ marginRight: "12px" }} | ||
> | ||
Cancel | ||
</Button> | ||
<Button | ||
onClick={handleConfirmChange} | ||
color="primary" | ||
variant="contained" | ||
aria-label="Confirm" | ||
> | ||
Change registration purpose | ||
</Button> | ||
</Box> | ||
</Modal> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ChangeRegistrationPurposeModal; |
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