Skip to content

Commit

Permalink
Merge pull request #379 from beezSSG/dev
Browse files Browse the repository at this point in the history
#deploy dev -> main 운영 배포 04-19 10:40
  • Loading branch information
rog-won authored Apr 19, 2024
2 parents 963a068 + bddd960 commit 77f6f56
Show file tree
Hide file tree
Showing 47 changed files with 2,409 additions and 1,753 deletions.
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "./firebase-messaging-sw.js";
import MainHome from './pages/main/MainHome.js';
import Manager from './pages/manager/Manager.js';
import Ceo from './pages/ceo/Ceo.js';
import ScrollToTop from './ScrollToTop';

function App() {

Expand Down Expand Up @@ -34,6 +35,7 @@ function App() {
<>
<AuthProvider>
<BrowserRouter>
<ScrollToTop />
<Routes>
<Route path='/*' element={<MainHome />} />
<Route path='/manager/*' element={<Manager/>} />
Expand Down
14 changes: 14 additions & 0 deletions src/ScrollToTop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { useEffect } from 'react';
import { useLocation } from 'react-router-dom';

function ScrollToTop() {
const { pathname } = useLocation();

useEffect(() => {
window.scrollTo(0, 0);
}, [pathname]);

return null;
}

export default ScrollToTop;
1 change: 1 addition & 0 deletions src/assets/data/mypage/list.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{
"title": "내 활동",
"subtitle": [
{ "subname": "최근본 상품", "subpath": "" },
{ "subname": "찜목록", "subpath": "save" },
{ "subname": "나의 후기", "subpath": "review" }
]
Expand Down
13 changes: 13 additions & 0 deletions src/assets/imgs/logo/teamlogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 0 additions & 56 deletions src/pages/ceo/CheckModal.js

This file was deleted.

5 changes: 2 additions & 3 deletions src/pages/ceo/Inventory.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export default function Inventory() {

return (
<div className="mx-auto w-[80%]">
<p className="text-3xl font-semibold mb-4">재고 현황</p>
<div className="text-center mb-5">
<input
type="search"
Expand All @@ -58,7 +57,7 @@ export default function Inventory() {
<thead>
<tr className="bg-yellow-400 p-20">
<th className="w-1/6 py-2">번호</th>
<th className="w-1/2 py-2">점포 이름</th>
<th className="w-1/6 py-1">카테고리</th>
<th className="w-1/2 py-1">상품 이름</th>
<th className="w-1/5 py-2">가격</th>
<th className="w-1/4 py-2">수량</th>
Expand All @@ -72,7 +71,7 @@ export default function Inventory() {
className="border-b border-gray-300 hover:bg-gray-200"
>
<td className="text-center py-3">{[index + 1]}</td>
<td className="text-center py-3">{group.storeName}</td>
<td className="text-center py-3">{group.productCategory}</td>
<td className="text-center py-3">{group.productName}</td>
<td className="text-center py-3">
{group.price.toLocaleString()}
Expand Down
57 changes: 57 additions & 0 deletions src/pages/ceo/PickCheckModal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { useState } from "react";
import { Modal, Button } from "antd";
import axios from "axios";

export default function PickCheckModal({ getPickup, group }) {

const [isOpen, setIsOpen] = useState(false);

const onToggleModal = () => {
setIsOpen((prev) => !prev);
};

// customerName / date
function confrimHandle() {
// const params = { "id": group[0].customerId, "date":group[0].date };
const params = { "date":group[0].date };
console.log(params);
axios
.post("ceo/deletepickup", null, { params: params })
.then((resp) => {
getPickup("",0);

console.log(resp);
})
.catch((error) => {
// 오류가 발생했을 때의 처리
console.error("error");
});
onToggleModal();
}

return (
<>
<button
type="button"
onClick={onToggleModal}
className="bg-sub-yellow rounded-xl p-2 font-bold hover:bg-sub-orange"
>
확인하기
</button>

{isOpen &&
<Modal
open={true}
centered={true}
footer={null}
onCancel={onToggleModal}
>
{/* 여기에 모달내부에 보여줄 디자인을 작성 */}
<Button key="submit" onClick={confrimHandle}>
<h1 className="text-lg font-bold">승인 확인되었습니다</h1>
</Button>
</Modal>
}
</>
);
}
Loading

0 comments on commit 77f6f56

Please sign in to comment.