Skip to content

Commit cdac5d8

Browse files
committed
Merge branch 'main' into 176-demo-account
2 parents 60bee21 + 44862cb commit cdac5d8

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

src/compounds/ActionsGroup/ActionsGroup.jsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import React, { useState } from 'react'
22
import PropTypes from 'prop-types'
33
import { ListGroup } from 'react-bootstrap'
44
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
5-
// import SendMessage from './actions/SendMessage'
5+
import SendMessage from './actions/SendMessage'
66
import ViewFiles from './actions/ViewFiles'
77
import { allowNull } from '../../resources/utilityFunctions'
88
import './actions-group.scss'
99

10-
// TODO: add back handleSendingMessagesOrFiles into the props, removing for now to avoid console error. see below TODO.
11-
const ActionsGroup = ({ initialFiles }) => {
10+
const ActionsGroup = ({ handleSendingMessagesOrFiles, initialFiles }) => {
1211
const [show, setShow] = useState(false)
1312
const [action, setAction] = useState(null)
1413

@@ -24,15 +23,15 @@ const ActionsGroup = ({ initialFiles }) => {
2423
return (
2524
<>
2625
<ListGroup className='actions-group'>
27-
{/* TODO(@summercook): return this and the below commented code
28-
once we are able to refactor posting messages & attachments */}
29-
{/* <ListGroup.Item action variant='primary' onClick={() => handleShow('SendMessage')}>
26+
<ListGroup.Item
27+
action
28+
onClick={() => handleShow('SendMessage')}
29+
>
3030
<FontAwesomeIcon icon='fa-envelope' />
3131
Send Message
32-
</ListGroup.Item> */}
32+
</ListGroup.Item>
3333
<ListGroup.Item
3434
action
35-
variant='primary'
3635
onClick={() => handleShow('ViewFiles')}
3736
role='presentation'
3837
bsPrefix='bg-secondary-8 list-group-item'
@@ -41,19 +40,19 @@ const ActionsGroup = ({ initialFiles }) => {
4140
View Files
4241
</ListGroup.Item>
4342
</ListGroup>
44-
{/* {(action === 'SendMessage' && show)
43+
{(action === 'SendMessage' && show)
4544
&& (
4645
<SendMessage
4746
handleClose={handleClose}
4847
onSubmit={handleSendingMessagesOrFiles}
4948
/>
50-
)} */}
49+
)}
5150
{(action === 'ViewFiles' && show)
5251
&& (
5352
<ViewFiles
5453
handleClose={handleClose}
5554
initialFiles={initialFiles}
56-
// onSubmit={handleSendingMessagesOrFiles}
55+
onSubmit={handleSendingMessagesOrFiles}
5756
/>
5857
)}
5958
</>

src/compounds/RequestList/RequestList.jsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@ const RequestList = ({ backgroundColor, requests }) => (
88
<>
99
<Title title='My Requests' size='medium' />
1010
<div className='rounded overflow-hidden mb-4'>
11-
{requests.map((req, index) => (
11+
{requests.length === 0 ? (
12+
// the no-requests class is for testing purposes in the webstore - do not remove
13+
<p className='mt-2 no-requests'>
14+
You do not have any requests yet.
15+
<br />
16+
<a href='/browse'>Browse our available services</a> to create a request,
17+
or start a new general request by clicking the <b>"Initiate a Request"</b> button above.
18+
</p>
19+
) : (requests.map((req, index) => (
1220
<Link key={req.id} href={`${req.href}`} passHref legacyBehavior>
1321
<RequestItem request={req} index={index} backgroundColor={backgroundColor} />
1422
</Link>
15-
))}
23+
)))}
1624
</div>
1725
</>
1826
)

src/compounds/RequestList/RequestList.stories.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,8 @@ Alternate.args = {
7575
},
7676
],
7777
}
78+
79+
export const NoRequests = Template.bind({})
80+
NoRequests.args = {
81+
requests: [],
82+
}

0 commit comments

Comments
 (0)