43 lines
1006 B
JavaScript
43 lines
1006 B
JavaScript
import React from "react";
|
|
import { connect } from "react-redux";
|
|
import { createStructuredSelector } from "reselect";
|
|
import {
|
|
toggleModalVisible,
|
|
setModalContext
|
|
} from "../../redux/modals/modals.actions";
|
|
import { Button } from "antd";
|
|
|
|
const mapStateToProps = createStructuredSelector({
|
|
//currentUser: selectCurrentUser
|
|
});
|
|
const mapDispatchToProps = dispatch => ({
|
|
toggleModalVisible: () => dispatch(toggleModalVisible("invoiceEnter")),
|
|
setInvoiceEnterContext: context =>
|
|
dispatch(setModalContext({ context: context, modal: "invoiceEnter" }))
|
|
});
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps
|
|
)(function JobsDetailPliComponent({
|
|
toggleModalVisible,
|
|
setInvoiceEnterContext,
|
|
job
|
|
}) {
|
|
return (
|
|
<div>
|
|
<Button
|
|
onClick={() => {
|
|
setInvoiceEnterContext({
|
|
actions: { refetch: null },
|
|
context: {
|
|
job
|
|
}
|
|
});
|
|
}}
|
|
>
|
|
Enter Invoice
|
|
</Button>
|
|
</div>
|
|
);
|
|
});
|