@onehat/ui 0.3.338 → 0.3.340
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Column,
|
|
3
|
-
Icon,
|
|
4
|
-
Row,
|
|
5
|
-
Text,
|
|
6
|
-
} from 'native-base';
|
|
7
1
|
import {
|
|
8
2
|
VIEW,
|
|
9
3
|
} from '../../Constants/Commands.js';
|
|
10
4
|
import * as yup from 'yup'; // https://github.com/jquense/yup#string
|
|
11
5
|
import Inflector from 'inflector-js';
|
|
12
6
|
import qs from 'qs';
|
|
13
|
-
import Form from '../Form/Form.js';
|
|
14
7
|
import inArray from '../../Functions/inArray.js';
|
|
15
8
|
import Pdf from '../Icons/Pdf.js';
|
|
16
|
-
import TriangleExclamation from '../Icons/TriangleExclamation.js';
|
|
17
9
|
import withModal from './withModal.js';
|
|
18
10
|
import { EDITOR_TYPE__PLAIN } from '../../Constants/Editor.js';
|
|
19
11
|
import UiGlobals from '../../UiGlobals.js';
|
|
@@ -307,8 +299,13 @@ export default function withPdfButtons(WrappedComponent) {
|
|
|
307
299
|
},
|
|
308
300
|
sendEmail = async (data) => {
|
|
309
301
|
|
|
302
|
+
const
|
|
303
|
+
dispatch = UiGlobals.redux.dispatch,
|
|
304
|
+
setIsWaitModalShownAction = UiGlobals.debugReducer.setIsWaitModalShownAction;
|
|
305
|
+
|
|
306
|
+
dispatch(setIsWaitModalShownAction(true));
|
|
307
|
+
|
|
310
308
|
data.id = selection[0].id;
|
|
311
|
-
|
|
312
309
|
const result = await Repository._send('POST', model + '/emailModelPdf', data);
|
|
313
310
|
|
|
314
311
|
const {
|
|
@@ -318,13 +315,13 @@ export default function withPdfButtons(WrappedComponent) {
|
|
|
318
315
|
message
|
|
319
316
|
} = Repository._processServerResponse(result);
|
|
320
317
|
|
|
318
|
+
dispatch(setIsWaitModalShownAction(false));
|
|
319
|
+
|
|
321
320
|
if (!success) {
|
|
322
321
|
alert('Email could not be sent.');
|
|
323
322
|
return;
|
|
324
323
|
}
|
|
325
|
-
|
|
326
324
|
showInfo('Email sent successfully.');
|
|
327
|
-
|
|
328
325
|
};
|
|
329
326
|
|
|
330
327
|
const buttons = [
|