-
Notifications
You must be signed in to change notification settings - Fork 3
feat: mark email done on send #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: mark email done on send #339
Conversation
FRO-293 Sending in Email/Channel should Send and Mark as Done.
Email, easy. For Channel need to think thru what exactly we mean. I think:
Eventually this should apply to document comments as well. Also: this should probably be a setting that can be turned on/off. Doesn't seem obvious to me that this is what everyone will want. |
3682ad7 to
d0237d4
Compare
0a96a24 to
a98814a
Compare
6ca0007 to
d484247
Compare
c68045b to
f1e3d7d
Compare
f1e3d7d to
c515e02
Compare
| const sendEmail = async () => { | ||
| if (isPendingSend() || isPendingUpload()) return; | ||
| const sendEmail = async (): Promise<boolean> => { | ||
| if (isPendingSend() || isPendingUpload()) return false; | ||
| setIsPendingSend(true); | ||
| const to = form().recipients.to.map(convertEmailRecipientToContactInfo); | ||
| const cc = form().recipients.cc.map(convertEmailRecipientToContactInfo); | ||
| const bcc = form().recipients.bcc.map(convertEmailRecipientToContactInfo); | ||
|
|
||
| if ((to?.length ?? 0) + (cc?.length ?? 0) + (bcc?.length ?? 0) === 0) { | ||
| toast.failure('Email failed to send. No recipients provided'); | ||
| return; | ||
| setIsPendingSend(false); | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future would be great if we pulled this logic out of component body
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, agreed, I'll purify BaseInput at some point
Emails are now by default marked as done on send.
Additionally, emails with tables now get a white background.