forked from ddrilling/asb_cloud_front
Исправлена работа очистки операций перед импортом
This commit is contained in:
parent
c8050b91e5
commit
bd7c2842c5
@ -6,7 +6,7 @@ import { ErrorFetch } from '@components/ErrorFetch'
|
||||
import { UploadForm } from '@components/UploadForm'
|
||||
|
||||
const errorTextStyle = { color: 'red', fontWeight: 'bold' }
|
||||
const uploadFormStyle = { marginTop: '24px' }
|
||||
const uploadFormStyle = { marginTop: 24 }
|
||||
|
||||
export const ImportOperations = memo(({ well: givenWell, onDone }) => {
|
||||
const [deleteBeforeImport, setDeleteBeforeImport] = useState(false)
|
||||
@ -15,7 +15,7 @@ export const ImportOperations = memo(({ well: givenWell, onDone }) => {
|
||||
const [wellContext] = useWell()
|
||||
const well = useMemo(() => givenWell ?? wellContext, [givenWell, wellContext])
|
||||
|
||||
const url = useMemo(() => `/api/well/${well.id}/wellOperations/import${deleteBeforeImport ? '/1' : '/0'}`, [well])
|
||||
const url = useMemo(() => `/api/well/${well.id}/wellOperations/import/${deleteBeforeImport ? 1 : 0}`, [well, deleteBeforeImport])
|
||||
|
||||
const onUploadSuccess = useCallback(() => {
|
||||
setErrorText('')
|
||||
|
Loading…
Reference in New Issue
Block a user