mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 09:13:23 +03:00
ref: Refactoring
This commit is contained in:
43
client/src/entry-actions/modals.js
Executable file
43
client/src/entry-actions/modals.js
Executable file
@@ -0,0 +1,43 @@
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
import ModalTypes from '../constants/ModalTypes';
|
||||
|
||||
const openUsersModal = () => ({
|
||||
type: EntryActionTypes.MODAL_OPEN,
|
||||
payload: {
|
||||
type: ModalTypes.USERS,
|
||||
},
|
||||
});
|
||||
|
||||
const openUserSettingsModal = () => ({
|
||||
type: EntryActionTypes.MODAL_OPEN,
|
||||
payload: {
|
||||
type: ModalTypes.USER_SETTINGS,
|
||||
},
|
||||
});
|
||||
|
||||
const openProjectAddModal = () => ({
|
||||
type: EntryActionTypes.MODAL_OPEN,
|
||||
payload: {
|
||||
type: ModalTypes.PROJECT_ADD,
|
||||
},
|
||||
});
|
||||
|
||||
const openProjectSettingsModal = () => ({
|
||||
type: EntryActionTypes.MODAL_OPEN,
|
||||
payload: {
|
||||
type: ModalTypes.PROJECT_SETTINGS,
|
||||
},
|
||||
});
|
||||
|
||||
const closeModal = () => ({
|
||||
type: EntryActionTypes.MODAL_CLOSE,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
export default {
|
||||
openUsersModal,
|
||||
openUserSettingsModal,
|
||||
openProjectAddModal,
|
||||
openProjectSettingsModal,
|
||||
closeModal,
|
||||
};
|
||||
Reference in New Issue
Block a user