Merge pull request #1549 from luismanez/react-outlook-add-todo-task
This commit is contained in:
commit
a6015efc00
|
@ -59,6 +59,8 @@ react-outlook-add-todo-task|Luis Mañez (MVP, [ClearPeople](http://www.clearpeop
|
||||||
Version|Date|Comments
|
Version|Date|Comments
|
||||||
-------|----|--------
|
-------|----|--------
|
||||||
1.0.0|Jun 3, 2020|Initial release
|
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
|
## Disclaimer
|
||||||
|
|
||||||
|
|
|
@ -162,8 +162,8 @@ export default class CreateTask extends React.Component<
|
||||||
status: "notStarted",
|
status: "notStarted",
|
||||||
title: taskTitle,
|
title: taskTitle,
|
||||||
body: {
|
body: {
|
||||||
content: this.props.context.item.body,
|
content: this._composeBody(this.props.context.item.body),
|
||||||
contentType: "text",
|
contentType: "html",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -180,4 +180,10 @@ export default class CreateTask extends React.Component<
|
||||||
console.log(e);
|
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>`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue