Events for all resources
Closed this issue · 1 comments
ceciud commented
Hi, i'm tring to use this repo, it is very good!
I have differents resources and i use 'eventSources'
`eventSources: [
{
events: function (fetchInfo, successCallback, failureCallback) {
let params = getFiltersParams();
params.start = fetchInfo.startStr;
params.end = fetchInfo.endStr;
let queryString = new URLSearchParams(params).toString();
let urlWithParams = `${apiEndpointUrl}?${queryString}`;
fetch(urlWithParams,
{
method: "GET"
}).then(res => {
return res.json();
}).then(res => {
successCallback(res);
});
}
}
],`
If i wan't to share a event with all resources, how i can do?
Mi json answer from urlWithParams is, for example:
{ "type": 2, "start": "2024-05-19T02:00:00", "end": "2024-05-19T11:30:00", "resourceIds": [ "1,2,3,4,5,6,7,8,9" ], "display": "background", "backgroundColor": "#f00" },,
ceciud commented
Sorry, i have to set
the json:
{ "type": 2, "start": "2024-05-19T02:00:00", "end": "2024-05-19T11:30:00", "resourceIds": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "display": "background", "backgroundColor": "#f00" },