Added image upload to email and multiple recipients BOD-103
This commit is contained in:
@@ -4,17 +4,21 @@ import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { auth, logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { setEmailOptions } from "../../redux/email/email.actions";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setEmailOptions: (e) => dispatch(setEmailOptions(e)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(function Test({ bodyshop }) {
|
||||
)(function Test({ bodyshop, setEmailOptions }) {
|
||||
const handle = async () => {
|
||||
const response = await axios.post(
|
||||
"/accounting/iif/receivables",
|
||||
@@ -94,6 +98,24 @@ export default connect(
|
||||
|
||||
return (
|
||||
<div>
|
||||
<button
|
||||
onClick={() => {
|
||||
setEmailOptions({
|
||||
messageOptions: {
|
||||
to: ["patrickwf@gmail.com"],
|
||||
replyTo: bodyshop.email,
|
||||
},
|
||||
template: {
|
||||
name: TemplateList.parts_order_confirmation.key,
|
||||
variables: {
|
||||
id: "a7c2d4e1-f519-42a9-a071-c48cf0f22979",
|
||||
},
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
send email
|
||||
</button>
|
||||
<button onClick={handle}>Hit with Header.</button>
|
||||
<button onClick={handleLocal}>Hit Localhost with Header.</button>
|
||||
<button onClick={handleQbxml}>Qbxml</button>
|
||||
|
||||
Reference in New Issue
Block a user