mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
feat: remove SET_DASHBOARD_REQUEST_LOADING reducer.
feat: fix dropdown filter. feat: fix fetch resource data.
This commit is contained in:
@@ -3,7 +3,7 @@ import { createReducer } from '@reduxjs/toolkit';
|
||||
|
||||
const initialState = {
|
||||
pageTitle: '',
|
||||
pageSubtitle: 'Hello World',
|
||||
pageSubtitle: '',
|
||||
preferencesPageTitle: '',
|
||||
sidebarExpended: true,
|
||||
dialogs: {},
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { createSelector } from "@reduxjs/toolkit";
|
||||
|
||||
const dialogByNameSelector = (dialogName) => (state) => state.dashboard.dialogs?.[dialogName];
|
||||
const dialogByNameSelector = (state, props) => state.dashboard.dialogs?.[props.dialogName];
|
||||
|
||||
export const isDialogOpenFactory = (dialogName) => createSelector(
|
||||
dialogByNameSelector(dialogName),
|
||||
export const isDialogOpenFactory = () => createSelector(
|
||||
dialogByNameSelector,
|
||||
(dialog) => {
|
||||
return dialog && dialog.isOpen;
|
||||
},
|
||||
);
|
||||
|
||||
export const getDialogPayloadFactory = (dialogName) => createSelector(
|
||||
dialogByNameSelector(dialogName),
|
||||
export const getDialogPayloadFactory = () => createSelector(
|
||||
dialogByNameSelector,
|
||||
(dialog) => {
|
||||
return { ...dialog?.payload };
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user