물건상세 2차점 즐겨찾기 관련
This commit is contained in:
parent
f2ea05f69e
commit
125eb3213b
@ -528,12 +528,12 @@ export default function StuffDetail() {
|
|||||||
}
|
}
|
||||||
get({ url: url }).then((res) => {
|
get({ url: url }).then((res) => {
|
||||||
if (!isEmptyArray(res)) {
|
if (!isEmptyArray(res)) {
|
||||||
|
//즐겨찾기 구분 추가
|
||||||
|
res.map((row) => {
|
||||||
|
row.value = row.saleStoreId
|
||||||
|
row.label = row.saleStoreName
|
||||||
|
})
|
||||||
if (session?.storeId === 'T01') {
|
if (session?.storeId === 'T01') {
|
||||||
//즐겨찾기 구분 추가
|
|
||||||
res.map((row) => {
|
|
||||||
row.value = row.saleStoreId
|
|
||||||
row.label = row.saleStoreName
|
|
||||||
})
|
|
||||||
firstList = res.filter((row) => row.saleStoreLevel === '1')
|
firstList = res.filter((row) => row.saleStoreLevel === '1')
|
||||||
firstList.sort((a, b) => (a.saleStoreId !== 'T01') - (b.saleStoreId !== 'T01') || a.saleStoreId - b.saleStoreId)
|
firstList.sort((a, b) => (a.saleStoreId !== 'T01') - (b.saleStoreId !== 'T01') || a.saleStoreId - b.saleStoreId)
|
||||||
favList = firstList.filter((row) => row.saleStoreId === 'T01' || row.priority !== 'B')
|
favList = firstList.filter((row) => row.saleStoreId === 'T01' || row.priority !== 'B')
|
||||||
@ -553,7 +553,6 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
let data = managementState?.firstAgentId ? managementState.firstAgentId : managementState.saleStoreId
|
let data = managementState?.firstAgentId ? managementState.firstAgentId : managementState.saleStoreId
|
||||||
url = `/api/object/saleStore/${data}/list?firstFlg=0&userId=${session?.userId}`
|
url = `/api/object/saleStore/${data}/list?firstFlg=0&userId=${session?.userId}`
|
||||||
|
|
||||||
get({ url: url }).then((res) => {
|
get({ url: url }).then((res) => {
|
||||||
if (!isEmptyArray(res)) {
|
if (!isEmptyArray(res)) {
|
||||||
res.map((row) => {
|
res.map((row) => {
|
||||||
|
|||||||
@ -23,7 +23,7 @@ export default function StuffSubHeader({ type }) {
|
|||||||
|
|
||||||
const setFloorPlanObjectNo = useSetRecoilState(floorPlanObjectState)
|
const setFloorPlanObjectNo = useSetRecoilState(floorPlanObjectState)
|
||||||
|
|
||||||
const { managementState, setManagementState } = useContext(GlobalDataContext)
|
const { managementState } = useContext(GlobalDataContext)
|
||||||
|
|
||||||
const [buttonStyle, setButtonStyle] = useState('')
|
const [buttonStyle, setButtonStyle] = useState('')
|
||||||
|
|
||||||
@ -31,11 +31,11 @@ export default function StuffSubHeader({ type }) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.scrollTo(0, 0)
|
window.scrollTo(0, 0)
|
||||||
setManagementState({})
|
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (type === 'detail') {
|
if (type === 'detail') {
|
||||||
|
setButtonStyle('')
|
||||||
if (isObjectNotEmpty(managementState)) {
|
if (isObjectNotEmpty(managementState)) {
|
||||||
if (managementState?.createSaleStoreId === 'T01') {
|
if (managementState?.createSaleStoreId === 'T01') {
|
||||||
if (session?.storeId !== 'T01') {
|
if (session?.storeId !== 'T01') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user