fix notifications

This commit is contained in:
Фролов 2021-05-31 15:10:35 +05:00
parent 2045006d6f
commit 1dbe047902
3 changed files with 6 additions and 5 deletions

View File

@ -49,6 +49,7 @@ export default function WellTreeSelector(props) {
setWellsTree(wellsTree) setWellsTree(wellsTree)
} }
catch (e) { catch (e) {
console.error(`${e.message}`); console.error(`${e.message}`);
} }
setLoader(false) setLoader(false)

View File

@ -6,7 +6,7 @@ import {Subscribe} from '../services/signalr'
import Loader from '../components/Loader' import Loader from '../components/Loader'
import moment from 'moment' import moment from 'moment'
import '../styles/message.css' import '../styles/message.css'
import Notification from '../components/Notification' import notify from '../components/notify'
const {Option} = Select const {Option} = Select
@ -77,7 +77,7 @@ export default function Messages() {
MessageService.getMessage(id) MessageService.getMessage(id)
.then(handleReceiveMessages) .then(handleReceiveMessages)
.catch((ex) => { .catch((ex) => {
Notification(`Не удалось загрузить сообщения по скважине "${id}"`, 'error') notify(`Не удалось загрузить сообщения по скважине "${id}"`, 'error')
console.log(ex) console.log(ex)
}) })

View File

@ -12,7 +12,7 @@ import moment from 'moment'
import {Subscribe} from '../services/signalr' import {Subscribe} from '../services/signalr'
import {DataService, MessageService} from '../services/api' import {DataService, MessageService} from '../services/api'
import '../styles/message.css' import '../styles/message.css'
import Notification from "../components/Notification"; import notify from "../components/notify";
const {Option} = Select const {Option} = Select
@ -207,14 +207,14 @@ export default function TelemetryView(props) {
DataService.getData(id) DataService.getData(id)
.then(handleReceiveDataSaub) .then(handleReceiveDataSaub)
.catch((ex) => { .catch((ex) => {
Notification(`Не удалось загрузить данные по скважине "${id}"`, 'error') notify(`Не удалось загрузить данные по скважине "${id}"`, 'error')
console.log(ex) console.log(ex)
}) })
MessageService.getMessage(id) MessageService.getMessage(id)
.then(handleReceiveMessages) .then(handleReceiveMessages)
.catch((ex) => { .catch((ex) => {
Notification(`Не удалось загрузить сообщения по скважине "${id}"`, 'error') notify(`Не удалось загрузить сообщения по скважине "${id}"`, 'error')
console.log(ex) console.log(ex)
}) })