Hi there!
I have a TimeRangeStore and a ResourceTimeRange Store, both with recurring events.
They look something like this:
const resourceTimeRangeStore = new MyResourceTimeRangeStore({
readUrl : 'php/schedule/resourcetimerange/read.php',
autoLoad : true,
autoCommit : true,
sendAsFormData : true,
listeners : {
beforeCommit : () => {
scheduler.readOnly = true;
},
commit : () => {
scheduler.readOnly = false;
},
exception : (timerange) => {
processException(timerange);
scheduler.readOnly = false;
}
}
});
const timeRangeStore = new MyTimeRangeStore({
readUrl : 'php/schedule/timerange/read.php',
autoLoad : true,
autoCommit : true,
sendAsFormData : true,
listeners : {
beforeCommit : () => {
scheduler.readOnly = true;
},
commit : () => {
scheduler.readOnly = false;
},
exception : (timerange) => {
processException(timerange);
scheduler.readOnly = false;
}
}
});
My features section has
timeRanges : {
showCurrentTimeLine : true,
showHeaderElements : false
},
resourceTimeRanges : true,
And my read.php's look something like this (the resourceTimeRangeStore's read.php is the same, but with a resourceId attached to the ranges)
function sendData($data) {
die(json_encode(
[
"success" => true,
"data" => $data
]));
}
array_push($_SESSION["timeranges"], [ "id" => 'weekendstest', "name" => 'Weekend', "startDate" => '2024-01-01 00:00:00', "endDate" => '2024-01-02 23:59:00', "recurrenceRule" => 'FREQ=WEEKLY;INTERVAL=1;BYDAY=SA', "timeRangeColor" => "red" ]);
sendData($_SESSION["timeranges"]);
How can it be that only the RESOURCE time ranges show up? What am I not seeing?
Or is it not possible to have regular timeRanges AND resourceTimeRanges in one scheduler??
Any help would be greatly appreciated.