harukatokutake 6 лет назад
Родитель
Сommit
dbd7fd281c
1 измененных файлов с 10 добавлено и 2 удалено
  1. 10 2
      src/client/js/components/Admin/FullTextSearchManagement/FullTextSearchPage.jsx

+ 10 - 2
src/client/js/components/Admin/FullTextSearchManagement/FullTextSearchPage.jsx

@@ -1,9 +1,12 @@
 import React, { Fragment } from 'react';
 import React, { Fragment } from 'react';
 import PropTypes from 'prop-types';
 import PropTypes from 'prop-types';
 
 
-import { createSubscribedElement } from '../../UnstatedUtils';
 import AppContainer from '../../../services/AppContainer';
 import AppContainer from '../../../services/AppContainer';
 
 
+import { createSubscribedElement } from '../../UnstatedUtils';
+import { toastSuccess, toastError } from '../../../util/apiNotification';
+
+
 class FullTextSearchManagement extends React.Component {
 class FullTextSearchManagement extends React.Component {
 
 
   constructor(props) {
   constructor(props) {
@@ -17,7 +20,12 @@ class FullTextSearchManagement extends React.Component {
     const { appContainer } = this.props;
     const { appContainer } = this.props;
     const pageId = this.pageId;
     const pageId = this.pageId;
 
 
-    appContainer.apiPost('/admin/search/build', { page_id: pageId });
+    appContainer.apiPost('/admin/search/build', { page_id: pageId }).then((res) => {
+      toastSuccess('Building request is successfully posted.');
+    })
+      .catch((e) => {
+        toastError('err', e);
+      });
   }
   }
 
 
   render() {
   render() {