mirror of
https://github.com/pnp/sp-dev-fx-webparts.git
synced 2025-03-08 21:01:46 +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);
|
||||
//"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,
|
||||
Description: updateEvent.Description,
|
||||
Geolocation: updateEvent.geolocation,
|
||||
@ -192,11 +192,17 @@ export default class spservices {
|
||||
fAllDayEvent: false,
|
||||
fRecurrence: updateEvent.fRecurrence,
|
||||
Category: updateEvent.Category,
|
||||
UID: updateEvent.UID,
|
||||
RecurrenceData: updateEvent.RecurrenceData ? await this.deCodeHtmlEntities(updateEvent.RecurrenceData) : "",
|
||||
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) {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user