Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2/27 배포 #203

Merged
merged 27 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5094672
Docs: 공지사항 주석처리
KKangHHee Mar 25, 2024
a0c4314
Fix/매장 픽업 표시 수정
choiyoubin Mar 25, 2024
0d732f3
Merge pull request #195 from choiyoubin/test
choiyoubin Mar 25, 2024
e51f42e
Merge pull request #194 from KKangHHee/test
imi21123 Mar 25, 2024
868b1a5
Fix/드림 테스트 전 영수증 속도 변경
choiyoubin Mar 26, 2024
16ad7e2
Merge pull request #196 from choiyoubin/test
choiyoubin Mar 26, 2024
5ecc82b
Feat/오르다, 바나당 포트 출력 속도 다르게
choiyoubin Mar 26, 2024
a6603d2
Merge pull request #197 from choiyoubin/test
choiyoubin Mar 26, 2024
798f092
Fix/비번찾기 번호인증시 alert창
choiyoubin Mar 26, 2024
cab2960
Fix/비밀번호 조건 해제
choiyoubin Mar 26, 2024
56850b8
Merge pull request #198 from choiyoubin/test
choiyoubin Mar 26, 2024
34d4202
Fix/영수증 주문번호수정
choiyoubin Mar 26, 2024
aad63c2
Merge pull request #199 from choiyoubin/test
choiyoubin Mar 26, 2024
eb82234
Fix/Timer시간 수정
choiyoubin Mar 26, 2024
30d4305
Merge pull request #200 from choiyoubin/test
choiyoubin Mar 26, 2024
515e81b
Feat: 모든 페이지 Auth
hhbb0081 Mar 26, 2024
accecdb
Fix: 로그아웃 시 쿠키 삭제
hhbb0081 Mar 26, 2024
1d2232b
Feat: 영수증 선택 기준 idx로 변경
hhbb0081 Mar 26, 2024
180b506
Feat: 주문 접수 후 선택 영수증 해제
hhbb0081 Mar 26, 2024
902b315
Feat: 파일 위치 변경
hhbb0081 Mar 26, 2024
3efcf2b
Feat: 로그아웃 시 쿠키 삭제
hhbb0081 Mar 26, 2024
3f87c7a
Fix: refresh token 재발급 삭제
hhbb0081 Mar 26, 2024
b5bafe2
Merge branches 'test' and 'test' of https://github.com/hhbb0081/ready…
hhbb0081 Mar 26, 2024
5444871
Style: 주석 제거
hhbb0081 Mar 26, 2024
488f0ef
Merge pull request #201 from hhbb0081/test
hhbb0081 Mar 26, 2024
431c853
Merge branch 'test' of https://github.com/hhbb0081/readyBusinessFront…
hhbb0081 Mar 26, 2024
7c1397d
Merge pull request #202 from hhbb0081/test
hhbb0081 Mar 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Navigate, Route, Routes, useLocation } from "react-router-dom";
// import Header2 from "../src/components/views/Header/Header2";
// import Auth from "./hoc/auth.jsx";
import ApplicationForm from "./components/signup/ApplicationForm/ApplicationForm.jsx";
import Auth from "./hoc/Auth.jsx";
import FindIdPage from "./pages/Find/FindIdPage/FindIdPage.jsx"; //아이디 찾기-전화번호 인증
import NoneFindIdPage from "./pages/Find/FindIdPage/NoneFindIdPage/NoneFindIdPage.jsx"; //아이디 찾기 결과-회원 X
import UserFindIdPage from "./pages/Find/FindIdPage/UserFindIdPage/UserFindIdPage.jsx"; //아이디 찾기 결과-아이디 반환
Expand All @@ -22,24 +23,23 @@ import SignupPage from "./pages/Signup/SignupPage.jsx";
import TermsPage from "./pages/Signup/Terms/TermsPage.jsx";
import VerificationPage from "./pages/Signup/Verification/VerificationPage.jsx";
import StoreManage from "./pages/StoreManage/StoreManage.jsx";
import Auth from "./utils/Auth.jsx";

function App() {
//const [cookies, , removeCookies] = useCookies();
let location = useLocation();

// 로그인 필요없는 페이지
// sms인증 구현으로 인한 AUTH잠시 해제
// const NewSignupPage = Auth(SignupPage, false); // 회원가입
const NewSignupPage = Auth(SignupPage, false); // 회원가입
const NewLoginPage = Auth(LoginPage, false); // 로그인
// sms인증 구현으로 인한 AUTH잠시 해제
// const NewFindIdPage = Auth(FindIdPage, false); //아이디 찾기-전화번호 인증
const NewFindIdPage = Auth(FindIdPage, false); //아이디 찾기-전화번호 인증
const NewNoneFindIdPage = Auth(NoneFindIdPage, false); //아이디 찾기 결과-회원 X
const NewUserFindIdPage = Auth(UserFindIdPage, false); //아이디 찾기 결과-아이디 반환
const NewFindPasswordPage = Auth(FindPasswordPage, false); //비밀번호 찾기 - 아이디 조회
const NewChangeNewPasswordPage = Auth(ChangeNewPasswordPage, false); //비밀번호 변경 - 전화번호 인증
const NewChangePasswordPage = Auth(ChangePasswordPage, false); //비밀번호 변경 - 전화번호 인증
//const NewPhoneAuthPage = Auth(PhoneAuthPage, false); // 휴대폰 인증
const NewPhoneAuthPage = Auth(PhoneAuthPage, false); // 휴대폰 인증
const NewTermsPage = Auth(TermsPage, false); // 이용약관 페이지

// 로그인 필수 페이지
Expand All @@ -50,7 +50,7 @@ function App() {
const NewJudgeResultsRejectPage = Auth(JudgeResultsRejectPage, true, 3); // 입점 심사 반려 페이지
const NewMainPage = Auth(MainPage, true, 4); // 메인페이지 (4, 5)
const NewStoreManage = Auth(StoreManage, true, 4); // 매장관리 페이지 (4, 5)
// const NewOrderManagementPage = Auth(OrderManagePage, true, 5); // 주문관리
const NewOrderManagementPage = Auth(OrderManagePage, true, 5); // 주문관리
const NewInventoryPage = Auth(InventoryPage, true, 5); // 재고관리
const NewSalesPage = Auth(SalesManage, true, 5); // 매출관리
const NewMyPage = Auth(MyPage, true, 5); // 마이페이지
Expand All @@ -60,7 +60,7 @@ function App() {
<div>
<div className="App">
<Routes>
<Route path="/" element={<LoginPage />} />
<Route path="/" element={<NewLoginPage />} />
<Route path="/*" element={<Navigate to="/"></Navigate>}></Route>
</Routes>
</div>
Expand All @@ -73,13 +73,12 @@ function App() {
<Routes>
<Route path="/main" element={<NewMainPage />} />
<Route path="/store" element={<NewStoreManage />} />
<Route path="/order" element={<OrderManagePage />} />
<Route path="/order" element={<NewOrderManagementPage />} />
<Route path="/inventory" element={<NewInventoryPage />} />
<Route path="/sales" element={<NewSalesPage />} />
<Route path="/mypage" element={<NewMyPage />} />
<Route path="/signup" element={<SignupPage />} />
{/* 추가 */}
<Route path="/signup/auth/phone" element={<PhoneAuthPage />} />
<Route path="/signup" element={<NewSignupPage />} />
<Route path="/signup/auth/phone" element={<NewPhoneAuthPage />} />
<Route
path="/signup/auth/verification"
element={<NewVerificationPage />}
Expand All @@ -95,7 +94,7 @@ function App() {
element={<NewJudgeResultsRejectPage />}
/>
<Route path="/login" element={<NewLoginPage />} />
<Route path="/find/id" element={<FindIdPage />} />
<Route path="/find/id" element={<NewFindIdPage />} />
<Route path="/find/id/search" element={<NewUserFindIdPage />} />
<Route path="/find/id/none" element={<NewNoneFindIdPage />} />
<Route path="/find/password" element={<NewFindPasswordPage />} />
Expand Down
6 changes: 3 additions & 3 deletions src/components/UserReceipt.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import "./UserReceipt.css";

function UserReceipt(props) {
console.log(props);
const { foodies, idx, pickUp, time } = props;
const { foodies, orderNum, pickUp, time } = props;
return (
<Printer type="epson" width={42} characterSet="korea">
<Row left={`[${pickUp}]`} right="ReadyVery" />
<Row left={`[${pickUp === 1 ? '픽업' : '매장'}]`} right="ReadyVery" />
<Br />
<Text size={{ width: 3, height: 3 }} align="center" bold={true}>
{idx} {/*idx*/}
{orderNum} {/*orderNum*/}
</Text>
<Br />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import useSendVerifySms from "../../../../hooks/useSendVerifySms";
import RedButton from "../../redButton/RedButton";
import CertificationNumInput from "../CertificationNumInput/CertificationNumInput";
import "./CertificationInput.css";
const TIMER_DURATION = 600; //타이머 시간 설정(600초)
const TIMER_DURATION = 180; //타이머 시간 설정(600초)

// 아이디찾기 및 회원가입 번호인증에 사용
function CertificationInput({ type, buttonText }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import RedButton from "../../redButton/RedButton";
import "../CertificationInput/CertificationInput.css";
import CertificationInputCheck from "./CertificationInputCheck";

const TIMER_DURATION = 600; //타이머 시간 설정(600초)
const TIMER_DURATION = 180; //타이머 시간 설정(600초)

// 비밀번호 변경 번호 인증_번호입력
// 추후 아이디 찾기 및 회원가입 번호인증과 비교 후 수정 필요
Expand All @@ -22,6 +22,7 @@ function CertificationInputPhoneNumber(userInfo) {
if (/^\d+$/.test(phonenumber) && phonenumber.length === 11) {
// 11자리 입력 후에
if (!postmessage) {
alert("인증번호를 발송했습니다. 인증번호가 오지 않으면 입력하신 정보가 회원정보와 일치하는지 확인해 주세요.")
handlePostmessage();
} else { //타이머 초기화용
setPostmessage(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import useSendVerifySms from "../../../../hooks/useSendVerifySms";
import RedButton from "../../../login/redButton/RedButton";
import "./UserInputNumber.css";
import UserInputNumberMessage from "./UserInputNumberMessage/UserInputNumberMessage";
const TIMER_DURATION = 600; //타이머 시간 설정(600초)
const TIMER_DURATION = 180; //타이머 시간 설정(600초)

function PhoneCertificationInput() {
const [chkButton, setChkButton] = useState(false); // 인증버튼 클릭 여부
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const UserInputPassword = () => {
const handlePasswordChange = (e) => {
const newPassword = e.target.value;
setPassword(newPassword);
isPasswordCombinationValid(newPassword);
// isPasswordCombinationValid(newPassword);
};

const handlePasswordCheckChange = (e) => {
Expand All @@ -25,34 +25,36 @@ const UserInputPassword = () => {
validatePassword(password, newPasswordCheck);
};

const isPasswordLength = (password) => {
const minLength = 8;
return password.length >= minLength;
};
// const isPasswordLength = (password) => {
// const minLength = 8;
// return password.length >= minLength;
// };

const isPasswordCombinationValid = (password) => {
const hasLetter = /[a-zA-Z]/.test(password);
const hasNumber = /\d/.test(password);
const hasSpecialChar = /[!@#$%^&*(),.?":{}|<>]/.test(password);
return hasLetter && hasNumber && hasSpecialChar;
};
// const isPasswordCombinationValid = (password) => {
// const hasLetter = /[a-zA-Z]/.test(password);
// const hasNumber = /\d/.test(password);
// const hasSpecialChar = /[!@#$%^&*(),.?":{}|<>]/.test(password);
// return hasLetter && hasNumber && hasSpecialChar;
// };

const validatePassword = (newPassword, newPasswordCheck) => {
if (newPassword !== newPasswordCheck) {
setPasswordError(true);
} else if (!isPasswordLength(newPassword)) {
setPasswordError(true);
} else if (!isPasswordCombinationValid(newPassword)) {
setPasswordError(true);
} else {
// } else if (!isPasswordLength(newPassword)) {
// setPasswordError(true);
// } else if (!isPasswordCombinationValid(newPassword)) {
// setPasswordError(true);
// } else {
setPasswordError(false);
}
};
return(
<div className="signup-page-content-password-wrapper">
<label className="signup-page-content-password-label-style">비밀번호</label>
<div className="signup-page-content-password-label-plus-text">
영문+숫자+특수문자 8자 이상
{/* 영문+숫자+특수문자 8자 이상 */}
비밀번호를 입력해주세요
</div>
<div>
<input
Expand All @@ -79,10 +81,10 @@ const UserInputPassword = () => {
<LoginChkAlrm icon={"X"} paddingSize={"0.45rem"}>
{password !== confirmPassword
? "비밀번호가 일치하지 않습니다."
: !isPasswordLength(password)
? "8자 이상 입력해야 합니다."
: !isPasswordCombinationValid(password)
? "영문+숫자+특수문자의 조합이어야 합니다."
// : !isPasswordLength(password)
// ? "8자 이상 입력해야 합니다."
// : !isPasswordCombinationValid(password)
// ? "영문+숫자+특수문자의 조합이어야 합니다."
: null}
</LoginChkAlrm>
) : <div style={{minHeight: "0.9rem"}}/>
Expand Down
33 changes: 20 additions & 13 deletions src/components/views/Home/OrderContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function OrderContainer () {
// console.log(completeData);

const handleOrderMenu = (dummyInfo, e) => {
const selectedMenu = dummyInfo.orders.filter((order) => order.orderNum === e);
const selectedMenu = dummyInfo.orders.filter((order) => order.idx === e);
context.setSelectedMenu(e !== context.selectedIdx ? selectedMenu : {});
context.setSelectedIdx(e !== context.selectedIdx ? e : 0);
}
Expand All @@ -36,12 +36,12 @@ export default function OrderContainer () {
<OrderBoxWrapper>
{
waitData && waitData?.data?.orders?.map((item) => (
<span onClick={() => handleWaitOrderMenu(item.orderNum)}>
<span onClick={() => handleWaitOrderMenu(item.idx)}>
<OrderBox
id={item.orderNum}
category={item.pickUp}
menu={item.foodies}
clicked={item.orderNum === context.selectedIdx}
clicked={item.idx === context.selectedIdx}
/>
</span>
))
Expand All @@ -53,12 +53,12 @@ export default function OrderContainer () {
<OrderBoxWrapper>
{
makeData && makeData?.data?.orders?.map((item) => (
<span onClick={() => handleMakeOrderMenu(item.orderNum)}>
<span onClick={() => handleMakeOrderMenu(item.idx)}>
<OrderBox
id={item.orderNum}
category={item.pickUp}
menu={item.foodies}
clicked={item.orderNum === context.selectedIdx}
clicked={item.idx=== context.selectedIdx}
/>
</span>
))
Expand All @@ -70,12 +70,12 @@ export default function OrderContainer () {
<>
{
completeData && completeData?.data?.orders?.map((item) => (
<span onClick={() => handleCompleteOrderMenu(item.orderNum)}>
<span onClick={() => handleCompleteOrderMenu(item.idx)}>
<OrderBox
id={item.orderNum}
category={item.pickUp}
menu={item.foodies}
clicked={item.orderNum === context.selectedIdx}
clicked={item.idx === context.selectedIdx}
/>
</span>
))
Expand All @@ -90,6 +90,13 @@ const Container = styled.div`
width: 100%;
height: calc(100% - 60px);
overflow-y: auto;

// -ms-overflow-style: none; /* 인터넷 익스플로러 */
// scrollbar-width: none; /* 파이어폭스 */

// &::-webkit-scrollbar {
// display: none;
// }
`;

const OrderBoxContainer = styled.div`
Expand Down Expand Up @@ -118,10 +125,10 @@ const OrderBoxWrapper = styled.div`
overflow-y: auto;
padding-bottom: 50px;

-ms-overflow-style: none; /* 인터넷 익스플로러 */
scrollbar-width: none; /* 파이어폭스 */
// -ms-overflow-style: none; /* 인터넷 익스플로러 */
// scrollbar-width: none; /* 파이어폭스 */

&::-webkit-scrollbar {
display: none;
}
`;
// &::-webkit-scrollbar {
// display: none;
// }
`;
8 changes: 4 additions & 4 deletions src/components/views/Home/ReciptBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default function ReceiptBox ({children, modalIdx, setModalIdx}) {

// 주문 거부
const handleCancel = async (e) => {
// setLoading(1);
console.log(e);
message.loading("로딩 중...");

Expand All @@ -26,20 +25,21 @@ export default function ReceiptBox ({children, modalIdx, setModalIdx}) {
);

setModalIdx(0);
// setLoading(0);
context.setSelectedMenu({});
context.setSelectedIdx(0);
};

// 주문 접수
const handleMake = async (e) => {
// setLoading(2);
console.log(context?.selectedMenu);
message.loading("로딩 중...");

await acceptOrder(
`${context?.selectedMenu[0]?.orderId}@${e}`,
);
setModalIdx(0);
// setLoading(0);
context.setSelectedMenu({});
context.setSelectedIdx(0);
};

const selectedInfo = context.selectedMenu;
Expand Down
File renamed without changes.
File renamed without changes.
22 changes: 12 additions & 10 deletions src/hooks/Mypage/useMypageLogout.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { message } from "antd";
import axios from "axios";
import { useCookies } from "react-cookie";
import { useNavigate } from "react-router-dom";
import { useSetRecoilState } from "recoil";
import { isAuthenticatedState, loginState } from "../../Atom/status";
import { isAuthenticatedState } from "../../Atom/status";

// 수정필요! 백에서 로그아웃이 구현되면 ㄱㄱ
const apiRoot = process.env.REACT_APP_API_ROOT;
Expand All @@ -11,9 +12,9 @@ const apiUrl = `${apiRoot}/${apiVer}/user/logout`;

const useMypageLogout = () => {
const navigate = useNavigate();
const setIsLoggedIn = useSetRecoilState(loginState);
const token = localStorage.getItem("accessToken");
const setIsAuthenticated = useSetRecoilState(isAuthenticatedState);
const [, , removeCookie] = useCookies(["accessToken", "refreshToken", "JSESSIONID"]);
// 반환된 함수가 실제로 호출되면 로그아웃을 수행
const isTokenLogout = async () => {
// 로컬스토리지에 엑세스토큰 저장시에.
Expand All @@ -24,14 +25,15 @@ const useMypageLogout = () => {
};
try {
const response = await axios.get(apiUrl, config);
console.log(response);
setIsAuthenticated(false);
setIsLoggedIn({
accessToken: null,
expiredTime: null,
});
localStorage.removeItem("accessToken", "");
message.success("로그아웃에 성공하셨습니다.");
if(response.status === 200){
console.log(response);
setIsAuthenticated(false);
localStorage.clear();
removeCookie("JSESSIONID");
removeCookie("accessToken");
removeCookie("refreshToken");
message.success("로그아웃에 성공하셨습니다.");
}
navigate("/");
} catch (error) {
message.info("관리자에게 문의하세요.");
Expand Down
Loading
Loading