mirror of
https://github.com/pnp/sp-dev-fx-webparts.git
synced 2025-03-09 06:38:52 +00:00
fix issue when updating events (#901)
This commit is contained in:
parent
3e82d22c5f
commit
9650938465
@ -181,7 +181,7 @@ export default class spservices {
|
|||||||
|
|
||||||
const web = new Web(siteUrl);
|
const web = new Web(siteUrl);
|
||||||
//"Title","fRecurrence", "fAllDayEvent","EventDate", "EndDate", "Description","ID", "Location","Geolocation","ParticipantsPickerId"
|
//"Title","fRecurrence", "fAllDayEvent","EventDate", "EndDate", "Description","ID", "Location","Geolocation","ParticipantsPickerId"
|
||||||
results = await web.lists.getById(listId).items.getById(updateEvent.Id).update({
|
let newItem: any = {
|
||||||
Title: updateEvent.title,
|
Title: updateEvent.title,
|
||||||
Description: updateEvent.Description,
|
Description: updateEvent.Description,
|
||||||
Geolocation: updateEvent.geolocation,
|
Geolocation: updateEvent.geolocation,
|
||||||
@ -192,11 +192,17 @@ export default class spservices {
|
|||||||
fAllDayEvent: false,
|
fAllDayEvent: false,
|
||||||
fRecurrence: updateEvent.fRecurrence,
|
fRecurrence: updateEvent.fRecurrence,
|
||||||
Category: updateEvent.Category,
|
Category: updateEvent.Category,
|
||||||
UID: updateEvent.UID,
|
|
||||||
RecurrenceData: updateEvent.RecurrenceData ? await this.deCodeHtmlEntities(updateEvent.RecurrenceData) : "",
|
RecurrenceData: updateEvent.RecurrenceData ? await this.deCodeHtmlEntities(updateEvent.RecurrenceData) : "",
|
||||||
EventType: updateEvent.EventType,
|
EventType: updateEvent.EventType,
|
||||||
MasterSeriesItemID: updateEvent.MasterSeriesItemID,
|
};
|
||||||
});
|
if (updateEvent.UID) {
|
||||||
|
newItem.UID = updateEvent.UID;
|
||||||
|
}
|
||||||
|
if (updateEvent.MasterSeriesItemID) {
|
||||||
|
newItem.MasterSeriesItemID = updateEvent.MasterSeriesItemID;
|
||||||
|
}
|
||||||
|
|
||||||
|
results = await web.lists.getById(listId).items.getById(updateEvent.Id).update(newItem);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user