upload, parse and store door lock entries

This commit is contained in:
Bilal Catic
2019-05-30 03:44:11 +02:00
parent d141889c4d
commit 79bcf91dc7
16 changed files with 528 additions and 57 deletions

View File

@@ -7,7 +7,7 @@ import {
const initialState = {
pending: false,
result: {},
error: '',
error: null,
};
export const doorLockData = (state, action) => {
@@ -18,15 +18,18 @@ export const doorLockData = (state, action) => {
case UPLOAD_DOOR_LOCK_DATA_PENDING:
return Object.assign({}, state, {
pending: true,
error: null,
});
case UPLOAD_DOOR_LOCK_DATA_SUCCESS:
return Object.assign({}, state, {
pending: false,
result: action.payload,
error: null,
});
case UPLOAD_DOOR_LOCK_DATA_FAILED:
return Object.assign({}, state, {
pending: false,
result: {},
error: action.payload,
});
default: