Compare commits
No commits in common. "eaddd3b2a3386a6b3526d581f3c95055068b23bf" and "87868245697d4e5932647be04c093473b55675ca" have entirely different histories.
eaddd3b2a3
...
8786824569
@ -1,5 +1,5 @@
|
|||||||
import Header from '@/components/ui/common/Header'
|
import Header from '@/components/ui/common/Header'
|
||||||
|
|
||||||
export default function page() {
|
export default function page() {
|
||||||
return <Header name={'調査物件一覧'} />
|
return <Header name={'調査物件一覧'} backBtn={true} />
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
import type { Metadata } from 'next'
|
import type { Metadata } from 'next'
|
||||||
|
|
||||||
import ReactQueryProviders from '@/providers/ReactQueryProvider'
|
import ReactQueryProviders from '@/providers/ReactQueryProvider'
|
||||||
import PopupController from '@/components/ui/PopupController'
|
import PopupController from '@/components/ui/PopupController'
|
||||||
|
|
||||||
import '@/styles/style.scss'
|
import '@/styles/style.scss'
|
||||||
|
|
||||||
import type { ReactNode } from 'react'
|
import type { ReactNode } from 'react'
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
import NavTab from '@/components/survey-sale/common/NavTab'
|
|
||||||
|
|
||||||
export default function page() {
|
|
||||||
return <NavTab />
|
|
||||||
}
|
|
||||||
21
src/app/survey-sale/[id]/basic-info/page.tsx
Normal file
21
src/app/survey-sale/[id]/basic-info/page.tsx
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import BasicForm from '@/components/survey-sale/detail/BasicForm'
|
||||||
|
|
||||||
|
export default function page() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="container">
|
||||||
|
<div className="sale-contents">
|
||||||
|
<div className="sale-detail-tab-relative">
|
||||||
|
<div className="sale-detail-tab-wrap">
|
||||||
|
<div className="sale-detail-tab-inner">
|
||||||
|
<button className="sale-detail-tab act">基本情報</button>
|
||||||
|
<button className="sale-detail-tab">電気 / 屋根情報</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<BasicForm />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -4,8 +4,20 @@ import DetailForm from '@/components/survey-sale/detail/DetailForm'
|
|||||||
export default function page() {
|
export default function page() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<DataTable />
|
<div className="container">
|
||||||
<DetailForm />
|
<div className="sale-contents">
|
||||||
|
<div className="sale-detail-tab-relative">
|
||||||
|
<div className="sale-detail-tab-wrap">
|
||||||
|
<div className="sale-detail-tab-inner">
|
||||||
|
<button className="sale-detail-tab act">基本情報</button>
|
||||||
|
<button className="sale-detail-tab">電気 / 屋根情報</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<DataTable />
|
||||||
|
<DetailForm />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
21
src/app/survey-sale/[id]/roof-info/page.tsx
Normal file
21
src/app/survey-sale/[id]/roof-info/page.tsx
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import RoofInfoForm from '@/components/survey-sale/detail/RoofInfoForm'
|
||||||
|
|
||||||
|
export default function page() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="container">
|
||||||
|
<div className="sale-contents">
|
||||||
|
<div className="sale-detail-tab-relative">
|
||||||
|
<div className="sale-detail-tab-wrap">
|
||||||
|
<div className="sale-detail-tab-inner">
|
||||||
|
<button className="sale-detail-tab">基本情報</button>
|
||||||
|
<button className="sale-detail-tab act">電気 / 屋根情報</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<RoofInfoForm />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -1,9 +0,0 @@
|
|||||||
import BasicForm from '@/components/survey-sale/detail/BasicForm'
|
|
||||||
|
|
||||||
export default function page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<BasicForm />
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
import { ReactNode } from 'react'
|
|
||||||
|
|
||||||
interface SurveySaleLayoutProps {
|
|
||||||
children: ReactNode
|
|
||||||
navTab: ReactNode
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function layout({ children, navTab }: SurveySaleLayoutProps) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="container">
|
|
||||||
<div className="sale-contents">
|
|
||||||
{navTab}
|
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@ -4,8 +4,12 @@ import SearchForm from '@/components/survey-sale/list/SearchForm'
|
|||||||
export default function page() {
|
export default function page() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SearchForm />
|
<div className="container">
|
||||||
<ListTable />
|
<div className="sale-contents">
|
||||||
|
<SearchForm />
|
||||||
|
<ListTable />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
import RoofInfoForm from '@/components/survey-sale/detail/RoofInfoForm'
|
|
||||||
|
|
||||||
export default function page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<RoofInfoForm />
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
'use client'
|
|
||||||
|
|
||||||
import { usePathname } from 'next/navigation'
|
|
||||||
|
|
||||||
export default function NavTab() {
|
|
||||||
const pathname = usePathname()
|
|
||||||
|
|
||||||
if (pathname === '/survey-sale') {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="sale-detail-tab-relative">
|
|
||||||
<div className="sale-detail-tab-wrap">
|
|
||||||
<div className="sale-detail-tab-inner">
|
|
||||||
<button className="sale-detail-tab">基本情報</button>
|
|
||||||
<button className="sale-detail-tab">電気 / 屋根情報</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@ -1,14 +1,4 @@
|
|||||||
'use client'
|
|
||||||
|
|
||||||
import { useHeaderStore } from '@/store/header'
|
|
||||||
import { useEffect } from 'react'
|
|
||||||
|
|
||||||
export default function Main() {
|
export default function Main() {
|
||||||
const { setBackBtn } = useHeaderStore()
|
|
||||||
useEffect(() => {
|
|
||||||
setBackBtn(false)
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="main-contens">
|
<div className="main-contens">
|
||||||
|
|||||||
@ -1,42 +1,33 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { useEffect, useState } from 'react'
|
import { useState } from 'react'
|
||||||
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { usePathname } from 'next/navigation'
|
|
||||||
|
|
||||||
import { Swiper, SwiperSlide } from 'swiper/react'
|
import { Swiper, SwiperSlide } from 'swiper/react'
|
||||||
|
|
||||||
import type { HeaderProps } from '@/types/Header'
|
import type { HeaderProps } from '@/types/Header'
|
||||||
|
|
||||||
import 'swiper/css'
|
import 'swiper/css'
|
||||||
|
import { usePathname } from 'next/navigation'
|
||||||
|
|
||||||
// type HeaderProps = {
|
// type HeaderProps = {
|
||||||
// name: string //header 이름
|
// name: string //header 이름
|
||||||
// backBtn: boolean // 뒤로가기 버튼 유무
|
// backBtn: boolean // 뒤로가기 버튼 유무
|
||||||
// }
|
// }
|
||||||
|
|
||||||
export default function Header({ name }: HeaderProps) {
|
export default function Header({ name, backBtn }: HeaderProps) {
|
||||||
const pathname = usePathname()
|
const pathname = usePathname()
|
||||||
const [headerAct, setHeaderAct] = useState<boolean>(false)
|
const [headerAct, setHeaderAct] = useState<boolean>(false)
|
||||||
const [isShowBackBtn, setIsShowBackBtn] = useState<boolean>(false)
|
|
||||||
|
|
||||||
if (pathname === '/login') {
|
if (pathname === '/login') {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (pathname !== '/') {
|
|
||||||
setIsShowBackBtn(true)
|
|
||||||
}
|
|
||||||
}, [pathname])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="header-warp">
|
<div className="header-warp">
|
||||||
<header>
|
<header>
|
||||||
<div className="header-inner">
|
<div className="header-inner">
|
||||||
{isShowBackBtn && (
|
{backBtn && (
|
||||||
<div className="back-button-wrap">
|
<div className="back-button-wrap">
|
||||||
<button className="back-button"></button>
|
<button className="back-button"></button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,19 +0,0 @@
|
|||||||
import { create } from 'zustand'
|
|
||||||
|
|
||||||
type HeaderState = {
|
|
||||||
backBtn: boolean
|
|
||||||
setBackBtn: (backBtn: boolean) => void
|
|
||||||
}
|
|
||||||
|
|
||||||
type InitialState = {
|
|
||||||
backBtn: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
const initialState: InitialState = {
|
|
||||||
backBtn: true,
|
|
||||||
}
|
|
||||||
|
|
||||||
export const useHeaderStore = create<HeaderState>((set) => ({
|
|
||||||
...initialState,
|
|
||||||
setBackBtn: (value: boolean) => set((state) => ({ ...state, backBtn: value })),
|
|
||||||
}))
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
export type HeaderProps = {
|
export type HeaderProps = {
|
||||||
name: string //header 이름
|
name: string //header 이름
|
||||||
// backBtn: boolean // 뒤로가기 버튼 유무
|
backBtn: boolean // 뒤로가기 버튼 유무
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user