Merge pull request #1774 from mohammadamer/patch-1

This commit is contained in:
Hugo Bernier 2021-03-21 01:15:04 -04:00 committed by GitHub
commit 98b48cfeba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 17 deletions

View File

@ -84,9 +84,14 @@ The Web Part checks the user's permissions for the View, Add, Edit, and Delete e
![calendar](assets/screen9.png)
## Used SharePoint Framework Version
## Compatibility
![SPFx 1.10](https://img.shields.io/badge/SPFx-1.10.0-green.svg)
![Node.js LTS 6.x | LTS 8.x](https://img.shields.io/badge/Node.js-LTS%206.x%20%7C%20LTS%208.x-green.svg)
![SharePoint Online](https://img.shields.io/badge/SharePoint-Online-yellow.svg)
![Teams N/A: Untested with Microsoft Teams](https://img.shields.io/badge/Teams-N%2FA-lightgrey.svg "Untested with Microsoft Teams")
![Workbench Hosted: Does not work with local workbench](https://img.shields.io/badge/Workbench-Hosted-yellow.svg "Does not work with local workbench")
![1.10.0](https://img.shields.io/badge/version-1.10.0-green.svg)
## Applies to
@ -109,11 +114,12 @@ The Web Part Use PnPjs library, Office-ui-fabric-react components. react Big-Cal
Solution|Author(s)
--------|---------
Calendar Web PArt|[Mohammed Amer](https://www.linkedin.com/in/mohammad3mer/) ([@https://twitter.com/Mohammad3mer](https://twitter.com/Mohammad3mer))
Calendar Web Part|Abderahman Moujahid
Calendar Web Part|Hugo Bernier ([@bernier](https://twitter.com/bernierh), [Tahoe Ninjas](https://tahoeninjas.blog/))
Calendar Web Part|João Mendes
Calendar Web Part|Mohamed Derhalli
Calendar Web Part (Upgrade)|Hugo Bernier ([@bernier](https://twitter.com/bernierh), [Tahoe Ninjas](https://tahoeninjas.blog/))
Calendar Web Part|Nanddeep Nachan ([@NanddeepNachan](https://twitter.com/NanddeepNachan))
Calendar Web Part|Abderahman Moujahid
## Version history
@ -128,6 +134,7 @@ Version|Date|Comments
1.0.6|December 3, 2020|Fixed all-day events (#1623)
1.0.7|December 4, 2020|Fixed styling Year view + Dutch localization
1.0.8|December 24, 2020|Fixed timezone difference (#1646)
1.0.9|March 16, 2021|Fixed issue deleting events (#1773)
## Disclaimer

View File

@ -189,6 +189,13 @@
"company": "",
"pictureUrl": "https://avatars.githubusercontent.com/u/36161889?s=460\u0026u=afdd5f6681bc375ee3811482dec79824c12d8170\u0026v=4",
"name": "Abderahman Moujahid"
},
{
"gitHubAccount": "mohammadamer",
"company": "Atea Global Services",
"pictureUrl": "https://avatars.githubusercontent.com/u/19314043?s=460&u=79acb7fd0ad466e1040ddd8a739fa93385018b81&v=4",
"name": "Mohammed Amer",
"twitter": "Mohammad3mer"
}
],
"references": [

View File

@ -3,7 +3,7 @@
"solution": {
"name": "react-calendar-client-side-solution",
"id": "3a13208b-3874-4036-9262-4edd22e88187",
"version": "1.0.8.0",
"version": "1.0.9.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false

View File

@ -1,6 +1,6 @@
{
"name": "react-calendar",
"version": "1.0.2",
"version": "1.0.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,7 +1,7 @@
{
"name": "react-calendar",
"main": "lib/index.js",
"version": "1.0.4",
"version": "1.0.9",
"private": true,
"engines": {
"node": ">=0.10.0"

View File

@ -176,7 +176,7 @@ export class Event extends React.Component<IEventProps, IEventState> {
}
else {
if (this.state.eventData.EventType == '1') { // recurrence exception
eventData.RecurrenceID = eventData.EventDate.toString();
eventData.RecurrenceID = eventData.EventDate;
eventData.MasterSeriesItemID = eventData.ID.toString();
eventData.EventType = "4";
eventData.fRecurrence = true;

View File

@ -20,6 +20,6 @@ export interface IEventData {
fRecurrence?: string | boolean;
EventType?: string;
UID?: string;
RecurrenceID?: string;
RecurrenceID?: Date;
MasterSeriesItemID?: string;
}

View File

@ -91,7 +91,7 @@ export default class spservices {
UID: newEvent.UID,
RecurrenceData: newEvent.RecurrenceData ? await this.deCodeHtmlEntities(newEvent.RecurrenceData) : "",
MasterSeriesItemID: newEvent.MasterSeriesItemID,
RecurrenceID: newEvent.RecurrenceID ? await this.getUtcTime(newEvent.RecurrenceID) : undefined,
RecurrenceID: newEvent.RecurrenceID ? newEvent.RecurrenceID : undefined,
});
}
catch (error) {
@ -240,7 +240,7 @@ export default class spservices {
switch (event.EventType.toString()) {
case '4': // Exception Recurrence Event
results = await web.lists.getById(listId).items.getById(event.Id).update({
Title: `Delete: ${event.title}`,
Title: `Deleted: ${event.title}`,
EventType: '3',
});
break;
@ -251,9 +251,10 @@ export default class spservices {
await this.deleteRecurrenceExceptions(event, siteUrl, listId);
await web.lists.getById(listId).items.getById(event.Id).delete();
} else {
// delete a single recurrence Exception. add new entry with eventtype 3
event.RecurrenceID = event.EventDate.toString();
//Applying the Standard funactionality of SharePoint When deleting for deleting one occurrence of recurrent event by
// 1) adding prefix "Deleted" to event title 2) Set RecurrenceID to event Date 3) Set MasterSeriesItemID to event ID 4)Set fRecurrence to true 5) Set event type to 3
event.title = `Deleted: ${event.title}`;
event.RecurrenceID = event.EventDate;
event.MasterSeriesItemID = event.ID.toString();
event.fRecurrence = true;
event.EventType = '3';
@ -532,7 +533,7 @@ export default class spservices {
Duration: event.Duration,
RecurrenceData: event.RecurrenceData ? await this.deCodeHtmlEntities(event.RecurrenceData) : "",
fRecurrence: event.fRecurrence,
RecurrenceID: event.RecurrenceID ? await this.getLocalTime(event.RecurrenceID) : undefined,
RecurrenceID: event.RecurrenceID ? event.RecurrenceID : undefined,
MasterSeriesItemID: event.MasterSeriesItemID,
UID: event.UID.replace("{", "").replace("}", ""),
});