-
Notifications
You must be signed in to change notification settings - Fork 5
/
SubrecipientsCell.tsx
61 lines (54 loc) · 1.26 KB
/
SubrecipientsCell.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import type { FindSubrecipients } from 'types/graphql'
import type { CellSuccessProps, CellFailureProps } from '@redwoodjs/web'
import Subrecipients from 'src/components/Subrecipient/Subrecipients'
export const QUERY = gql`
query FindSubrecipients {
subrecipients {
id
ueiTinCombo
createdAt
validSubrecipientUploads {
id
parsedSubrecipient {
name
recipientId
pocName
pocPhoneNumber
pocEmailAddress
zip5
zip4
addressLine1
addressLine2
addressLine3
city
state
}
upload {
id
}
createdAt
updatedAt
}
invalidSubrecipientUploads {
id
upload {
id
}
createdAt
updatedAt
}
}
}
`
export const Loading = () => <div>Loading...</div>
export const Empty = () => {
return <div className="rw-text-center">{'No subrecipients yet. '}</div>
}
export const Failure = ({ error }: CellFailureProps) => (
<div className="rw-cell-error">{error?.message}</div>
)
export const Success = ({
subrecipients,
}: CellSuccessProps<FindSubrecipients>) => {
return <Subrecipients subrecipients={subrecipients} />
}