forked from ddrilling/asb_cloud_front
Rename Notification to notify
This commit is contained in:
parent
a6bf82eafe
commit
4232c1f4b5
@ -4,6 +4,7 @@ import { WellService } from '../services/api'
|
|||||||
import Loader from '../components/Loader'
|
import Loader from '../components/Loader'
|
||||||
import { TreeSelect } from 'antd'
|
import { TreeSelect } from 'antd'
|
||||||
import { useHistory } from 'react-router-dom'
|
import { useHistory } from 'react-router-dom'
|
||||||
|
import notify from '/notify'
|
||||||
|
|
||||||
const groupBy = (table, ...keys) => {
|
const groupBy = (table, ...keys) => {
|
||||||
let key = keys[0]
|
let key = keys[0]
|
||||||
@ -49,7 +50,7 @@ export default function WellTreeSelector(props) {
|
|||||||
setWellsTree(wellsTree)
|
setWellsTree(wellsTree)
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
|
notify('Не удалось загрузить список скважин', 'error')
|
||||||
console.error(`${e.message}`);
|
console.error(`${e.message}`);
|
||||||
}
|
}
|
||||||
setLoader(false)
|
setLoader(false)
|
||||||
|
@ -12,6 +12,7 @@ import locale from 'antd/lib/locale/ru_RU'
|
|||||||
import {generateUUID} from '../services/UidGenerator'
|
import {generateUUID} from '../services/UidGenerator'
|
||||||
import { ArchiveColumn } from '../components/ArchiveColumn'
|
import { ArchiveColumn } from '../components/ArchiveColumn'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import notify from '../components/notify'
|
||||||
|
|
||||||
const { RangePicker } = DatePicker;
|
const { RangePicker } = DatePicker;
|
||||||
|
|
||||||
@ -96,7 +97,10 @@ export default function Archive() {
|
|||||||
|
|
||||||
DataService.getData(id, startDate, interval, 2048)
|
DataService.getData(id, startDate, interval, 2048)
|
||||||
.then(handleReceiveDataSaub)
|
.then(handleReceiveDataSaub)
|
||||||
.catch(error => console.error(error))
|
.catch(error => {
|
||||||
|
notify(`Не удалось загрузить данные по скважине (${id}) c ${rangeDate[0]} по ${rangeDate[1]}`, 'error')
|
||||||
|
console.error(error)
|
||||||
|
})
|
||||||
}, [id, rangeDate]);
|
}, [id, rangeDate]);
|
||||||
|
|
||||||
let charts = null
|
let charts = null
|
||||||
|
@ -10,8 +10,6 @@ import notify from '../components/notify'
|
|||||||
|
|
||||||
const {Option} = Select
|
const {Option} = Select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Словарь категорий для строк таблицы
|
// Словарь категорий для строк таблицы
|
||||||
const categoryDictionary = {
|
const categoryDictionary = {
|
||||||
1: {title: 'Авария'},
|
1: {title: 'Авария'},
|
||||||
|
@ -3,6 +3,7 @@ import { WellService } from '../services/api'
|
|||||||
import Loader from '../components/Loader'
|
import Loader from '../components/Loader'
|
||||||
import { Table } from 'antd' // TreeSelect
|
import { Table } from 'antd' // TreeSelect
|
||||||
import { useHistory } from 'react-router-dom'
|
import { useHistory } from 'react-router-dom'
|
||||||
|
import notify from '../components/notify'
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@ -40,6 +41,7 @@ export default function Wells(props){
|
|||||||
setWells( newWells )
|
setWells( newWells )
|
||||||
}
|
}
|
||||||
catch(e){
|
catch(e){
|
||||||
|
notify('Не удалось загрузить список скважин', 'error')
|
||||||
console.error(`${e.message}`);
|
console.error(`${e.message}`);
|
||||||
}
|
}
|
||||||
setLoader(false)
|
setLoader(false)
|
||||||
|
Loading…
Reference in New Issue
Block a user