Skip to content

Commit 18c72c7

Browse files
committed
update document component to have the correct props
1 parent bbb4b4f commit 18c72c7

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/compounds/Document/Document.jsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Dropdown, Offcanvas } from 'react-bootstrap'
44
import LineItemsTable from '../../components/LineItemsTable/LineItemsTable'
55
import './document.scss'
66

7-
const Document = ({ document, addClass }) => {
7+
const Document = ({ accessToken, addClass, acceptSOW, document, request }) => {
88
const { identifier, date, documentStatusColor, documentType,
99
documentTypeColor, documentStatus, lineItems, requestIdentifier,
1010
shippingPrice, shipTo, shipFrom, subtotalPrice,
@@ -42,9 +42,13 @@ const Document = ({ document, addClass }) => {
4242
Next Actions
4343
</Dropdown.Toggle>
4444
<Dropdown.Menu>
45-
{/* TODO: @summer-cook Update this menu item so it submits this document for approval &
46-
add more dropdown items depending on what actions we need here. */}
47-
<Dropdown.Item href='#/action-1'>Submit for Approval</Dropdown.Item>
45+
{/* TODO: @summer-cook SOW should have submit for approval. It should also ONLY show the submit for approval when the SOW has not yet been submitted. Need to figure out a way to tell if it has been submitted or not. . */}
46+
<Dropdown.Item
47+
href='#/action-1'
48+
onClick={() => {acceptSOW({data: request, sowID: identifier, accessToken: accessToken})}}
49+
>
50+
Submit for Approval
51+
</Dropdown.Item>
4852
</Dropdown.Menu>
4953
</Dropdown>
5054
</div>
@@ -90,6 +94,8 @@ const Document = ({ document, addClass }) => {
9094

9195
Document.propTypes = {
9296
addClass: PropTypes.string,
97+
accessToken: PropTypes.string.isRequired,
98+
acceptSOW: PropTypes.func.isRequired,
9399
document: PropTypes.shape({
94100
identifier: PropTypes.string.isRequired,
95101
date: PropTypes.string.isRequired,

0 commit comments

Comments
 (0)