물건화면 , 메인화면 수정적용
This commit is contained in:
parent
1387c8aa0b
commit
45b0063b8b
@ -136,7 +136,7 @@ export default function MainContents() {
|
||||
})}
|
||||
</ul>
|
||||
) : (
|
||||
<MainSkeleton />
|
||||
<MainSkeleton count={6} />
|
||||
)}
|
||||
</ProductItem>
|
||||
<ProductItem num={2} name={getMessage('main.content.notice')}>
|
||||
@ -147,7 +147,9 @@ export default function MainContents() {
|
||||
<div className="notice-title">{recentNoticeList[0]?.title}</div>
|
||||
<div className="notice-contents">{recentNoticeList[0]?.contents}</div>
|
||||
</>
|
||||
) : null}
|
||||
) : (
|
||||
<MainSkeleton count={5} />
|
||||
)}
|
||||
</div>
|
||||
</ProductItem>
|
||||
</div>
|
||||
@ -168,7 +170,9 @@ export default function MainContents() {
|
||||
)
|
||||
})}
|
||||
</>
|
||||
) : null}
|
||||
) : (
|
||||
<MainSkeleton count={2} />
|
||||
)}
|
||||
</ul>
|
||||
</ProductItem>
|
||||
<ProductItem num={4} name={'Data Download'}>
|
||||
|
||||
@ -1,11 +1,14 @@
|
||||
import React from 'react'
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import { AgGridReact } from 'ag-grid-react'
|
||||
import { useMessage } from '@/hooks/useMessage'
|
||||
|
||||
import 'ag-grid-community/styles/ag-grid.css'
|
||||
import 'ag-grid-community/styles/ag-theme-quartz.css'
|
||||
|
||||
export default function StuffQGrid(props) {
|
||||
const { getMessage } = useMessage()
|
||||
|
||||
const { gridData, gridColumns, isPageable = true, count, gridRef } = props
|
||||
/**
|
||||
* 행 데이터를 설정할 때 useState을 사용하여 렌더링 전반에 걸쳐 일관된 배열 참조를 유지하는 것이 좋습니다
|
||||
@ -95,7 +98,7 @@ export default function StuffQGrid(props) {
|
||||
onSelectionChanged={onSelectionChanged}
|
||||
onCellDoubleClicked={onCellDoubleClicked}
|
||||
pagination={isPageable}
|
||||
overlayNoRowsTemplate={'<span className="ag-overlay-loading-center">물건 목록이 없습니다.</span>'}
|
||||
overlayNoRowsTemplate={`<span className="ag-overlay-loading-center">${getMessage('stuff.grid.noData')}</span>`}
|
||||
getRowClass={getRowClass}
|
||||
autoSizeAllColumns={true}
|
||||
/>
|
||||
|
||||
@ -1,11 +1,14 @@
|
||||
import React from 'react'
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import { AgGridReact } from 'ag-grid-react'
|
||||
import { useMessage } from '@/hooks/useMessage'
|
||||
|
||||
import 'ag-grid-community/styles/ag-grid.css'
|
||||
import 'ag-grid-community/styles/ag-theme-quartz.css'
|
||||
|
||||
export default function FindAddressPopGrid(props) {
|
||||
const { getMessage } = useMessage()
|
||||
|
||||
const { gridData, gridColumns, isPageable = true } = props
|
||||
|
||||
const [rowData, setRowData] = useState(null)
|
||||
@ -46,7 +49,7 @@ export default function FindAddressPopGrid(props) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="ag-theme-quartz" style={{ height: 500 }}>
|
||||
<div className="ag-theme-quartz" style={{ height: 400 }}>
|
||||
<AgGridReact
|
||||
onGridReady={onGridReady}
|
||||
rowBuffer={rowBuffer}
|
||||
@ -56,6 +59,7 @@ export default function FindAddressPopGrid(props) {
|
||||
rowSelection={'singleRow'}
|
||||
pagination={isPageable}
|
||||
onSelectionChanged={onSelectionChanged}
|
||||
overlayNoRowsTemplate={`<span className="ag-overlay-loading-center">${getMessage('stuff.grid.noData')}</span>`}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -253,6 +253,12 @@ export default function PlanRequestPop(props) {
|
||||
}
|
||||
}, [commonCode])
|
||||
|
||||
// 숫자만 입력 가능
|
||||
const handleKeyUp = (e) => {
|
||||
let input = e.target
|
||||
input.value = input.value.replace(/[^0-9]/g, '')
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="modal-popup">
|
||||
<div className="modal-dialog big">
|
||||
@ -301,6 +307,7 @@ export default function PlanRequestPop(props) {
|
||||
type="text"
|
||||
className="input-light"
|
||||
value={schPlanReqNo}
|
||||
onKeyUp={handleKeyUp}
|
||||
onChange={(e) => {
|
||||
setSchPlanReqNo(e.target.value)
|
||||
}}
|
||||
|
||||
@ -1,11 +1,14 @@
|
||||
import React from 'react'
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import { AgGridReact } from 'ag-grid-react'
|
||||
import { useMessage } from '@/hooks/useMessage'
|
||||
|
||||
import 'ag-grid-community/styles/ag-grid.css'
|
||||
import 'ag-grid-community/styles/ag-theme-quartz.css'
|
||||
|
||||
export default function PlanRequestPopQGrid(props) {
|
||||
const { getMessage } = useMessage()
|
||||
|
||||
const { gridData, gridColumns, isPageable = true } = props
|
||||
|
||||
const [rowData, setRowData] = useState(null)
|
||||
@ -56,6 +59,7 @@ export default function PlanRequestPopQGrid(props) {
|
||||
rowSelection={'singleRow'}
|
||||
pagination={isPageable}
|
||||
onSelectionChanged={onSelectionChanged}
|
||||
overlayNoRowsTemplate={`<span className="ag-overlay-loading-center">${getMessage('stuff.grid.noData')}</span>`}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import Skeleton from 'react-loading-skeleton'
|
||||
import 'react-loading-skeleton/dist/skeleton.css'
|
||||
|
||||
export default function MainSkeleton() {
|
||||
export default function MainSkeleton({ count }) {
|
||||
return (
|
||||
<>
|
||||
<div className="mb-6">
|
||||
<Skeleton height={`50px`} />
|
||||
</div>
|
||||
<Skeleton count={5} />
|
||||
<Skeleton count={count} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@ -587,6 +587,7 @@
|
||||
"stuff.detail.planGridHeader.management": "管理",
|
||||
"stuff.detail.planGrid.btn1": "見積書の照会",
|
||||
"stuff.detail.planGrid.btn2": "Excel",
|
||||
"stuff.grid.noData": "照会されたデータがありません",
|
||||
"length": "長さ",
|
||||
"height": "高さ",
|
||||
"output": "出力",
|
||||
|
||||
@ -592,6 +592,7 @@
|
||||
"stuff.detail.planGridHeader.management": "관리",
|
||||
"stuff.detail.planGrid.btn1": "견적서 조회",
|
||||
"stuff.detail.planGrid.btn2": "Excel",
|
||||
"stuff.grid.noData": "조회된 데이터가 없습니다",
|
||||
"length": "길이",
|
||||
"height": "높이",
|
||||
"output": "출력",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user