firebase: {
apiKey: "AIzaSyAF4lNZ5WtAsXSpfFLlMjD76ij3ykkV71Y",
authDomain: "angular-84f46.firebaseapp.com",
databaseURL: "https://angular-84f46.firebaseio.com",
projectId: "angular-84f46",
storageBucket: "angular-84f46.appspot.com",
messagingSenderId: "63615603270",
appId: "1:63615603270:web:946140011c5410c96bf047",
measurementId: "G-4JSCEMTWJ6"
} |
public onActionBegin(args: any): void {
if (args.requestType == "eventChange") {
this.data.doc(args.changedRecords[0].DocumentId).update({ Subject: args.changedRecords[0].Subject });
this.data.doc(args.changedRecords[0].DocumentId).update({ EndTime: args.changedRecords[0].EndTime });
this.data.doc(args.changedRecords[0].DocumentId).update({ StartTime: args.changedRecords[0].StartTime });
this.data.doc(args.changedRecords[0].DocumentId).update({ Location: args.changedRecords[0].Location });
this.data.doc(args.changedRecords[0].DocumentId).update({ IsAllDay: args.changedRecords[0].IsAllDay });
this.data.doc(args.changedRecords[0].DocumentId).update({ RecurrenceRule: args.changedRecords[0].RecurrenceRule });
} else if (args.requestType == "eventCreate") {
let guid = (this.GuidFun() + this.GuidFun() + "-" + this.GuidFun() + "-4" + this.GuidFun().substr(0, 3) + "-" + this.GuidFun() + "-" + this.GuidFun() + this.GuidFun() + this.GuidFun()).toLowerCase();
args.data[0].DocumentId = guid.toString();
this.data.doc(guid).set(args.data[0]);
} else if (args.requestType == "eventRemove") {
this.data.doc(args.deletedRecords[0].DocumentId).delete();
}
}
public GuidFun() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
} |
Hi Hernán,You are most welcome.We are happy that your problem has resolved.Please get in touch with us if you would require any further assistance.
Regards,Vengatesh
Hi Hernán,Thanks for the update.We have checked the reported issue but we need additional information to validate this issue. So could you please share us Syncfusion package version which is used in your project?We are happy to assist you.Regards,Vengatesh
public onActionBegin(args: any): void {
if (args.requestType == "eventChange") {
this.data.doc(args.changedRecords[0].DocumentId).update({ Subject: args.changedRecords[0].Subject });
this.data.doc(args.changedRecords[0].DocumentId).update({ EndTime: args.changedRecords[0].EndTime });
this.data.doc(args.changedRecords[0].DocumentId).update({ StartTime: args.changedRecords[0].StartTime });
this.data.doc(args.changedRecords[0].DocumentId).update({ Location: args.changedRecords[0].Location });
this.data.doc(args.changedRecords[0].DocumentId).update({ IsAllDay: args.changedRecords[0].IsAllDay });
this.data.doc(args.changedRecords[0].DocumentId).update({ RecurrenceRule: args.changedRecords[0].RecurrenceRule });
} else if (args.requestType == "eventCreate") {
let guid = (this.GuidFun() + this.GuidFun() + "-" + this.GuidFun() + "-4" + this.GuidFun().substr(0, 3) + "-" + this.GuidFun() + "-" + this.GuidFun() + this.GuidFun() + this.GuidFun()).toLowerCase();
args.data[0].DocumentId = guid.toString();
this.schData.Subject = args.data[0].Subject;
this.schData.StartTime = args.data[0].StartTime;
this.schData.EndTime = args.data[0].EndTime;
this.schData.Location = args.data[0].Location;
this.schData.IsAllDay = args.data[0].IsAllDay;
this.schData.RecurrenceRule = args.data[0].RecurrenceRule;
this.schData.Id = args.data[0].Id;
this.data.doc(guid).set(this.schData);
} else if (args.requestType == "eventRemove") {
this.data.doc(args.deletedRecords[0].DocumentId).delete();
}
} |
Hi gents,
Can you tell me what the RecurrenceRule syntax is, please?
I have an events app already up and running in firestore, but I would like to incorporate scheduler into the app
regards
Michael
Refer to the below UG sections for using the RecurrenceRule with the Schedule.
https://ej2.syncfusion.com/angular/documentation/schedule/appointments/#recurrence-options-and-rules
https://ej2.syncfusion.com/angular/documentation/schedule/appointments/#recurring-events