forked from acouzens/open5gs
update it
This commit is contained in:
parent
3be52d587b
commit
1993d86e20
|
@ -44,12 +44,12 @@ class Collection extends Component {
|
|||
dispatch(subscribers.fetch)
|
||||
}
|
||||
|
||||
if (status.pending === false) {
|
||||
if (status.response) {
|
||||
dispatch(Notification.success({
|
||||
title: 'Subscriber',
|
||||
message: `${status.id} has been deleted`
|
||||
}));
|
||||
dispatch(clearActionStatus(MODEL, 'delete'));
|
||||
}
|
||||
|
||||
if (status.error) {
|
||||
|
@ -64,7 +64,6 @@ class Collection extends Component {
|
|||
label: 'Dismiss'
|
||||
}
|
||||
}));
|
||||
}
|
||||
dispatch(clearActionStatus(MODEL, 'delete'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,23 +79,31 @@ class Document extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
if (status.pending === false) {
|
||||
if (status.response) {
|
||||
NProgress.configure({
|
||||
parent: 'body',
|
||||
trickleSpeed: 5
|
||||
});
|
||||
NProgress.done(true);
|
||||
|
||||
if (status.response) {
|
||||
const message = action === 'create' ? "New subscriber created" : `${status.id} subscriber updated`;
|
||||
|
||||
dispatch(Notification.success({
|
||||
title: 'Subscriber',
|
||||
message
|
||||
}));
|
||||
|
||||
dispatch(clearActionStatus(MODEL, action));
|
||||
onHide();
|
||||
}
|
||||
|
||||
if (status.error) {
|
||||
NProgress.configure({
|
||||
parent: 'body',
|
||||
trickleSpeed: 5
|
||||
});
|
||||
NProgress.done(true);
|
||||
|
||||
const title = ((((status || {}).error || {}).response || {}).data || {}).name || 'System Error';
|
||||
const message = ((((status || {}).error || {}).response || {}).data || {}).message || 'Unknown Error';
|
||||
|
||||
|
@ -108,12 +116,7 @@ class Document extends Component {
|
|||
callback: () => onHide()
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
dispatch(clearActionStatus(MODEL, action));
|
||||
if (status.response) {
|
||||
onHide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue