@@ -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 fetchActivities = (cardId) => ({
|
||||
@@ -24,31 +29,6 @@ fetchActivities.failure = (cardId, error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const toggleActivitiesDetails = (cardId, isVisible) => ({
|
||||
type: ActionTypes.ACTIVITIES_DETAILS_TOGGLE,
|
||||
payload: {
|
||||
cardId,
|
||||
isVisible,
|
||||
},
|
||||
});
|
||||
|
||||
toggleActivitiesDetails.success = (cardId, activities, users) => ({
|
||||
type: ActionTypes.ACTIVITIES_DETAILS_TOGGLE__SUCCESS,
|
||||
payload: {
|
||||
cardId,
|
||||
activities,
|
||||
users,
|
||||
},
|
||||
});
|
||||
|
||||
toggleActivitiesDetails.failure = (cardId, error) => ({
|
||||
type: ActionTypes.ACTIVITIES_DETAILS_TOGGLE__FAILURE,
|
||||
payload: {
|
||||
cardId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleActivityCreate = (activity) => ({
|
||||
type: ActionTypes.ACTIVITY_CREATE_HANDLE,
|
||||
payload: {
|
||||
@@ -56,24 +36,7 @@ const handleActivityCreate = (activity) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleActivityUpdate = (activity) => ({
|
||||
type: ActionTypes.ACTIVITY_UPDATE_HANDLE,
|
||||
payload: {
|
||||
activity,
|
||||
},
|
||||
});
|
||||
|
||||
const handleActivityDelete = (activity) => ({
|
||||
type: ActionTypes.ACTIVITY_DELETE_HANDLE,
|
||||
payload: {
|
||||
activity,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
fetchActivities,
|
||||
toggleActivitiesDetails,
|
||||
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 ActionTypes from '../constants/ActionTypes';
|
||||
|
||||
const createAttachment = (attachment) => ({
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/*!
|
||||
* 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 createBackgroundImage = (backgroundImage) => ({
|
||||
type: ActionTypes.BACKGROUND_IMAGE_CREATE,
|
||||
payload: {
|
||||
backgroundImage,
|
||||
},
|
||||
});
|
||||
|
||||
createBackgroundImage.success = (localId, backgroundImage) => ({
|
||||
type: ActionTypes.BACKGROUND_IMAGE_CREATE__SUCCESS,
|
||||
payload: {
|
||||
localId,
|
||||
backgroundImage,
|
||||
},
|
||||
});
|
||||
|
||||
createBackgroundImage.failure = (localId, error) => ({
|
||||
type: ActionTypes.BACKGROUND_IMAGE_CREATE__FAILURE,
|
||||
payload: {
|
||||
localId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleBackgroundImageCreate = (backgroundImage) => ({
|
||||
type: ActionTypes.BACKGROUND_IMAGE_CREATE_HANDLE,
|
||||
payload: {
|
||||
backgroundImage,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteBackgroundImage = (id) => ({
|
||||
type: ActionTypes.BACKGROUND_IMAGE_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
deleteBackgroundImage.success = (backgroundImage) => ({
|
||||
type: ActionTypes.BACKGROUND_IMAGE_DELETE__SUCCESS,
|
||||
payload: {
|
||||
backgroundImage,
|
||||
},
|
||||
});
|
||||
|
||||
deleteBackgroundImage.failure = (id, error) => ({
|
||||
type: ActionTypes.BACKGROUND_IMAGE_DELETE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleBackgroundImageDelete = (backgroundImage) => ({
|
||||
type: ActionTypes.BACKGROUND_IMAGE_DELETE_HANDLE,
|
||||
payload: {
|
||||
backgroundImage,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createBackgroundImage,
|
||||
handleBackgroundImageCreate,
|
||||
deleteBackgroundImage,
|
||||
handleBackgroundImageDelete,
|
||||
};
|
||||
@@ -0,0 +1,104 @@
|
||||
/*!
|
||||
* 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 createBaseCustomFieldGroup = (baseCustomFieldGroup) => ({
|
||||
type: ActionTypes.BASE_CUSTOM_FIELD_GROUP_CREATE,
|
||||
payload: {
|
||||
baseCustomFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
createBaseCustomFieldGroup.success = (localId, baseCustomFieldGroup) => ({
|
||||
type: ActionTypes.BASE_CUSTOM_FIELD_GROUP_CREATE__SUCCESS,
|
||||
payload: {
|
||||
localId,
|
||||
baseCustomFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
createBaseCustomFieldGroup.failure = (localId, error) => ({
|
||||
type: ActionTypes.BASE_CUSTOM_FIELD_GROUP_CREATE__FAILURE,
|
||||
payload: {
|
||||
localId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleBaseCustomFieldGroupCreate = (baseCustomFieldGroup) => ({
|
||||
type: ActionTypes.BASE_CUSTOM_FIELD_GROUP_CREATE_HANDLE,
|
||||
payload: {
|
||||
baseCustomFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
const updateBaseCustomFieldGroup = (id, data) => ({
|
||||
type: ActionTypes.BASE_CUSTOM_FIELD_GROUP_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
updateBaseCustomFieldGroup.success = (baseCustomFieldGroup) => ({
|
||||
type: ActionTypes.BASE_CUSTOM_FIELD_GROUP_UPDATE__SUCCESS,
|
||||
payload: {
|
||||
baseCustomFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
updateBaseCustomFieldGroup.failure = (id, error) => ({
|
||||
type: ActionTypes.BASE_CUSTOM_FIELD_GROUP_UPDATE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleBaseCustomFieldGroupUpdate = (baseCustomFieldGroup) => ({
|
||||
type: ActionTypes.BASE_CUSTOM_FIELD_GROUP_UPDATE_HANDLE,
|
||||
payload: {
|
||||
baseCustomFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteBaseCustomFieldGroup = (id) => ({
|
||||
type: ActionTypes.BASE_CUSTOM_FIELD_GROUP_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
deleteBaseCustomFieldGroup.success = (baseCustomFieldGroup) => ({
|
||||
type: ActionTypes.BASE_CUSTOM_FIELD_GROUP_DELETE__SUCCESS,
|
||||
payload: {
|
||||
baseCustomFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
deleteBaseCustomFieldGroup.failure = (id, error) => ({
|
||||
type: ActionTypes.BASE_CUSTOM_FIELD_GROUP_DELETE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleBaseCustomFieldGroupDelete = (baseCustomFieldGroup) => ({
|
||||
type: ActionTypes.BASE_CUSTOM_FIELD_GROUP_DELETE_HANDLE,
|
||||
payload: {
|
||||
baseCustomFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createBaseCustomFieldGroup,
|
||||
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 ActionTypes from '../constants/ActionTypes';
|
||||
|
||||
const createBoardMembership = (boardMembership) => ({
|
||||
@@ -25,10 +30,13 @@ createBoardMembership.failure = (localId, error) => ({
|
||||
|
||||
const handleBoardMembershipCreate = (
|
||||
boardMembership,
|
||||
isProjectAvailable,
|
||||
project,
|
||||
board,
|
||||
users,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
@@ -36,17 +44,25 @@ const handleBoardMembershipCreate = (
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
deletedNotifications,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notificationsToDelete,
|
||||
notificationServices,
|
||||
) => ({
|
||||
type: ActionTypes.BOARD_MEMBERSHIP_CREATE_HANDLE,
|
||||
payload: {
|
||||
boardMembership,
|
||||
isProjectAvailable,
|
||||
project,
|
||||
board,
|
||||
users,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
@@ -54,18 +70,14 @@ const handleBoardMembershipCreate = (
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
deletedNotifications,
|
||||
},
|
||||
});
|
||||
|
||||
handleBoardMembershipCreate.fetchProject = (id, currentUserId, currentBoardId) => ({
|
||||
type: ActionTypes.BOARD_MEMBERSHIP_CREATE_HANDLE__PROJECT_FETCH,
|
||||
payload: {
|
||||
id,
|
||||
currentUserId,
|
||||
currentBoardId,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notificationsToDelete,
|
||||
notificationServices,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -99,17 +111,19 @@ const handleBoardMembershipUpdate = (boardMembership) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const deleteBoardMembership = (id) => ({
|
||||
const deleteBoardMembership = (id, isCurrentUser) => ({
|
||||
type: ActionTypes.BOARD_MEMBERSHIP_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
isCurrentUser,
|
||||
},
|
||||
});
|
||||
|
||||
deleteBoardMembership.success = (boardMembership) => ({
|
||||
deleteBoardMembership.success = (boardMembership, isCurrentUser) => ({
|
||||
type: ActionTypes.BOARD_MEMBERSHIP_DELETE__SUCCESS,
|
||||
payload: {
|
||||
boardMembership,
|
||||
isCurrentUser,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -121,10 +135,11 @@ deleteBoardMembership.failure = (id, error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleBoardMembershipDelete = (boardMembership) => ({
|
||||
const handleBoardMembershipDelete = (boardMembership, isCurrentUser) => ({
|
||||
type: ActionTypes.BOARD_MEMBERSHIP_DELETE_HANDLE,
|
||||
payload: {
|
||||
boardMembership,
|
||||
isCurrentUser,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -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 createBoard = (board) => ({
|
||||
@@ -24,10 +29,11 @@ createBoard.failure = (localId, error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleBoardCreate = (board) => ({
|
||||
const handleBoardCreate = (board, boardMemberships) => ({
|
||||
type: ActionTypes.BOARD_CREATE_HANDLE,
|
||||
payload: {
|
||||
board,
|
||||
boardMemberships,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -48,8 +54,12 @@ fetchBoard.success = (
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
) => ({
|
||||
type: ActionTypes.BOARD_FETCH__SUCCESS,
|
||||
payload: {
|
||||
@@ -62,8 +72,12 @@ fetchBoard.success = (
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -105,6 +119,23 @@ const handleBoardUpdate = (board) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const updateBoardContext = (id, value) => ({
|
||||
type: ActionTypes.BOARD_CONTEXT_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
value,
|
||||
},
|
||||
});
|
||||
|
||||
const searchInBoard = (id, value, currentListId) => ({
|
||||
type: ActionTypes.IN_BOARD_SEARCH,
|
||||
payload: {
|
||||
id,
|
||||
value,
|
||||
currentListId,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteBoard = (id) => ({
|
||||
type: ActionTypes.BOARD_DELETE,
|
||||
payload: {
|
||||
@@ -140,6 +171,8 @@ export default {
|
||||
fetchBoard,
|
||||
updateBoard,
|
||||
handleBoardUpdate,
|
||||
updateBoardContext,
|
||||
searchInBoard,
|
||||
deleteBoard,
|
||||
handleBoardDelete,
|
||||
};
|
||||
|
||||
+118
-18
@@ -1,9 +1,67 @@
|
||||
/*!
|
||||
* 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 createCard = (card) => ({
|
||||
const fetchCards = (listId) => ({
|
||||
type: ActionTypes.CARDS_FETCH,
|
||||
payload: {
|
||||
listId,
|
||||
},
|
||||
});
|
||||
|
||||
fetchCards.success = (
|
||||
listId,
|
||||
cards,
|
||||
users,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
) => ({
|
||||
type: ActionTypes.CARDS_FETCH__SUCCESS,
|
||||
payload: {
|
||||
listId,
|
||||
cards,
|
||||
users,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
},
|
||||
});
|
||||
|
||||
fetchCards.failure = (listId, error) => ({
|
||||
type: ActionTypes.CARDS_FETCH__FAILURE,
|
||||
payload: {
|
||||
listId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCardsUpdate = (cards, activities) => ({
|
||||
type: ActionTypes.CARDS_UPDATE_HANDLE,
|
||||
payload: {
|
||||
cards,
|
||||
activities,
|
||||
},
|
||||
});
|
||||
|
||||
const createCard = (card, autoOpen) => ({
|
||||
type: ActionTypes.CARD_CREATE,
|
||||
payload: {
|
||||
card,
|
||||
autoOpen,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -23,14 +81,30 @@ createCard.failure = (localId, error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleCardCreate = (card, cardMemberships, cardLabels, tasks, attachments) => ({
|
||||
const handleCardCreate = (
|
||||
card,
|
||||
users,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
) => ({
|
||||
type: ActionTypes.CARD_CREATE_HANDLE,
|
||||
payload: {
|
||||
card,
|
||||
users,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -57,42 +131,75 @@ updateCard.failure = (id, error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleCardUpdate = (card, isFetched, cardMemberships, cardLabels, tasks, attachments) => ({
|
||||
const handleCardUpdate = (
|
||||
card,
|
||||
isFetched,
|
||||
users,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
) => ({
|
||||
type: ActionTypes.CARD_UPDATE_HANDLE,
|
||||
payload: {
|
||||
card,
|
||||
isFetched,
|
||||
users,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
},
|
||||
});
|
||||
|
||||
const duplicateCard = (id, card, taskIds) => ({
|
||||
const duplicateCard = (id, localId, data) => ({
|
||||
type: ActionTypes.CARD_DUPLICATE,
|
||||
payload: {
|
||||
id,
|
||||
card,
|
||||
taskIds,
|
||||
localId,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
duplicateCard.success = (localId, card, cardMemberships, cardLabels, tasks) => ({
|
||||
duplicateCard.success = (
|
||||
localId,
|
||||
card,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
) => ({
|
||||
type: ActionTypes.CARD_DUPLICATE__SUCCESS,
|
||||
payload: {
|
||||
localId,
|
||||
card,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
},
|
||||
});
|
||||
|
||||
duplicateCard.failure = (id, error) => ({
|
||||
duplicateCard.failure = (localId, error) => ({
|
||||
type: ActionTypes.CARD_DUPLICATE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
localId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
@@ -126,15 +233,9 @@ const handleCardDelete = (card) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const filterText = (boardId, text) => ({
|
||||
type: ActionTypes.TEXT_FILTER_IN_CURRENT_BOARD,
|
||||
payload: {
|
||||
boardId,
|
||||
text,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
fetchCards,
|
||||
handleCardsUpdate,
|
||||
createCard,
|
||||
handleCardCreate,
|
||||
updateCard,
|
||||
@@ -142,5 +243,4 @@ export default {
|
||||
duplicateCard,
|
||||
deleteCard,
|
||||
handleCardDelete,
|
||||
filterText,
|
||||
};
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
import ActionTypes from '../constants/ActionTypes';
|
||||
|
||||
const createCommentActivity = (activity) => ({
|
||||
type: ActionTypes.COMMENT_ACTIVITY_CREATE,
|
||||
payload: {
|
||||
activity,
|
||||
},
|
||||
});
|
||||
|
||||
createCommentActivity.success = (localId, activity) => ({
|
||||
type: ActionTypes.COMMENT_ACTIVITY_CREATE__SUCCESS,
|
||||
payload: {
|
||||
localId,
|
||||
activity,
|
||||
},
|
||||
});
|
||||
|
||||
createCommentActivity.failure = (localId, error) => ({
|
||||
type: ActionTypes.COMMENT_ACTIVITY_CREATE__FAILURE,
|
||||
payload: {
|
||||
localId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const updateCommentActivity = (id, data) => ({
|
||||
type: ActionTypes.COMMENT_ACTIVITY_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
updateCommentActivity.success = (activity) => ({
|
||||
type: ActionTypes.COMMENT_ACTIVITY_UPDATE__SUCCESS,
|
||||
payload: {
|
||||
activity,
|
||||
},
|
||||
});
|
||||
|
||||
updateCommentActivity.failure = (id, error) => ({
|
||||
type: ActionTypes.COMMENT_ACTIVITY_UPDATE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteCommentActivity = (id) => ({
|
||||
type: ActionTypes.COMMENT_ACTIVITY_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
deleteCommentActivity.success = (activity) => ({
|
||||
type: ActionTypes.COMMENT_ACTIVITY_DELETE__SUCCESS,
|
||||
payload: {
|
||||
activity,
|
||||
},
|
||||
});
|
||||
|
||||
deleteCommentActivity.failure = (id, error) => ({
|
||||
type: ActionTypes.COMMENT_ACTIVITY_DELETE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createCommentActivity,
|
||||
updateCommentActivity,
|
||||
deleteCommentActivity,
|
||||
};
|
||||
@@ -0,0 +1,130 @@
|
||||
/*!
|
||||
* 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 fetchComments = (cardId) => ({
|
||||
type: ActionTypes.COMMENTS_FETCH,
|
||||
payload: {
|
||||
cardId,
|
||||
},
|
||||
});
|
||||
|
||||
fetchComments.success = (cardId, comments, users) => ({
|
||||
type: ActionTypes.COMMENTS_FETCH__SUCCESS,
|
||||
payload: {
|
||||
cardId,
|
||||
comments,
|
||||
users,
|
||||
},
|
||||
});
|
||||
|
||||
fetchComments.failure = (cardId, error) => ({
|
||||
type: ActionTypes.COMMENTS_FETCH__FAILURE,
|
||||
payload: {
|
||||
cardId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const createComment = (comment) => ({
|
||||
type: ActionTypes.COMMENT_CREATE,
|
||||
payload: {
|
||||
comment,
|
||||
},
|
||||
});
|
||||
|
||||
createComment.success = (localId, comment) => ({
|
||||
type: ActionTypes.COMMENT_CREATE__SUCCESS,
|
||||
payload: {
|
||||
localId,
|
||||
comment,
|
||||
},
|
||||
});
|
||||
|
||||
createComment.failure = (localId, error) => ({
|
||||
type: ActionTypes.COMMENT_CREATE__FAILURE,
|
||||
payload: {
|
||||
localId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCommentCreate = (comment, users) => ({
|
||||
type: ActionTypes.COMMENT_CREATE_HANDLE,
|
||||
payload: {
|
||||
comment,
|
||||
users,
|
||||
},
|
||||
});
|
||||
|
||||
const updateComment = (id, data) => ({
|
||||
type: ActionTypes.COMMENT_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
updateComment.success = (comment) => ({
|
||||
type: ActionTypes.COMMENT_UPDATE__SUCCESS,
|
||||
payload: {
|
||||
comment,
|
||||
},
|
||||
});
|
||||
|
||||
updateComment.failure = (id, error) => ({
|
||||
type: ActionTypes.COMMENT_UPDATE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCommentUpdate = (comment) => ({
|
||||
type: ActionTypes.COMMENT_UPDATE_HANDLE,
|
||||
payload: {
|
||||
comment,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteComment = (id) => ({
|
||||
type: ActionTypes.COMMENT_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
deleteComment.success = (comment) => ({
|
||||
type: ActionTypes.COMMENT_DELETE__SUCCESS,
|
||||
payload: {
|
||||
comment,
|
||||
},
|
||||
});
|
||||
|
||||
deleteComment.failure = (id, error) => ({
|
||||
type: ActionTypes.COMMENT_DELETE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCommentDelete = (comment) => ({
|
||||
type: ActionTypes.COMMENT_DELETE_HANDLE,
|
||||
payload: {
|
||||
comment,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
fetchComments,
|
||||
createComment,
|
||||
handleCommentCreate,
|
||||
updateComment,
|
||||
handleCommentUpdate,
|
||||
deleteComment,
|
||||
handleCommentDelete,
|
||||
};
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
/*!
|
||||
* 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 createCustomFieldGroup = (customFieldGroup) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_GROUP_CREATE,
|
||||
payload: {
|
||||
customFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
createCustomFieldGroup.success = (localId, customFieldGroup) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_GROUP_CREATE__SUCCESS,
|
||||
payload: {
|
||||
localId,
|
||||
customFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
createCustomFieldGroup.failure = (localId, error) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_GROUP_CREATE__FAILURE,
|
||||
payload: {
|
||||
localId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldGroupCreate = (customFieldGroup) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_GROUP_CREATE_HANDLE,
|
||||
payload: {
|
||||
customFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
const updateCustomFieldGroup = (id, data) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_GROUP_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
updateCustomFieldGroup.success = (customFieldGroup) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_GROUP_UPDATE__SUCCESS,
|
||||
payload: {
|
||||
customFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
updateCustomFieldGroup.failure = (id, error) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_GROUP_UPDATE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldGroupUpdate = (customFieldGroup) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_GROUP_UPDATE_HANDLE,
|
||||
payload: {
|
||||
customFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteCustomFieldGroup = (id) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_GROUP_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
deleteCustomFieldGroup.success = (customFieldGroup) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_GROUP_DELETE__SUCCESS,
|
||||
payload: {
|
||||
customFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
deleteCustomFieldGroup.failure = (id, error) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_GROUP_DELETE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldGroupDelete = (customFieldGroup) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_GROUP_DELETE_HANDLE,
|
||||
payload: {
|
||||
customFieldGroup,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createCustomFieldGroup,
|
||||
handleCustomFieldGroupCreate,
|
||||
updateCustomFieldGroup,
|
||||
handleCustomFieldGroupUpdate,
|
||||
deleteCustomFieldGroup,
|
||||
handleCustomFieldGroupDelete,
|
||||
};
|
||||
@@ -0,0 +1,72 @@
|
||||
/*!
|
||||
* 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 updateCustomFieldValue = (customFieldValue) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_VALUE_UPDATE,
|
||||
payload: {
|
||||
customFieldValue,
|
||||
},
|
||||
});
|
||||
|
||||
updateCustomFieldValue.success = (localId, customFieldValue) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_VALUE_UPDATE__SUCCESS,
|
||||
payload: {
|
||||
localId,
|
||||
customFieldValue,
|
||||
},
|
||||
});
|
||||
|
||||
updateCustomFieldValue.failure = (localId, error) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_VALUE_UPDATE__FAILURE,
|
||||
payload: {
|
||||
localId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldValueUpdate = (customFieldValue) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_VALUE_UPDATE_HANDLE,
|
||||
payload: {
|
||||
customFieldValue,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteCustomFieldValue = (id) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_VALUE_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
deleteCustomFieldValue.success = (customFieldValue) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_VALUE_DELETE__SUCCESS,
|
||||
payload: {
|
||||
customFieldValue,
|
||||
},
|
||||
});
|
||||
|
||||
deleteCustomFieldValue.failure = (id, error) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_VALUE_DELETE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldValueDelete = (customFieldValue) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_VALUE_DELETE_HANDLE,
|
||||
payload: {
|
||||
customFieldValue,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
updateCustomFieldValue,
|
||||
handleCustomFieldValueUpdate,
|
||||
deleteCustomFieldValue,
|
||||
handleCustomFieldValueDelete,
|
||||
};
|
||||
@@ -0,0 +1,104 @@
|
||||
/*!
|
||||
* 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 createCustomField = (customField) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_CREATE,
|
||||
payload: {
|
||||
customField,
|
||||
},
|
||||
});
|
||||
|
||||
createCustomField.success = (localId, customField) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_CREATE__SUCCESS,
|
||||
payload: {
|
||||
localId,
|
||||
customField,
|
||||
},
|
||||
});
|
||||
|
||||
createCustomField.failure = (localId, error) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_CREATE__FAILURE,
|
||||
payload: {
|
||||
localId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldCreate = (customField) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_CREATE_HANDLE,
|
||||
payload: {
|
||||
customField,
|
||||
},
|
||||
});
|
||||
|
||||
const updateCustomField = (id, data) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
updateCustomField.success = (customField) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_UPDATE__SUCCESS,
|
||||
payload: {
|
||||
customField,
|
||||
},
|
||||
});
|
||||
|
||||
updateCustomField.failure = (id, error) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_UPDATE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldUpdate = (customField) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_UPDATE_HANDLE,
|
||||
payload: {
|
||||
customField,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteCustomField = (id) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
deleteCustomField.success = (customField) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_DELETE__SUCCESS,
|
||||
payload: {
|
||||
customField,
|
||||
},
|
||||
});
|
||||
|
||||
deleteCustomField.failure = (id, error) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_DELETE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCustomFieldDelete = (customField) => ({
|
||||
type: ActionTypes.CUSTOM_FIELD_DELETE_HANDLE,
|
||||
payload: {
|
||||
customField,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createCustomField,
|
||||
handleCustomFieldCreate,
|
||||
updateCustomField,
|
||||
handleCustomFieldUpdate,
|
||||
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 router from './router';
|
||||
import socket from './socket';
|
||||
import login from './login';
|
||||
@@ -6,16 +11,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 {
|
||||
...router,
|
||||
@@ -26,14 +38,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 ActionTypes from '../constants/ActionTypes';
|
||||
|
||||
const createLabel = (label) => ({
|
||||
@@ -23,6 +28,32 @@ createLabel.failure = (localId, error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const createLabelFromCard = (cardId, label) => ({
|
||||
type: ActionTypes.LABEL_FROM_CARD_CREATE,
|
||||
payload: {
|
||||
cardId,
|
||||
label,
|
||||
},
|
||||
});
|
||||
|
||||
createLabelFromCard.success = (localId, label, cardLabel) => ({
|
||||
type: ActionTypes.LABEL_FROM_CARD_CREATE__SUCCESS,
|
||||
payload: {
|
||||
localId,
|
||||
label,
|
||||
cardLabel,
|
||||
},
|
||||
});
|
||||
|
||||
createLabelFromCard.failure = (cardId, localId, error) => ({
|
||||
type: ActionTypes.LABEL_FROM_CARD_CREATE__FAILURE,
|
||||
payload: {
|
||||
cardId,
|
||||
localId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleLabelCreate = (label) => ({
|
||||
type: ActionTypes.LABEL_CREATE_HANDLE,
|
||||
payload: {
|
||||
@@ -151,24 +182,27 @@ const handleLabelFromCardRemove = (cardLabel) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const addLabelToBoardFilter = (id, boardId) => ({
|
||||
const addLabelToBoardFilter = (id, boardId, currentListId) => ({
|
||||
type: ActionTypes.LABEL_TO_BOARD_FILTER_ADD,
|
||||
payload: {
|
||||
id,
|
||||
boardId,
|
||||
currentListId,
|
||||
},
|
||||
});
|
||||
|
||||
const removeLabelFromBoardFilter = (id, boardId) => ({
|
||||
const removeLabelFromBoardFilter = (id, boardId, currentListId) => ({
|
||||
type: ActionTypes.LABEL_FROM_BOARD_FILTER_REMOVE,
|
||||
payload: {
|
||||
id,
|
||||
boardId,
|
||||
currentListId,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createLabel,
|
||||
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 ActionTypes from '../constants/ActionTypes';
|
||||
|
||||
const createList = (list) => ({
|
||||
@@ -84,25 +89,75 @@ sortList.failure = (id, error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleListSort = (list, cards) => ({
|
||||
type: ActionTypes.LIST_SORT_HANDLE,
|
||||
const moveListCards = (id, nextId, cardIds) => ({
|
||||
type: ActionTypes.LIST_CARDS_MOVE,
|
||||
payload: {
|
||||
list,
|
||||
cards,
|
||||
id,
|
||||
nextId,
|
||||
cardIds,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteList = (id) => ({
|
||||
type: ActionTypes.LIST_DELETE,
|
||||
moveListCards.success = (list, cards, activities) => ({
|
||||
type: ActionTypes.LIST_CARDS_MOVE__SUCCESS,
|
||||
payload: {
|
||||
list,
|
||||
cards,
|
||||
activities,
|
||||
},
|
||||
});
|
||||
|
||||
moveListCards.failure = (id, error) => ({
|
||||
type: ActionTypes.LIST_CARDS_MOVE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const clearList = (id) => ({
|
||||
type: ActionTypes.LIST_CLEAR,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
deleteList.success = (list) => ({
|
||||
clearList.success = (list) => ({
|
||||
type: ActionTypes.LIST_CLEAR__SUCCESS,
|
||||
payload: {
|
||||
list,
|
||||
},
|
||||
});
|
||||
|
||||
clearList.failure = (id, error) => ({
|
||||
type: ActionTypes.LIST_CLEAR__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleListClear = (list) => ({
|
||||
type: ActionTypes.LIST_CLEAR_HANDLE,
|
||||
payload: {
|
||||
list,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteList = (id, trashId, cardIds) => ({
|
||||
type: ActionTypes.LIST_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
trashId,
|
||||
cardIds,
|
||||
},
|
||||
});
|
||||
|
||||
deleteList.success = (list, cards) => ({
|
||||
type: ActionTypes.LIST_DELETE__SUCCESS,
|
||||
payload: {
|
||||
list,
|
||||
cards,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -114,10 +169,11 @@ deleteList.failure = (id, error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleListDelete = (list) => ({
|
||||
const handleListDelete = (list, cards) => ({
|
||||
type: ActionTypes.LIST_DELETE_HANDLE,
|
||||
payload: {
|
||||
list,
|
||||
cards,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -127,7 +183,9 @@ export default {
|
||||
updateList,
|
||||
handleListUpdate,
|
||||
sortList,
|
||||
handleListSort,
|
||||
moveListCards,
|
||||
clearList,
|
||||
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 ActionTypes from '../constants/ActionTypes';
|
||||
|
||||
const initializeLogin = (config) => ({
|
||||
@@ -28,20 +33,20 @@ authenticate.failure = (error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const authenticateUsingOidc = () => ({
|
||||
type: ActionTypes.USING_OIDC_AUTHENTICATE,
|
||||
const authenticateWithOidc = () => ({
|
||||
type: ActionTypes.WITH_OIDC_AUTHENTICATE,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
authenticateUsingOidc.success = (accessToken) => ({
|
||||
type: ActionTypes.USING_OIDC_AUTHENTICATE__SUCCESS,
|
||||
authenticateWithOidc.success = (accessToken) => ({
|
||||
type: ActionTypes.WITH_OIDC_AUTHENTICATE__SUCCESS,
|
||||
payload: {
|
||||
accessToken,
|
||||
},
|
||||
});
|
||||
|
||||
authenticateUsingOidc.failure = (error) => ({
|
||||
type: ActionTypes.USING_OIDC_AUTHENTICATE__FAILURE,
|
||||
authenticateWithOidc.failure = (error) => ({
|
||||
type: ActionTypes.WITH_OIDC_AUTHENTICATE__FAILURE,
|
||||
payload: {
|
||||
error,
|
||||
},
|
||||
@@ -55,6 +60,6 @@ const clearAuthenticateError = () => ({
|
||||
export default {
|
||||
initializeLogin,
|
||||
authenticate,
|
||||
authenticateUsingOidc,
|
||||
authenticateWithOidc,
|
||||
clearAuthenticateError,
|
||||
};
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
/*!
|
||||
* 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 openModal = (type) => ({
|
||||
const openModal = (type, params = {}) => ({
|
||||
type: ActionTypes.MODAL_OPEN,
|
||||
payload: {
|
||||
type,
|
||||
params,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
/*!
|
||||
* 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 createNotificationService = (notificationService) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_CREATE,
|
||||
payload: {
|
||||
notificationService,
|
||||
},
|
||||
});
|
||||
|
||||
createNotificationService.success = (localId, notificationService) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_CREATE__SUCCESS,
|
||||
payload: {
|
||||
localId,
|
||||
notificationService,
|
||||
},
|
||||
});
|
||||
|
||||
createNotificationService.failure = (localId, error) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_CREATE__FAILURE,
|
||||
payload: {
|
||||
localId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleNotificationServiceCreate = (notificationService) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_CREATE_HANDLE,
|
||||
payload: {
|
||||
notificationService,
|
||||
},
|
||||
});
|
||||
|
||||
const updateNotificationService = (id, data) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
updateNotificationService.success = (notificationService) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_UPDATE__SUCCESS,
|
||||
payload: {
|
||||
notificationService,
|
||||
},
|
||||
});
|
||||
|
||||
updateNotificationService.failure = (id, error) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_UPDATE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleNotificationServiceUpdate = (notificationService) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_UPDATE_HANDLE,
|
||||
payload: {
|
||||
notificationService,
|
||||
},
|
||||
});
|
||||
|
||||
const testNotificationService = (id) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_TEST,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
testNotificationService.success = (notificationService) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_TEST__SUCCESS,
|
||||
payload: {
|
||||
notificationService,
|
||||
},
|
||||
});
|
||||
|
||||
testNotificationService.failure = (id, error) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_TEST__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteNotificationService = (id) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
deleteNotificationService.success = (notificationService) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_DELETE__SUCCESS,
|
||||
payload: {
|
||||
notificationService,
|
||||
},
|
||||
});
|
||||
|
||||
deleteNotificationService.failure = (id, error) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_DELETE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleNotificationServiceDelete = (notificationService) => ({
|
||||
type: ActionTypes.NOTIFICATION_SERVICE_DELETE_HANDLE,
|
||||
payload: {
|
||||
notificationService,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createNotificationService,
|
||||
handleNotificationServiceCreate,
|
||||
updateNotificationService,
|
||||
handleNotificationServiceUpdate,
|
||||
testNotificationService,
|
||||
deleteNotificationService,
|
||||
handleNotificationServiceDelete,
|
||||
};
|
||||
@@ -1,12 +1,34 @@
|
||||
/*!
|
||||
* 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 handleNotificationCreate = (notification, users, cards, activities) => ({
|
||||
const deleteAllNotifications = () => ({
|
||||
type: ActionTypes.ALL_NOTIFICATIONS_DELETE,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
deleteAllNotifications.success = (notifications) => ({
|
||||
type: ActionTypes.ALL_NOTIFICATIONS_DELETE__SUCCESS,
|
||||
payload: {
|
||||
notifications,
|
||||
},
|
||||
});
|
||||
|
||||
deleteAllNotifications.failure = (error) => ({
|
||||
type: ActionTypes.ALL_NOTIFICATIONS_DELETE__FAILURE,
|
||||
payload: {
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleNotificationCreate = (notification, users) => ({
|
||||
type: ActionTypes.NOTIFICATION_CREATE_HANDLE,
|
||||
payload: {
|
||||
notification,
|
||||
users,
|
||||
cards,
|
||||
activities,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -40,6 +62,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 ActionTypes from '../constants/ActionTypes';
|
||||
|
||||
const createProjectManager = (projectManager) => ({
|
||||
@@ -25,10 +30,15 @@ createProjectManager.failure = (localId, error) => ({
|
||||
|
||||
const handleProjectManagerCreate = (
|
||||
projectManager,
|
||||
boardIds,
|
||||
isCurrentUser,
|
||||
isProjectAvailable,
|
||||
project,
|
||||
board,
|
||||
users,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
@@ -36,17 +46,27 @@ const handleProjectManagerCreate = (
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
deletedNotifications,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notificationsToDelete,
|
||||
notificationServices,
|
||||
) => ({
|
||||
type: ActionTypes.PROJECT_MANAGER_CREATE_HANDLE,
|
||||
payload: {
|
||||
projectManager,
|
||||
boardIds,
|
||||
isCurrentUser,
|
||||
isProjectAvailable,
|
||||
project,
|
||||
board,
|
||||
users,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
@@ -54,27 +74,21 @@ const handleProjectManagerCreate = (
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
deletedNotifications,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notificationsToDelete,
|
||||
notificationServices,
|
||||
},
|
||||
});
|
||||
|
||||
handleProjectManagerCreate.fetchProject = (id, currentUserId, currentBoardId) => ({
|
||||
type: ActionTypes.PROJECT_MANAGER_CREATE_HANDLE__PROJECT_FETCH,
|
||||
payload: {
|
||||
id,
|
||||
currentUserId,
|
||||
currentBoardId,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteProjectManager = (id, isCurrentUser, isCurrentProject) => ({
|
||||
const deleteProjectManager = (id) => ({
|
||||
type: ActionTypes.PROJECT_MANAGER_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
isCurrentUser,
|
||||
isCurrentProject,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -93,12 +107,10 @@ deleteProjectManager.failure = (id, error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleProjectManagerDelete = (projectManager, isCurrentUser, isCurrentProject) => ({
|
||||
const handleProjectManagerDelete = (projectManager) => ({
|
||||
type: ActionTypes.PROJECT_MANAGER_DELETE_HANDLE,
|
||||
payload: {
|
||||
projectManager,
|
||||
isCurrentUser,
|
||||
isCurrentProject,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -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 ActionTypes from '../constants/ActionTypes';
|
||||
|
||||
const searchProjects = (value) => ({
|
||||
type: ActionTypes.PROJECTS_SEARCH,
|
||||
payload: {
|
||||
value,
|
||||
},
|
||||
});
|
||||
|
||||
const updateProjectsOrder = (value) => ({
|
||||
type: ActionTypes.PROJECTS_ORDER_UPDATE,
|
||||
payload: {
|
||||
value,
|
||||
},
|
||||
});
|
||||
|
||||
const toggleHiddenProjects = (isVisible) => ({
|
||||
type: ActionTypes.HIDDEN_PROJECTS_TOGGLE,
|
||||
payload: {
|
||||
isVisible,
|
||||
},
|
||||
});
|
||||
|
||||
const createProject = (data) => ({
|
||||
type: ActionTypes.PROJECT_CREATE,
|
||||
payload: {
|
||||
@@ -22,14 +48,28 @@ createProject.failure = (error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleProjectCreate = (project, users, projectManagers, boards, boardMemberships) => ({
|
||||
const handleProjectCreate = (
|
||||
project,
|
||||
users,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
customFields,
|
||||
notificationServices,
|
||||
) => ({
|
||||
type: ActionTypes.PROJECT_CREATE_HANDLE,
|
||||
payload: {
|
||||
project,
|
||||
users,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
customFields,
|
||||
notificationServices,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -56,32 +96,56 @@ updateProject.failure = (id, error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleProjectUpdate = (project) => ({
|
||||
const handleProjectUpdate = (
|
||||
project,
|
||||
boardIds,
|
||||
isAvailable,
|
||||
board,
|
||||
users,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
lists,
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notificationsToDelete,
|
||||
notificationServices,
|
||||
) => ({
|
||||
type: ActionTypes.PROJECT_UPDATE_HANDLE,
|
||||
payload: {
|
||||
project,
|
||||
},
|
||||
});
|
||||
|
||||
const updateProjectBackgroundImage = (id) => ({
|
||||
type: ActionTypes.PROJECT_BACKGROUND_IMAGE_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
updateProjectBackgroundImage.success = (project) => ({
|
||||
type: ActionTypes.PROJECT_BACKGROUND_IMAGE_UPDATE__SUCCESS,
|
||||
payload: {
|
||||
project,
|
||||
},
|
||||
});
|
||||
|
||||
updateProjectBackgroundImage.failure = (id, error) => ({
|
||||
type: ActionTypes.PROJECT_BACKGROUND_IMAGE_UPDATE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
boardIds,
|
||||
isAvailable,
|
||||
board,
|
||||
users,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
lists,
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notificationsToDelete,
|
||||
notificationServices,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -115,11 +179,13 @@ const handleProjectDelete = (project) => ({
|
||||
});
|
||||
|
||||
export default {
|
||||
searchProjects,
|
||||
updateProjectsOrder,
|
||||
toggleHiddenProjects,
|
||||
createProject,
|
||||
handleProjectCreate,
|
||||
updateProject,
|
||||
handleProjectUpdate,
|
||||
updateProjectBackgroundImage,
|
||||
deleteProject,
|
||||
handleProjectDelete,
|
||||
};
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
/*!
|
||||
* 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 handleLocationChange = (
|
||||
pathname,
|
||||
currentBoardId,
|
||||
currentCardId,
|
||||
isEditModeEnabled,
|
||||
board,
|
||||
users,
|
||||
projects,
|
||||
@@ -10,12 +19,20 @@ const handleLocationChange = (
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
deletedNotifications,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notificationsToDelete,
|
||||
) => ({
|
||||
type: ActionTypes.LOCATION_CHANGE_HANDLE,
|
||||
payload: {
|
||||
pathname,
|
||||
currentBoardId,
|
||||
currentCardId,
|
||||
isEditModeEnabled,
|
||||
board,
|
||||
users,
|
||||
projects,
|
||||
@@ -25,12 +42,21 @@ const handleLocationChange = (
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
deletedNotifications,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notificationsToDelete,
|
||||
},
|
||||
});
|
||||
|
||||
handleLocationChange.fetchContent = () => ({
|
||||
type: ActionTypes.LOCATION_CHANGE_HANDLE__CONTENT_FETCH,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
handleLocationChange.fetchBoard = (id) => ({
|
||||
type: ActionTypes.LOCATION_CHANGE_HANDLE__BOARD_FETCH,
|
||||
payload: {
|
||||
|
||||
@@ -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 handleSocketDisconnect = () => ({
|
||||
@@ -6,11 +11,14 @@ const handleSocketDisconnect = () => ({
|
||||
});
|
||||
|
||||
const handleSocketReconnect = (
|
||||
config,
|
||||
user,
|
||||
board,
|
||||
users,
|
||||
projects,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
@@ -18,18 +26,25 @@ const handleSocketReconnect = (
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
activities,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notifications,
|
||||
notificationServices,
|
||||
) => ({
|
||||
type: ActionTypes.SOCKET_RECONNECT_HANDLE,
|
||||
payload: {
|
||||
config,
|
||||
user,
|
||||
board,
|
||||
users,
|
||||
projects,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
@@ -37,10 +52,14 @@ const handleSocketReconnect = (
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
activities,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notifications,
|
||||
notificationServices,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
/*!
|
||||
* 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 createTaskList = (taskList) => ({
|
||||
type: ActionTypes.TASK_LIST_CREATE,
|
||||
payload: {
|
||||
taskList,
|
||||
},
|
||||
});
|
||||
|
||||
createTaskList.success = (localId, taskList) => ({
|
||||
type: ActionTypes.TASK_LIST_CREATE__SUCCESS,
|
||||
payload: {
|
||||
localId,
|
||||
taskList,
|
||||
},
|
||||
});
|
||||
|
||||
createTaskList.failure = (localId, error) => ({
|
||||
type: ActionTypes.TASK_LIST_CREATE__FAILURE,
|
||||
payload: {
|
||||
localId,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleTaskListCreate = (taskList) => ({
|
||||
type: ActionTypes.TASK_LIST_CREATE_HANDLE,
|
||||
payload: {
|
||||
taskList,
|
||||
},
|
||||
});
|
||||
|
||||
const updateTaskList = (id, data) => ({
|
||||
type: ActionTypes.TASK_LIST_UPDATE,
|
||||
payload: {
|
||||
id,
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
updateTaskList.success = (taskList) => ({
|
||||
type: ActionTypes.TASK_LIST_UPDATE__SUCCESS,
|
||||
payload: {
|
||||
taskList,
|
||||
},
|
||||
});
|
||||
|
||||
updateTaskList.failure = (id, error) => ({
|
||||
type: ActionTypes.TASK_LIST_UPDATE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleTaskListUpdate = (taskList) => ({
|
||||
type: ActionTypes.TASK_LIST_UPDATE_HANDLE,
|
||||
payload: {
|
||||
taskList,
|
||||
},
|
||||
});
|
||||
|
||||
const deleteTaskList = (id) => ({
|
||||
type: ActionTypes.TASK_LIST_DELETE,
|
||||
payload: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
deleteTaskList.success = (taskList) => ({
|
||||
type: ActionTypes.TASK_LIST_DELETE__SUCCESS,
|
||||
payload: {
|
||||
taskList,
|
||||
},
|
||||
});
|
||||
|
||||
deleteTaskList.failure = (id, error) => ({
|
||||
type: ActionTypes.TASK_LIST_DELETE__FAILURE,
|
||||
payload: {
|
||||
id,
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleTaskListDelete = (taskList) => ({
|
||||
type: ActionTypes.TASK_LIST_DELETE_HANDLE,
|
||||
payload: {
|
||||
taskList,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
createTaskList,
|
||||
handleTaskListCreate,
|
||||
updateTaskList,
|
||||
handleTaskListUpdate,
|
||||
deleteTaskList,
|
||||
handleTaskListDelete,
|
||||
};
|
||||
@@ -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 createTask = (task) => ({
|
||||
|
||||
@@ -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 createUser = (data) => ({
|
||||
@@ -56,12 +61,60 @@ updateUser.failure = (id, error) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const handleUserUpdate = (user, users, isCurrent) => ({
|
||||
const handleUserUpdate = (
|
||||
user,
|
||||
projectIds,
|
||||
boardIds,
|
||||
config,
|
||||
board,
|
||||
users,
|
||||
projects,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
lists,
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notificationsToDelete,
|
||||
notificationServices,
|
||||
) => ({
|
||||
type: ActionTypes.USER_UPDATE_HANDLE,
|
||||
payload: {
|
||||
user,
|
||||
projectIds,
|
||||
boardIds,
|
||||
config,
|
||||
board,
|
||||
users,
|
||||
isCurrent,
|
||||
projects,
|
||||
projectManagers,
|
||||
backgroundImages,
|
||||
baseCustomFieldGroups,
|
||||
boards,
|
||||
boardMemberships,
|
||||
labels,
|
||||
lists,
|
||||
cards,
|
||||
cardMemberships,
|
||||
cardLabels,
|
||||
taskLists,
|
||||
tasks,
|
||||
attachments,
|
||||
customFieldGroups,
|
||||
customFields,
|
||||
customFieldValues,
|
||||
notificationsToDelete,
|
||||
notificationServices,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -270,19 +323,22 @@ const handleUserFromCardRemove = (cardMembership) => ({
|
||||
},
|
||||
});
|
||||
|
||||
const addUserToBoardFilter = (id, boardId) => ({
|
||||
const addUserToBoardFilter = (id, boardId, replace, currentListId) => ({
|
||||
type: ActionTypes.USER_TO_BOARD_FILTER_ADD,
|
||||
payload: {
|
||||
id,
|
||||
boardId,
|
||||
replace,
|
||||
currentListId,
|
||||
},
|
||||
});
|
||||
|
||||
const removeUserFromBoardFilter = (id, boardId) => ({
|
||||
const removeUserFromBoardFilter = (id, boardId, currentListId) => ({
|
||||
type: ActionTypes.USER_FROM_BOARD_FILTER_REMOVE,
|
||||
payload: {
|
||||
id,
|
||||
boardId,
|
||||
currentListId,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user