aboutsummaryrefslogtreecommitdiff
path: root/modern/src/store/calendars.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-01-27 14:24:09 -0800
committerAnton Tananaev <anton@traccar.org>2023-01-27 14:24:09 -0800
commit2a1bc9710eb1005a8937dc7ec63c25975bb28f41 (patch)
treeaf414797d86b809f845562e498637a4f2f2bf9ce /modern/src/store/calendars.js
parentc2f20eb92f9d916df576d6fecc4063c41a089b0e (diff)
downloadtrackermap-web-2a1bc9710eb1005a8937dc7ec63c25975bb28f41.tar.gz
trackermap-web-2a1bc9710eb1005a8937dc7ec63c25975bb28f41.tar.bz2
trackermap-web-2a1bc9710eb1005a8937dc7ec63c25975bb28f41.zip
Scheduled reports page
Diffstat (limited to 'modern/src/store/calendars.js')
-rw-r--r--modern/src/store/calendars.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/modern/src/store/calendars.js b/modern/src/store/calendars.js
new file mode 100644
index 00000000..924288e6
--- /dev/null
+++ b/modern/src/store/calendars.js
@@ -0,0 +1,16 @@
+import { createSlice } from '@reduxjs/toolkit';
+
+const { reducer, actions } = createSlice({
+ name: 'calendars',
+ initialState: {
+ items: {},
+ },
+ reducers: {
+ update(state, action) {
+ action.payload.forEach((item) => state.items[item.id] = item);
+ },
+ },
+});
+
+export { actions as calendarsActions };
+export { reducer as calendarsReducer };