-
- {singlePrice}
- 원
-
+
+
- )
- : (optionPrices || []).map((input) => (
-
-
-
- {input.option}
-
-
- /
-
-
- {input.price}
- 원
-
-
-
- ))}
+
>
) : (
<>
가격
-
-
단일메뉴
-
-
- {isSingle
- ? (
-
-
-
-
-
setSinglePrice(e.target.value === '' ? 0 : Number(e.target.value))}
- />
-
원
-
-
-
-
- )
- : (optionPrices || []).map((input) => (
-
-
-
updatePriceInput(input.id, 'option', e.target.value)}
- disabled={isSingle}
- />
-
-
updatePriceInput(input.id, 'price', e.target.value)}
- />
-
원
-
-
-
+
+
+
+
+
setSinglePrice(Number(e.target.value))}
+ />
+
원
- ))}
-
+
+
>
)}
@@ -209,85 +93,21 @@ export default function MenuPrice({ isComplete }:MenuPriceProps) {
<>
가격
-
-
단일메뉴
-
-
- {isSingle
- ? (
-
-
-
-
-
setSinglePrice(e.target.value === '' ? 0 : Number(e.target.value))}
- />
-
원
-
-
-
-
- )
- : (optionPrices || []).map((input) => (
-
-
-
updatePriceInput(input.id, 'option', e.target.value)}
- disabled={isSingle}
- />
-
-
updatePriceInput(input.id, 'price', e.target.value)}
- />
-
원
-
-
-
+
+
+
+
setSinglePrice(e.target.value === '' ? 0 : Number(e.target.value))}
+ />
+
원
- ))}
-
+
+
+
>
)}
diff --git a/src/page/AddMenu/hook/useFormValidation.ts b/src/page/AddMenu/hook/useFormValidation.ts
index 6afc46b4..f1331a19 100644
--- a/src/page/AddMenu/hook/useFormValidation.ts
+++ b/src/page/AddMenu/hook/useFormValidation.ts
@@ -1,5 +1,6 @@
import useAddMenuStore from 'store/addMenu';
import { useErrorMessageStore } from 'store/errorMessageStore';
+import showToast from 'utils/ts/showToast';
const useFormValidation = () => {
const { setMenuError, setCategoryError } = useErrorMessageStore();
@@ -10,6 +11,7 @@ const useFormValidation = () => {
if (name.length === 0) {
setMenuError('메뉴명을 입력해주세요.');
+ showToast('error', '메뉴명을 입력해주세요.');
isValid = false;
} else {
setMenuError('');
@@ -17,6 +19,7 @@ const useFormValidation = () => {
if (categoryIds.length === 0) {
setCategoryError('카테고리를 1개 이상 선택해주세요.');
+ showToast('error', '카테고리를 1개 이상 선택해주세요.');
isValid = false;
} else {
setCategoryError('');
diff --git a/src/page/Auth/Login/ApprovalModal/ApprovalModal.module.scss b/src/page/Auth/Login/ApprovalModal/ApprovalModal.module.scss
new file mode 100644
index 00000000..4655fca4
--- /dev/null
+++ b/src/page/Auth/Login/ApprovalModal/ApprovalModal.module.scss
@@ -0,0 +1,72 @@
+.background {
+ background-color: rgb(0 0 0 / 70%);
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100vw;
+ height: 100vh;
+}
+
+.container {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ color: #000000;
+ opacity: 1;
+ background-color: #ffffff;
+ width: 300px;
+ height: 200px;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ gap: 8px;
+
+ &__title {
+ font-size: 18px;
+ font-weight: 500;
+
+ span {
+ color: #175c8e;
+ }
+ }
+
+ &__description {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ font-size: 14px;
+ color: #8e8e8e;
+ }
+
+ &__phone {
+ font-size: 16px;
+ color: #175c8e;
+ font-weight: 500;
+ }
+}
+
+.button {
+ display: flex;
+ gap: 8px;
+ margin-top: 8px;
+
+ &__confirm {
+ width: 115px;
+ height: 40px;
+ border-radius: 4px;
+ border: 1px solid #8e8e8e;
+ box-sizing: border-box;
+ cursor: pointer;
+ }
+
+ &__clipboard {
+ width: 115px;
+ height: 40px;
+ border-radius: 4px;
+ background-color: #175c8e;
+ color: #ffffff;
+ cursor: pointer;
+ }
+}
diff --git a/src/page/Auth/Login/ApprovalModal/index.tsx b/src/page/Auth/Login/ApprovalModal/index.tsx
new file mode 100644
index 00000000..02e68a65
--- /dev/null
+++ b/src/page/Auth/Login/ApprovalModal/index.tsx
@@ -0,0 +1,37 @@
+import { createPortal } from 'react-dom';
+import showToast from 'utils/ts/showToast';
+import styles from './ApprovalModal.module.scss';
+
+const PHONE_NUMBER = '010-7724-5536';
+
+export default function ApprovalModal({ toggle }:{ toggle: () => void }) {
+ const copyPhone = () => {
+ navigator.clipboard.writeText(PHONE_NUMBER).then(() => {
+ showToast('success', '전화번호를 클립보드에 복사하였습니다.');
+ }).catch(() => {
+ showToast('error', '전화번호를 복사하는데 실패했습니다.');
+ });
+ };
+
+ return createPortal(
+
+
+
+ 관리자의 승인
+ 이 진행 중입니다.
+
+
+ 해당 화면이 지속해서 보일 시
+ 아래 연락처로 문의하시기 바랍니다.
+
+
{PHONE_NUMBER}
+
+
+
+
+
+
+
,
+ document.body,
+ );
+}
diff --git a/src/page/Auth/Login/Login.module.scss b/src/page/Auth/Login/Login.module.scss
index 380534ec..9ad18983 100644
--- a/src/page/Auth/Login/Login.module.scss
+++ b/src/page/Auth/Login/Login.module.scss
@@ -71,7 +71,7 @@
@include media.media-breakpoint-down(mobile) {
border: none;
- border-bottom: 1px solid #d2dae2;
+ border-bottom: 1px solid #f7941e;
}
}
@@ -98,10 +98,6 @@
&__error-message {
font-size: 12px;
color: #f7941e;
-
- @include media.media-breakpoint-down(mobile) {
- display: none;
- }
}
&__icon {
@@ -136,7 +132,7 @@
&--login {
@include media.media-breakpoint-down(mobile) {
background: #f7941e;
- margin-top: 48px;
+ margin-top: 38px;
}
}
}
@@ -190,6 +186,10 @@
}
}
}
+
+ &__error {
+ height: 10px;
+ }
}
.option {
diff --git a/src/page/Auth/Login/index.tsx b/src/page/Auth/Login/index.tsx
index 3d07c2cd..668242a5 100644
--- a/src/page/Auth/Login/index.tsx
+++ b/src/page/Auth/Login/index.tsx
@@ -15,6 +15,7 @@ import sha256 from 'utils/ts/SHA-256';
import { useErrorMessageStore } from 'store/errorMessageStore';
import styles from './Login.module.scss';
import OPTION from './static/option';
+import ApprovalModal from './ApprovalModal';
export default function Login() {
const { value: isBlind, changeValue: changeIsBlind } = useBooleanState();
@@ -23,8 +24,9 @@ export default function Login() {
const { login, isError: isServerError } = useLogin();
const [isFormError, setIsFormError] = useState(false);
const navigate = useNavigate();
- const { loginError } = useErrorMessageStore();
+ const { loginError, loginErrorCode } = useErrorMessageStore();
const [emailError, setEmailError] = useState('');
+ const { value: isModalOpen, changeValue: toggle } = useBooleanState(false);
const isError = isServerError || isFormError;
@@ -83,7 +85,7 @@ export default function Login() {