diff --git a/samples/js-modern-calendar/README.md b/samples/js-modern-calendar/README.md index 1560abdc7..865ea9ba6 100644 --- a/samples/js-modern-calendar/README.md +++ b/samples/js-modern-calendar/README.md @@ -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 diff --git a/samples/js-modern-calendar/assets/sample.json b/samples/js-modern-calendar/assets/sample.json index c9aa58663..05304f268 100644 --- a/samples/js-modern-calendar/assets/sample.json +++ b/samples/js-modern-calendar/assets/sample.json @@ -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": [ diff --git a/samples/js-modern-calendar/config/package-solution.json b/samples/js-modern-calendar/config/package-solution.json index f1a69306f..2dc3e6fcf 100644 --- a/samples/js-modern-calendar/config/package-solution.json +++ b/samples/js-modern-calendar/config/package-solution.json @@ -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": "", diff --git a/samples/js-modern-calendar/package.json b/samples/js-modern-calendar/package.json index d8bea7071..82dd43e66 100644 --- a/samples/js-modern-calendar/package.json +++ b/samples/js-modern-calendar/package.json @@ -1,6 +1,6 @@ { "name": "modern-calendar", - "version": "1.0.2", + "version": "1.0.3", "private": true, "main": "lib/index.js", "engines": { diff --git a/samples/js-modern-calendar/src/webparts/modernCalendar/ModernCalendarWebPart.ts b/samples/js-modern-calendar/src/webparts/modernCalendar/ModernCalendarWebPart.ts index f2c06e6cb..f57cb59af 100644 --- a/samples/js-modern-calendar/src/webparts/modernCalendar/ModernCalendarWebPart.ts +++ b/samples/js-modern-calendar/src/webparts/modernCalendar/ModernCalendarWebPart.ts @@ -390,10 +390,12 @@ export default class ModernCalendarWebPart extends BaseClientSideWebPart { + 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 { var eventDetail = - moment(_event["start"]).format("MM/DD/YYYY hh:mm") + - " - " + - moment(_event["end"]).format("MM/DD/YYYY hh:mm") + + moment.utc(_event["start"]).local().format('YYYY-MM-DD hh:mm A') + + " - " + + moment.utc(_event["end"]).local().format('YYYY-MM-DD hh:mm A') + "
" + _event["detail"]; swal2.default(_event.title, eventDetail, "info"); diff --git a/samples/react-tree-orgchart/README.md b/samples/react-tree-orgchart/README.md index 9980f84e6..0c3b8bc8a 100644 --- a/samples/react-tree-orgchart/README.md +++ b/samples/react-tree-orgchart/README.md @@ -1,7 +1,7 @@ # Tree Organization ## Summary -The Tree Organization WebPart shows the Organization Chart of the or the team, the web part reads infomation from current user to build the Organization Chart. +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. You can configure in the web part properties: * show all Organization Chart @@ -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 @@ -33,12 +32,12 @@ You can configure in the web part properties: * [Office 365 tenant](https://docs.microsoft.com/sharepoint/dev/spfx/set-up-your-development-environment) -## WebPart Properties +## Web Part Properties Property |Type|Required| comments --------------------|----|--------|---------- -title | Text| no| WebPart Title +title | Text| no| Web Part Title teamLeader |Text|no|UPN of manager if viewType is 4 viewType|viewType(number)|yes|if currentUserTeam is set it's not required maxLevels | Number| yes | Maximum number of levels to show @@ -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 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). - diff --git a/samples/react-tree-orgchart/assets/sample.json b/samples/react-tree-orgchart/assets/sample.json index e391a4a13..9a3cd77ca 100644 --- a/samples/react-tree-orgchart/assets/sample.json +++ b/samples/react-tree-orgchart/assets/sample.json @@ -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": [ diff --git a/samples/react-tree-orgchart/src/webparts/treeOrgChart/components/TreeOrgChart.tsx b/samples/react-tree-orgchart/src/webparts/treeOrgChart/components/TreeOrgChart.tsx index ad85dc6f9..f41529c3d 100755 --- a/samples/react-tree-orgchart/src/webparts/treeOrgChart/components/TreeOrgChart.tsx +++ b/samples/react-tree-orgchart/src/webparts/treeOrgChart/components/TreeOrgChart.tsx @@ -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; } }