Skip to content

Commit

Permalink
fix: remove logs and make org id the stakeholder_uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynndp committed Feb 20, 2022
1 parent 3df2f7f commit 35983eb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
4 changes: 1 addition & 3 deletions src/components/Messaging/AnnounceMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ const AnnounceMessageForm = ({ setToggleAnnounceMessage }) => {
(payload.body && payload.organization_id) ||
(payload.body && payload.region_id)
) {
console.log('anounceMessage handleSubmit', payload);
const res = await postMessageSend(payload);
console.log('anounceMessage message created', res);
await postMessageSend(payload);
history.go(0);
}
} catch (err) {
Expand Down
8 changes: 4 additions & 4 deletions src/components/Messaging/MessageBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ export const SurveyMessage = ({ message }) => {
) : (
<div className={messageRow}>
<Grid item className={messageTimeStampLeft}>
<Typography>{dateFormat(message.composed_at, 'yyyy-mm-dd hh:mm')}</Typography>
<Typography>
{dateFormat(message.composed_at, 'yyyy-mm-dd hh:mm')}
</Typography>
</Grid>
<Grid item className={surveyContent}>
<Typography variant={'h4'}>
Expand Down Expand Up @@ -365,9 +367,7 @@ const MessageBody = ({ messages, messageRecipient }) => {

if (messageContent !== '') {
if (user.userName && messageRecipient) {
console.log('messageBody handleSubmit', messagePayload);
const res = await postMessageSend(messagePayload);
console.log('messageBody message created', res);
await postMessageSend(messagePayload);
history.go(0);
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/components/Messaging/NewMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ const NewMessage = ({ openModal, handleClose }) => {
user.userName &&
messagePayload.to !== ''
) {
console.log('newMessage handleSubmit', messagePayload);
const res = await postMessageSend(messagePayload);
console.log('newMessage message created', res);
await postMessageSend(messagePayload);
history.go(0);
}
handleClose();
Expand Down
6 changes: 2 additions & 4 deletions src/components/Messaging/Survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const SurveyForm = ({ setToggleSurvey }) => {
payload['region_id'] = region.id;
}
if (organization?.id) {
payload['organization_id'] = organization.id;
payload['organization_id'] = organization.stakeholder_uuid;
}

Object.values(allQuestions).map((question) => {
Expand All @@ -157,9 +157,7 @@ const SurveyForm = ({ setToggleSurvey }) => {
payload.survey.title.length > 1 &&
(payload['region_id'] || payload['organization_id'])
) {
console.log('survey handleSubmit', payload);
const res = await postMessageSend(payload);
console.log('survey message created', res);
await postMessageSend(payload);
history.go(0);
}
} catch (err) {
Expand Down

0 comments on commit 35983eb

Please sign in to comment.