aboutsummaryrefslogtreecommitdiff
path: root/modern/src/store
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-06-21 17:42:00 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-06-21 17:42:00 -0700
commitd3a027a92958371acaf35d300770a4c864df7231 (patch)
tree0f6d28e5cd6603231f7db0c0d9d407687b649cbc /modern/src/store
parent0de52345ecb1bc9137a3d5df1fe753917b677314 (diff)
downloadetbsa-traccar-web-d3a027a92958371acaf35d300770a4c864df7231.tar.gz
etbsa-traccar-web-d3a027a92958371acaf35d300770a4c864df7231.tar.bz2
etbsa-traccar-web-d3a027a92958371acaf35d300770a4c864df7231.zip
Implement device removal
Diffstat (limited to 'modern/src/store')
-rw-r--r--modern/src/store/devices.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/modern/src/store/devices.js b/modern/src/store/devices.js
index 0d96e98..3d7be3e 100644
--- a/modern/src/store/devices.js
+++ b/modern/src/store/devices.js
@@ -12,7 +12,10 @@ const { reducer, actions } = createSlice({
},
select(state, action) {
state.selectedId = action.payload.id;
- }
+ },
+ remove(state, action) {
+ delete state.items[action.payload];
+ },
}
});