From 3e5239b9ec1826017e09767cecf0bc90521c8361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EB=8B=A4=EC=9D=B8?= Date: Tue, 14 Feb 2023 12:59:25 +0900 Subject: [PATCH 01/18] =?UTF-8?q?[Feat]=20=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=95=8C=EB=A6=BC=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=EC=9D=98=20=20All=EB=B2=84=ED=8A=BC=EA=B3=BC=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=20=EC=97=B0=EA=B2=B0=20=EB=B0=8F=20modalprov?= =?UTF-8?q?ider=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20intraID=20?= =?UTF-8?q?=EC=A1=B0=EA=B1=B4=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/notification/CreateNotiButton.tsx | 32 +++++++++++-------- components/modal/ModalProvider.tsx | 2 +- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/components/admin/notification/CreateNotiButton.tsx b/components/admin/notification/CreateNotiButton.tsx index 256a723ef..0ed98103f 100644 --- a/components/admin/notification/CreateNotiButton.tsx +++ b/components/admin/notification/CreateNotiButton.tsx @@ -1,31 +1,35 @@ import { useSetRecoilState } from 'recoil'; import { modalState } from 'utils/recoil/modal'; import style from 'styles/admin/notification/CreateNotificationButton.module.scss'; +// import AdminNotiAllModal from 'components/modal/admin/AdminNotiAllModal'; export default function CreateNotiButton() { const setModal = useSetRecoilState(modalState); - // TODO Create Modal Distinguishing Criteria(param) - const openModal = (param?: string) => { - if (!param) { - // TODO all notification modal - console.log('Create all notification'); - } else { - // TODO someone notification modal - console.log(`Create ${param} notification`); - } - }; + // // TODO Create Modal Distinguishing Criteria(param) + // const openModal = (param?: string) => { + // if (!param) { + // // TODO all notification modal + // console.log('Create all notification'); + // } else { + // // TODO someone notification modal + // console.log(`Create ${param} notification`); + // } + // }; return ( <>
-
diff --git a/components/modal/ModalProvider.tsx b/components/modal/ModalProvider.tsx index 8d5c37fb8..cfd78ae6c 100644 --- a/components/modal/ModalProvider.tsx +++ b/components/modal/ModalProvider.tsx @@ -40,7 +40,7 @@ export default function ModalProvider() { 'FIXED-STAT': , 'ADMIN-PROFILE': intraId ? : null, 'ADMIN-PENALTY': intraId ? : null, - 'ADMIN-NOTI_ALL': intraId ? : null, + 'ADMIN-NOTI_ALL': , 'ADMIN-NOTI_USER': intraId ? : null, 'ADMIN-CHECK_FEEDBACK': intraId ? : null, }; From f231e7a06e6a5695d46119b64ba5a476bc76e7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EB=8B=A4=EC=9D=B8?= Date: Tue, 14 Feb 2023 14:37:55 +0900 Subject: [PATCH 02/18] =?UTF-8?q?[Feat]=20=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=EC=A0=84=EC=B2=B4=20=EC=9C=A0=EC=A0=80=20=EC=95=8C=EB=A6=BC=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9,=EC=B7=A8=EC=86=8C=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=ED=81=AC=EA=B8=B0=20=EB=B3=80=EA=B2=BD=20#650?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/admin/modal/AdminNotiAll.module.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/styles/admin/modal/AdminNotiAll.module.scss b/styles/admin/modal/AdminNotiAll.module.scss index 423135193..8b9d0f1e0 100644 --- a/styles/admin/modal/AdminNotiAll.module.scss +++ b/styles/admin/modal/AdminNotiAll.module.scss @@ -35,6 +35,7 @@ } .btns { + // align-items: center; text-align: center; flex-direction: column; display: flex; @@ -43,12 +44,13 @@ } .btn { + align-items: center; display: flex; text-align: center; justify-content: center; margin-bottom: 10px; - width: 100px; - height: 20px; + width: 20rem; + height: 40px; margin-left: auto; margin-right: auto; font-weight: bold; From 7b209f07edb3283b225b0a0bba50cccc9ff8945e Mon Sep 17 00:00:00 2001 From: Dain Jeong Date: Tue, 14 Feb 2023 20:45:31 +0900 Subject: [PATCH 03/18] =?UTF-8?q?[Feat]=20toast=20message=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B4=88=EC=95=88=20=EC=B6=94=EA=B0=80=20#655?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/toastmsg/toastmsg.tsx | 48 ++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 components/toastmsg/toastmsg.tsx diff --git a/components/toastmsg/toastmsg.tsx b/components/toastmsg/toastmsg.tsx new file mode 100644 index 000000000..dee4f873f --- /dev/null +++ b/components/toastmsg/toastmsg.tsx @@ -0,0 +1,48 @@ +import * as React from 'react'; +import Stack from '@mui/material/Stack'; +import Button from '@mui/material/Button'; +import Snackbar from '@mui/material/Snackbar'; +import MuiAlert, { AlertProps } from '@mui/material/Alert'; + +const Alert = React.forwardRef(function Alert( + props, + ref +) { + return ; +}); + +export default function CustomizedSnackbars() { + const [open, setOpen] = React.useState(false); + + const handleClick = () => { + setOpen(true); + }; + + const handleClose = ( + event?: React.SyntheticEvent | Event, + reason?: string + ) => { + if (reason === 'clickaway') { + return; + } + + setOpen(false); + }; + + return ( + + + + + This is a success message! + + + This is an error message! + This is a warning message! + This is an information message! + This is a success message! + + ); +} From f9ff2bebb77c5ac822aca6fee0ece6c6fecca8f7 Mon Sep 17 00:00:00 2001 From: Dain Jeong Date: Tue, 14 Feb 2023 21:25:09 +0900 Subject: [PATCH 04/18] =?UTF-8?q?[Feat]=20=EC=A0=84=EC=B2=B4=20=EC=9C=A0?= =?UTF-8?q?=EC=A0=80=20=EC=95=8C=EB=A6=BC=20=EB=AA=A8=EB=8B=AC=20toast=20m?= =?UTF-8?q?essage=20=EB=9D=84=EC=9A=B0=EA=B8=B0=20=EC=B4=88=EC=95=88=20#65?= =?UTF-8?q?5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/admin/AdminNotiAllModal.tsx | 81 +++++++++++++++----- components/toastmsg/toastmsg.tsx | 4 - 2 files changed, 61 insertions(+), 24 deletions(-) diff --git a/components/modal/admin/AdminNotiAllModal.tsx b/components/modal/admin/AdminNotiAllModal.tsx index fa384e7ff..94c8eacfb 100644 --- a/components/modal/admin/AdminNotiAllModal.tsx +++ b/components/modal/admin/AdminNotiAllModal.tsx @@ -2,9 +2,20 @@ import { useSetRecoilState } from 'recoil'; import { useEffect, useState } from 'react'; import styles from 'styles/admin/modal/AdminNotiAll.module.scss'; import { modalState } from 'utils/recoil/modal'; +import * as React from 'react'; +import Stack from '@mui/material/Stack'; +import Snackbar from '@mui/material/Snackbar'; +import MuiAlert, { AlertProps } from '@mui/material/Alert'; import instance from 'utils/axios'; import { finished } from 'stream'; +const Alert = React.forwardRef(function Alert( + props, + ref +) { + return ; +}); + interface EditedAllNoti { notification: string | number; } @@ -42,20 +53,20 @@ export default function AdminNotiAllModal(props: any) { // useEffect(() => { // getBasicPenaltyHandler(); // }, []); - const finishEditHandler = () => { - let errMsg = ''; - if (editedAllNoti.notification < 0) { - errMsg += '시간은 0 이상이어야합니다.\n'; - console.log(errMsg); - editedAllNoti.notification = ''; - } - if (errMsg) alert(errMsg); - setAllNoti({ - ...editedAllNoti, - intraID: props.value, - }); - // setModal({ modalName: null }); - }; + // const finishEditHandler = () => { + // let errMsg = ''; + // if (editedAllNoti.notification < 0) { + // errMsg += '시간은 0 이상이어야합니다.\n'; + // console.log(errMsg); + // editedAllNoti.notification = ''; + // } + // if (errMsg) alert(errMsg); + // setAllNoti({ + // ...editedAllNoti, + // intraID: props.value, + // }); + // // setModal({ modalName: null }); + // }; useEffect(() => { console.log({ allNoti }); return () => { @@ -63,7 +74,24 @@ export default function AdminNotiAllModal(props: any) { }; }, [allNoti]); const setModal = useSetRecoilState(modalState); + const finishEditHandler = () => setModal({ modalName: null }); const cancelEditHandler = () => setModal({ modalName: null }); + const [open, setOpen] = React.useState(false); + + const handleClick = () => { + setOpen(true); + }; + + const handleClose = ( + event?: React.SyntheticEvent | Event, + reason?: string + ) => { + if (reason === 'clickaway') { + return; + } + + setOpen(false); + }; return (
@@ -84,12 +112,25 @@ export default function AdminNotiAllModal(props: any) {
- + + + + + This is a success message! + + + diff --git a/components/toastmsg/toastmsg.tsx b/components/toastmsg/toastmsg.tsx index dee4f873f..3621dce62 100644 --- a/components/toastmsg/toastmsg.tsx +++ b/components/toastmsg/toastmsg.tsx @@ -39,10 +39,6 @@ export default function CustomizedSnackbars() { This is a success message! - This is an error message! - This is a warning message! - This is an information message! - This is a success message! ); } From 0734fdc4d319cf909c76ff54e6750a8ae32f2975 Mon Sep 17 00:00:00 2001 From: Dain Jeong Date: Wed, 15 Feb 2023 13:52:47 +0900 Subject: [PATCH 05/18] =?UTF-8?q?[Feat]=20=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=EC=A0=84=EC=B2=B4=20=EC=9C=A0=EC=A0=80=20=EC=95=8C=EB=A6=BC=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=20textarea=20=EC=88=98=EC=A0=95=20#650?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/admin/AdminNotiAllModal.tsx | 4 +--- styles/admin/modal/AdminNotiAll.module.scss | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/components/modal/admin/AdminNotiAllModal.tsx b/components/modal/admin/AdminNotiAllModal.tsx index fa384e7ff..bd6b3caec 100644 --- a/components/modal/admin/AdminNotiAllModal.tsx +++ b/components/modal/admin/AdminNotiAllModal.tsx @@ -72,10 +72,8 @@ export default function AdminNotiAllModal(props: any) {