feat: expand sidebar once open form editor page.

feat: rounding money amount.
feat: optimize page form structure.
feat: refactoring make journal and expense form with FastField component.
This commit is contained in:
Ahmed Bouhuolia
2020-11-29 00:06:59 +02:00
parent 53dd447540
commit 011542e2a3
118 changed files with 3883 additions and 2660 deletions

View File

@@ -9,6 +9,7 @@ const initialState = {
pageHint: '',
preferencesPageTitle: '',
sidebarExpended: true,
previousSidebarExpended: null,
dialogs: {},
topbarEditViewId: null,
requestsLoading: 0,
@@ -62,9 +63,25 @@ const reducerInstance = createReducer(initialState, {
state.requestsLoading = Math.max(requestsLoading, 0);
},
[t.RECORD_SIDEBAR_PREVIOUS_EXPAND]: (state) => {
state.previousSidebarExpended = state.sidebarExpended;
},
[t.SIDEBAR_EXPEND_TOGGLE]: (state) => {
state.sidebarExpended = !state.sidebarExpended;
}
},
[t.SIDEBAR_EXPAND]: (state) => {
state.sidebarExpended = true;
},
[t.SIDEBAR_SHRINK]: (state) => {
state.sidebarExpended = false;
},
[t.RESET_SIDEBAR_PREVIOUS_EXPAND]: (state) => {
state.sidebarExpended = state.previousSidebarExpended;
},
});
export default persistReducer({