forked from ddrilling/asb_cloud_front
Move drillingProgramButton into documentTemplate header
This commit is contained in:
parent
449a7566b6
commit
e42b9069fe
@ -17,7 +17,7 @@ const pageSize = 12
|
||||
const { RangePicker } = DatePicker
|
||||
const { Search } = Input
|
||||
|
||||
export default function DocumentsTemplate({ idCategory, idWell, accept, onChange }) {
|
||||
export default function DocumentsTemplate({ idCategory, idWell, accept, headerChild, onChange }) {
|
||||
const [page, setPage] = useState(1)
|
||||
const [filterDataRange, setFilterDataRange] = useState([])
|
||||
const [filterCompanyName, setFilterCompanyName] = useState([])
|
||||
@ -181,6 +181,8 @@ export default function DocumentsTemplate({ idCategory, idWell, accept, onChange
|
||||
onUploadStart={() => setShowLoader(true)}
|
||||
onUploadComplete={handleUploadComplete}/>
|
||||
</div>
|
||||
|
||||
{headerChild}
|
||||
</div>
|
||||
|
||||
<EditableTable
|
||||
|
@ -35,18 +35,25 @@ export default function DrillingProgram({idWell}) {
|
||||
}
|
||||
}
|
||||
|
||||
const downloadButton = <div>
|
||||
<span>Программа бурения</span>
|
||||
<div>
|
||||
<Tooltip title={tooltip}>
|
||||
<Button
|
||||
onClick={downloadProgram}
|
||||
disabled={!downloadButtonEnabled}>
|
||||
Сформировать и скачать
|
||||
</Button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
return(<LoaderPortal show={showLoader}>
|
||||
<Tooltip title={tooltip}>
|
||||
<Button
|
||||
onClick={downloadProgram}
|
||||
disabled={!downloadButtonEnabled}>
|
||||
Сформировать программу бурения
|
||||
</Button>
|
||||
</Tooltip>
|
||||
<DocumentsTemplate
|
||||
idWell={idWell}
|
||||
idCategory={idFileCategoryDrillingProgramItems}
|
||||
accept='.xlsx'
|
||||
onChange={filesUpdated}/>
|
||||
headerChild={downloadButton}
|
||||
onChange={filesUpdated} />
|
||||
</LoaderPortal>)
|
||||
}
|
Loading…
Reference in New Issue
Block a user