Skip to content

Commit

Permalink
fix: chips should show organization or region name
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynndp committed Mar 19, 2022
1 parent 5c999e0 commit cd4aa48
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/components/Messaging/AnnounceMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ const AnnounceMessageForm = ({ setToggleAnnounceMessage }) => {
const handleChange = (e) => {
setErrors(null);
const { name, value } = e.target;
console.log(name, value, String.toString(value));
setValues({
...values,
[name]: value,
[name]: `${value}`,
});
};

Expand Down
16 changes: 12 additions & 4 deletions src/components/Messaging/MessageBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,19 @@ const SenderInformation = ({
<b>DATE:</b> {dateFormat(message?.composed_at, 'yyyy/mm/dd')}
</Typography>
{message?.bulk_message_recipients &&
message?.bulk_message_recipients.map((recipient, i) => (
message.bulk_message_recipients.map((recipient, i) => (
<Chip
key={`${recipient.recipient}-${i}`}
label={`${recipient.recipient}`}
color={recipient.type === 'region' ? 'secondary' : 'primary'}
key={`${
recipient.organization
? recipient.organization
: recipient.region
}-${i}`}
label={`${
recipient.organization
? recipient.organization
: recipient.region
}`}
color="primary"
style={{
color: 'white',
borderRadius: '6px',
Expand Down

0 comments on commit cd4aa48

Please sign in to comment.