Skip to content

Commit 2682c28

Browse files
committed
handle behavior around accepting the sow from the webstore
1 parent aa29c78 commit 2682c28

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

src/compounds/Document/Document.jsx

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React, { useState } from 'react'
22
import PropTypes from 'prop-types'
3-
import { Dropdown, Offcanvas, Row } from 'react-bootstrap'
3+
import { Dropdown, Offcanvas } from 'react-bootstrap'
44
import LineItemsTable from '../../components/LineItemsTable/LineItemsTable'
5-
import Notice from '../../components/Notice/Notice'
65
import { allowNull } from '../../resources/utilityFunctions'
76
import './document.scss'
87

@@ -13,7 +12,6 @@ const Document = ({ acceptSOW, addClass, backgroundColor, document }) => {
1312
turnaroundTime,
1413
} = document
1514
const [show, setShow] = useState(false)
16-
const [showNotice, setShowNotice] = useState(false)
1715
const handleClose = () => setShow(false)
1816
const handleShow = () => setShow(true)
1917

@@ -51,30 +49,18 @@ const Document = ({ acceptSOW, addClass, backgroundColor, document }) => {
5149
<Dropdown.Item
5250
href='#/accept-sow'
5351
onClick={() => {
54-
acceptSOW
55-
setShowNotice(true)
52+
acceptSOW()
53+
handleClose()
5654
}}
5755
>
58-
Submit for Approval
56+
Accept SOW
5957
</Dropdown.Item>
6058
</Dropdown.Menu>
6159
</Dropdown>
6260
</div>
6361
)}
6462
</Offcanvas.Header>
6563
<Offcanvas.Body>
66-
{showNotice && (
67-
<Row>
68-
<Notice
69-
addClass='my-3'
70-
alert={{
71-
body: [`SOW ${identifier} has been accepted successfully. Now awaiting purchase order.`],
72-
variant: 'success',
73-
onClose: () => setShowNotice(false),
74-
}}
75-
/>
76-
</Row>
77-
)}
7864
<div className='d-block d-md-flex justify-content-between'>
7965
<div className='details'>
8066
<h5>Details:</h5>

0 commit comments

Comments
 (0)