mirror of
https://github.com/plankanban/planka.git
synced 2025-12-26 01:11:58 +03:00
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import ActionTypes from '../constants/ActionTypes';
|
||||
|
||||
const initializeCore = (
|
||||
@@ -6,6 +11,8 @@ const initializeCore = (
|
||||
users,
|
||||
projects,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
@@ -13,10 +20,14 @@ const initializeCore = (
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
activities,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notifications,
|
||||
notificationServices,
|
||||
) => ({
|
||||
type: ActionTypes.CORE_INITIALIZE,
|
||||
payload: {
|
||||
@@ -25,6 +36,8 @@ const initializeCore = (
|
||||
users,
|
||||
projects,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
@@ -32,14 +45,17 @@ const initializeCore = (
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
activities,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notifications,
|
||||
notificationServices,
|
||||
},
|
||||
});
|
||||
|
||||
// TODO: with success?
|
||||
initializeCore.fetchConfig = (config) => ({
|
||||
type: ActionTypes.CORE_INITIALIZE__CONFIG_FETCH,
|
||||
payload: {
|
||||
@@ -47,13 +63,32 @@ initializeCore.fetchConfig = (config) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const logout = (invalidateAccessToken) => ({
|
||||
type: ActionTypes.LOGOUT,
|
||||
const toggleFavorites = (isEnabled) => ({
|
||||
type: ActionTypes.FAVORITES_TOGGLE,
|
||||
payload: {
|
||||
invalidateAccessToken,
|
||||
isEnabled,
|
||||
},
|
||||
});
|
||||
|
||||
const toggleEditMode = (isEnabled) => ({
|
||||
type: ActionTypes.EDIT_MODE_TOGGLE,
|
||||
payload: {
|
||||
isEnabled,
|
||||
},
|
||||
});
|
||||
|
||||
const updateHomeView = (value) => ({
|
||||
type: ActionTypes.HOME_VIEW_UPDATE,
|
||||
payload: {
|
||||
value,
|
||||
},
|
||||
});
|
||||
|
||||
const logout = () => ({
|
||||
type: ActionTypes.LOGOUT,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
logout.invalidateAccessToken = () => ({
|
||||
type: ActionTypes.LOGOUT__ACCESS_TOKEN_INVALIDATE,
|
||||
payload: {},
|
||||
@@ -61,5 +96,8 @@ logout.invalidateAccessToken = () => ({
|
||||
|
||||
export default {
|
||||
initializeCore,
|
||||
toggleFavorites,
|
||||
toggleEditMode,
|
||||
updateHomeView,
|
||||
logout,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user