Merge pull request #1774 from mohammadamer/patch-1
This commit is contained in:
commit
98b48cfeba
|
@ -84,9 +84,14 @@ The Web Part checks the user's permissions for the View, Add, Edit, and Delete e
|
||||||
|
|
||||||
![calendar](assets/screen9.png)
|
![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
|
## Applies to
|
||||||
|
|
||||||
|
@ -100,7 +105,7 @@ Property |Type|Required| comments
|
||||||
--------------------|----|--------|----------
|
--------------------|----|--------|----------
|
||||||
Site Url of Calendar List | Text| yes|
|
Site Url of Calendar List | Text| yes|
|
||||||
Calendar list| Choice/Dropdown | yes| this is filled with all list of type "event list" created
|
Calendar list| Choice/Dropdown | yes| this is filled with all list of type "event list" created
|
||||||
Start Date | Date | yes | Event Date
|
Start Date | Date | yes | Event Date
|
||||||
End Date| Date| yes | Event Date
|
End Date| Date| yes | Event Date
|
||||||
|
|
||||||
## Solution
|
## Solution
|
||||||
|
@ -109,11 +114,12 @@ The Web Part Use PnPjs library, Office-ui-fabric-react components. react Big-Cal
|
||||||
|
|
||||||
Solution|Author(s)
|
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|João Mendes
|
||||||
Calendar Web Part|Mohamed Derhalli
|
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|Nanddeep Nachan ([@NanddeepNachan](https://twitter.com/NanddeepNachan))
|
||||||
Calendar Web Part|Abderahman Moujahid
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
|
@ -128,6 +134,7 @@ Version|Date|Comments
|
||||||
1.0.6|December 3, 2020|Fixed all-day events (#1623)
|
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.7|December 4, 2020|Fixed styling Year view + Dutch localization
|
||||||
1.0.8|December 24, 2020|Fixed timezone difference (#1646)
|
1.0.8|December 24, 2020|Fixed timezone difference (#1646)
|
||||||
|
1.0.9|March 16, 2021|Fixed issue deleting events (#1773)
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
|
|
||||||
|
|
|
@ -189,6 +189,13 @@
|
||||||
"company": "",
|
"company": "",
|
||||||
"pictureUrl": "https://avatars.githubusercontent.com/u/36161889?s=460\u0026u=afdd5f6681bc375ee3811482dec79824c12d8170\u0026v=4",
|
"pictureUrl": "https://avatars.githubusercontent.com/u/36161889?s=460\u0026u=afdd5f6681bc375ee3811482dec79824c12d8170\u0026v=4",
|
||||||
"name": "Abderahman Moujahid"
|
"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": [
|
"references": [
|
||||||
|
@ -204,4 +211,4 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"solution": {
|
"solution": {
|
||||||
"name": "react-calendar-client-side-solution",
|
"name": "react-calendar-client-side-solution",
|
||||||
"id": "3a13208b-3874-4036-9262-4edd22e88187",
|
"id": "3a13208b-3874-4036-9262-4edd22e88187",
|
||||||
"version": "1.0.8.0",
|
"version": "1.0.9.0",
|
||||||
"includeClientSideAssets": true,
|
"includeClientSideAssets": true,
|
||||||
"skipFeatureDeployment": true,
|
"skipFeatureDeployment": true,
|
||||||
"isDomainIsolated": false
|
"isDomainIsolated": false
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "react-calendar",
|
"name": "react-calendar",
|
||||||
"version": "1.0.2",
|
"version": "1.0.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "react-calendar",
|
"name": "react-calendar",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"version": "1.0.4",
|
"version": "1.0.9",
|
||||||
"private": true,
|
"private": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
|
|
|
@ -176,7 +176,7 @@ export class Event extends React.Component<IEventProps, IEventState> {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (this.state.eventData.EventType == '1') { // recurrence exception
|
if (this.state.eventData.EventType == '1') { // recurrence exception
|
||||||
eventData.RecurrenceID = eventData.EventDate.toString();
|
eventData.RecurrenceID = eventData.EventDate;
|
||||||
eventData.MasterSeriesItemID = eventData.ID.toString();
|
eventData.MasterSeriesItemID = eventData.ID.toString();
|
||||||
eventData.EventType = "4";
|
eventData.EventType = "4";
|
||||||
eventData.fRecurrence = true;
|
eventData.fRecurrence = true;
|
||||||
|
|
|
@ -20,6 +20,6 @@ export interface IEventData {
|
||||||
fRecurrence?: string | boolean;
|
fRecurrence?: string | boolean;
|
||||||
EventType?: string;
|
EventType?: string;
|
||||||
UID?: string;
|
UID?: string;
|
||||||
RecurrenceID?: string;
|
RecurrenceID?: Date;
|
||||||
MasterSeriesItemID?: string;
|
MasterSeriesItemID?: string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ export default class spservices {
|
||||||
UID: newEvent.UID,
|
UID: newEvent.UID,
|
||||||
RecurrenceData: newEvent.RecurrenceData ? await this.deCodeHtmlEntities(newEvent.RecurrenceData) : "",
|
RecurrenceData: newEvent.RecurrenceData ? await this.deCodeHtmlEntities(newEvent.RecurrenceData) : "",
|
||||||
MasterSeriesItemID: newEvent.MasterSeriesItemID,
|
MasterSeriesItemID: newEvent.MasterSeriesItemID,
|
||||||
RecurrenceID: newEvent.RecurrenceID ? await this.getUtcTime(newEvent.RecurrenceID) : undefined,
|
RecurrenceID: newEvent.RecurrenceID ? newEvent.RecurrenceID : undefined,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
@ -240,7 +240,7 @@ export default class spservices {
|
||||||
switch (event.EventType.toString()) {
|
switch (event.EventType.toString()) {
|
||||||
case '4': // Exception Recurrence Event
|
case '4': // Exception Recurrence Event
|
||||||
results = await web.lists.getById(listId).items.getById(event.Id).update({
|
results = await web.lists.getById(listId).items.getById(event.Id).update({
|
||||||
Title: `Delete: ${event.title}`,
|
Title: `Deleted: ${event.title}`,
|
||||||
EventType: '3',
|
EventType: '3',
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
@ -251,9 +251,10 @@ export default class spservices {
|
||||||
await this.deleteRecurrenceExceptions(event, siteUrl, listId);
|
await this.deleteRecurrenceExceptions(event, siteUrl, listId);
|
||||||
await web.lists.getById(listId).items.getById(event.Id).delete();
|
await web.lists.getById(listId).items.getById(event.Id).delete();
|
||||||
} else {
|
} else {
|
||||||
// delete a single recurrence Exception. add new entry with eventtype 3
|
//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.RecurrenceID = event.EventDate.toString();
|
event.title = `Deleted: ${event.title}`;
|
||||||
|
event.RecurrenceID = event.EventDate;
|
||||||
event.MasterSeriesItemID = event.ID.toString();
|
event.MasterSeriesItemID = event.ID.toString();
|
||||||
event.fRecurrence = true;
|
event.fRecurrence = true;
|
||||||
event.EventType = '3';
|
event.EventType = '3';
|
||||||
|
@ -532,7 +533,7 @@ export default class spservices {
|
||||||
Duration: event.Duration,
|
Duration: event.Duration,
|
||||||
RecurrenceData: event.RecurrenceData ? await this.deCodeHtmlEntities(event.RecurrenceData) : "",
|
RecurrenceData: event.RecurrenceData ? await this.deCodeHtmlEntities(event.RecurrenceData) : "",
|
||||||
fRecurrence: event.fRecurrence,
|
fRecurrence: event.fRecurrence,
|
||||||
RecurrenceID: event.RecurrenceID ? await this.getLocalTime(event.RecurrenceID) : undefined,
|
RecurrenceID: event.RecurrenceID ? event.RecurrenceID : undefined,
|
||||||
MasterSeriesItemID: event.MasterSeriesItemID,
|
MasterSeriesItemID: event.MasterSeriesItemID,
|
||||||
UID: event.UID.replace("{", "").replace("}", ""),
|
UID: event.UID.replace("{", "").replace("}", ""),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue