diff --git a/src/components/Main.jsx b/src/components/Main.jsx
index 1a436582..5f6c1052 100644
--- a/src/components/Main.jsx
+++ b/src/components/Main.jsx
@@ -41,12 +41,12 @@ export default function MainPage(mainPageProps) {
if (searchRadioType === 'object') {
setStuffSearch({
...stuffSearch,
- schObjectNo: searchTxt,
+ schObjectNo: searchTxt.trim(),
code: 'M',
})
router.push('/management/stuff', { scroll: false })
} else {
- setSearchForm({ ...searchForm, searchValue: searchTxt, mainFlag: 'Y' })
+ setSearchForm({ ...searchForm, searchValue: searchTxt.trim(), mainFlag: 'Y' })
router.push('/community/faq')
}
}
diff --git a/src/components/header/Header.jsx b/src/components/header/Header.jsx
index 2e2e98cd..5cdbfff9 100644
--- a/src/components/header/Header.jsx
+++ b/src/components/header/Header.jsx
@@ -60,24 +60,33 @@ export default function Header(props) {
const qOrderUrl = process.env.NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL
const qMusubiUrl = process.env.NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL
- const [SelectOptions, setSelectOptions] = useState(
- userSession.groupId === '60000' ? [{ id: 0, name: 'Q.ORDER', link: `${qOrderUrl}` }] : [{ id: 1, name: 'Q.Musubi', link: `${qMusubiUrl}` }],
- )
+ const [SelectOptions, setSelectOptions] = useState([])
const getAutoLoginParam = async () => {
await promisePost({ url: '/api/login/v1.0/user/login/autoLoginEncryptData', data: { loginId: userSession.userId } })
.then((res) => {
if (res) {
setSelectOptions(
- userSession.groupId === '60000'
- ? [{ id: 0, name: 'Q.ORDER', link: `${qOrderUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` }]
- : [{ id: 1, name: 'Q.Musubi', link: `${qMusubiUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` }],
- )
- setSelected(
- userSession.groupId === '60000'
- ? { id: 0, name: 'Q.ORDER', link: `${qOrderUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` }
- : { id: 1, name: 'Q.Musubi', link: `${qMusubiUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` },
+ userSession.storeId === 'T01'
+ ? [
+ { id: 0, name: getMessage('site.header.link1') },
+ { id: 1, name: 'Q.ORDER', link: `${qOrderUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` },
+ { id: 2, name: 'Q.Musubi', link: `${qMusubiUrl}?autoLoginParam1=${encodeURIComponent(res.data)}` },
+ { id: 3, name: getMessage('site.header.link2'), link: `https://q-warranty.q-cells.jp/seller_login`, target: '_blank' },
+ ]
+ : 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) => {
@@ -85,9 +94,9 @@ export default function Header(props) {
})
}
- // useEffect(() => {
- // getAutoLoginParam()
- // }, [userSession])
+ useEffect(() => {
+ getAutoLoginParam()
+ }, [userSession])
const menus = [
{ id: 0, name: 'header.menus.home', url: '/', children: [] },
@@ -124,18 +133,31 @@ export default function Header(props) {
const onChangeSelect = (option) => {
setSelected(option)
}
+
const navPage = () => {
if (selected.link) {
- location.href = selected.link
+ if (selected.target === '_blank') {
+ window.open(selected.link)
+ } else {
+ location.href = selected.link
+ }
}
}
- // Home 클릭시 물건 리코일 비우기
- const moveHome = () => {
- setStuffSearch({
- ...stuffSearch,
- code: 'DELETE',
- })
+ // 물건메뉴 이외 클릭시 물건 리코일 비우기
+ const removeStuffRecoil = (menu) => {
+ //menu.id 0 HOME
+ //menu.id 3 신규물건등록
+ //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) => {
@@ -152,7 +174,8 @@ export default function Header(props) {
key={`${menu.id}`}
href={menu.url}
onClick={() => {
- moveHome()
+ // moveHome()
+ removeStuffRecoil(menu)
}}
>
{getMessage(menu.name)}
@@ -169,7 +192,13 @@ export default function Header(props) {
onMouseEnter={(e) => ToggleonMouse(e, 'add', 'li > ul')}
onMouseLeave={(e) => ToggleonMouse(e, 'remove', 'li > ul')}
>
-
+ {
+ removeStuffRecoil(m)
+ }}
+ >
{getMessage(m.name)}
@@ -190,7 +219,15 @@ export default function Header(props) {
-
+ {
+ setStuffSearch({
+ ...stuffSearch,
+ code: 'DELETE',
+ })
+ }}
+ >
-
+
@@ -1963,11 +1985,11 @@ export default function StuffDetail() {
{!isFormValid ? (
-
+
{getMessage('stuff.detail.btn.tempSave')}
) : (
-
+
{getMessage('stuff.detail.btn.save')}
)}
@@ -1995,10 +2017,10 @@ export default function StuffDetail() {
{getMessage('stuff.detail.btn.moveList')}
-
+
{getMessage('stuff.detail.btn.save')}
-
+
{getMessage('stuff.detail.btn.delete')}
@@ -2007,11 +2029,11 @@ export default function StuffDetail() {
<>
{!isFormValid ? (
-
+
{getMessage('stuff.detail.btn.tempSave')}
) : (
-
+
{getMessage('stuff.detail.btn.save')}
)}
@@ -2045,12 +2067,13 @@ export default function StuffDetail() {
onClick={() => {
form.setValue('planReqNo', '')
}}
+ style={{ display: showButton }}
>
) : null}
{managementState?.tempFlg === '1' ? (
<>
-
+
{getMessage('stuff.planReqPopup.title')}
>
@@ -2306,7 +2329,7 @@ export default function StuffDetail() {
-
+
{getMessage('stuff.detail.btn.addressPop')}
{getMessage('stuff.detail.btn.addressPop.guide')}
@@ -2401,7 +2424,7 @@ export default function StuffDetail() {
>
{getMessage('stuff.detail.standardWindSpeedIdSpan')}
-
+
{getMessage('stuff.detail.btn.windSpeedPop')}
@@ -2571,10 +2594,10 @@ export default function StuffDetail() {
{getMessage('stuff.detail.btn.moveList')}
-
+
{getMessage('stuff.detail.btn.save')}
-
+
{getMessage('stuff.detail.btn.delete')}
@@ -2583,11 +2606,11 @@ export default function StuffDetail() {
<>
{!isFormValid ? (
-
+
{getMessage('stuff.detail.btn.tempSave')}
) : (
-
+
{getMessage('stuff.detail.btn.save')}
)}
diff --git a/src/hooks/roofcover/useRoofAllocationSetting.js b/src/hooks/roofcover/useRoofAllocationSetting.js
index 0840dc2d..05a76e9b 100644
--- a/src/hooks/roofcover/useRoofAllocationSetting.js
+++ b/src/hooks/roofcover/useRoofAllocationSetting.js
@@ -108,15 +108,18 @@ export function useRoofAllocationSetting(id) {
// 지붕재 오른쪽 마우스 클릭 후 단일로 지붕재 변경 필요한 경우
const handleSaveContext = () => {
+ const newRoofList = currentRoofList.map((roof, idx) => {
+ return { ...roof, index: idx }
+ })
setBasicSetting((prev) => {
return {
...prev,
- selectedRoofMaterial: currentRoofList.find((roof) => roof.selected),
+ selectedRoofMaterial: newRoofList.find((roof) => roof.selected),
}
})
- setRoofList(currentRoofList)
- const selectedRoofMaterial = currentRoofList.find((roof) => roof.selected)
+ setRoofList(newRoofList)
+ const selectedRoofMaterial = newRoofList.find((roof) => roof.selected)
setSurfaceShapePattern(currentObject, roofDisplay.column, false, selectedRoofMaterial)
closeAll()
}
@@ -180,14 +183,18 @@ export function useRoofAllocationSetting(id) {
canvas.remove(wallLine)
})
+ const newRoofList = currentRoofList.map((roof, idx) => {
+ return { ...roof, index: idx }
+ })
+
setBasicSetting((prev) => {
return {
...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')
diff --git a/src/locales/ja.json b/src/locales/ja.json
index 382daaa5..27794f3e 100644
--- a/src/locales/ja.json
+++ b/src/locales/ja.json
@@ -513,6 +513,8 @@
"color.darkblue": "남색(JA)",
"site.name": "Q.CAST III",
"site.sub_name": "太陽光発電システム図面管理サイト",
+ "site.header.link1": "選択してください。",
+ "site.header.link2": "オンライン保証システム",
"board.notice.title": "お知らせ",
"board.notice.sub.title": "お知らせ一覧",
"board.faq.title": "FAQ",
@@ -663,6 +665,7 @@
"stuff.detail.tooltip.saleStoreId": "販売代理店または販売代理店IDを1文字以上入力してください",
"stuff.detail.tooltip.surfaceType": "塩害地域の定義は各メーカーの設置マニュアルをご確認ください",
"stuff.detail.tempSave.message1": "一時保存されました。商品番号を取得するには、必須項目をすべて入力してください。",
+ "stuff.detail.tempSave.message2": "担当者は10桁以下で入力してください.",
"stuff.detail.confirm.message1": "販売店情報を変更すると、設計依頼文書番号が削除されます。変更しますか?",
"stuff.detail.delete.message1": "仕様が確定したものは削除できません。",
"stuff.detail.planList.title": "プランリスト",
@@ -803,6 +806,7 @@
"main.content.download1": "操作マニュアル",
"main.content.download2": "屋根の説明書",
"main.content.noBusiness": "Hanwha Japanにお問い合わせください",
+ "main.content.alert.noFile": "資料が準備中です",
"main.popup.login.popupTitle": "パスワード変更",
"main.popup.login.newPassword1": "新しいパスワードを入力",
"main.popup.login.newPassword2": "新規パスワード再入力",
diff --git a/src/locales/ko.json b/src/locales/ko.json
index e8282e49..d199c139 100644
--- a/src/locales/ko.json
+++ b/src/locales/ko.json
@@ -523,6 +523,8 @@
"color.darkblue": "남색",
"site.name": "Q.CAST III",
"site.sub_name": "태양광 발전 시스템 도면관리 사이트",
+ "site.header.link1": "선택하세요.",
+ "site.header.link2": "온라인보증시스템",
"board.notice.title": "공지사항",
"board.notice.sub.title": "공지사항 목록",
"board.faq.title": "FAQ",
@@ -673,6 +675,7 @@
"stuff.detail.tooltip.saleStoreId": "판매대리점 또는 판매대리점ID를 1자 이상 입력하세요",
"stuff.detail.tooltip.surfaceType": "염해지역 정의는 각 메이커의 설치 메뉴얼을 확인해주십시오",
"stuff.detail.tempSave.message1": "임시저장 되었습니다. 물건번호를 획득하려면 필수 항목을 모두 입력해 주십시오.",
+ "stuff.detail.tempSave.message2": "담당자는 10자리 이하로 입력해 주십시오.",
"stuff.detail.confirm.message1": "판매점 정보를 변경하면, 설계의뢰 문서번호가 삭제됩니다. 변경하시겠습니까?",
"stuff.detail.delete.message1": "사양이 확정된 물건은 삭제할 수 없습니다.",
"stuff.detail.planList.title": "플랜리스트",
@@ -813,6 +816,7 @@
"main.content.download1": "조작메뉴얼",
"main.content.download2": "지붕설명서",
"main.content.noBusiness": "Hanwha Japan에 문의하세요",
+ "main.content.alert.noFile": "자료가 준비중입니다",
"main.popup.login.popupTitle": "비밀번호변경",
"main.popup.login.newPassword1": "새 비밀번호 입력",
"main.popup.login.newPassword2": "새 비밀번호 재입력",
diff --git a/src/store/settingAtom.js b/src/store/settingAtom.js
index 1b837fdd..305bcb57 100644
--- a/src/store/settingAtom.js
+++ b/src/store/settingAtom.js
@@ -224,9 +224,7 @@ export const roofMaterialsAtom = atom({
export const selectedRoofMaterialSelector = selector({
key: 'selectedRoofMaterialSelector',
get: ({ get }) => {
- const addedRoofs = get(addedRoofsState)
-
- return addedRoofs.find((roof) => roof.selected)
+ return get(basicSettingState).selectedRoofMaterial
},
})