mirror of
https://github.com/plankanban/planka.git
synced 2025-12-27 01:11:50 +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 EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const fetchActivitiesInCurrentCard = () => ({
|
||||
@@ -5,13 +10,6 @@ const fetchActivitiesInCurrentCard = () => ({
|
||||
payload: {},
|
||||
});
|
||||
|
||||
const toggleActivitiesDetailsInCurrentCard = (isVisible) => ({
|
||||
type: EntryActionTypes.ACTIVITIES_DETAILS_IN_CURRENT_CARD_TOGGLE,
|
||||
payload: {
|
||||
isVisible,
|
||||
},
|
||||
});
|
||||
|
||||
const handleActivityCreate = (activity) => ({
|
||||
type: EntryActionTypes.ACTIVITY_CREATE_HANDLE,
|
||||
payload: {
|
||||
@@ -19,24 +17,7 @@ const handleActivityCreate = (activity) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleActivityUpdate = (activity) => ({
|
||||
type: EntryActionTypes.ACTIVITY_UPDATE_HANDLE,
|
||||
payload: {
|
||||
activity,
|
||||
},
|
||||
});
|
||||
|
||||
const handleActivityDelete = (activity) => ({
|
||||
type: EntryActionTypes.ACTIVITY_DELETE_HANDLE,
|
||||
payload: {
|
||||
activity,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
fetchActivitiesInCurrentCard,
|
||||
toggleActivitiesDetailsInCurrentCard,
|
||||
handleActivityCreate,
|
||||
handleActivityUpdate,
|
||||
handleActivityDelete,
|
||||
};
|
||||
|
||||
@@ -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 EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createAttachmentInCurrentCard = (data) => ({
|
||||
|
||||
42
client/src/entry-actions/background-images.js
Normal file
42
client/src/entry-actions/background-images.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createBackgroundImageInCurrentProject = (data) => ({
|
||||
type: EntryActionTypes.BACKGROUND_IMAGE_IN_CURRENT_PROJECT_CREATE,
|
||||
payload: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleBackgroundImageCreate = (backgroundImage, requestId) => ({
|
||||
type: EntryActionTypes.BACKGROUND_IMAGE_CREATE_HANDLE,
|
||||
payload: {
|
||||
backgroundImage,
|
||||
requestId,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteBackgroundImage = (id) => ({
|
||||
type: EntryActionTypes.BACKGROUND_IMAGE_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
const handleBackgroundImageDelete = (backgroundImage) => ({
|
||||
type: EntryActionTypes.BACKGROUND_IMAGE_DELETE_HANDLE,
|
||||
payload: {
|
||||
backgroundImage,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createBackgroundImageInCurrentProject,
|
||||
handleBackgroundImageCreate,
|
||||
deleteBackgroundImage,
|
||||
handleBackgroundImageDelete,
|
||||
};
|
||||
58
client/src/entry-actions/base-custom-field-groups.js
Normal file
58
client/src/entry-actions/base-custom-field-groups.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createBaseCustomFieldGroupInCurrentProject = (data) => ({
|
||||
type: EntryActionTypes.BASE_CUSTOM_FIELD_GROUP_IN_CURRENT_PROJECT_CREATE,
|
||||
payload: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleBaseCustomFieldGroupCreate = (baseCustomFieldGroup) => ({
|
||||
type: EntryActionTypes.BASE_CUSTOM_FIELD_GROUP_CREATE_HANDLE,
|
||||
payload: {
|
||||
baseCustomFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
const updateBaseCustomFieldGroup = (id, data) => ({
|
||||
type: EntryActionTypes.BASE_CUSTOM_FIELD_GROUP_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleBaseCustomFieldGroupUpdate = (baseCustomFieldGroup) => ({
|
||||
type: EntryActionTypes.BASE_CUSTOM_FIELD_GROUP_UPDATE_HANDLE,
|
||||
payload: {
|
||||
baseCustomFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteBaseCustomFieldGroup = (id) => ({
|
||||
type: EntryActionTypes.BASE_CUSTOM_FIELD_GROUP_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
const handleBaseCustomFieldGroupDelete = (baseCustomFieldGroup) => ({
|
||||
type: EntryActionTypes.BASE_CUSTOM_FIELD_GROUP_DELETE_HANDLE,
|
||||
payload: {
|
||||
baseCustomFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createBaseCustomFieldGroupInCurrentProject,
|
||||
handleBaseCustomFieldGroupCreate,
|
||||
updateBaseCustomFieldGroup,
|
||||
handleBaseCustomFieldGroupUpdate,
|
||||
deleteBaseCustomFieldGroup,
|
||||
handleBaseCustomFieldGroupDelete,
|
||||
};
|
||||
@@ -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 EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createMembershipInCurrentBoard = (data) => ({
|
||||
@@ -7,10 +12,11 @@ const createMembershipInCurrentBoard = (data) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleBoardMembershipCreate = (boardMembership) => ({
|
||||
const handleBoardMembershipCreate = (boardMembership, users) => ({
|
||||
type: EntryActionTypes.BOARD_MEMBERSHIP_CREATE_HANDLE,
|
||||
payload: {
|
||||
boardMembership,
|
||||
users,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -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 EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createBoardInCurrentProject = (data) => ({
|
||||
@@ -7,10 +12,11 @@ const createBoardInCurrentProject = (data) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleBoardCreate = (board, requestId) => ({
|
||||
const handleBoardCreate = (board, boardMemberships, requestId) => ({
|
||||
type: EntryActionTypes.BOARD_CREATE_HANDLE,
|
||||
payload: {
|
||||
board,
|
||||
boardMemberships,
|
||||
requestId,
|
||||
},
|
||||
});
|
||||
@@ -30,6 +36,13 @@ const updateBoard = (id, data) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const updateCurrentBoard = (data) => ({
|
||||
type: EntryActionTypes.CURRENT_BOARD_UPDATE,
|
||||
payload: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleBoardUpdate = (board) => ({
|
||||
type: EntryActionTypes.BOARD_UPDATE_HANDLE,
|
||||
payload: {
|
||||
@@ -45,6 +58,27 @@ const moveBoard = (id, index) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const updateContextInCurrentBoard = (value) => ({
|
||||
type: EntryActionTypes.CONTEXT_IN_CURRENT_BOARD_UPDATE,
|
||||
payload: {
|
||||
value,
|
||||
},
|
||||
});
|
||||
|
||||
const updateViewInCurrentBoard = (value) => ({
|
||||
type: EntryActionTypes.VIEW_IN_CURRENT_BOARD_UPDATE,
|
||||
payload: {
|
||||
value,
|
||||
},
|
||||
});
|
||||
|
||||
const searchInCurrentBoard = (value) => ({
|
||||
type: EntryActionTypes.IN_CURRENT_BOARD_SEARCH,
|
||||
payload: {
|
||||
value,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteBoard = (id) => ({
|
||||
type: EntryActionTypes.BOARD_DELETE,
|
||||
payload: {
|
||||
@@ -64,8 +98,12 @@ export default {
|
||||
handleBoardCreate,
|
||||
fetchBoard,
|
||||
updateBoard,
|
||||
updateCurrentBoard,
|
||||
handleBoardUpdate,
|
||||
moveBoard,
|
||||
updateContextInCurrentBoard,
|
||||
updateViewInCurrentBoard,
|
||||
searchInCurrentBoard,
|
||||
deleteBoard,
|
||||
handleBoardDelete,
|
||||
};
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const fetchCardsInCurrentList = () => ({
|
||||
type: EntryActionTypes.CARDS_IN_CURRENT_LIST_FETCH,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
const handleCardsUpdate = (cards, activities) => ({
|
||||
type: EntryActionTypes.CARDS_UPDATE_HANDLE,
|
||||
payload: {
|
||||
cards,
|
||||
activities,
|
||||
},
|
||||
});
|
||||
|
||||
const createCard = (listId, data, autoOpen) => ({
|
||||
type: EntryActionTypes.CARD_CREATE,
|
||||
payload: {
|
||||
@@ -9,6 +27,22 @@ const createCard = (listId, data, autoOpen) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const createCardInCurrentList = (data, autoOpen) => ({
|
||||
type: EntryActionTypes.CARD_IN_CURRENT_LIST_CREATE,
|
||||
payload: {
|
||||
data,
|
||||
autoOpen,
|
||||
},
|
||||
});
|
||||
|
||||
const createCardInFirstFiniteList = (data, autoOpen) => ({
|
||||
type: EntryActionTypes.CARD_IN_FIRST_FINITE_LIST_CREATE,
|
||||
payload: {
|
||||
data,
|
||||
autoOpen,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCardCreate = (card) => ({
|
||||
type: EntryActionTypes.CARD_CREATE_HANDLE,
|
||||
payload: {
|
||||
@@ -38,7 +72,7 @@ const handleCardUpdate = (card) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const moveCard = (id, listId, index) => ({
|
||||
const moveCard = (id, listId, index = 0) => ({
|
||||
type: EntryActionTypes.CARD_MOVE,
|
||||
payload: {
|
||||
id,
|
||||
@@ -47,15 +81,40 @@ const moveCard = (id, listId, index) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const moveCurrentCard = (listId, index) => ({
|
||||
const moveCurrentCard = (listId, index = 0, autoClose = false) => ({
|
||||
type: EntryActionTypes.CURRENT_CARD_MOVE,
|
||||
payload: {
|
||||
listId,
|
||||
index,
|
||||
autoClose,
|
||||
},
|
||||
});
|
||||
|
||||
const transferCard = (id, boardId, listId, index) => ({
|
||||
const moveCardToArchive = (id) => ({
|
||||
type: EntryActionTypes.CARD_TO_ARCHIVE_MOVE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
const moveCurrentCardToArchive = () => ({
|
||||
type: EntryActionTypes.CURRENT_CARD_TO_ARCHIVE_MOVE,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
const moveCardToTrash = (id) => ({
|
||||
type: EntryActionTypes.CARD_TO_TRASH_MOVE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
const moveCurrentCardToTrash = () => ({
|
||||
type: EntryActionTypes.CURRENT_CARD_TO_TRASH_MOVE,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
const transferCard = (id, boardId, listId, index = 0) => ({
|
||||
type: EntryActionTypes.CARD_TRANSFER,
|
||||
payload: {
|
||||
id,
|
||||
@@ -65,7 +124,7 @@ const transferCard = (id, boardId, listId, index) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const transferCurrentCard = (boardId, listId, index) => ({
|
||||
const transferCurrentCard = (boardId, listId, index = 0) => ({
|
||||
type: EntryActionTypes.CURRENT_CARD_TRANSFER,
|
||||
payload: {
|
||||
boardId,
|
||||
@@ -74,16 +133,26 @@ const transferCurrentCard = (boardId, listId, index) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const duplicateCard = (id) => ({
|
||||
const duplicateCard = (id, data) => ({
|
||||
type: EntryActionTypes.CARD_DUPLICATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const duplicateCurrentCard = () => ({
|
||||
const duplicateCurrentCard = (data) => ({
|
||||
type: EntryActionTypes.CURRENT_CARD_DUPLICATE,
|
||||
payload: {},
|
||||
payload: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const goToAdjacentCard = (direction) => ({
|
||||
type: EntryActionTypes.TO_ADJACENT_CARD_GO,
|
||||
payload: {
|
||||
direction,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteCard = (id) => ({
|
||||
@@ -105,27 +174,28 @@ const handleCardDelete = (card) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const filterText = (text) => ({
|
||||
type: EntryActionTypes.TEXT_FILTER_IN_CURRENT_BOARD,
|
||||
payload: {
|
||||
text,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
fetchCardsInCurrentList,
|
||||
handleCardsUpdate,
|
||||
createCard,
|
||||
createCardInCurrentList,
|
||||
createCardInFirstFiniteList,
|
||||
handleCardCreate,
|
||||
updateCard,
|
||||
updateCurrentCard,
|
||||
handleCardUpdate,
|
||||
moveCard,
|
||||
moveCurrentCard,
|
||||
moveCardToArchive,
|
||||
moveCurrentCardToArchive,
|
||||
moveCardToTrash,
|
||||
moveCurrentCardToTrash,
|
||||
transferCard,
|
||||
transferCurrentCard,
|
||||
duplicateCard,
|
||||
duplicateCurrentCard,
|
||||
goToAdjacentCard,
|
||||
deleteCard,
|
||||
deleteCurrentCard,
|
||||
handleCardDelete,
|
||||
filterText,
|
||||
};
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createCommentActivityInCurrentCard = (data) => ({
|
||||
type: EntryActionTypes.COMMENT_ACTIVITY_IN_CURRENT_CARD_CREATE,
|
||||
payload: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const updateCommentActivity = (id, data) => ({
|
||||
type: EntryActionTypes.COMMENT_ACTIVITY_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteCommentActivity = (id) => ({
|
||||
type: EntryActionTypes.COMMENT_ACTIVITY_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createCommentActivityInCurrentCard,
|
||||
updateCommentActivity,
|
||||
deleteCommentActivity,
|
||||
};
|
||||
65
client/src/entry-actions/comments.js
Executable file
65
client/src/entry-actions/comments.js
Executable file
@@ -0,0 +1,65 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const fetchCommentsInCurrentCard = () => ({
|
||||
type: EntryActionTypes.COMMENTS_IN_CURRENT_CARD_FETCH,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
const createCommentInCurrentCard = (data) => ({
|
||||
type: EntryActionTypes.COMMENT_IN_CURRENT_CARD_CREATE,
|
||||
payload: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCommentCreate = (comment, users) => ({
|
||||
type: EntryActionTypes.COMMENT_CREATE_HANDLE,
|
||||
payload: {
|
||||
comment,
|
||||
users,
|
||||
},
|
||||
});
|
||||
|
||||
const updateComment = (id, data) => ({
|
||||
type: EntryActionTypes.COMMENT_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCommentUpdate = (comment) => ({
|
||||
type: EntryActionTypes.COMMENT_UPDATE_HANDLE,
|
||||
payload: {
|
||||
comment,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteComment = (id) => ({
|
||||
type: EntryActionTypes.COMMENT_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCommentDelete = (comment) => ({
|
||||
type: EntryActionTypes.COMMENT_DELETE_HANDLE,
|
||||
payload: {
|
||||
comment,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
fetchCommentsInCurrentCard,
|
||||
createCommentInCurrentCard,
|
||||
handleCommentCreate,
|
||||
updateComment,
|
||||
handleCommentUpdate,
|
||||
deleteComment,
|
||||
handleCommentDelete,
|
||||
};
|
||||
@@ -1,6 +1,32 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const logout = (invalidateAccessToken) => ({
|
||||
const toggleFavorites = (isEnabled) => ({
|
||||
type: EntryActionTypes.FAVORITES_TOGGLE,
|
||||
payload: {
|
||||
isEnabled,
|
||||
},
|
||||
});
|
||||
|
||||
const toggleEditMode = (isEnabled) => ({
|
||||
type: EntryActionTypes.EDIT_MODE_TOGGLE,
|
||||
payload: {
|
||||
isEnabled,
|
||||
},
|
||||
});
|
||||
|
||||
const updateHomeView = (value) => ({
|
||||
type: EntryActionTypes.HOME_VIEW_UPDATE,
|
||||
payload: {
|
||||
value,
|
||||
},
|
||||
});
|
||||
|
||||
const logout = (invalidateAccessToken = true) => ({
|
||||
type: EntryActionTypes.LOGOUT,
|
||||
payload: {
|
||||
invalidateAccessToken,
|
||||
@@ -8,5 +34,8 @@ const logout = (invalidateAccessToken) => ({
|
||||
});
|
||||
|
||||
export default {
|
||||
toggleFavorites,
|
||||
toggleEditMode,
|
||||
updateHomeView,
|
||||
logout,
|
||||
};
|
||||
|
||||
75
client/src/entry-actions/custom-field-groups.js
Normal file
75
client/src/entry-actions/custom-field-groups.js
Normal file
@@ -0,0 +1,75 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createCustomFieldGroupInCurrentBoard = (data) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_GROUP_IN_CURRENT_BOARD_CREATE,
|
||||
payload: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const createCustomFieldGroupInCurrentCard = (data) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_GROUP_IN_CURRENT_CARD_CREATE,
|
||||
payload: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldGroupCreate = (customFieldGroup) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_GROUP_CREATE_HANDLE,
|
||||
payload: {
|
||||
customFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
const updateCustomFieldGroup = (id, data) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_GROUP_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldGroupUpdate = (customFieldGroup) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_GROUP_UPDATE_HANDLE,
|
||||
payload: {
|
||||
customFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
const moveCustomFieldGroup = (id, index) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_GROUP_MOVE,
|
||||
payload: {
|
||||
id,
|
||||
index,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteCustomFieldGroup = (id) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_GROUP_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldGroupDelete = (customFieldGroup) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_GROUP_DELETE_HANDLE,
|
||||
payload: {
|
||||
customFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createCustomFieldGroupInCurrentBoard,
|
||||
createCustomFieldGroupInCurrentCard,
|
||||
handleCustomFieldGroupCreate,
|
||||
updateCustomFieldGroup,
|
||||
handleCustomFieldGroupUpdate,
|
||||
moveCustomFieldGroup,
|
||||
deleteCustomFieldGroup,
|
||||
handleCustomFieldGroupDelete,
|
||||
};
|
||||
46
client/src/entry-actions/custom-field-values.js
Normal file
46
client/src/entry-actions/custom-field-values.js
Normal file
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const updateCustomFieldValue = (cardId, customFieldGroupId, customFieldId, data) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_VALUE_UPDATE,
|
||||
payload: {
|
||||
cardId,
|
||||
customFieldGroupId,
|
||||
customFieldId,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldValueUpdate = (customFieldValue) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_VALUE_UPDATE_HANDLE,
|
||||
payload: {
|
||||
customFieldValue,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteCustomFieldValue = (cardId, customFieldGroupId, customFieldId) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_VALUE_DELETE,
|
||||
payload: {
|
||||
cardId,
|
||||
customFieldGroupId,
|
||||
customFieldId,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldValueDelete = (customFieldValue) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_VALUE_DELETE_HANDLE,
|
||||
payload: {
|
||||
customFieldValue,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
updateCustomFieldValue,
|
||||
handleCustomFieldValueUpdate,
|
||||
deleteCustomFieldValue,
|
||||
handleCustomFieldValueDelete,
|
||||
};
|
||||
77
client/src/entry-actions/custom-fields.js
Normal file
77
client/src/entry-actions/custom-fields.js
Normal file
@@ -0,0 +1,77 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createCustomFieldInBaseGroup = (baseCustomFieldGroupId, data) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_IN_BASE_GROUP_CREATE,
|
||||
payload: {
|
||||
baseCustomFieldGroupId,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const createCustomFieldInGroup = (customFieldGroupId, data) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_IN_GROUP_CREATE,
|
||||
payload: {
|
||||
customFieldGroupId,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldCreate = (customField) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_CREATE_HANDLE,
|
||||
payload: {
|
||||
customField,
|
||||
},
|
||||
});
|
||||
|
||||
const updateCustomField = (id, data) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldUpdate = (customField) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_UPDATE_HANDLE,
|
||||
payload: {
|
||||
customField,
|
||||
},
|
||||
});
|
||||
|
||||
const moveCustomField = (id, index) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_MOVE,
|
||||
payload: {
|
||||
id,
|
||||
index,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteCustomField = (id) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldDelete = (customField) => ({
|
||||
type: EntryActionTypes.CUSTOM_FIELD_DELETE_HANDLE,
|
||||
payload: {
|
||||
customField,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createCustomFieldInBaseGroup,
|
||||
createCustomFieldInGroup,
|
||||
handleCustomFieldCreate,
|
||||
updateCustomField,
|
||||
handleCustomFieldUpdate,
|
||||
moveCustomField,
|
||||
deleteCustomField,
|
||||
handleCustomFieldDelete,
|
||||
};
|
||||
@@ -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 socket from './socket';
|
||||
import login from './login';
|
||||
import core from './core';
|
||||
@@ -5,16 +10,23 @@ import modals from './modals';
|
||||
import users from './users';
|
||||
import projects from './projects';
|
||||
import projectManagers from './project-managers';
|
||||
import backgroundImages from './background-images';
|
||||
import baseCustomFieldGroups from './base-custom-field-groups';
|
||||
import boards from './boards';
|
||||
import boardMemberships from './board-memberships';
|
||||
import labels from './labels';
|
||||
import lists from './lists';
|
||||
import cards from './cards';
|
||||
import taskLists from './task-lists';
|
||||
import tasks from './tasks';
|
||||
import attachments from './attachments';
|
||||
import customFieldGroups from './custom-field-groups';
|
||||
import customFields from './custom-fields';
|
||||
import customFieldValues from './custom-field-values';
|
||||
import comments from './comments';
|
||||
import activities from './activities';
|
||||
import commentActivities from './comment-activities';
|
||||
import notifications from './notifications';
|
||||
import notificationServices from './notification-services';
|
||||
|
||||
export default {
|
||||
...socket,
|
||||
@@ -24,14 +36,21 @@ export default {
|
||||
...users,
|
||||
...projects,
|
||||
...projectManagers,
|
||||
...backgroundImages,
|
||||
...baseCustomFieldGroups,
|
||||
...boards,
|
||||
...boardMemberships,
|
||||
...labels,
|
||||
...lists,
|
||||
...cards,
|
||||
...taskLists,
|
||||
...tasks,
|
||||
...attachments,
|
||||
...customFieldGroups,
|
||||
...customFields,
|
||||
...customFieldValues,
|
||||
...comments,
|
||||
...activities,
|
||||
...commentActivities,
|
||||
...notifications,
|
||||
...notificationServices,
|
||||
};
|
||||
|
||||
@@ -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 EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createLabelInCurrentBoard = (data) => ({
|
||||
@@ -7,6 +12,14 @@ const createLabelInCurrentBoard = (data) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const createLabelFromCard = (cardId, data) => ({
|
||||
type: EntryActionTypes.LABEL_FROM_CARD_CREATE,
|
||||
payload: {
|
||||
cardId,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleLabelCreate = (label) => ({
|
||||
type: EntryActionTypes.LABEL_CREATE_HANDLE,
|
||||
payload: {
|
||||
@@ -111,6 +124,7 @@ const removeLabelFromFilterInCurrentBoard = (id) => ({
|
||||
|
||||
export default {
|
||||
createLabelInCurrentBoard,
|
||||
createLabelFromCard,
|
||||
handleLabelCreate,
|
||||
updateLabel,
|
||||
handleLabelUpdate,
|
||||
|
||||
@@ -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 EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createListInCurrentBoard = (data) => ({
|
||||
@@ -47,11 +52,22 @@ const sortList = (id, data) => {
|
||||
};
|
||||
};
|
||||
|
||||
const handleListSort = (list, cards) => ({
|
||||
type: EntryActionTypes.LIST_SORT_HANDLE,
|
||||
const moveListCardsToArchiveList = (id) => ({
|
||||
type: EntryActionTypes.LIST_CARDS_TO_ARCHIVE_LIST_MOVE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
const clearTrashListInCurrentBoard = () => ({
|
||||
type: EntryActionTypes.TRASH_LIST_IN_CURRENT_BOARD_CLEAR,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
const handleListClear = (list) => ({
|
||||
type: EntryActionTypes.LIST_CLEAR_HANDLE,
|
||||
payload: {
|
||||
list,
|
||||
cards,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -62,10 +78,11 @@ const deleteList = (id) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleListDelete = (list) => ({
|
||||
const handleListDelete = (list, cards) => ({
|
||||
type: EntryActionTypes.LIST_DELETE_HANDLE,
|
||||
payload: {
|
||||
list,
|
||||
cards,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -76,7 +93,9 @@ export default {
|
||||
handleListUpdate,
|
||||
moveList,
|
||||
sortList,
|
||||
handleListSort,
|
||||
moveListCardsToArchiveList,
|
||||
clearTrashListInCurrentBoard,
|
||||
handleListClear,
|
||||
deleteList,
|
||||
handleListDelete,
|
||||
};
|
||||
|
||||
@@ -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 EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const authenticate = (data) => ({
|
||||
@@ -7,8 +12,8 @@ const authenticate = (data) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const authenticateUsingOidc = () => ({
|
||||
type: EntryActionTypes.USING_OIDC_AUTHENTICATE,
|
||||
const authenticateWithOidc = () => ({
|
||||
type: EntryActionTypes.WITH_OIDC_AUTHENTICATE,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
@@ -19,6 +24,6 @@ const clearAuthenticateError = () => ({
|
||||
|
||||
export default {
|
||||
authenticate,
|
||||
authenticateUsingOidc,
|
||||
authenticateWithOidc,
|
||||
clearAuthenticateError,
|
||||
};
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
import ModalTypes from '../constants/ModalTypes';
|
||||
|
||||
const openUsersModal = () => ({
|
||||
const openAdministrationModal = () => ({
|
||||
type: EntryActionTypes.MODAL_OPEN,
|
||||
payload: {
|
||||
type: ModalTypes.USERS,
|
||||
type: ModalTypes.ADMINISTRATION,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -15,10 +20,13 @@ const openUserSettingsModal = () => ({
|
||||
},
|
||||
});
|
||||
|
||||
const openProjectAddModal = () => ({
|
||||
const openAddProjectModal = (defaultProjectType) => ({
|
||||
type: EntryActionTypes.MODAL_OPEN,
|
||||
payload: {
|
||||
type: ModalTypes.PROJECT_ADD,
|
||||
type: ModalTypes.ADD_PROJECT,
|
||||
params: {
|
||||
defaultType: defaultProjectType,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -29,15 +37,26 @@ const openProjectSettingsModal = () => ({
|
||||
},
|
||||
});
|
||||
|
||||
const openBoardSettingsModal = (boardId) => ({
|
||||
type: EntryActionTypes.MODAL_OPEN,
|
||||
payload: {
|
||||
type: ModalTypes.BOARD_SETTINGS,
|
||||
params: {
|
||||
id: boardId,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const closeModal = () => ({
|
||||
type: EntryActionTypes.MODAL_CLOSE,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
export default {
|
||||
openUsersModal,
|
||||
openAdministrationModal,
|
||||
openUserSettingsModal,
|
||||
openProjectAddModal,
|
||||
openAddProjectModal,
|
||||
openProjectSettingsModal,
|
||||
openBoardSettingsModal,
|
||||
closeModal,
|
||||
};
|
||||
|
||||
75
client/src/entry-actions/notification-services.js
Normal file
75
client/src/entry-actions/notification-services.js
Normal file
@@ -0,0 +1,75 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createNotificationServiceInCurrentUser = (data) => ({
|
||||
type: EntryActionTypes.NOTIFICATION_SERVICE_IN_CURRENT_USER_CREATE,
|
||||
payload: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const createNotificationServiceInBoard = (boardId, data) => ({
|
||||
type: EntryActionTypes.NOTIFICATION_SERVICE_IN_BOARD_CREATE,
|
||||
payload: {
|
||||
boardId,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleNotificationServiceCreate = (notificationService) => ({
|
||||
type: EntryActionTypes.NOTIFICATION_SERVICE_CREATE_HANDLE,
|
||||
payload: {
|
||||
notificationService,
|
||||
},
|
||||
});
|
||||
|
||||
const updateNotificationService = (id, data) => ({
|
||||
type: EntryActionTypes.NOTIFICATION_SERVICE_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleNotificationServiceUpdate = (notificationService) => ({
|
||||
type: EntryActionTypes.NOTIFICATION_SERVICE_UPDATE_HANDLE,
|
||||
payload: {
|
||||
notificationService,
|
||||
},
|
||||
});
|
||||
|
||||
const testNotificationService = (id) => ({
|
||||
type: EntryActionTypes.NOTIFICATION_SERVICE_TEST,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteNotificationService = (id) => ({
|
||||
type: EntryActionTypes.NOTIFICATION_SERVICE_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
const handleNotificationServiceDelete = (notificationService) => ({
|
||||
type: EntryActionTypes.NOTIFICATION_SERVICE_DELETE_HANDLE,
|
||||
payload: {
|
||||
notificationService,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createNotificationServiceInCurrentUser,
|
||||
createNotificationServiceInBoard,
|
||||
handleNotificationServiceCreate,
|
||||
updateNotificationService,
|
||||
handleNotificationServiceUpdate,
|
||||
testNotificationService,
|
||||
deleteNotificationService,
|
||||
handleNotificationServiceDelete,
|
||||
};
|
||||
@@ -1,9 +1,20 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const handleNotificationCreate = (notification) => ({
|
||||
const deleteAllNotifications = () => ({
|
||||
type: EntryActionTypes.ALL_NOTIFICATIONS_DELETE,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
const handleNotificationCreate = (notification, users) => ({
|
||||
type: EntryActionTypes.NOTIFICATION_CREATE_HANDLE,
|
||||
payload: {
|
||||
notification,
|
||||
users,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -22,6 +33,7 @@ const handleNotificationDelete = (notification) => ({
|
||||
});
|
||||
|
||||
export default {
|
||||
deleteAllNotifications,
|
||||
handleNotificationCreate,
|
||||
deleteNotification,
|
||||
handleNotificationDelete,
|
||||
|
||||
@@ -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 EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createManagerInCurrentProject = (data) => ({
|
||||
@@ -7,10 +12,11 @@ const createManagerInCurrentProject = (data) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleProjectManagerCreate = (projectManager) => ({
|
||||
const handleProjectManagerCreate = (projectManager, users) => ({
|
||||
type: EntryActionTypes.PROJECT_MANAGER_CREATE_HANDLE,
|
||||
payload: {
|
||||
projectManager,
|
||||
users,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,31 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const searchProjects = (value) => ({
|
||||
type: EntryActionTypes.PROJECTS_SEARCH,
|
||||
payload: {
|
||||
value,
|
||||
},
|
||||
});
|
||||
|
||||
const updateProjectsOrder = (value) => ({
|
||||
type: EntryActionTypes.PROJECTS_ORDER_UPDATE,
|
||||
payload: {
|
||||
value,
|
||||
},
|
||||
});
|
||||
|
||||
const toggleHiddenProjects = (isVisible) => ({
|
||||
type: EntryActionTypes.HIDDEN_PROJECTS_TOGGLE,
|
||||
payload: {
|
||||
isVisible,
|
||||
},
|
||||
});
|
||||
|
||||
const createProject = (data) => ({
|
||||
type: EntryActionTypes.PROJECT_CREATE,
|
||||
payload: {
|
||||
@@ -14,6 +40,14 @@ const handleProjectCreate = (project) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const updateProject = (id, data) => ({
|
||||
type: EntryActionTypes.PROJECT_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const updateCurrentProject = (data) => ({
|
||||
type: EntryActionTypes.CURRENT_PROJECT_UPDATE,
|
||||
payload: {
|
||||
@@ -28,13 +62,6 @@ const handleProjectUpdate = (project) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const updateCurrentProjectBackgroundImage = (data) => ({
|
||||
type: EntryActionTypes.CURRENT_PROJECT_BACKGROUND_IMAGE_UPDATE,
|
||||
payload: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteCurrentProject = () => ({
|
||||
type: EntryActionTypes.CURRENT_PROJECT_DELETE,
|
||||
payload: {},
|
||||
@@ -48,11 +75,14 @@ const handleProjectDelete = (project) => ({
|
||||
});
|
||||
|
||||
export default {
|
||||
searchProjects,
|
||||
updateProjectsOrder,
|
||||
toggleHiddenProjects,
|
||||
createProject,
|
||||
handleProjectCreate,
|
||||
updateProject,
|
||||
updateCurrentProject,
|
||||
handleProjectUpdate,
|
||||
updateCurrentProjectBackgroundImage,
|
||||
deleteCurrentProject,
|
||||
handleProjectDelete,
|
||||
};
|
||||
|
||||
@@ -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 EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const handleSocketDisconnect = () => ({
|
||||
|
||||
67
client/src/entry-actions/task-lists.js
Executable file
67
client/src/entry-actions/task-lists.js
Executable file
@@ -0,0 +1,67 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createTaskListInCurrentCard = (data) => ({
|
||||
type: EntryActionTypes.TASK_LIST_IN_CURRENT_CARD_CREATE,
|
||||
payload: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleTaskListCreate = (taskList) => ({
|
||||
type: EntryActionTypes.TASK_LIST_CREATE_HANDLE,
|
||||
payload: {
|
||||
taskList,
|
||||
},
|
||||
});
|
||||
|
||||
const updateTaskList = (id, data) => ({
|
||||
type: EntryActionTypes.TASK_LIST_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
const handleTaskListUpdate = (taskList) => ({
|
||||
type: EntryActionTypes.TASK_LIST_UPDATE_HANDLE,
|
||||
payload: {
|
||||
taskList,
|
||||
},
|
||||
});
|
||||
|
||||
const moveTaskList = (id, index) => ({
|
||||
type: EntryActionTypes.TASK_LIST_MOVE,
|
||||
payload: {
|
||||
id,
|
||||
index,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteTaskList = (id) => ({
|
||||
type: EntryActionTypes.TASK_LIST_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
const handleTaskListDelete = (taskList) => ({
|
||||
type: EntryActionTypes.TASK_LIST_DELETE_HANDLE,
|
||||
payload: {
|
||||
taskList,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createTaskListInCurrentCard,
|
||||
handleTaskListCreate,
|
||||
updateTaskList,
|
||||
handleTaskListUpdate,
|
||||
moveTaskList,
|
||||
deleteTaskList,
|
||||
handleTaskListDelete,
|
||||
};
|
||||
@@ -1,8 +1,14 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createTaskInCurrentCard = (data) => ({
|
||||
type: EntryActionTypes.TASK_IN_CURRENT_CARD_CREATE,
|
||||
const createTask = (taskListId, data) => ({
|
||||
type: EntryActionTypes.TASK_CREATE,
|
||||
payload: {
|
||||
taskListId,
|
||||
data,
|
||||
},
|
||||
});
|
||||
@@ -29,10 +35,11 @@ const handleTaskUpdate = (task) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const moveTask = (id, index) => ({
|
||||
const moveTask = (id, taskListId, index) => ({
|
||||
type: EntryActionTypes.TASK_MOVE,
|
||||
payload: {
|
||||
id,
|
||||
taskListId,
|
||||
index,
|
||||
},
|
||||
});
|
||||
@@ -52,7 +59,7 @@ const handleTaskDelete = (task) => ({
|
||||
});
|
||||
|
||||
export default {
|
||||
createTaskInCurrentCard,
|
||||
createTask,
|
||||
handleTaskCreate,
|
||||
updateTask,
|
||||
handleTaskUpdate,
|
||||
|
||||
@@ -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 EntryActionTypes from '../constants/EntryActionTypes';
|
||||
|
||||
const createUser = (data) => ({
|
||||
@@ -165,6 +170,11 @@ const addUserToCurrentCard = (id) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const addCurrentUserToCurrentCard = () => ({
|
||||
type: EntryActionTypes.CURRENT_USER_TO_CURRENT_CARD_ADD,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
const handleUserToCardAdd = (cardMembership) => ({
|
||||
type: EntryActionTypes.USER_TO_CARD_ADD_HANDLE,
|
||||
payload: {
|
||||
@@ -187,6 +197,11 @@ const removeUserFromCurrentCard = (id) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const removeCurrentUserFromCurrentCard = () => ({
|
||||
type: EntryActionTypes.CURRENT_USER_FROM_CURRENT_CARD_REMOVE,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
const handleUserFromCardRemove = (cardMembership) => ({
|
||||
type: EntryActionTypes.USER_FROM_CARD_REMOVE_HANDLE,
|
||||
payload: {
|
||||
@@ -194,10 +209,11 @@ const handleUserFromCardRemove = (cardMembership) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const addUserToFilterInCurrentBoard = (id) => ({
|
||||
const addUserToFilterInCurrentBoard = (id, replace = false) => ({
|
||||
type: EntryActionTypes.USER_TO_FILTER_IN_CURRENT_BOARD_ADD,
|
||||
payload: {
|
||||
id,
|
||||
replace,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -233,9 +249,11 @@ export default {
|
||||
handleUserDelete,
|
||||
addUserToCard,
|
||||
addUserToCurrentCard,
|
||||
addCurrentUserToCurrentCard,
|
||||
handleUserToCardAdd,
|
||||
removeUserFromCard,
|
||||
removeUserFromCurrentCard,
|
||||
removeCurrentUserFromCurrentCard,
|
||||
handleUserFromCardRemove,
|
||||
addUserToFilterInCurrentBoard,
|
||||
removeUserFromFilterInCurrentBoard,
|
||||
|
||||
Reference in New Issue
Block a user