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