);
};
diff --git a/client/src/components/common/SelectField.jsx b/client/src/components/common/SelectField.jsx
index cd51f825..c24834f4 100644
--- a/client/src/components/common/SelectField.jsx
+++ b/client/src/components/common/SelectField.jsx
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
-import Checkbox from '@/components/common/CheckBox';
+import Checkbox from '@/components/common/inputs/CheckBox';
const SelectField = ({ label, required, options, onChange, selectedOptions, ...props }) => {
const [isOpen, setIsOpen] = useState(false);
diff --git a/client/src/layouts/Header.jsx b/client/src/layouts/Header.jsx
index 3b22f6f9..c16e76bd 100644
--- a/client/src/layouts/Header.jsx
+++ b/client/src/layouts/Header.jsx
@@ -1,15 +1,8 @@
import BreadCrumb from '@/components/common/BreadCrumb';
-import vendorRoute from '@/routes/vendorRoute';
const Header = () => {
- const tmp = () => {
- for (const roots of vendorRoute()) {
- console.log(roots);
- }
- };
-
return (
-
+
);
diff --git a/client/src/pages/vendor/DashBoardPage.jsx b/client/src/pages/vendor/DashBoardPage.jsx
index 86113a7f..dac606c1 100644
--- a/client/src/pages/vendor/DashBoardPage.jsx
+++ b/client/src/pages/vendor/DashBoardPage.jsx
@@ -1,4 +1,3 @@
-import { getMemberList } from '@/apis/member';
import { useContext } from 'react';
import AlertContext from '@/utils/dialog/alert/AlertContext';
import AlertWdithContext from '@/utils/dialog/alertwidth/AlertWidthContext';
diff --git a/client/src/routes/memberRoute.jsx b/client/src/routes/memberRoute.jsx
index 22038185..67cca8af 100644
--- a/client/src/routes/memberRoute.jsx
+++ b/client/src/routes/memberRoute.jsx
@@ -1,13 +1,10 @@
import { Navigate } from 'react-router-dom';
-import { lazy } from 'react';
-import LazyComponentWrapper from '@/pages/utils/LazyComponentWrapper';
-
-const SimpConsent = lazy(() => import('@/pages/member/SimpConsentPage')); // 간편동의 등록
-const Invoice = lazy(() => import('@/pages/member/InvoicePage')); // 청구서 상세조회
-const PaymentChoose = lazy(() => import('@/pages/member/PaymentChoosePage')); // 청구서 결제수단 선택
-const PaymentCard = lazy(() => import('@/pages/member/PaymentCardPage')); // 납부자결제 (카드)
-const PaymentAccount = lazy(() => import('@/pages/member/PaymentAccountPage')); // 납부자결제 (계좌)
-const PaymentVirtual = lazy(() => import('@/pages/member/PaymentVirtualPage')); // 가상계좌결제
+import SimpConsent from '@/pages/member/SimpConsentPage'; // 간편동의 등록
+import Invoice from '@/pages/member/InvoicePage'; // 청구서 상세조회
+import PaymentChoose from '@/pages/member/PaymentChoosePage'; // 청구서 결제수단 선택
+import PaymentCard from '@/pages/member/PaymentCardPage'; // 납부자결제 (카드)
+import PaymentAccount from '@/pages/member/PaymentAccountPage'; // 납부자결제 (계좌)
+import PaymentVirtual from '@/pages/member/PaymentVirtualPage'; // 가상계좌결제
const memberRoute = () => {
return [
@@ -17,27 +14,27 @@ const memberRoute = () => {
},
{
path: 'simpconsent/:memberid?',
- element:
,
+ element:
,
},
{
path: 'invoice/:invoiceId',
- element:
,
+ element:
,
},
{
path: 'invoice/payment',
- element:
,
+ element:
,
},
{
path: 'invoice/payment/card',
- element:
,
+ element:
,
},
{
path: 'invoice/payment/account',
- element:
,
+ element:
,
},
{
path: 'invoice/payment/virtual',
- element:
,
+ element:
,
},
];
};
diff --git a/client/src/routes/root.jsx b/client/src/routes/root.jsx
index 3be52a8e..bc9dc003 100644
--- a/client/src/routes/root.jsx
+++ b/client/src/routes/root.jsx
@@ -1,13 +1,10 @@
-import { lazy } from 'react';
import { Navigate, createBrowserRouter } from 'react-router-dom';
-import LazyComponentWrapper from '@/pages/utils/LazyComponentWrapper';
import vendorRoute from './vendorRoute';
import memberRoute from './memberRoute';
-
-const Login = lazy(() => import('@/pages/LoginPage')); // 로그인
-const Signup = lazy(() => import('@/pages/SignupPage')); // 회원가입
-const VendorIndex = lazy(() => import('@/pages/vendor/VenIndexPage')); // 고객 중첩 라우팅
-const MemberIndex = lazy(() => import('@/pages/member/MemIndexPage')); // 회원 중첩 라우팅
+import Login from '@/pages/LoginPage'; // 로그인
+import Signup from '@/pages/SignupPage'; // 회원가입
+import VendorIndex from '@/pages/vendor/VenIndexPage'; // 고객 중첩 라우팅
+import MemberIndex from '@/pages/member/MemIndexPage'; // 회원 중첩 라우팅
const root = createBrowserRouter([
{
@@ -16,20 +13,20 @@ const root = createBrowserRouter([
},
{
path: 'login',
- element:
,
+ element:
,
},
{
path: 'signup',
- element:
,
+ element:
,
},
{
path: 'vendor',
- element:
,
+ element:
,
children: vendorRoute(),
},
{
path: 'member',
- element:
,
+ element:
,
children: memberRoute(),
},
]);
diff --git a/client/src/routes/vendorRoute.jsx b/client/src/routes/vendorRoute.jsx
index c5bcb216..bfca1f7c 100644
--- a/client/src/routes/vendorRoute.jsx
+++ b/client/src/routes/vendorRoute.jsx
@@ -1,38 +1,29 @@
import { Navigate } from 'react-router-dom';
-import { lazy } from 'react';
-import LazyComponentWrapper from '@/pages/utils/LazyComponentWrapper';
import User from '@/assets/User';
import Home from '@/assets/Home';
import File from '@/assets/File';
import Card from '@/assets/Card';
import Item from '@/assets/Item';
import Setting from '@/assets/Setting';
-import ProductListPage from '@/pages/vendor/product/ProductListPage';
-
-const DashBoard = lazy(() => import('@/pages/vendor/DashBoardPage')); // 대시보드
-
-const MemberIndex = lazy(() => import('@/pages/vendor/member/MemberIndex')); // 회원
-const MemberList = lazy(() => import('@/pages/vendor/member/MemberListPage')); // 회원목록
-const MemberDetail = lazy(() => import('@/pages/vendor/member/MemberDetailPage')); // 회원상세
-const MemberRegister = lazy(() => import('@/pages/vendor/member/MemberRegisterPage')); // 회원등록
-const MemberIngoUpdate = lazy(() => import('@/pages/vendor/member/MemberInfoUpdatePage')); // 회원수정
-
-const ContractIndex = lazy(() => import('@/pages/vendor/contract/ContractIndex')); // 계약
-const ContractList = lazy(() => import('@/pages/vendor/contract/ContractListPage')); // 계약목록
-const ContractDetail = lazy(() => import('@/pages/vendor/contract/ContractDetailPage')); // 계약상세
-const ProductInfoUpdate = lazy(() => import('@/pages/vendor/contract/ProductInfoUpdatePage')); // 상품수정
-const BillingInfoUpdate = lazy(() => import('@/pages/vendor/contract/BillingInfoUpdatePage')); // 청구수정
-const PaymentInfoUpdate = lazy(() => import('@/pages/vendor/contract/PaymentInfoUpdatePage')); // 결제수정
-
-const BillingtIndex = lazy(() => import('@/pages/vendor/billing/BillingIndex')); // 청구
-const BillingList = lazy(() => import('@/pages/vendor/billing/BillingListPage')); // 청구목록
-const BillingDetail = lazy(() => import('@/pages/vendor/billing/BillingDetailPage')); // 청구상세
-
-const ProductIndex = lazy(() => import('@/pages/vendor/product/ProductIndex')); // 상품
-const ProductList = lazy(() => import('@/pages/vendor/product/ProductListPage')); // 상품목록
-
-const SettingIndex = lazy(() => import('@/pages/vendor/setting/SettingIndex')); // 간편서명동의설정
-const SettingSimpConsent = lazy(() => import('@/pages/vendor/setting/SettingSimpConsentPage')); // 간편서명동의설정
+import DashBoard from '@/pages/vendor/DashBoardPage';
+import MemberIndex from '@/pages/vendor/member/MemberIndex';
+import MemberList from '@/pages/vendor/member/MemberListPage';
+import MemberDetail from '@/pages/vendor/member/MemberDetailPage';
+import MemberRegister from '@/pages/vendor/member/MemberRegisterPage';
+import MemberInfoUpdate from '@/pages/vendor/member/MemberInfoUpdatePage';
+import ContractIndex from '@/pages/vendor/contract/ContractIndex';
+import ContractList from '@/pages/vendor/contract/ContractListPage';
+import ContractDetail from '@/pages/vendor/contract/ContractDetailPage';
+import ProductInfoUpdate from '@/pages/vendor/contract/ProductInfoUpdatePage';
+import BillingInfoUpdate from '@/pages/vendor/contract/BillingInfoUpdatePage';
+import PaymentInfoUpdate from '@/pages/vendor/contract/PaymentInfoUpdatePage';
+import BillingIndex from '@/pages/vendor/billing/BillingIndex';
+import BillingList from '@/pages/vendor/billing/BillingListPage';
+import BillingDetail from '@/pages/vendor/billing/BillingDetailPage';
+import ProductIndex from '@/pages/vendor/product/ProductIndex';
+import ProductList from '@/pages/vendor/product/ProductListPage';
+import SettingIndex from '@/pages/vendor/setting/SettingIndex';
+import SettingSimpConsent from '@/pages/vendor/setting/SettingSimpConsentPage';
const vendorRoute = () => {
return [
@@ -44,37 +35,37 @@ const vendorRoute = () => {
path: 'dashboard',
name: '대시보드',
icon:
,
- element:
,
+ element:
,
},
{
path: 'members',
name: '회원',
icon:
,
- element:
,
+ element:
,
children: [
{
path: '',
name: '회원 목록',
menu: true,
- element:
,
+ element:
,
},
{
path: 'detail/:id',
name: '회원 상세 정보',
menu: false,
- element:
,
+ element:
,
},
{
path: 'register',
name: '회원 등록',
menu: false,
- element:
,
+ element:
,
},
{
path: 'update/:id',
name: '회원 정보 수정',
menu: false,
- element:
,
+ element:
,
},
],
},
@@ -82,37 +73,37 @@ const vendorRoute = () => {
path: 'contracts',
name: '계약',
icon:
,
- element:
,
+ element:
,
children: [
{
path: '',
name: '계약 목록',
menu: true,
- element:
,
+ element:
,
},
{
path: 'detail/:id',
name: '계약 상세 정보',
menu: false,
- element:
,
+ element:
,
},
{
path: 'Product/update/:id',
name: '상품 정보 수정',
menu: false,
- element:
,
+ element:
,
},
{
path: 'payment/update/:id',
name: '결제 정보 수정',
menu: false,
- element:
,
+ element:
,
},
{
path: 'billings/update/:id',
- name: '청구 정보 수저',
+ name: '청구 정보 수정',
menu: false,
- element:
,
+ element:
,
},
],
},
@@ -120,19 +111,19 @@ const vendorRoute = () => {
path: 'billings',
name: '청구',
icon:
,
- element:
,
+ element:
,
children: [
{
path: '',
name: '청구 목록',
menu: true,
- element:
,
+ element:
,
},
{
path: 'detail/:id',
name: '청구 상세 정보',
menu: false,
- element:
,
+ element:
,
},
],
},
@@ -140,13 +131,13 @@ const vendorRoute = () => {
path: 'products',
name: '상품',
icon:
,
- element:
,
+ element:
,
children: [
{
path: '',
name: '상품 목록',
menu: true,
- element:
,
+ element:
,
},
],
},
@@ -154,7 +145,7 @@ const vendorRoute = () => {
path: 'setting',
name: '설정',
icon:
,
- element:
,
+ element:
,
children: [
{
path: '',
@@ -166,7 +157,7 @@ const vendorRoute = () => {
path: 'simpconsent',
name: '간편서명동의 설정',
menu: true,
- element:
,
+ element:
,
},
],
},
From affbf5b78a2185b20b20af0109333b319ab1bffc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EC=A0=95=ED=98=84=EC=9A=B0?=
<122512457+hyo-nu@users.noreply.github.com>
Date: Mon, 15 Jul 2024 11:01:02 +0900
Subject: [PATCH 3/4] =?UTF-8?q?[KAN-149]=20feat(login):=20breadCrumb=20?=
=?UTF-8?q?=EA=B5=AC=ED=98=84=20=EC=A4=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
client/src/components/common/BreadCrumb.jsx | 24 +++++++++++++++------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/client/src/components/common/BreadCrumb.jsx b/client/src/components/common/BreadCrumb.jsx
index 4d0995ff..105e73e0 100644
--- a/client/src/components/common/BreadCrumb.jsx
+++ b/client/src/components/common/BreadCrumb.jsx
@@ -5,26 +5,35 @@ import { useLocation } from 'react-router-dom';
const BreadCrumb = () => {
const [currentRoute, setCurrentRoute] = useState({
icon: '',
- name: '',
- childName: '',
+ name: [],
});
const location = useLocation();
- const currentPaths = location.pathname.split('/').filter(path => path);
+ const currentPaths = location.pathname
+ .split('/')
+ .filter(path => path)
+ .slice(1);
const breadCrumbTitle = () => {
for (const route of vendorRoute()) {
- if (currentPaths[1] === route.path) {
+ if (currentPaths[0] === route.path) {
setCurrentRoute({
icon: route.icon,
- name: route.name,
- childName: '',
+ name: [route.name],
});
+
+ return route;
}
}
};
+ const breadCrumbMenu = route => {
+ if (route.child) {
+ setCurrentRoute({});
+ }
+ };
+
const breadCrumbSetting = () => {
for (const route of vendorRoute()) {
if (currentPaths[1] === route.path) {
@@ -61,7 +70,8 @@ const BreadCrumb = () => {
};
useEffect(() => {
- breadCrumbSetting();
+ const route = breadCrumbTitle();
+ breadCrumbSetting(route);
}, [location]);
return (
From 5dc9f9d5dc079e71a3012d77c645f066c7f252ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EC=A0=95=ED=98=84=EC=9A=B0?=
<122512457+hyo-nu@users.noreply.github.com>
Date: Mon, 15 Jul 2024 14:44:51 +0900
Subject: [PATCH 4/4] =?UTF-8?q?[KAN-149]=20feat(login):=20breadCrumb=20?=
=?UTF-8?q?=EA=B5=AC=ED=98=84=20=EC=99=84=EB=A3=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
client/src/assets/Home.jsx | 5 +-
client/src/assets/Item.jsx | 11 ++-
client/src/components/common/BreadCrumb.jsx | 78 +++++++++------------
client/src/layouts/SideBar.jsx | 11 ++-
client/src/routes/vendorRoute.jsx | 12 ++--
5 files changed, 60 insertions(+), 57 deletions(-)
diff --git a/client/src/assets/Home.jsx b/client/src/assets/Home.jsx
index eec9bd95..75f6f1f8 100644
--- a/client/src/assets/Home.jsx
+++ b/client/src/assets/Home.jsx
@@ -6,7 +6,10 @@ const Home = props => (
xmlns='http://www.w3.org/2000/svg'
{...props} // props를 통해 스타일이나 클래스 등을 전달할 수 있습니다.
>
-
+
);
diff --git a/client/src/assets/Item.jsx b/client/src/assets/Item.jsx
index 0ad585de..97d0dd8b 100644
--- a/client/src/assets/Item.jsx
+++ b/client/src/assets/Item.jsx
@@ -1,17 +1,26 @@
const Item = props => (
-