@voplus/morpho-csp 1.2.49 → 1.2.50
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.
|
@@ -1,26 +1,19 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
1
2
|
import { Button, Form, Row, Space } from "@voplus/antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { useIncorporationCLDAStore, useIncorporationCLDA, } from "../../../../../data/incorporation-clda";
|
|
2
5
|
import Modal from "@voplus/morpho-ui/es/components/Modal";
|
|
3
6
|
import ProseMirror from "@voplus/morpho-text/es/controls/ProseMirror";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { observe } from "@voplus/morpho-ui";
|
|
6
7
|
import styles from "./index.less";
|
|
7
|
-
import { useIncorporationCLDAStore, useIncorporationCLDA, } from "../../../../../data/incorporation-clda";
|
|
8
|
-
import { useCLDASettingStore } from "../../../../../data/clda-setting";
|
|
9
8
|
const CLDASendForm = (props) => {
|
|
10
9
|
const clda = useIncorporationCLDA(props.id, { reload: true, includes: "email-content" });
|
|
11
10
|
const store = useIncorporationCLDAStore();
|
|
12
|
-
const
|
|
11
|
+
const [text, setText] = useState("");
|
|
13
12
|
return observe(() => (React.createElement(Modal, { title: "CLDA Send Form Dialog", visible: true, destroyOnClose: true, closable: false, footer: null, onCancel: props.onCancel },
|
|
14
13
|
React.createElement("div", { className: styles["clda-send-form"] },
|
|
15
14
|
React.createElement(Form, { layout: "vertical" },
|
|
16
15
|
React.createElement(Form.Item, { label: "Email Content" },
|
|
17
|
-
React.createElement(ProseMirror, { toolbarProps: { sticky: false }, scroll: true, defaultHtml: clda === null || clda === void 0 ? void 0 : clda.
|
|
18
|
-
const text = opt.editor.dom.innerHTML === "<p><br></p>" ? "" : opt.editor.dom.innerHTML;
|
|
19
|
-
cldaSettingStore.edit(props.id, {
|
|
20
|
-
data: { DefaultEmailContent: text },
|
|
21
|
-
error: "message",
|
|
22
|
-
});
|
|
23
|
-
} })),
|
|
16
|
+
React.createElement(ProseMirror, { toolbarProps: { sticky: false }, scroll: true, defaultHtml: clda === null || clda === void 0 ? void 0 : clda.emailContent, className: "proseMirror", onChange: (opt) => setText(opt.editor.dom.innerHTML === "<p><br></p>" ? "" : opt.editor.dom.innerHTML) })),
|
|
24
17
|
React.createElement(Row, { justify: "end" },
|
|
25
18
|
React.createElement(Space, null,
|
|
26
19
|
React.createElement(Button, { onClick: onCancel }, "Cancel"),
|
|
@@ -31,7 +24,7 @@ const CLDASendForm = (props) => {
|
|
|
31
24
|
}
|
|
32
25
|
/** email send */
|
|
33
26
|
async function onSend() {
|
|
34
|
-
await store.send(props.id, { data: { Email:
|
|
27
|
+
await store.send(props.id, { data: { Email: text }, error: "message" });
|
|
35
28
|
if (props.onCancel)
|
|
36
29
|
props.onCancel();
|
|
37
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/clda/components/CLDASendForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/clda/components/CLDASendForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACN,yBAAyB,EACzB,oBAAoB,GACpB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,MAAM,uCAAuC,CAAC;AAC1D,OAAO,WAAW,MAAM,6CAA6C,CAAC;AACtE,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,YAAY,GAAG,CAAC,KAA4C,EAAE,EAAE;IACrE,MAAM,IAAI,GAAG,oBAAoB,CA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