Merge pull request #2092 from petkir/1969_js-modern-calendar-TimeZone

This commit is contained in:
Hugo Bernier 2021-10-31 15:51:38 -04:00 committed by GitHub
commit 4eb4e74d2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 23 deletions

View File

@ -47,6 +47,7 @@ Solution|Author(s)
js-modern-calendar | Jeremy Coleman (MCP, PC Professional, Inc.)
js-modern-calendar | Nanddeep Nachan ([@NanddeepNachan](twitter.com/NanddeepNachan))
js-modern-calendar | Ravi Chandra ([Ravikadri](https://github.com/Ravikadri))
js-modern-calendar | Peter Paul Kirschner ([@petkir_at](https://twitter.com/petkir_at))
## Version history
@ -55,6 +56,7 @@ Version|Date|Comments
1.0.0.0|February 11, 2017|Initial release
1.0.0.1|June 05, 2020|Updated the external CDN references to public CDN references
1.0.2.0|February 9, 2021|Upgraded to SPFx 1.11 and fixed issues with missing dependencies
1.0.3.0|October 28, 2021|fixed issues with Timezones. The Browser Timezone Settings are now used
## Disclaimer

View File

@ -21,7 +21,7 @@
},
{
"key": "SPFX-VERSION",
"value": "1.6.0"
"value": "1.11.0"
}
],
"thumbnails": [
@ -45,6 +45,13 @@
"pictureUrl": "https://github.com/nanddeepn.png",
"name": "Nanddeep Nachan",
"twitter": "NanddeepNachan"
},
{
"gitHubAccount": "petkir",
"company": "Cubido Business Solutions GmbH",
"pictureUrl": "https://github.com/petkir.png",
"name": "Peter Paul Kirschner",
"twitter": "petkir_at"
}
],
"references": [

View File

@ -2,7 +2,7 @@
"solution": {
"name": "SPFx Modern Calendar",
"id": "3d593a2f-73f1-486f-9dae-555c6f6b584d",
"version": "1.0.2.0",
"version": "1.0.3.0",
"includeClientSideAssets": true,
"developer": {
"name": "",

View File

@ -1,6 +1,6 @@
{
"name": "modern-calendar",
"version": "1.0.2",
"version": "1.0.3",
"private": true,
"main": "lib/index.js",
"engines": {

View File

@ -390,10 +390,12 @@ export default class ModernCalendarWebPart extends BaseClientSideWebPart<IModern
private _renderList(items: any[]): void {
var calItems: EventObjectInput[] = items.map((list: any) => {
const start = list[this.properties.start];
const end = list[this.properties.end];
return {
title: list[this.properties.title],
start: list[this.properties.start],
end: list[this.properties.end],
start: moment.utc(start,'YYYY-MM-DD HH:mm:ss').toDate(),
end: moment.utc(end,'YYYY-MM-DD HH:mm:ss').toDate(),
id: list["Id"],
detail: list[this.properties.detail],
};
@ -405,9 +407,9 @@ export default class ModernCalendarWebPart extends BaseClientSideWebPart<IModern
events: calItems,
eventClick: (_event) => {
var eventDetail =
moment(_event["start"]).format("MM/DD/YYYY hh:mm") +
moment.utc(_event["start"]).local().format('YYYY-MM-DD hh:mm A') +
" - " +
moment(_event["end"]).format("MM/DD/YYYY hh:mm") +
moment.utc(_event["end"]).local().format('YYYY-MM-DD hh:mm A') +
"<br>" +
_event["detail"];
swal2.default(_event.title, eventDetail, "info");

View File

@ -18,14 +18,13 @@ You can configure in the web part properties:
## Compatibility
![SPFx 1.10.0](https://img.shields.io/badge/SPFx-1.10.0-green.svg)
![Node.js LTS v10 | LTS v8](https://img.shields.io/badge/Node.js-LTS%20v14%20%7C%20LTS%20v12%20%7C%20LTS%20v10%20%7C%20LTS%20v8-green.svg)
![SPFx 1.10](https://img.shields.io/badge/SPFx-1.10.0-green.svg)
![Node.js LTS 10 | LTS 8](https://img.shields.io/badge/Node.js-LTS%2010%20%7C%20LTS%208-green.svg)
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1")
![Local Workbench Incompatible](https://img.shields.io/badge/Local%20Workbench-Incompatible-red.svg "This solution requires access to read the current user's information")
![Hosted Workbench Compatible](https://img.shields.io/badge/Hosted%20Workbench-Compatible-green.svg)
![Local Workbench Incompatible](https://img.shields.io/badge/Local%20Workbench-Incompatible-red.svg "The solution requires access to the user's properties")
![Hosted Workbench Compatible (with API permissions)](https://img.shields.io/badge/Hosted%20Workbench-Compatible%20(with%20API%20permissions)-yellow.svg)
## Applies to
@ -58,20 +57,20 @@ currentUserTeam|boolean|no|only in Interface to handle previouse installations
Solution|Author(s)
--------|---------
Tree Organization WebPart|João Mendes
Tree Organization WebPart|Peter Paul Kirschner ([@petkir_at](https://twitter.com/petkir_at))
Tree Organization Web Part|[João Mendes](https://github.com/joaojmendes)
Tree Organization Web Part|[Peter Paul Kirschner](https://github.com/petkir) ([@petkir_at](https://twitter.com/petkir_at))
## Version history
Version|Date|Comments
-------|----|--------
1.1.2|October 28, 2021|Fixes the Issue with different TimeZones.
1.1.1|October 5, 2021|Added missing Graph permissions in manifest
1.1.0|Feb 28, 2021|Added <ul><li>Show Other Team</li><li>Live Contact Card</li><li>Filter user by userPrincipalName</li><li>Graph API</li><li>PNPJS updates</li></ul>
1.0.2|June 12, 2020|Added exception handler for profiles missing display name
1.0.1|Jan 28, 2020|Update to SPFx 1.10, minor fixes and refactoring.
1.0.0|Feb 25, 2019|Initial release
## Minimal Path to Awesome
- Clone this repository
@ -96,5 +95,4 @@ For questions regarding this sample, [create a new question](https://github.com/
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=react-tree-orgchart&authors=@joaojmendes%20@petkir&title=react-tree-orgchart%20-%20).
<img src="https://telemetry.sharepointpnp.com/sp-dev-fx-webparts/samples/react-tree-orgchart" />

View File

@ -9,7 +9,7 @@
"The Tree Organization Web Part shows the Organization Chart of the or the team, the web part reads infomation from current user to build the Organization Chart."
],
"creationDateTime": "2021-02-28",
"updateDateTime": "2021-10-05",
"updateDateTime": "2021-10-28",
"products": [
"SharePoint",
"Office"
@ -25,7 +25,7 @@
},
{
"key": "PNPCONTROLS",
"value": "PropertyFieldNumber, PeoplePicker"
"value": "PropertyFieldNumber, PeoplePicker, WebPartTitle"
}
],
"thumbnails": [

View File

@ -290,7 +290,7 @@ export default class TreeOrgChart extends React.Component<
if (showEditOther && this.props.teamLeader && this.props.teamLeader.length > 0) {
selectedTeamleader = this.claimUserToUPN(this.props.teamLeader);
if (!selectedTeamleader) {
selectedTeamleader == this.props.teamLeader;
selectedTeamleader = this.props.teamLeader;
}
}