mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 06:40:31 +00:00
re-structure to monorepo.
This commit is contained in:
127
packages/webapp/src/store/dashboard/dashboard.actions.tsx
Normal file
127
packages/webapp/src/store/dashboard/dashboard.actions.tsx
Normal file
@@ -0,0 +1,127 @@
|
||||
// @ts-nocheck
|
||||
import t from '@/store/types';
|
||||
|
||||
export function dashboardPageTitle(pageTitle) {
|
||||
return {
|
||||
type: t.CHANGE_DASHBOARD_PAGE_TITLE,
|
||||
pageTitle,
|
||||
};
|
||||
}
|
||||
|
||||
export function dashboardPageHint(pageHint) {
|
||||
return {
|
||||
type: t.CHANGE_DASHBOARD_PAGE_HINT,
|
||||
pageHint,
|
||||
};
|
||||
}
|
||||
|
||||
export function openDialog(name, payload) {
|
||||
return {
|
||||
type: t.OPEN_DIALOG,
|
||||
name: name,
|
||||
payload: payload,
|
||||
};
|
||||
}
|
||||
|
||||
export function closeDialog(name, payload) {
|
||||
return {
|
||||
type: t.CLOSE_DIALOG,
|
||||
name: name,
|
||||
payload: payload,
|
||||
};
|
||||
}
|
||||
|
||||
export function openAlert(name, payload) {
|
||||
return {
|
||||
type: t.OPEN_ALERT,
|
||||
name,
|
||||
payload,
|
||||
};
|
||||
}
|
||||
|
||||
export function closeAlert(name, payload) {
|
||||
return {
|
||||
type: t.CLOSE_ALERT,
|
||||
name,
|
||||
payload,
|
||||
};
|
||||
}
|
||||
|
||||
export function openDrawer(name, payload) {
|
||||
return {
|
||||
type: t.OPEN_DRAWER,
|
||||
name,
|
||||
payload,
|
||||
};
|
||||
}
|
||||
export function closeDrawer(name, payload) {
|
||||
return {
|
||||
type: t.CLOSE_DRAWER,
|
||||
name,
|
||||
payload,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles the sidebar expend.
|
||||
*/
|
||||
export function toggleExpendSidebar(toggle) {
|
||||
return {
|
||||
type: t.SIDEBAR_EXPEND_TOGGLE,
|
||||
payload: { toggle },
|
||||
};
|
||||
}
|
||||
|
||||
export function appIsLoading(toggle) {
|
||||
return {
|
||||
type: t.APP_IS_LOADING,
|
||||
payload: { isLoading: toggle },
|
||||
};
|
||||
}
|
||||
|
||||
export function appIntlIsLoading(toggle) {
|
||||
return {
|
||||
type: t.APP_INTL_IS_LOADING,
|
||||
payload: { isLoading: toggle },
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Splash start loading.
|
||||
*/
|
||||
export function splashStartLoading() {
|
||||
return {
|
||||
type: t.SPLASH_START_LOADING,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Splash stop loading.
|
||||
*/
|
||||
export function splashStopLoading() {
|
||||
return {
|
||||
type: t.SPLASH_STOP_LOADING,
|
||||
};
|
||||
}
|
||||
|
||||
export const setFeatureDashboardMeta = ({ features }) => {
|
||||
return {
|
||||
type: t.SET_FEATURE_DASHBOARD_META,
|
||||
payload: {
|
||||
features,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export function openSidebarSubmenu({ submenuId }) {
|
||||
return {
|
||||
type: t.SIDEBAR_SUBMENU_OPEN,
|
||||
payload: { submenuId },
|
||||
};
|
||||
}
|
||||
|
||||
export function closeSidebarSubmenu() {
|
||||
return {
|
||||
type: t.SIDEBAR_SUBMENU_CLOSE,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user