Merge pull request #1549 from luismanez/react-outlook-add-todo-task

This commit is contained in:
Hugo Bernier 2020-10-18 21:09:21 -04:00 committed by GitHub
commit a6015efc00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -59,6 +59,8 @@ react-outlook-add-todo-task|Luis Mañez (MVP, [ClearPeople](http://www.clearpeop
Version|Date|Comments
-------|----|--------
1.0.0|Jun 3, 2020|Initial release
1.1.0|Sep 3, 2020|To Do item body coming from email body
1.2.0|Oct 16, 2020|To Do item body included a "open in outlook" link
## Disclaimer

View File

@ -162,8 +162,8 @@ export default class CreateTask extends React.Component<
status: "notStarted",
title: taskTitle,
body: {
content: this.props.context.item.body,
contentType: "text",
content: this._composeBody(this.props.context.item.body),
contentType: "html",
},
};
@ -180,4 +180,10 @@ export default class CreateTask extends React.Component<
console.log(e);
}
}
private _composeBody(emailBody: string): string {
const id: string = encodeURIComponent(this.props.context.item.id);
const link: string = `<a href='https://outlook.office365.com/owa/?ItemID=${id}&exvsurl=1&viewmodel=ReadMessageItem'>Open in Outlook</a>`;
return `${emailBody}<p style='font-size: large; padding-top: 10px;'>${link}</p>`;
}
}