Merge branch 'dev' into dev-yj
This commit is contained in:
commit
0123420bc0
@ -41,12 +41,12 @@ export default function MainPage(mainPageProps) {
|
|||||||
if (searchRadioType === 'object') {
|
if (searchRadioType === 'object') {
|
||||||
setStuffSearch({
|
setStuffSearch({
|
||||||
...stuffSearch,
|
...stuffSearch,
|
||||||
schObjectNo: searchTxt,
|
schObjectNo: searchTxt.trim(),
|
||||||
code: 'M',
|
code: 'M',
|
||||||
})
|
})
|
||||||
router.push('/management/stuff', { scroll: false })
|
router.push('/management/stuff', { scroll: false })
|
||||||
} else {
|
} else {
|
||||||
setSearchForm({ ...searchForm, searchValue: searchTxt, mainFlag: 'Y' })
|
setSearchForm({ ...searchForm, searchValue: searchTxt.trim(), mainFlag: 'Y' })
|
||||||
router.push('/community/faq')
|
router.push('/community/faq')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,24 +60,33 @@ export default function Header(props) {
|
|||||||
const qOrderUrl = process.env.NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL
|
const qOrderUrl = process.env.NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL
|
||||||
const qMusubiUrl = process.env.NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL
|
const qMusubiUrl = process.env.NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL
|
||||||
|
|
||||||
const [SelectOptions, setSelectOptions] = useState(
|
const [SelectOptions, setSelectOptions] = useState([])
|
||||||
userSession.groupId === '60000' ? [{ id: 0, name: 'Q.ORDER', link: `${qOrderUrl}` }] : [{ id: 1, name: 'Q.Musubi', link: `${qMusubiUrl}` }],
|
|
||||||
)
|
|
||||||
|
|
||||||
const getAutoLoginParam = async () => {
|
const getAutoLoginParam = async () => {
|
||||||
await promisePost({ url: '/api/login/v1.0/user/login/autoLoginEncryptData', data: { loginId: userSession.userId } })
|
await promisePost({ url: '/api/login/v1.0/user/login/autoLoginEncryptData', data: { loginId: userSession.userId } })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
setSelectOptions(
|
setSelectOptions(
|
||||||
userSession.groupId === '60000'
|
userSession.storeId === 'T01'
|
||||||
? [{ id: 0, name: 'Q.ORDER', link: `${qOrderUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` }]
|
? [
|
||||||
: [{ id: 1, name: 'Q.Musubi', link: `${qMusubiUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` }],
|
{ id: 0, name: getMessage('site.header.link1') },
|
||||||
)
|
{ id: 1, name: 'Q.ORDER', link: `${qOrderUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` },
|
||||||
setSelected(
|
{ id: 2, name: 'Q.Musubi', link: `${qMusubiUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` },
|
||||||
userSession.groupId === '60000'
|
{ id: 3, name: getMessage('site.header.link2'), link: `https://q-warranty.q-cells.jp/seller_login`, target: '_blank' },
|
||||||
? { id: 0, name: 'Q.ORDER', link: `${qOrderUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` }
|
]
|
||||||
: { id: 1, name: 'Q.Musubi', link: `${qMusubiUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` },
|
: userSession.groupId === '60000'
|
||||||
|
? [
|
||||||
|
{ id: 0, name: getMessage('site.header.link1') },
|
||||||
|
{ id: 1, name: 'Q.ORDER', link: `${qOrderUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` },
|
||||||
|
{ id: 2, name: getMessage('site.header.link2'), link: `https://q-warranty.q-cells.jp/seller_login`, target: '_blank' },
|
||||||
|
]
|
||||||
|
: [
|
||||||
|
{ id: 0, name: getMessage('site.header.link1') },
|
||||||
|
{ id: 1, name: 'Q.Musubi', link: `${qMusubiUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` },
|
||||||
|
{ id: 2, name: getMessage('site.header.link2'), link: `https://q-warranty.q-cells.jp/seller_login`, target: '_blank' },
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
onChangeSelect({ id: 0, name: getMessage('site.header.link1') })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
@ -85,9 +94,9 @@ export default function Header(props) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// useEffect(() => {
|
useEffect(() => {
|
||||||
// getAutoLoginParam()
|
getAutoLoginParam()
|
||||||
// }, [userSession])
|
}, [userSession])
|
||||||
|
|
||||||
const menus = [
|
const menus = [
|
||||||
{ id: 0, name: 'header.menus.home', url: '/', children: [] },
|
{ id: 0, name: 'header.menus.home', url: '/', children: [] },
|
||||||
@ -124,18 +133,31 @@ export default function Header(props) {
|
|||||||
const onChangeSelect = (option) => {
|
const onChangeSelect = (option) => {
|
||||||
setSelected(option)
|
setSelected(option)
|
||||||
}
|
}
|
||||||
|
|
||||||
const navPage = () => {
|
const navPage = () => {
|
||||||
if (selected.link) {
|
if (selected.link) {
|
||||||
location.href = selected.link
|
if (selected.target === '_blank') {
|
||||||
|
window.open(selected.link)
|
||||||
|
} else {
|
||||||
|
location.href = selected.link
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Home 클릭시 물건 리코일 비우기
|
// 물건메뉴 이외 클릭시 물건 리코일 비우기
|
||||||
const moveHome = () => {
|
const removeStuffRecoil = (menu) => {
|
||||||
setStuffSearch({
|
//menu.id 0 HOME
|
||||||
...stuffSearch,
|
//menu.id 3 신규물건등록
|
||||||
code: 'DELETE',
|
//menu.id 4 물건리스트
|
||||||
})
|
//menu.id 5 공지사항
|
||||||
|
//menu.id 6 FAQ
|
||||||
|
//menu.id 7 자료실
|
||||||
|
if (menu.id === 0 || menu.id === 5 || menu.id === 6 || menu.id === 7) {
|
||||||
|
setStuffSearch({
|
||||||
|
...stuffSearch,
|
||||||
|
code: 'DELETE',
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getMenuTemplate = (menus) => {
|
const getMenuTemplate = (menus) => {
|
||||||
@ -152,7 +174,8 @@ export default function Header(props) {
|
|||||||
key={`${menu.id}`}
|
key={`${menu.id}`}
|
||||||
href={menu.url}
|
href={menu.url}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
moveHome()
|
// moveHome()
|
||||||
|
removeStuffRecoil(menu)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{getMessage(menu.name)}
|
{getMessage(menu.name)}
|
||||||
@ -169,7 +192,13 @@ export default function Header(props) {
|
|||||||
onMouseEnter={(e) => ToggleonMouse(e, 'add', 'li > ul')}
|
onMouseEnter={(e) => ToggleonMouse(e, 'add', 'li > ul')}
|
||||||
onMouseLeave={(e) => ToggleonMouse(e, 'remove', 'li > ul')}
|
onMouseLeave={(e) => ToggleonMouse(e, 'remove', 'li > ul')}
|
||||||
>
|
>
|
||||||
<Link scroll={false} href={m.url}>
|
<Link
|
||||||
|
scroll={false}
|
||||||
|
href={m.url}
|
||||||
|
onClick={() => {
|
||||||
|
removeStuffRecoil(m)
|
||||||
|
}}
|
||||||
|
>
|
||||||
{getMessage(m.name)}
|
{getMessage(m.name)}
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
@ -190,7 +219,15 @@ export default function Header(props) {
|
|||||||
<div className="header-inner">
|
<div className="header-inner">
|
||||||
<div className="header-right">
|
<div className="header-right">
|
||||||
<h1 className="logo">
|
<h1 className="logo">
|
||||||
<Link href={'/'}></Link>
|
<Link
|
||||||
|
href={'/'}
|
||||||
|
onClick={() => {
|
||||||
|
setStuffSearch({
|
||||||
|
...stuffSearch,
|
||||||
|
code: 'DELETE',
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
></Link>
|
||||||
</h1>
|
</h1>
|
||||||
<nav>
|
<nav>
|
||||||
<ul className="nav-list ">{getMenuTemplate(menus)}</ul>
|
<ul className="nav-list ">{getMenuTemplate(menus)}</ul>
|
||||||
@ -223,7 +260,7 @@ export default function Header(props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="select-box">
|
<div className="select-box">
|
||||||
<QSelectBox options={SelectOptions} onChange={onChangeSelect} />
|
<QSelectBox options={SelectOptions} onChange={onChangeSelect} title={getMessage('site.header.link1')} />
|
||||||
</div>
|
</div>
|
||||||
<div className="btn-wrap">
|
<div className="btn-wrap">
|
||||||
<button className="btn-frame small dark" onClick={() => navPage()}>
|
<button className="btn-frame small dark" onClick={() => navPage()}>
|
||||||
|
|||||||
@ -16,7 +16,6 @@ import { useMainContentsController } from '@/hooks/main/useMainContentsControlle
|
|||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
|
|
||||||
export default function MainContents() {
|
export default function MainContents() {
|
||||||
const { session } = useContext(SessionContext)
|
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
||||||
@ -86,6 +85,7 @@ export default function MainContents() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('qcastState:::', qcastState?.businessCharger)
|
||||||
return (
|
return (
|
||||||
<div className="main-product-list-wrap">
|
<div className="main-product-list-wrap">
|
||||||
<div className="main-product-list">
|
<div className="main-product-list">
|
||||||
@ -107,8 +107,8 @@ export default function MainContents() {
|
|||||||
>
|
>
|
||||||
<div className="item-inner">
|
<div className="item-inner">
|
||||||
<span className="time">{dayjs(row.lastEditDatetime).format('YYYY.MM.DD HH:mm:ss')}</span>
|
<span className="time">{dayjs(row.lastEditDatetime).format('YYYY.MM.DD HH:mm:ss')}</span>
|
||||||
<span>{row.objectNo}</span>
|
<span>{row.tempFlg === '0' ? row.objectNo : getMessage('stuff.gridData.tempObjectNo')}</span>
|
||||||
<span>{row.objectName}</span>
|
<span>{row.objectName ? row.objectName : '-'}</span>
|
||||||
<span>{row.saleStoreName}</span>
|
<span>{row.saleStoreName}</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@ -116,7 +116,8 @@ export default function MainContents() {
|
|||||||
})}
|
})}
|
||||||
</ul>
|
</ul>
|
||||||
) : (
|
) : (
|
||||||
<MainSkeleton count={6} />
|
<></>
|
||||||
|
// <MainSkeleton count={6} />
|
||||||
)}
|
)}
|
||||||
</ProductItem>
|
</ProductItem>
|
||||||
<ProductItem num={2} name={getMessage('main.content.notice')}>
|
<ProductItem num={2} name={getMessage('main.content.notice')}>
|
||||||
@ -145,7 +146,7 @@ export default function MainContents() {
|
|||||||
return (
|
return (
|
||||||
<li key={row.rowNumber} className="faq-item">
|
<li key={row.rowNumber} className="faq-item">
|
||||||
<div className="faq-item-inner">
|
<div className="faq-item-inner">
|
||||||
<div className="faq-num pre">FAQ {row.noticeNo}</div>
|
<div className="faq-num pre">FAQ {row.rowNumber}</div>
|
||||||
<div className="faq-title pre">{row.title}</div>
|
<div className="faq-title pre">{row.title}</div>
|
||||||
<div className="faq-day pre">{dayjs(row.regDt).format('YYYY.MM.DD')}</div>
|
<div className="faq-day pre">{dayjs(row.regDt).format('YYYY.MM.DD')}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -160,10 +161,22 @@ export default function MainContents() {
|
|||||||
</ProductItem>
|
</ProductItem>
|
||||||
<ProductItem num={4} name={'Data Download'}>
|
<ProductItem num={4} name={'Data Download'}>
|
||||||
<div className="data-download-wrap">
|
<div className="data-download-wrap">
|
||||||
<button className="data-down">
|
<button
|
||||||
|
className="data-down"
|
||||||
|
type="button"
|
||||||
|
onClick={() => {
|
||||||
|
return alert(getMessage('main.content.alert.noFile'))
|
||||||
|
}}
|
||||||
|
>
|
||||||
<span>{getMessage('main.content.download1')}</span>
|
<span>{getMessage('main.content.download1')}</span>
|
||||||
</button>
|
</button>
|
||||||
<button className="data-down">
|
<button
|
||||||
|
className="data-down"
|
||||||
|
type="button"
|
||||||
|
onClick={() => {
|
||||||
|
return alert(getMessage('main.content.alert.noFile'))
|
||||||
|
}}
|
||||||
|
>
|
||||||
<span>{getMessage('main.content.download2')}</span>
|
<span>{getMessage('main.content.download2')}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,8 +9,10 @@ export default function ProductItem({ num, name, children }) {
|
|||||||
router.push('/management/stuff', { scroll: false })
|
router.push('/management/stuff', { scroll: false })
|
||||||
} else if (num === 2) {
|
} else if (num === 2) {
|
||||||
router.push('/community/notice')
|
router.push('/community/notice')
|
||||||
} else {
|
} else if (num === 3) {
|
||||||
router.push('/community/faq')
|
router.push('/community/faq')
|
||||||
|
} else {
|
||||||
|
router.push('/community/archive')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
@ -20,7 +22,7 @@ export default function ProductItem({ num, name, children }) {
|
|||||||
<span className={`item-logo ico0${num}`}></span>
|
<span className={`item-logo ico0${num}`}></span>
|
||||||
{name}
|
{name}
|
||||||
</h2>
|
</h2>
|
||||||
{num !== 4 && num !== 5 && (
|
{num !== 5 && (
|
||||||
<button
|
<button
|
||||||
className="more-btn"
|
className="more-btn"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@ -17,7 +17,6 @@ import QPagination from '../common/pagination/QPagination'
|
|||||||
import { SessionContext } from '@/app/SessionProvider'
|
import { SessionContext } from '@/app/SessionProvider'
|
||||||
|
|
||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
import { e } from 'mathjs'
|
|
||||||
|
|
||||||
export default function Stuff() {
|
export default function Stuff() {
|
||||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||||
|
|||||||
@ -34,6 +34,8 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
const [popPlanNo, setPopPlanNo] = useState('1') //default 1
|
const [popPlanNo, setPopPlanNo] = useState('1') //default 1
|
||||||
|
|
||||||
|
const [showButton, setShowButton] = useState('') //임시저장, 저장, 삭제 버튼 컨트롤
|
||||||
|
|
||||||
//공통코드
|
//공통코드
|
||||||
const { commonCode, findCommonCode } = useCommonCode()
|
const { commonCode, findCommonCode } = useCommonCode()
|
||||||
const [selOptions, setSelOptions] = useState('') //선택한 1차점
|
const [selOptions, setSelOptions] = useState('') //선택한 1차점
|
||||||
@ -266,7 +268,10 @@ export default function StuffDetail() {
|
|||||||
display: 'none',
|
display: 'none',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (managementState?.createUser === 'T01' && session?.userId !== 'T01') {
|
||||||
|
//createUser가 T01인데 로그인사용자가 T01이 아니면 버튼숨기기
|
||||||
|
buttonStyle = { display: 'none' }
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="grid-cell-btn">
|
<div className="grid-cell-btn">
|
||||||
@ -318,8 +323,14 @@ export default function StuffDetail() {
|
|||||||
setIsFormValid(true)
|
setIsFormValid(true)
|
||||||
}
|
}
|
||||||
promiseGet({ url: `/api/object/${objectNo}/detail` }).then((res) => {
|
promiseGet({ url: `/api/object/${objectNo}/detail` }).then((res) => {
|
||||||
// console.log('res::::', res.data)
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
|
// console.log(res.data.createUser)
|
||||||
|
// console.log(session)
|
||||||
|
if (res?.data?.createUser === 'T01' && session?.userId !== 'T01') {
|
||||||
|
//createUser가 T01인데 로그인사용자가 T01이 아니면 버튼숨기기
|
||||||
|
setShowButton('none')
|
||||||
|
}
|
||||||
|
|
||||||
if (isObjectNotEmpty(res.data)) {
|
if (isObjectNotEmpty(res.data)) {
|
||||||
let surfaceTypeValue
|
let surfaceTypeValue
|
||||||
if (res.data.surfaceType === 'Ⅲ・Ⅳ') {
|
if (res.data.surfaceType === 'Ⅲ・Ⅳ') {
|
||||||
@ -1296,12 +1307,16 @@ export default function StuffDetail() {
|
|||||||
delete params_sort.workNo
|
delete params_sort.workNo
|
||||||
delete params_sort.workName
|
delete params_sort.workName
|
||||||
|
|
||||||
// console.log(JSON.stringify(detail_sort) === JSON.stringify(params_sort))
|
|
||||||
// console.log(Object.entries(detail_sort).toString() === Object.entries(params_sort).toString())
|
|
||||||
if (Object.entries(detail_sort).toString() === Object.entries(params_sort).toString()) {
|
if (Object.entries(detail_sort).toString() === Object.entries(params_sort).toString()) {
|
||||||
return alert(getMessage('stuff.detail.noChgData'))
|
return alert(getMessage('stuff.detail.noChgData'))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params?.receiveUser !== '') {
|
||||||
|
if (params?.receiveUser.trim().length > 10) {
|
||||||
|
return alert(getMessage('stuff.detail.tempSave.message2'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (editMode === 'NEW') {
|
if (editMode === 'NEW') {
|
||||||
await promisePost({ url: apiUrl, data: params })
|
await promisePost({ url: apiUrl, data: params })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@ -1373,6 +1388,13 @@ export default function StuffDetail() {
|
|||||||
params.saleStoreLevel = session.storeLvl
|
params.saleStoreLevel = session.storeLvl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 담당자 자리수 체크
|
||||||
|
if (params?.receiveUser !== '') {
|
||||||
|
if (params?.receiveUser.trim().length > 10) {
|
||||||
|
return alert(getMessage('stuff.detail.tempSave.message2'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const apiUrl = '/api/object/save-object'
|
const apiUrl = '/api/object/save-object'
|
||||||
if (objectNo) {
|
if (objectNo) {
|
||||||
await promisePut({ url: apiUrl, data: params })
|
await promisePut({ url: apiUrl, data: params })
|
||||||
@ -1454,13 +1476,13 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
// 그리드 더블 클릭
|
// 그리드 더블 클릭
|
||||||
const getCellDoubleClicked = (params) => {
|
const getCellDoubleClicked = (params) => {
|
||||||
// if (params?.column?.colId !== 'estimateDate') {
|
if (params?.column?.colId !== 'estimateDate') {
|
||||||
// if (params?.data?.planNo && params?.data?.objectNo) {
|
if (params?.data?.planNo && params?.data?.objectNo) {
|
||||||
// let objectNo = params?.data?.objectNo
|
let objectNo = params?.data?.objectNo
|
||||||
// let planNo = params?.data?.planNo
|
let planNo = params?.data?.planNo
|
||||||
// router.push(`/floor-plan?pid=${planNo}&objectNo=${objectNo}`)
|
router.push(`/floor-plan?pid=${planNo}&objectNo=${objectNo}`)
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -1475,11 +1497,11 @@ export default function StuffDetail() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="left-unit-box">
|
<div className="left-unit-box">
|
||||||
{!isFormValid ? (
|
{!isFormValid ? (
|
||||||
<Button className="btn-origin grey mr5" onPress={onTempSave}>
|
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.tempSave')}
|
{getMessage('stuff.detail.btn.tempSave')}
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<Button type="submit" className="btn-origin navy mr5">
|
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.save')}
|
{getMessage('stuff.detail.btn.save')}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
@ -1514,7 +1536,7 @@ export default function StuffDetail() {
|
|||||||
)) ||
|
)) ||
|
||||||
null}
|
null}
|
||||||
</div>
|
</div>
|
||||||
<Button type="button" className="btn-origin grey" onPress={onSearchDesignRequestPopOpen}>
|
<Button type="button" className="btn-origin grey" onPress={onSearchDesignRequestPopOpen} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.planReqPopup.title')}
|
{getMessage('stuff.planReqPopup.title')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@ -1751,7 +1773,7 @@ export default function StuffDetail() {
|
|||||||
<div className="input-wrap mr5" style={{ width: '200px' }}>
|
<div className="input-wrap mr5" style={{ width: '200px' }}>
|
||||||
<input type="text" className="input-light" disabled value={form.watch('zipNo') || ''} />
|
<input type="text" className="input-light" disabled value={form.watch('zipNo') || ''} />
|
||||||
</div>
|
</div>
|
||||||
<Button className="btn-origin grey" onPress={onSearchPostNumberPopOpen}>
|
<Button className="btn-origin grey" onPress={onSearchPostNumberPopOpen} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.addressPop')}
|
{getMessage('stuff.detail.btn.addressPop')}
|
||||||
</Button>
|
</Button>
|
||||||
<div className="guide">{getMessage('stuff.detail.btn.addressPop.guide')}</div>
|
<div className="guide">{getMessage('stuff.detail.btn.addressPop.guide')}</div>
|
||||||
@ -1841,7 +1863,7 @@ export default function StuffDetail() {
|
|||||||
></Select>
|
></Select>
|
||||||
</div>
|
</div>
|
||||||
<span className="mr10">{getMessage('stuff.detail.standardWindSpeedIdSpan')}</span>
|
<span className="mr10">{getMessage('stuff.detail.standardWindSpeedIdSpan')}</span>
|
||||||
<Button type="button" className="btn-origin grey" onPress={onSearchWindSpeedPopOpen}>
|
<Button type="button" className="btn-origin grey" onPress={onSearchWindSpeedPopOpen} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.windSpeedPop')}
|
{getMessage('stuff.detail.btn.windSpeedPop')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@ -1963,11 +1985,11 @@ export default function StuffDetail() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="sub-right-footer">
|
<div className="sub-right-footer">
|
||||||
{!isFormValid ? (
|
{!isFormValid ? (
|
||||||
<Button className="btn-origin grey mr5" onPress={onTempSave}>
|
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.tempSave')}
|
{getMessage('stuff.detail.btn.tempSave')}
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<Button type="submit" className="btn-origin navy mr5">
|
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.save')}
|
{getMessage('stuff.detail.btn.save')}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
@ -1995,10 +2017,10 @@ export default function StuffDetail() {
|
|||||||
{getMessage('stuff.detail.btn.moveList')}
|
{getMessage('stuff.detail.btn.moveList')}
|
||||||
</button>
|
</button>
|
||||||
</Link>
|
</Link>
|
||||||
<Button type="submit" className="btn-origin navy mr5">
|
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.save')}
|
{getMessage('stuff.detail.btn.save')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="button" className="btn-origin grey" onPress={onDelete}>
|
<Button type="button" className="btn-origin grey" onPress={onDelete} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.delete')}
|
{getMessage('stuff.detail.btn.delete')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@ -2007,11 +2029,11 @@ export default function StuffDetail() {
|
|||||||
<>
|
<>
|
||||||
<div className="left-unit-box">
|
<div className="left-unit-box">
|
||||||
{!isFormValid ? (
|
{!isFormValid ? (
|
||||||
<Button className="btn-origin grey mr5" onPress={onTempSave}>
|
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.tempSave')}
|
{getMessage('stuff.detail.btn.tempSave')}
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<Button type="submit" className="btn-origin navy mr5">
|
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.save')}
|
{getMessage('stuff.detail.btn.save')}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
@ -2045,12 +2067,13 @@ export default function StuffDetail() {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
form.setValue('planReqNo', '')
|
form.setValue('planReqNo', '')
|
||||||
}}
|
}}
|
||||||
|
style={{ display: showButton }}
|
||||||
></button>
|
></button>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
{managementState?.tempFlg === '1' ? (
|
{managementState?.tempFlg === '1' ? (
|
||||||
<>
|
<>
|
||||||
<Button className="btn-origin grey" onPress={onSearchDesignRequestPopOpen}>
|
<Button className="btn-origin grey" onPress={onSearchDesignRequestPopOpen} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.planReqPopup.title')}
|
{getMessage('stuff.planReqPopup.title')}
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
@ -2306,7 +2329,7 @@ export default function StuffDetail() {
|
|||||||
<div className="input-wrap mr5" style={{ width: '200px' }}>
|
<div className="input-wrap mr5" style={{ width: '200px' }}>
|
||||||
<input type="text" className="input-light" disabled value={form.watch('zipNo') || ''} />
|
<input type="text" className="input-light" disabled value={form.watch('zipNo') || ''} />
|
||||||
</div>
|
</div>
|
||||||
<Button className="btn-origin grey" onPress={onSearchPostNumberPopOpen}>
|
<Button className="btn-origin grey" onPress={onSearchPostNumberPopOpen} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.addressPop')}
|
{getMessage('stuff.detail.btn.addressPop')}
|
||||||
</Button>
|
</Button>
|
||||||
<div className="guide">{getMessage('stuff.detail.btn.addressPop.guide')}</div>
|
<div className="guide">{getMessage('stuff.detail.btn.addressPop.guide')}</div>
|
||||||
@ -2401,7 +2424,7 @@ export default function StuffDetail() {
|
|||||||
></Select>
|
></Select>
|
||||||
</div>
|
</div>
|
||||||
<span className="mr10">{getMessage('stuff.detail.standardWindSpeedIdSpan')}</span>
|
<span className="mr10">{getMessage('stuff.detail.standardWindSpeedIdSpan')}</span>
|
||||||
<Button type="button" className="btn-origin grey" onPress={onSearchWindSpeedPopOpen}>
|
<Button type="button" className="btn-origin grey" onPress={onSearchWindSpeedPopOpen} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.windSpeedPop')}
|
{getMessage('stuff.detail.btn.windSpeedPop')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@ -2571,10 +2594,10 @@ export default function StuffDetail() {
|
|||||||
{getMessage('stuff.detail.btn.moveList')}
|
{getMessage('stuff.detail.btn.moveList')}
|
||||||
</button>
|
</button>
|
||||||
</Link>
|
</Link>
|
||||||
<Button type="submit" className="btn-origin navy mr5">
|
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.save')}
|
{getMessage('stuff.detail.btn.save')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="button" className="btn-origin grey" onPress={onDelete}>
|
<Button type="button" className="btn-origin grey" onPress={onDelete} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.delete')}
|
{getMessage('stuff.detail.btn.delete')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@ -2583,11 +2606,11 @@ export default function StuffDetail() {
|
|||||||
<>
|
<>
|
||||||
<div className="sub-right-footer">
|
<div className="sub-right-footer">
|
||||||
{!isFormValid ? (
|
{!isFormValid ? (
|
||||||
<Button className="btn-origin grey mr5" onPress={onTempSave}>
|
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.tempSave')}
|
{getMessage('stuff.detail.btn.tempSave')}
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<Button type="submit" className="btn-origin navy mr5">
|
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.save')}
|
{getMessage('stuff.detail.btn.save')}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -108,15 +108,18 @@ export function useRoofAllocationSetting(id) {
|
|||||||
|
|
||||||
// 지붕재 오른쪽 마우스 클릭 후 단일로 지붕재 변경 필요한 경우
|
// 지붕재 오른쪽 마우스 클릭 후 단일로 지붕재 변경 필요한 경우
|
||||||
const handleSaveContext = () => {
|
const handleSaveContext = () => {
|
||||||
|
const newRoofList = currentRoofList.map((roof, idx) => {
|
||||||
|
return { ...roof, index: idx }
|
||||||
|
})
|
||||||
setBasicSetting((prev) => {
|
setBasicSetting((prev) => {
|
||||||
return {
|
return {
|
||||||
...prev,
|
...prev,
|
||||||
selectedRoofMaterial: currentRoofList.find((roof) => roof.selected),
|
selectedRoofMaterial: newRoofList.find((roof) => roof.selected),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
setRoofList(currentRoofList)
|
setRoofList(newRoofList)
|
||||||
const selectedRoofMaterial = currentRoofList.find((roof) => roof.selected)
|
const selectedRoofMaterial = newRoofList.find((roof) => roof.selected)
|
||||||
setSurfaceShapePattern(currentObject, roofDisplay.column, false, selectedRoofMaterial)
|
setSurfaceShapePattern(currentObject, roofDisplay.column, false, selectedRoofMaterial)
|
||||||
closeAll()
|
closeAll()
|
||||||
}
|
}
|
||||||
@ -180,14 +183,18 @@ export function useRoofAllocationSetting(id) {
|
|||||||
canvas.remove(wallLine)
|
canvas.remove(wallLine)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const newRoofList = currentRoofList.map((roof, idx) => {
|
||||||
|
return { ...roof, index: idx }
|
||||||
|
})
|
||||||
|
|
||||||
setBasicSetting((prev) => {
|
setBasicSetting((prev) => {
|
||||||
return {
|
return {
|
||||||
...prev,
|
...prev,
|
||||||
selectedRoofMaterial: currentRoofList.find((roof) => roof.selected),
|
selectedRoofMaterial: newRoofList.find((roof) => roof.selected),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
setRoofList(currentRoofList)
|
setRoofList(newRoofList)
|
||||||
|
|
||||||
const roofs = canvas.getObjects().filter((obj) => obj.name === 'roof')
|
const roofs = canvas.getObjects().filter((obj) => obj.name === 'roof')
|
||||||
|
|
||||||
|
|||||||
@ -513,6 +513,8 @@
|
|||||||
"color.darkblue": "남색(JA)",
|
"color.darkblue": "남색(JA)",
|
||||||
"site.name": "Q.CAST III",
|
"site.name": "Q.CAST III",
|
||||||
"site.sub_name": "太陽光発電システム図面管理サイト",
|
"site.sub_name": "太陽光発電システム図面管理サイト",
|
||||||
|
"site.header.link1": "選択してください。",
|
||||||
|
"site.header.link2": "オンライン保証システム",
|
||||||
"board.notice.title": "お知らせ",
|
"board.notice.title": "お知らせ",
|
||||||
"board.notice.sub.title": "お知らせ一覧",
|
"board.notice.sub.title": "お知らせ一覧",
|
||||||
"board.faq.title": "FAQ",
|
"board.faq.title": "FAQ",
|
||||||
@ -663,6 +665,7 @@
|
|||||||
"stuff.detail.tooltip.saleStoreId": "販売代理店または販売代理店IDを1文字以上入力してください",
|
"stuff.detail.tooltip.saleStoreId": "販売代理店または販売代理店IDを1文字以上入力してください",
|
||||||
"stuff.detail.tooltip.surfaceType": "塩害地域の定義は各メーカーの設置マニュアルをご確認ください",
|
"stuff.detail.tooltip.surfaceType": "塩害地域の定義は各メーカーの設置マニュアルをご確認ください",
|
||||||
"stuff.detail.tempSave.message1": "一時保存されました。商品番号を取得するには、必須項目をすべて入力してください。",
|
"stuff.detail.tempSave.message1": "一時保存されました。商品番号を取得するには、必須項目をすべて入力してください。",
|
||||||
|
"stuff.detail.tempSave.message2": "担当者は10桁以下で入力してください.",
|
||||||
"stuff.detail.confirm.message1": "販売店情報を変更すると、設計依頼文書番号が削除されます。変更しますか?",
|
"stuff.detail.confirm.message1": "販売店情報を変更すると、設計依頼文書番号が削除されます。変更しますか?",
|
||||||
"stuff.detail.delete.message1": "仕様が確定したものは削除できません。",
|
"stuff.detail.delete.message1": "仕様が確定したものは削除できません。",
|
||||||
"stuff.detail.planList.title": "プランリスト",
|
"stuff.detail.planList.title": "プランリスト",
|
||||||
@ -803,6 +806,7 @@
|
|||||||
"main.content.download1": "操作マニュアル",
|
"main.content.download1": "操作マニュアル",
|
||||||
"main.content.download2": "屋根の説明書",
|
"main.content.download2": "屋根の説明書",
|
||||||
"main.content.noBusiness": "Hanwha Japanにお問い合わせください",
|
"main.content.noBusiness": "Hanwha Japanにお問い合わせください",
|
||||||
|
"main.content.alert.noFile": "資料が準備中です",
|
||||||
"main.popup.login.popupTitle": "パスワード変更",
|
"main.popup.login.popupTitle": "パスワード変更",
|
||||||
"main.popup.login.newPassword1": "新しいパスワードを入力",
|
"main.popup.login.newPassword1": "新しいパスワードを入力",
|
||||||
"main.popup.login.newPassword2": "新規パスワード再入力",
|
"main.popup.login.newPassword2": "新規パスワード再入力",
|
||||||
|
|||||||
@ -523,6 +523,8 @@
|
|||||||
"color.darkblue": "남색",
|
"color.darkblue": "남색",
|
||||||
"site.name": "Q.CAST III",
|
"site.name": "Q.CAST III",
|
||||||
"site.sub_name": "태양광 발전 시스템 도면관리 사이트",
|
"site.sub_name": "태양광 발전 시스템 도면관리 사이트",
|
||||||
|
"site.header.link1": "선택하세요.",
|
||||||
|
"site.header.link2": "온라인보증시스템",
|
||||||
"board.notice.title": "공지사항",
|
"board.notice.title": "공지사항",
|
||||||
"board.notice.sub.title": "공지사항 목록",
|
"board.notice.sub.title": "공지사항 목록",
|
||||||
"board.faq.title": "FAQ",
|
"board.faq.title": "FAQ",
|
||||||
@ -673,6 +675,7 @@
|
|||||||
"stuff.detail.tooltip.saleStoreId": "판매대리점 또는 판매대리점ID를 1자 이상 입력하세요",
|
"stuff.detail.tooltip.saleStoreId": "판매대리점 또는 판매대리점ID를 1자 이상 입력하세요",
|
||||||
"stuff.detail.tooltip.surfaceType": "염해지역 정의는 각 메이커의 설치 메뉴얼을 확인해주십시오",
|
"stuff.detail.tooltip.surfaceType": "염해지역 정의는 각 메이커의 설치 메뉴얼을 확인해주십시오",
|
||||||
"stuff.detail.tempSave.message1": "임시저장 되었습니다. 물건번호를 획득하려면 필수 항목을 모두 입력해 주십시오.",
|
"stuff.detail.tempSave.message1": "임시저장 되었습니다. 물건번호를 획득하려면 필수 항목을 모두 입력해 주십시오.",
|
||||||
|
"stuff.detail.tempSave.message2": "담당자는 10자리 이하로 입력해 주십시오.",
|
||||||
"stuff.detail.confirm.message1": "판매점 정보를 변경하면, 설계의뢰 문서번호가 삭제됩니다. 변경하시겠습니까?",
|
"stuff.detail.confirm.message1": "판매점 정보를 변경하면, 설계의뢰 문서번호가 삭제됩니다. 변경하시겠습니까?",
|
||||||
"stuff.detail.delete.message1": "사양이 확정된 물건은 삭제할 수 없습니다.",
|
"stuff.detail.delete.message1": "사양이 확정된 물건은 삭제할 수 없습니다.",
|
||||||
"stuff.detail.planList.title": "플랜리스트",
|
"stuff.detail.planList.title": "플랜리스트",
|
||||||
@ -813,6 +816,7 @@
|
|||||||
"main.content.download1": "조작메뉴얼",
|
"main.content.download1": "조작메뉴얼",
|
||||||
"main.content.download2": "지붕설명서",
|
"main.content.download2": "지붕설명서",
|
||||||
"main.content.noBusiness": "Hanwha Japan에 문의하세요",
|
"main.content.noBusiness": "Hanwha Japan에 문의하세요",
|
||||||
|
"main.content.alert.noFile": "자료가 준비중입니다",
|
||||||
"main.popup.login.popupTitle": "비밀번호변경",
|
"main.popup.login.popupTitle": "비밀번호변경",
|
||||||
"main.popup.login.newPassword1": "새 비밀번호 입력",
|
"main.popup.login.newPassword1": "새 비밀번호 입력",
|
||||||
"main.popup.login.newPassword2": "새 비밀번호 재입력",
|
"main.popup.login.newPassword2": "새 비밀번호 재입력",
|
||||||
|
|||||||
@ -224,9 +224,7 @@ export const roofMaterialsAtom = atom({
|
|||||||
export const selectedRoofMaterialSelector = selector({
|
export const selectedRoofMaterialSelector = selector({
|
||||||
key: 'selectedRoofMaterialSelector',
|
key: 'selectedRoofMaterialSelector',
|
||||||
get: ({ get }) => {
|
get: ({ get }) => {
|
||||||
const addedRoofs = get(addedRoofsState)
|
return get(basicSettingState).selectedRoofMaterial
|
||||||
|
|
||||||
return addedRoofs.find((roof) => roof.selected)
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user