mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
Update dependencies
This commit is contained in:
parent
05adea1afd
commit
de61d94a98
145 changed files with 963 additions and 1149 deletions
1157
client/package-lock.json
generated
1157
client/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -47,25 +47,25 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"connected-react-router": "^6.7.0",
|
"connected-react-router": "^6.8.0",
|
||||||
"date-fns": "^2.11.0",
|
"date-fns": "^2.11.0",
|
||||||
"dequal": "^1.0.0",
|
"dequal": "^1.0.0",
|
||||||
"history": "^4.10.1",
|
"history": "^4.10.1",
|
||||||
"i18next": "^19.3.2",
|
"i18next": "^19.3.1",
|
||||||
"i18next-browser-languagedetector": "^4.0.2",
|
"i18next-browser-languagedetector": "^4.0.2",
|
||||||
"initials": "^3.0.1",
|
"initials": "^3.0.1",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
"react": "^16.13.0",
|
"react": "^16.13.1",
|
||||||
"react-beautiful-dnd": "^13.0.0",
|
"react-beautiful-dnd": "^13.0.0",
|
||||||
"react-datepicker": "^2.14.0",
|
"react-datepicker": "^2.14.1",
|
||||||
"react-dom": "^16.13.0",
|
"react-dom": "^16.13.1",
|
||||||
"react-i18next": "^11.3.3",
|
"react-i18next": "^11.3.4",
|
||||||
"react-input-mask": "^2.0.4",
|
"react-input-mask": "^2.0.4",
|
||||||
"react-markdown": "^4.3.1",
|
"react-markdown": "^4.3.1",
|
||||||
"react-redux": "^7.2.0",
|
"react-redux": "^7.2.0",
|
||||||
"react-router-dom": "^5.1.2",
|
"react-router-dom": "^5.1.2",
|
||||||
"react-scripts": "3.4.0",
|
"react-scripts": "3.4.1",
|
||||||
"react-textarea-autosize": "^7.1.2",
|
"react-textarea-autosize": "^7.1.2",
|
||||||
"redux": "^4.0.5",
|
"redux": "^4.0.5",
|
||||||
"redux-logger": "^3.0.6",
|
"redux-logger": "^3.0.6",
|
||||||
|
@ -75,18 +75,18 @@
|
||||||
"sails.io.js": "^1.2.1",
|
"sails.io.js": "^1.2.1",
|
||||||
"semantic-ui-react": "^0.88.2",
|
"semantic-ui-react": "^0.88.2",
|
||||||
"socket.io-client": "^2.3.0",
|
"socket.io-client": "^2.3.0",
|
||||||
"validator": "^12.2.0",
|
"validator": "^13.0.0",
|
||||||
"whatwg-fetch": "^3.0.0"
|
"whatwg-fetch": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-config-airbnb": "^18.1.0",
|
"eslint-config-airbnb": "^18.1.0",
|
||||||
"eslint-config-prettier": "^6.10.0",
|
"eslint-config-prettier": "^6.10.1",
|
||||||
"eslint-plugin-import": "^2.20.1",
|
"eslint-plugin-import": "^2.20.1",
|
||||||
"eslint-plugin-jsx-a11y": "^6.2.3",
|
"eslint-plugin-jsx-a11y": "^6.2.3",
|
||||||
"eslint-plugin-prettier": "^3.1.2",
|
"eslint-plugin-prettier": "^3.1.2",
|
||||||
"eslint-plugin-react": "^7.19.0",
|
"eslint-plugin-react": "^7.19.0",
|
||||||
"eslint-plugin-react-hooks": "^2.5.0",
|
"eslint-plugin-react-hooks": "^2.5.1",
|
||||||
"prettier": "1.19.1"
|
"prettier": "2.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,21 +2,21 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Events */
|
/* Events */
|
||||||
|
|
||||||
export const createActionReceived = action => ({
|
export const createActionReceived = (action) => ({
|
||||||
type: ActionTypes.ACTION_CREATE_RECEIVED,
|
type: ActionTypes.ACTION_CREATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
action,
|
action,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateActionReceived = action => ({
|
export const updateActionReceived = (action) => ({
|
||||||
type: ActionTypes.ACTION_UPDATE_RECEIVED,
|
type: ActionTypes.ACTION_UPDATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
action,
|
action,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteActionReceived = action => ({
|
export const deleteActionReceived = (action) => ({
|
||||||
type: ActionTypes.ACTION_DELETE_RECEIVED,
|
type: ActionTypes.ACTION_DELETE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
action,
|
action,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Events */
|
/* Events */
|
||||||
|
|
||||||
export const fetchActionsRequested = cardId => ({
|
export const fetchActionsRequested = (cardId) => ({
|
||||||
type: ActionTypes.ACTIONS_FETCH_REQUESTED,
|
type: ActionTypes.ACTIONS_FETCH_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
cardId,
|
cardId,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
export const createBoard = board => ({
|
export const createBoard = (board) => ({
|
||||||
type: ActionTypes.BOARD_CREATE,
|
type: ActionTypes.BOARD_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
board,
|
board,
|
||||||
|
@ -17,7 +17,7 @@ export const updateBoard = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteBoard = id => ({
|
export const deleteBoard = (id) => ({
|
||||||
type: ActionTypes.BOARD_DELETE,
|
type: ActionTypes.BOARD_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -61,7 +61,7 @@ export const createBoardReceived = (board, lists, labels) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const fetchBoardRequested = id => ({
|
export const fetchBoardRequested = (id) => ({
|
||||||
type: ActionTypes.BOARD_FETCH_REQUESTED,
|
type: ActionTypes.BOARD_FETCH_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -105,7 +105,7 @@ export const updateBoardRequested = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateBoardSucceeded = board => ({
|
export const updateBoardSucceeded = (board) => ({
|
||||||
type: ActionTypes.BOARD_UPDATE_SUCCEEDED,
|
type: ActionTypes.BOARD_UPDATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
board,
|
board,
|
||||||
|
@ -120,21 +120,21 @@ export const updateBoardFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateBoardReceived = board => ({
|
export const updateBoardReceived = (board) => ({
|
||||||
type: ActionTypes.BOARD_UPDATE_RECEIVED,
|
type: ActionTypes.BOARD_UPDATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
board,
|
board,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteBoardRequested = id => ({
|
export const deleteBoardRequested = (id) => ({
|
||||||
type: ActionTypes.BOARD_DELETE_REQUESTED,
|
type: ActionTypes.BOARD_DELETE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteBoardSucceeded = board => ({
|
export const deleteBoardSucceeded = (board) => ({
|
||||||
type: ActionTypes.BOARD_DELETE_SUCCEEDED,
|
type: ActionTypes.BOARD_DELETE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
board,
|
board,
|
||||||
|
@ -149,7 +149,7 @@ export const deleteBoardFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteBoardReceived = board => ({
|
export const deleteBoardReceived = (board) => ({
|
||||||
type: ActionTypes.BOARD_DELETE_RECEIVED,
|
type: ActionTypes.BOARD_DELETE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
board,
|
board,
|
||||||
|
|
|
@ -2,28 +2,28 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Events */
|
/* Events */
|
||||||
|
|
||||||
export const createCardLabelRequested = data => ({
|
export const createCardLabelRequested = (data) => ({
|
||||||
type: ActionTypes.CARD_LABEL_CREATE_REQUESTED,
|
type: ActionTypes.CARD_LABEL_CREATE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createCardLabelSucceeded = cardLabel => ({
|
export const createCardLabelSucceeded = (cardLabel) => ({
|
||||||
type: ActionTypes.CARD_LABEL_CREATE_SUCCEEDED,
|
type: ActionTypes.CARD_LABEL_CREATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
cardLabel,
|
cardLabel,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createCardLabelFailed = error => ({
|
export const createCardLabelFailed = (error) => ({
|
||||||
type: ActionTypes.CARD_LABEL_CREATE_FAILED,
|
type: ActionTypes.CARD_LABEL_CREATE_FAILED,
|
||||||
payload: {
|
payload: {
|
||||||
error,
|
error,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createCardLabelReceived = cardLabel => ({
|
export const createCardLabelReceived = (cardLabel) => ({
|
||||||
type: ActionTypes.CARD_LABEL_CREATE_RECEIVED,
|
type: ActionTypes.CARD_LABEL_CREATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
cardLabel,
|
cardLabel,
|
||||||
|
@ -38,7 +38,7 @@ export const deleteCardLabelRequested = (cardId, labelId) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCardLabelSucceeded = cardLabel => ({
|
export const deleteCardLabelSucceeded = (cardLabel) => ({
|
||||||
type: ActionTypes.CARD_LABEL_DELETE_SUCCEEDED,
|
type: ActionTypes.CARD_LABEL_DELETE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
cardLabel,
|
cardLabel,
|
||||||
|
@ -54,7 +54,7 @@ export const deleteCardLabelFailed = (cardId, labelId, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCardLabelReceived = cardLabel => ({
|
export const deleteCardLabelReceived = (cardLabel) => ({
|
||||||
type: ActionTypes.CARD_LABEL_DELETE_RECEIVED,
|
type: ActionTypes.CARD_LABEL_DELETE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
cardLabel,
|
cardLabel,
|
||||||
|
|
|
@ -2,28 +2,28 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Events */
|
/* Events */
|
||||||
|
|
||||||
export const createCardMembershipRequested = data => ({
|
export const createCardMembershipRequested = (data) => ({
|
||||||
type: ActionTypes.CARD_MEMBERSHIP_CREATE_REQUESTED,
|
type: ActionTypes.CARD_MEMBERSHIP_CREATE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createCardMembershipSucceeded = cardMembership => ({
|
export const createCardMembershipSucceeded = (cardMembership) => ({
|
||||||
type: ActionTypes.CARD_MEMBERSHIP_CREATE_SUCCEEDED,
|
type: ActionTypes.CARD_MEMBERSHIP_CREATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
cardMembership,
|
cardMembership,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createCardMembershipFailed = error => ({
|
export const createCardMembershipFailed = (error) => ({
|
||||||
type: ActionTypes.CARD_MEMBERSHIP_CREATE_FAILED,
|
type: ActionTypes.CARD_MEMBERSHIP_CREATE_FAILED,
|
||||||
payload: {
|
payload: {
|
||||||
error,
|
error,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createCardMembershipReceived = cardMembership => ({
|
export const createCardMembershipReceived = (cardMembership) => ({
|
||||||
type: ActionTypes.CARD_MEMBERSHIP_CREATE_RECEIVED,
|
type: ActionTypes.CARD_MEMBERSHIP_CREATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
cardMembership,
|
cardMembership,
|
||||||
|
@ -38,7 +38,7 @@ export const deleteCardMembershipRequested = (cardId, userId) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCardMembershipSucceeded = cardMembership => ({
|
export const deleteCardMembershipSucceeded = (cardMembership) => ({
|
||||||
type: ActionTypes.CARD_MEMBERSHIP_DELETE_SUCCEEDED,
|
type: ActionTypes.CARD_MEMBERSHIP_DELETE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
cardMembership,
|
cardMembership,
|
||||||
|
@ -54,7 +54,7 @@ export const deleteCardMembershipFailed = (cardId, userId, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCardMembershipReceived = cardMembership => ({
|
export const deleteCardMembershipReceived = (cardMembership) => ({
|
||||||
type: ActionTypes.CARD_MEMBERSHIP_DELETE_RECEIVED,
|
type: ActionTypes.CARD_MEMBERSHIP_DELETE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
cardMembership,
|
cardMembership,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
export const createCard = card => ({
|
export const createCard = (card) => ({
|
||||||
type: ActionTypes.CARD_CREATE,
|
type: ActionTypes.CARD_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
card,
|
card,
|
||||||
|
@ -17,7 +17,7 @@ export const updateCard = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCard = id => ({
|
export const deleteCard = (id) => ({
|
||||||
type: ActionTypes.CARD_DELETE,
|
type: ActionTypes.CARD_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -50,21 +50,21 @@ export const createCardFailed = (localId, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createCardReceived = card => ({
|
export const createCardReceived = (card) => ({
|
||||||
type: ActionTypes.CARD_CREATE_RECEIVED,
|
type: ActionTypes.CARD_CREATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
card,
|
card,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const fetchCardRequested = id => ({
|
export const fetchCardRequested = (id) => ({
|
||||||
type: ActionTypes.CARD_FETCH_REQUESTED,
|
type: ActionTypes.CARD_FETCH_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const fetchCardSucceeded = card => ({
|
export const fetchCardSucceeded = (card) => ({
|
||||||
type: ActionTypes.CARD_FETCH_SUCCEEDED,
|
type: ActionTypes.CARD_FETCH_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
card,
|
card,
|
||||||
|
@ -87,7 +87,7 @@ export const updateCardRequested = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateCardSucceeded = card => ({
|
export const updateCardSucceeded = (card) => ({
|
||||||
type: ActionTypes.CARD_UPDATE_SUCCEEDED,
|
type: ActionTypes.CARD_UPDATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
card,
|
card,
|
||||||
|
@ -102,21 +102,21 @@ export const updateCardFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateCardReceived = card => ({
|
export const updateCardReceived = (card) => ({
|
||||||
type: ActionTypes.CARD_UPDATE_RECEIVED,
|
type: ActionTypes.CARD_UPDATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
card,
|
card,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCardRequested = id => ({
|
export const deleteCardRequested = (id) => ({
|
||||||
type: ActionTypes.CARD_DELETE_REQUESTED,
|
type: ActionTypes.CARD_DELETE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCardSucceeded = card => ({
|
export const deleteCardSucceeded = (card) => ({
|
||||||
type: ActionTypes.CARD_DELETE_SUCCEEDED,
|
type: ActionTypes.CARD_DELETE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
card,
|
card,
|
||||||
|
@ -131,7 +131,7 @@ export const deleteCardFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCardReceived = card => ({
|
export const deleteCardReceived = (card) => ({
|
||||||
type: ActionTypes.CARD_DELETE_RECEIVED,
|
type: ActionTypes.CARD_DELETE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
card,
|
card,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
export const createCommentAction = action => ({
|
export const createCommentAction = (action) => ({
|
||||||
type: ActionTypes.COMMENT_ACTION_CREATE,
|
type: ActionTypes.COMMENT_ACTION_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
action,
|
action,
|
||||||
|
@ -17,7 +17,7 @@ export const updateCommentAction = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCommentAction = id => ({
|
export const deleteCommentAction = (id) => ({
|
||||||
type: ActionTypes.COMMENT_ACTION_DELETE,
|
type: ActionTypes.COMMENT_ACTION_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -58,7 +58,7 @@ export const updateCommentActionRequested = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateCommentActionSucceeded = action => ({
|
export const updateCommentActionSucceeded = (action) => ({
|
||||||
type: ActionTypes.COMMENT_ACTION_UPDATE_SUCCEEDED,
|
type: ActionTypes.COMMENT_ACTION_UPDATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
action,
|
action,
|
||||||
|
@ -73,14 +73,14 @@ export const updateCommentActionFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCommentActionRequested = id => ({
|
export const deleteCommentActionRequested = (id) => ({
|
||||||
type: ActionTypes.COMMENT_ACTION_DELETE_REQUESTED,
|
type: ActionTypes.COMMENT_ACTION_DELETE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCommentActionSucceeded = action => ({
|
export const deleteCommentActionSucceeded = (action) => ({
|
||||||
type: ActionTypes.COMMENT_ACTION_DELETE_SUCCEEDED,
|
type: ActionTypes.COMMENT_ACTION_DELETE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
action,
|
action,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import EntryActionTypes from '../../constants/EntryActionTypes';
|
import EntryActionTypes from '../../constants/EntryActionTypes';
|
||||||
|
|
||||||
export const createBoardInCurrentProject = data => ({
|
export const createBoardInCurrentProject = (data) => ({
|
||||||
type: EntryActionTypes.BOARD_IN_CURRENT_PROJECT_CREATE,
|
type: EntryActionTypes.BOARD_IN_CURRENT_PROJECT_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -23,7 +23,7 @@ export const moveBoard = (id, index) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteBoard = id => ({
|
export const deleteBoard = (id) => ({
|
||||||
type: EntryActionTypes.BOARD_DELETE,
|
type: EntryActionTypes.BOARD_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -16,7 +16,7 @@ export const updateCard = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateCurrentCard = data => ({
|
export const updateCurrentCard = (data) => ({
|
||||||
type: EntryActionTypes.CURRENT_CARD_UPDATE,
|
type: EntryActionTypes.CURRENT_CARD_UPDATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -32,7 +32,7 @@ export const moveCard = (id, listId, index) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCard = id => ({
|
export const deleteCard = (id) => ({
|
||||||
type: EntryActionTypes.CARD_DELETE,
|
type: EntryActionTypes.CARD_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import EntryActionTypes from '../../constants/EntryActionTypes';
|
import EntryActionTypes from '../../constants/EntryActionTypes';
|
||||||
|
|
||||||
export const createCommentActionInCurrentCard = data => ({
|
export const createCommentActionInCurrentCard = (data) => ({
|
||||||
type: EntryActionTypes.COMMENT_ACTION_IN_CURRENT_CARD_CREATE,
|
type: EntryActionTypes.COMMENT_ACTION_IN_CURRENT_CARD_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -15,7 +15,7 @@ export const updateCommentAction = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteCommentAction = id => ({
|
export const deleteCommentAction = (id) => ({
|
||||||
type: EntryActionTypes.COMMENT_ACTION_DELETE,
|
type: EntryActionTypes.COMMENT_ACTION_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import EntryActionTypes from '../../constants/EntryActionTypes';
|
import EntryActionTypes from '../../constants/EntryActionTypes';
|
||||||
|
|
||||||
export const createLabelInCurrentBoard = data => ({
|
export const createLabelInCurrentBoard = (data) => ({
|
||||||
type: EntryActionTypes.LABEL_IN_CURRENT_BOARD_CREATE,
|
type: EntryActionTypes.LABEL_IN_CURRENT_BOARD_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -15,7 +15,7 @@ export const updateLabel = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteLabel = id => ({
|
export const deleteLabel = (id) => ({
|
||||||
type: EntryActionTypes.LABEL_DELETE,
|
type: EntryActionTypes.LABEL_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -30,7 +30,7 @@ export const addLabelToCard = (id, cardId) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const addLabelToCurrentCard = id => ({
|
export const addLabelToCurrentCard = (id) => ({
|
||||||
type: EntryActionTypes.LABEL_TO_CURRENT_CARD_ADD,
|
type: EntryActionTypes.LABEL_TO_CURRENT_CARD_ADD,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -45,21 +45,21 @@ export const removeLabelFromCard = (id, cardId) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const removeLabelFromCurrentCard = id => ({
|
export const removeLabelFromCurrentCard = (id) => ({
|
||||||
type: EntryActionTypes.LABEL_FROM_CURRENT_CARD_REMOVE,
|
type: EntryActionTypes.LABEL_FROM_CURRENT_CARD_REMOVE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const addLabelToFilterInCurrentBoard = id => ({
|
export const addLabelToFilterInCurrentBoard = (id) => ({
|
||||||
type: EntryActionTypes.LABEL_TO_FILTER_IN_CURRENT_BOARD_ADD,
|
type: EntryActionTypes.LABEL_TO_FILTER_IN_CURRENT_BOARD_ADD,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const removeLabelFromFilterInCurrentBoard = id => ({
|
export const removeLabelFromFilterInCurrentBoard = (id) => ({
|
||||||
type: EntryActionTypes.LABEL_FROM_FILTER_IN_CURRENT_BOARD_REMOVE,
|
type: EntryActionTypes.LABEL_FROM_FILTER_IN_CURRENT_BOARD_REMOVE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import EntryActionTypes from '../../constants/EntryActionTypes';
|
import EntryActionTypes from '../../constants/EntryActionTypes';
|
||||||
|
|
||||||
export const createListInCurrentBoard = data => ({
|
export const createListInCurrentBoard = (data) => ({
|
||||||
type: EntryActionTypes.LIST_IN_CURRENT_BOARD_CREATE,
|
type: EntryActionTypes.LIST_IN_CURRENT_BOARD_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -23,7 +23,7 @@ export const moveList = (id, index) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteList = id => ({
|
export const deleteList = (id) => ({
|
||||||
type: EntryActionTypes.LIST_DELETE,
|
type: EntryActionTypes.LIST_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import EntryActionTypes from '../../constants/EntryActionTypes';
|
import EntryActionTypes from '../../constants/EntryActionTypes';
|
||||||
|
|
||||||
export const authenticate = data => ({
|
export const authenticate = (data) => ({
|
||||||
type: EntryActionTypes.AUTHENTICATE,
|
type: EntryActionTypes.AUTHENTICATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import EntryActionTypes from '../../constants/EntryActionTypes';
|
import EntryActionTypes from '../../constants/EntryActionTypes';
|
||||||
|
|
||||||
// eslint-disable-next-line import/prefer-default-export
|
// eslint-disable-next-line import/prefer-default-export
|
||||||
export const deleteNotification = id => ({
|
export const deleteNotification = (id) => ({
|
||||||
type: EntryActionTypes.NOTIFICATION_DELETE,
|
type: EntryActionTypes.NOTIFICATION_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import EntryActionTypes from '../../constants/EntryActionTypes';
|
import EntryActionTypes from '../../constants/EntryActionTypes';
|
||||||
|
|
||||||
export const createMembershipInCurrentProject = data => ({
|
export const createMembershipInCurrentProject = (data) => ({
|
||||||
type: EntryActionTypes.MEMBERSHIP_IN_CURRENT_PROJECT_CREATE,
|
type: EntryActionTypes.MEMBERSHIP_IN_CURRENT_PROJECT_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteProjectMembership = id => ({
|
export const deleteProjectMembership = (id) => ({
|
||||||
type: EntryActionTypes.PROJECT_MEMBERSHIP_DELETE,
|
type: EntryActionTypes.PROJECT_MEMBERSHIP_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import EntryActionTypes from '../../constants/EntryActionTypes';
|
import EntryActionTypes from '../../constants/EntryActionTypes';
|
||||||
|
|
||||||
export const createProject = data => ({
|
export const createProject = (data) => ({
|
||||||
type: EntryActionTypes.PROJECT_CREATE,
|
type: EntryActionTypes.PROJECT_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateCurrentProject = data => ({
|
export const updateCurrentProject = (data) => ({
|
||||||
type: EntryActionTypes.CURRENT_PROJECT_UPDATE,
|
type: EntryActionTypes.CURRENT_PROJECT_UPDATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import EntryActionTypes from '../../constants/EntryActionTypes';
|
import EntryActionTypes from '../../constants/EntryActionTypes';
|
||||||
|
|
||||||
export const createTaskInCurrentCard = data => ({
|
export const createTaskInCurrentCard = (data) => ({
|
||||||
type: EntryActionTypes.TASK_IN_CURRENT_CARD_CREATE,
|
type: EntryActionTypes.TASK_IN_CURRENT_CARD_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -15,7 +15,7 @@ export const updateTask = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteTask = id => ({
|
export const deleteTask = (id) => ({
|
||||||
type: EntryActionTypes.TASK_DELETE,
|
type: EntryActionTypes.TASK_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import EntryActionTypes from '../../constants/EntryActionTypes';
|
import EntryActionTypes from '../../constants/EntryActionTypes';
|
||||||
|
|
||||||
export const createUser = data => ({
|
export const createUser = (data) => ({
|
||||||
type: EntryActionTypes.USER_CREATE,
|
type: EntryActionTypes.USER_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -20,14 +20,14 @@ export const updateUser = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateCurrentUser = data => ({
|
export const updateCurrentUser = (data) => ({
|
||||||
type: EntryActionTypes.CURRENT_USER_UPDATE,
|
type: EntryActionTypes.CURRENT_USER_UPDATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateCurrentUserEmail = data => ({
|
export const updateCurrentUserEmail = (data) => ({
|
||||||
type: EntryActionTypes.CURRENT_USER_EMAIL_UPDATE,
|
type: EntryActionTypes.CURRENT_USER_EMAIL_UPDATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -39,7 +39,7 @@ export const clearCurrentUserEmailUpdateError = () => ({
|
||||||
payload: {},
|
payload: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateCurrentUserPassword = data => ({
|
export const updateCurrentUserPassword = (data) => ({
|
||||||
type: EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE,
|
type: EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -51,14 +51,14 @@ export const clearCurrentUserPasswordUpdateError = () => ({
|
||||||
payload: {},
|
payload: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const uploadCurrentUserAvatar = file => ({
|
export const uploadCurrentUserAvatar = (file) => ({
|
||||||
type: EntryActionTypes.CURRENT_USER_AVATAR_UPLOAD,
|
type: EntryActionTypes.CURRENT_USER_AVATAR_UPLOAD,
|
||||||
payload: {
|
payload: {
|
||||||
file,
|
file,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteUser = id => ({
|
export const deleteUser = (id) => ({
|
||||||
type: EntryActionTypes.USER_DELETE,
|
type: EntryActionTypes.USER_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -73,7 +73,7 @@ export const addUserToCard = (id, cardId) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const addUserToCurrentCard = id => ({
|
export const addUserToCurrentCard = (id) => ({
|
||||||
type: EntryActionTypes.USER_TO_CURRENT_CARD_ADD,
|
type: EntryActionTypes.USER_TO_CURRENT_CARD_ADD,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -88,21 +88,21 @@ export const removeUserFromCard = (id, cardId) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const removeUserFromCurrentCard = id => ({
|
export const removeUserFromCurrentCard = (id) => ({
|
||||||
type: EntryActionTypes.USER_FROM_CURRENT_CARD_REMOVE,
|
type: EntryActionTypes.USER_FROM_CURRENT_CARD_REMOVE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const addUserToFilterInCurrentBoard = id => ({
|
export const addUserToFilterInCurrentBoard = (id) => ({
|
||||||
type: EntryActionTypes.USER_TO_FILTER_IN_CURRENT_BOARD_ADD,
|
type: EntryActionTypes.USER_TO_FILTER_IN_CURRENT_BOARD_ADD,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const removeUserFromFilterInCurrentBoard = id => ({
|
export const removeUserFromFilterInCurrentBoard = (id) => ({
|
||||||
type: EntryActionTypes.USER_FROM_FILTER_IN_CURRENT_BOARD_REMOVE,
|
type: EntryActionTypes.USER_FROM_FILTER_IN_CURRENT_BOARD_REMOVE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
export const createLabel = label => ({
|
export const createLabel = (label) => ({
|
||||||
type: ActionTypes.LABEL_CREATE,
|
type: ActionTypes.LABEL_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
label,
|
label,
|
||||||
|
@ -17,7 +17,7 @@ export const updateLabel = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteLabel = id => ({
|
export const deleteLabel = (id) => ({
|
||||||
type: ActionTypes.LABEL_DELETE,
|
type: ActionTypes.LABEL_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -82,7 +82,7 @@ export const createLabelFailed = (localId, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createLabelReceived = label => ({
|
export const createLabelReceived = (label) => ({
|
||||||
type: ActionTypes.LABEL_CREATE_RECEIVED,
|
type: ActionTypes.LABEL_CREATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
label,
|
label,
|
||||||
|
@ -97,7 +97,7 @@ export const updateLabelRequested = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateLabelSucceeded = label => ({
|
export const updateLabelSucceeded = (label) => ({
|
||||||
type: ActionTypes.LABEL_UPDATE_SUCCEEDED,
|
type: ActionTypes.LABEL_UPDATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
label,
|
label,
|
||||||
|
@ -112,21 +112,21 @@ export const updateLabelFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateLabelReceived = label => ({
|
export const updateLabelReceived = (label) => ({
|
||||||
type: ActionTypes.LABEL_UPDATE_RECEIVED,
|
type: ActionTypes.LABEL_UPDATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
label,
|
label,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteLabelRequested = id => ({
|
export const deleteLabelRequested = (id) => ({
|
||||||
type: ActionTypes.LABEL_DELETE_REQUESTED,
|
type: ActionTypes.LABEL_DELETE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteLabelSucceeded = label => ({
|
export const deleteLabelSucceeded = (label) => ({
|
||||||
type: ActionTypes.LABEL_DELETE_SUCCEEDED,
|
type: ActionTypes.LABEL_DELETE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
label,
|
label,
|
||||||
|
@ -141,7 +141,7 @@ export const deleteLabelFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteLabelReceived = label => ({
|
export const deleteLabelReceived = (label) => ({
|
||||||
type: ActionTypes.LABEL_DELETE_RECEIVED,
|
type: ActionTypes.LABEL_DELETE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
label,
|
label,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
export const createList = list => ({
|
export const createList = (list) => ({
|
||||||
type: ActionTypes.LIST_CREATE,
|
type: ActionTypes.LIST_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
list,
|
list,
|
||||||
|
@ -17,7 +17,7 @@ export const updateList = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteList = id => ({
|
export const deleteList = (id) => ({
|
||||||
type: ActionTypes.LIST_DELETE,
|
type: ActionTypes.LIST_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -50,7 +50,7 @@ export const createListFailed = (localId, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createListReceived = list => ({
|
export const createListReceived = (list) => ({
|
||||||
type: ActionTypes.LIST_CREATE_RECEIVED,
|
type: ActionTypes.LIST_CREATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
list,
|
list,
|
||||||
|
@ -65,7 +65,7 @@ export const updateListRequested = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateListSucceeded = list => ({
|
export const updateListSucceeded = (list) => ({
|
||||||
type: ActionTypes.LIST_UPDATE_SUCCEEDED,
|
type: ActionTypes.LIST_UPDATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
list,
|
list,
|
||||||
|
@ -80,21 +80,21 @@ export const updateListFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateListReceived = list => ({
|
export const updateListReceived = (list) => ({
|
||||||
type: ActionTypes.LIST_UPDATE_RECEIVED,
|
type: ActionTypes.LIST_UPDATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
list,
|
list,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteListRequested = id => ({
|
export const deleteListRequested = (id) => ({
|
||||||
type: ActionTypes.LIST_DELETE_REQUESTED,
|
type: ActionTypes.LIST_DELETE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteListSucceeded = list => ({
|
export const deleteListSucceeded = (list) => ({
|
||||||
type: ActionTypes.LIST_DELETE_SUCCEEDED,
|
type: ActionTypes.LIST_DELETE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
list,
|
list,
|
||||||
|
@ -109,7 +109,7 @@ export const deleteListFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteListReceived = list => ({
|
export const deleteListReceived = (list) => ({
|
||||||
type: ActionTypes.LIST_DELETE_RECEIVED,
|
type: ActionTypes.LIST_DELETE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
list,
|
list,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
export const authenticate = data => ({
|
export const authenticate = (data) => ({
|
||||||
type: ActionTypes.AUTHENTICATE,
|
type: ActionTypes.AUTHENTICATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -21,21 +21,21 @@ export const logout = () => ({
|
||||||
|
|
||||||
/* Events */
|
/* Events */
|
||||||
|
|
||||||
export const authenticateRequested = data => ({
|
export const authenticateRequested = (data) => ({
|
||||||
type: ActionTypes.AUTHENTICATE_REQUESTED,
|
type: ActionTypes.AUTHENTICATE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const authenticateSucceeded = accessToken => ({
|
export const authenticateSucceeded = (accessToken) => ({
|
||||||
type: ActionTypes.AUTHENTICATE_SUCCEEDED,
|
type: ActionTypes.AUTHENTICATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
accessToken,
|
accessToken,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const authenticateFailed = error => ({
|
export const authenticateFailed = (error) => ({
|
||||||
type: ActionTypes.AUTHENTICATE_FAILED,
|
type: ActionTypes.AUTHENTICATE_FAILED,
|
||||||
payload: {
|
payload: {
|
||||||
error,
|
error,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
export const openModal = type => ({
|
export const openModal = (type) => ({
|
||||||
type: ActionTypes.MODAL_OPEN,
|
type: ActionTypes.MODAL_OPEN,
|
||||||
payload: {
|
payload: {
|
||||||
type,
|
type,
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const createNotificationReceived = (notification, user, card, action) =>
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteNotificationReceived = notification => ({
|
export const deleteNotificationReceived = (notification) => ({
|
||||||
type: ActionTypes.NOTIFICATION_DELETE_RECEIVED,
|
type: ActionTypes.NOTIFICATION_DELETE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
notification,
|
notification,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
export const deleteNotifications = ids => ({
|
export const deleteNotifications = (ids) => ({
|
||||||
type: ActionTypes.NOTIFICATIONS_DELETE,
|
type: ActionTypes.NOTIFICATIONS_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
ids,
|
ids,
|
||||||
|
@ -26,21 +26,21 @@ export const fetchNotificationsSucceeded = (notifications, users, cards, actions
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const fetchNotificationsFailed = error => ({
|
export const fetchNotificationsFailed = (error) => ({
|
||||||
type: ActionTypes.NOTIFICATIONS_FETCH_FAILED,
|
type: ActionTypes.NOTIFICATIONS_FETCH_FAILED,
|
||||||
payload: {
|
payload: {
|
||||||
error,
|
error,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteNotificationsRequested = ids => ({
|
export const deleteNotificationsRequested = (ids) => ({
|
||||||
type: ActionTypes.NOTIFICATIONS_DELETE_REQUESTED,
|
type: ActionTypes.NOTIFICATIONS_DELETE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
ids,
|
ids,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteNotificationsSucceeded = notifications => ({
|
export const deleteNotificationsSucceeded = (notifications) => ({
|
||||||
type: ActionTypes.NOTIFICATIONS_DELETE_SUCCEEDED,
|
type: ActionTypes.NOTIFICATIONS_DELETE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
notifications,
|
notifications,
|
||||||
|
|
|
@ -2,14 +2,14 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
export const createProjectMembership = projectMembership => ({
|
export const createProjectMembership = (projectMembership) => ({
|
||||||
type: ActionTypes.PROJECT_MEMBERSHIP_CREATE,
|
type: ActionTypes.PROJECT_MEMBERSHIP_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
projectMembership,
|
projectMembership,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteProjectMembership = id => ({
|
export const deleteProjectMembership = (id) => ({
|
||||||
type: ActionTypes.PROJECT_MEMBERSHIP_DELETE,
|
type: ActionTypes.PROJECT_MEMBERSHIP_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -50,14 +50,14 @@ export const createProjectMembershipReceived = (projectMembership, user) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteProjectMembershipRequested = id => ({
|
export const deleteProjectMembershipRequested = (id) => ({
|
||||||
type: ActionTypes.PROJECT_MEMBERSHIP_DELETE_REQUESTED,
|
type: ActionTypes.PROJECT_MEMBERSHIP_DELETE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteProjectMembershipSucceeded = projectMembership => ({
|
export const deleteProjectMembershipSucceeded = (projectMembership) => ({
|
||||||
type: ActionTypes.PROJECT_MEMBERSHIP_DELETE_SUCCEEDED,
|
type: ActionTypes.PROJECT_MEMBERSHIP_DELETE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
projectMembership,
|
projectMembership,
|
||||||
|
@ -72,7 +72,7 @@ export const deleteProjectMembershipFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteProjectMembershipReceived = projectMembership => ({
|
export const deleteProjectMembershipReceived = (projectMembership) => ({
|
||||||
type: ActionTypes.PROJECT_MEMBERSHIP_DELETE_RECEIVED,
|
type: ActionTypes.PROJECT_MEMBERSHIP_DELETE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
projectMembership,
|
projectMembership,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
export const createProject = data => ({
|
export const createProject = (data) => ({
|
||||||
type: ActionTypes.PROJECT_CREATE,
|
type: ActionTypes.PROJECT_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -17,7 +17,7 @@ export const updateProject = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteProject = id => ({
|
export const deleteProject = (id) => ({
|
||||||
type: ActionTypes.PROJECT_DELETE,
|
type: ActionTypes.PROJECT_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -26,7 +26,7 @@ export const deleteProject = id => ({
|
||||||
|
|
||||||
/* Events */
|
/* Events */
|
||||||
|
|
||||||
export const createProjectRequested = data => ({
|
export const createProjectRequested = (data) => ({
|
||||||
type: ActionTypes.PROJECT_CREATE_REQUESTED,
|
type: ActionTypes.PROJECT_CREATE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -43,7 +43,7 @@ export const createProjectSucceeded = (project, users, projectMemberships, board
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createProjectFailed = error => ({
|
export const createProjectFailed = (error) => ({
|
||||||
type: ActionTypes.PROJECT_CREATE_FAILED,
|
type: ActionTypes.PROJECT_CREATE_FAILED,
|
||||||
payload: {
|
payload: {
|
||||||
error,
|
error,
|
||||||
|
@ -68,7 +68,7 @@ export const updateProjectRequested = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateProjectSucceeded = project => ({
|
export const updateProjectSucceeded = (project) => ({
|
||||||
type: ActionTypes.PROJECT_UPDATE_SUCCEEDED,
|
type: ActionTypes.PROJECT_UPDATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
project,
|
project,
|
||||||
|
@ -83,21 +83,21 @@ export const updateProjectFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateProjectReceived = project => ({
|
export const updateProjectReceived = (project) => ({
|
||||||
type: ActionTypes.PROJECT_UPDATE_RECEIVED,
|
type: ActionTypes.PROJECT_UPDATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
project,
|
project,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteProjectRequested = id => ({
|
export const deleteProjectRequested = (id) => ({
|
||||||
type: ActionTypes.PROJECT_DELETE_REQUESTED,
|
type: ActionTypes.PROJECT_DELETE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteProjectSucceeded = project => ({
|
export const deleteProjectSucceeded = (project) => ({
|
||||||
type: ActionTypes.PROJECT_DELETE_SUCCEEDED,
|
type: ActionTypes.PROJECT_DELETE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
project,
|
project,
|
||||||
|
@ -112,7 +112,7 @@ export const deleteProjectFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteProjectReceived = project => ({
|
export const deleteProjectReceived = (project) => ({
|
||||||
type: ActionTypes.PROJECT_DELETE_RECEIVED,
|
type: ActionTypes.PROJECT_DELETE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
project,
|
project,
|
||||||
|
|
|
@ -17,7 +17,7 @@ export const fetchProjectsSucceeded = (projects, users, projectMemberships, boar
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const fetchProjectsFailed = error => ({
|
export const fetchProjectsFailed = (error) => ({
|
||||||
type: ActionTypes.PROJECTS_FETCH_FAILED,
|
type: ActionTypes.PROJECTS_FETCH_FAILED,
|
||||||
payload: {
|
payload: {
|
||||||
error,
|
error,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
export const createTask = task => ({
|
export const createTask = (task) => ({
|
||||||
type: ActionTypes.TASK_CREATE,
|
type: ActionTypes.TASK_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
task,
|
task,
|
||||||
|
@ -17,7 +17,7 @@ export const updateTask = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteTask = id => ({
|
export const deleteTask = (id) => ({
|
||||||
type: ActionTypes.TASK_DELETE,
|
type: ActionTypes.TASK_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -50,7 +50,7 @@ export const createTaskFailed = (localId, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createTaskReceived = task => ({
|
export const createTaskReceived = (task) => ({
|
||||||
type: ActionTypes.TASK_CREATE_RECEIVED,
|
type: ActionTypes.TASK_CREATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
task,
|
task,
|
||||||
|
@ -65,7 +65,7 @@ export const updateTaskRequested = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateTaskSucceeded = task => ({
|
export const updateTaskSucceeded = (task) => ({
|
||||||
type: ActionTypes.TASK_UPDATE_SUCCEEDED,
|
type: ActionTypes.TASK_UPDATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
task,
|
task,
|
||||||
|
@ -80,21 +80,21 @@ export const updateTaskFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateTaskReceived = task => ({
|
export const updateTaskReceived = (task) => ({
|
||||||
type: ActionTypes.TASK_UPDATE_RECEIVED,
|
type: ActionTypes.TASK_UPDATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
task,
|
task,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteTaskRequested = id => ({
|
export const deleteTaskRequested = (id) => ({
|
||||||
type: ActionTypes.TASK_DELETE_REQUESTED,
|
type: ActionTypes.TASK_DELETE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteTaskSucceeded = task => ({
|
export const deleteTaskSucceeded = (task) => ({
|
||||||
type: ActionTypes.TASK_DELETE_SUCCEEDED,
|
type: ActionTypes.TASK_DELETE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
task,
|
task,
|
||||||
|
@ -109,7 +109,7 @@ export const deleteTaskFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteTaskReceived = task => ({
|
export const deleteTaskReceived = (task) => ({
|
||||||
type: ActionTypes.TASK_DELETE_RECEIVED,
|
type: ActionTypes.TASK_DELETE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
task,
|
task,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ActionTypes from '../constants/ActionTypes';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
export const createUser = data => ({
|
export const createUser = (data) => ({
|
||||||
type: ActionTypes.USER_CREATE,
|
type: ActionTypes.USER_CREATE,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
|
@ -22,21 +22,21 @@ export const updateUser = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const clearUserEmailUpdateError = id => ({
|
export const clearUserEmailUpdateError = (id) => ({
|
||||||
type: ActionTypes.USER_EMAIL_UPDATE_ERROR_CLEAR,
|
type: ActionTypes.USER_EMAIL_UPDATE_ERROR_CLEAR,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const clearUserPasswordUpdateError = id => ({
|
export const clearUserPasswordUpdateError = (id) => ({
|
||||||
type: ActionTypes.USER_PASSWORD_UPDATE_ERROR_CLEAR,
|
type: ActionTypes.USER_PASSWORD_UPDATE_ERROR_CLEAR,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteUser = id => ({
|
export const deleteUser = (id) => ({
|
||||||
type: ActionTypes.USER_DELETE,
|
type: ActionTypes.USER_DELETE,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -78,28 +78,28 @@ export const removeUserFromBoardFilter = (id, boardId) => ({
|
||||||
|
|
||||||
/* Events */
|
/* Events */
|
||||||
|
|
||||||
export const createUserRequested = data => ({
|
export const createUserRequested = (data) => ({
|
||||||
type: ActionTypes.USER_CREATE_REQUESTED,
|
type: ActionTypes.USER_CREATE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
data,
|
data,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createUserSucceeded = user => ({
|
export const createUserSucceeded = (user) => ({
|
||||||
type: ActionTypes.USER_CREATE_SUCCEEDED,
|
type: ActionTypes.USER_CREATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
user,
|
user,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createUserFailed = error => ({
|
export const createUserFailed = (error) => ({
|
||||||
type: ActionTypes.USER_CREATE_FAILED,
|
type: ActionTypes.USER_CREATE_FAILED,
|
||||||
payload: {
|
payload: {
|
||||||
error,
|
error,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createUserReceived = user => ({
|
export const createUserReceived = (user) => ({
|
||||||
type: ActionTypes.USER_CREATE_RECEIVED,
|
type: ActionTypes.USER_CREATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
user,
|
user,
|
||||||
|
@ -111,14 +111,14 @@ export const fetchCurrentUserRequested = () => ({
|
||||||
payload: {},
|
payload: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const fetchCurrentUserSucceeded = user => ({
|
export const fetchCurrentUserSucceeded = (user) => ({
|
||||||
type: ActionTypes.CURRENT_USER_FETCH_SUCCEEDED,
|
type: ActionTypes.CURRENT_USER_FETCH_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
user,
|
user,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const fetchCurrentUserFailed = error => ({
|
export const fetchCurrentUserFailed = (error) => ({
|
||||||
type: ActionTypes.CURRENT_USER_FETCH_FAILED,
|
type: ActionTypes.CURRENT_USER_FETCH_FAILED,
|
||||||
payload: {
|
payload: {
|
||||||
error,
|
error,
|
||||||
|
@ -133,7 +133,7 @@ export const updateUserRequested = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateUserSucceeded = user => ({
|
export const updateUserSucceeded = (user) => ({
|
||||||
type: ActionTypes.USER_UPDATE_SUCCEEDED,
|
type: ActionTypes.USER_UPDATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
user,
|
user,
|
||||||
|
@ -148,7 +148,7 @@ export const updateUserFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateUserReceived = user => ({
|
export const updateUserReceived = (user) => ({
|
||||||
type: ActionTypes.USER_UPDATE_RECEIVED,
|
type: ActionTypes.USER_UPDATE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
user,
|
user,
|
||||||
|
@ -187,7 +187,7 @@ export const updateUserPasswordRequested = (id, data) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const updateUserPasswordSucceeded = id => ({
|
export const updateUserPasswordSucceeded = (id) => ({
|
||||||
type: ActionTypes.USER_PASSWORD_UPDATE_SUCCEEDED,
|
type: ActionTypes.USER_PASSWORD_UPDATE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -202,7 +202,7 @@ export const updateUserPasswordFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const uploadUserAvatarRequested = id => ({
|
export const uploadUserAvatarRequested = (id) => ({
|
||||||
type: ActionTypes.USER_AVATAR_UPLOAD_REQUESTED,
|
type: ActionTypes.USER_AVATAR_UPLOAD_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
|
@ -225,14 +225,14 @@ export const uploadUserAvatarFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteUserRequested = id => ({
|
export const deleteUserRequested = (id) => ({
|
||||||
type: ActionTypes.USER_DELETE_REQUESTED,
|
type: ActionTypes.USER_DELETE_REQUESTED,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteUserSucceeded = user => ({
|
export const deleteUserSucceeded = (user) => ({
|
||||||
type: ActionTypes.USER_DELETE_SUCCEEDED,
|
type: ActionTypes.USER_DELETE_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
user,
|
user,
|
||||||
|
@ -247,7 +247,7 @@ export const deleteUserFailed = (id, error) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const deleteUserReceived = user => ({
|
export const deleteUserReceived = (user) => ({
|
||||||
type: ActionTypes.USER_DELETE_RECEIVED,
|
type: ActionTypes.USER_DELETE_RECEIVED,
|
||||||
payload: {
|
payload: {
|
||||||
user,
|
user,
|
||||||
|
|
|
@ -7,14 +7,14 @@ export const fetchUsersRequested = () => ({
|
||||||
payload: {},
|
payload: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const fetchUsersSucceeded = users => ({
|
export const fetchUsersSucceeded = (users) => ({
|
||||||
type: ActionTypes.USERS_FETCH_SUCCEEDED,
|
type: ActionTypes.USERS_FETCH_SUCCEEDED,
|
||||||
payload: {
|
payload: {
|
||||||
users,
|
users,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const fetchUsersFailed = error => ({
|
export const fetchUsersFailed = (error) => ({
|
||||||
type: ActionTypes.USERS_FETCH_FAILED,
|
type: ActionTypes.USERS_FETCH_FAILED,
|
||||||
payload: {
|
payload: {
|
||||||
error,
|
error,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import socket from './socket';
|
||||||
|
|
||||||
/* Transformers */
|
/* Transformers */
|
||||||
|
|
||||||
export const transformAction = action => ({
|
export const transformAction = (action) => ({
|
||||||
...action,
|
...action,
|
||||||
createdAt: new Date(action.createdAt),
|
createdAt: new Date(action.createdAt),
|
||||||
});
|
});
|
||||||
|
@ -10,14 +10,14 @@ export const transformAction = action => ({
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const getActions = (cardId, data, headers) =>
|
const getActions = (cardId, data, headers) =>
|
||||||
socket.get(`/cards/${cardId}/actions`, data, headers).then(body => ({
|
socket.get(`/cards/${cardId}/actions`, data, headers).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
items: body.items.map(transformAction),
|
items: body.items.map(transformAction),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/* Event handlers */
|
/* Event handlers */
|
||||||
|
|
||||||
const makeHandleActionCreate = next => body => {
|
const makeHandleActionCreate = (next) => (body) => {
|
||||||
next({
|
next({
|
||||||
...body,
|
...body,
|
||||||
item: transformAction(body.item),
|
item: transformAction(body.item),
|
||||||
|
|
|
@ -7,7 +7,7 @@ const createBoard = (projectId, data, headers) =>
|
||||||
socket.post(`/projects/${projectId}/boards`, data, headers);
|
socket.post(`/projects/${projectId}/boards`, data, headers);
|
||||||
|
|
||||||
const getBoard = (id, headers) =>
|
const getBoard = (id, headers) =>
|
||||||
socket.get(`/boards/${id}`, undefined, headers).then(body => ({
|
socket.get(`/boards/${id}`, undefined, headers).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
included: {
|
included: {
|
||||||
...body.included,
|
...body.included,
|
||||||
|
|
|
@ -2,7 +2,7 @@ import socket from './socket';
|
||||||
|
|
||||||
/* Transformers */
|
/* Transformers */
|
||||||
|
|
||||||
export const transformCard = card => ({
|
export const transformCard = (card) => ({
|
||||||
...card,
|
...card,
|
||||||
...(card.dueDate && {
|
...(card.dueDate && {
|
||||||
dueDate: new Date(card.dueDate),
|
dueDate: new Date(card.dueDate),
|
||||||
|
@ -17,7 +17,7 @@ export const transformCard = card => ({
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const transformCardData = data => ({
|
export const transformCardData = (data) => ({
|
||||||
...data,
|
...data,
|
||||||
...(data.dueDate && {
|
...(data.dueDate && {
|
||||||
dueDate: data.dueDate.toISOString(),
|
dueDate: data.dueDate.toISOString(),
|
||||||
|
@ -35,32 +35,32 @@ export const transformCardData = data => ({
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const createCard = (listId, data, headers) =>
|
const createCard = (listId, data, headers) =>
|
||||||
socket.post(`/lists/${listId}/cards`, transformCardData(data), headers).then(body => ({
|
socket.post(`/lists/${listId}/cards`, transformCardData(data), headers).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformCard(body.item),
|
item: transformCard(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const getCard = (id, headers) =>
|
const getCard = (id, headers) =>
|
||||||
socket.get(`/cards/${id}`, undefined, headers).then(body => ({
|
socket.get(`/cards/${id}`, undefined, headers).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformCard(body.item),
|
item: transformCard(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const updateCard = (id, data, headers) =>
|
const updateCard = (id, data, headers) =>
|
||||||
socket.patch(`/cards/${id}`, transformCardData(data), headers).then(body => ({
|
socket.patch(`/cards/${id}`, transformCardData(data), headers).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformCard(body.item),
|
item: transformCard(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const deleteCard = (id, headers) =>
|
const deleteCard = (id, headers) =>
|
||||||
socket.delete(`/cards/${id}`, undefined, headers).then(body => ({
|
socket.delete(`/cards/${id}`, undefined, headers).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformCard(body.item),
|
item: transformCard(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/* Event handlers */
|
/* Event handlers */
|
||||||
|
|
||||||
const makeHandleCardCreate = next => body => {
|
const makeHandleCardCreate = (next) => (body) => {
|
||||||
next({
|
next({
|
||||||
...body,
|
...body,
|
||||||
item: transformCard(body.item),
|
item: transformCard(body.item),
|
||||||
|
|
|
@ -4,19 +4,19 @@ import { transformAction } from './actions';
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const createCommentAction = (cardId, data, headers) =>
|
const createCommentAction = (cardId, data, headers) =>
|
||||||
socket.post(`/cards/${cardId}/comment-actions`, data, headers).then(body => ({
|
socket.post(`/cards/${cardId}/comment-actions`, data, headers).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformAction(body.item),
|
item: transformAction(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const updateCommentAction = (id, data, headers) =>
|
const updateCommentAction = (id, data, headers) =>
|
||||||
socket.patch(`/comment-actions/${id}`, data, headers).then(body => ({
|
socket.patch(`/comment-actions/${id}`, data, headers).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformAction(body.item),
|
item: transformAction(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const deleteCommentAction = (id, headers) =>
|
const deleteCommentAction = (id, headers) =>
|
||||||
socket.delete(`/comment-actions/${id}`, undefined, headers).then(body => ({
|
socket.delete(`/comment-actions/${id}`, undefined, headers).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
item: transformAction(body.item),
|
item: transformAction(body.item),
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Config from '../constants/Config';
|
||||||
const http = {};
|
const http = {};
|
||||||
|
|
||||||
// TODO: all methods
|
// TODO: all methods
|
||||||
['POST'].forEach(method => {
|
['POST'].forEach((method) => {
|
||||||
http[method.toLowerCase()] = (url, data, headers) => {
|
http[method.toLowerCase()] = (url, data, headers) => {
|
||||||
const formData = Object.keys(data).reduce((result, key) => {
|
const formData = Object.keys(data).reduce((result, key) => {
|
||||||
result.append(key, data[key]);
|
result.append(key, data[key]);
|
||||||
|
@ -18,8 +18,8 @@ const http = {};
|
||||||
headers,
|
headers,
|
||||||
body: formData,
|
body: formData,
|
||||||
})
|
})
|
||||||
.then(response =>
|
.then((response) =>
|
||||||
response.json().then(body => ({
|
response.json().then((body) => ({
|
||||||
body,
|
body,
|
||||||
isError: response.status !== 200,
|
isError: response.status !== 200,
|
||||||
})),
|
})),
|
||||||
|
|
|
@ -4,8 +4,8 @@ import { transformAction } from './actions';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const getNotifications = headers =>
|
const getNotifications = (headers) =>
|
||||||
socket.get('/notifications', undefined, headers).then(body => ({
|
socket.get('/notifications', undefined, headers).then((body) => ({
|
||||||
...body,
|
...body,
|
||||||
included: {
|
included: {
|
||||||
...body.included,
|
...body.included,
|
||||||
|
@ -19,7 +19,7 @@ const updateNotifications = (ids, data, headers) =>
|
||||||
|
|
||||||
/* Event handlers */
|
/* Event handlers */
|
||||||
|
|
||||||
const makeHandleNotificationCreate = next => body => {
|
const makeHandleNotificationCreate = (next) => (body) => {
|
||||||
next({
|
next({
|
||||||
...body,
|
...body,
|
||||||
included: {
|
included: {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import socket from './socket';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const getProjects = headers => socket.get('/projects', undefined, headers);
|
const getProjects = (headers) => socket.get('/projects', undefined, headers);
|
||||||
|
|
||||||
const createProject = (data, headers) => socket.post('/projects', data, headers);
|
const createProject = (data, headers) => socket.post('/projects', data, headers);
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ const { socket } = io;
|
||||||
|
|
||||||
socket.connect = socket._connect; // eslint-disable-line no-underscore-dangle
|
socket.connect = socket._connect; // eslint-disable-line no-underscore-dangle
|
||||||
|
|
||||||
['GET', 'POST', 'PUT', 'PATCH', 'DELETE'].forEach(method => {
|
['GET', 'POST', 'PUT', 'PATCH', 'DELETE'].forEach((method) => {
|
||||||
socket[method.toLowerCase()] = (url, data, headers) =>
|
socket[method.toLowerCase()] = (url, data, headers) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
socket.request(
|
socket.request(
|
||||||
|
|
|
@ -3,11 +3,11 @@ import socket from './socket';
|
||||||
|
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|
||||||
const getUsers = headers => socket.get('/users', undefined, headers);
|
const getUsers = (headers) => socket.get('/users', undefined, headers);
|
||||||
|
|
||||||
const createUser = (data, headers) => socket.post('/users', data, headers);
|
const createUser = (data, headers) => socket.post('/users', data, headers);
|
||||||
|
|
||||||
const getCurrentUser = headers => socket.get('/users/me', undefined, headers);
|
const getCurrentUser = (headers) => socket.get('/users/me', undefined, headers);
|
||||||
|
|
||||||
const updateUser = (id, data, headers) => socket.patch(`/users/${id}`, data, headers);
|
const updateUser = (id, data, headers) => socket.patch(`/users/${id}`, data, headers);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { useForm } from '../../hooks';
|
||||||
|
|
||||||
import styles from './AddUserPopup.module.css';
|
import styles from './AddUserPopup.module.css';
|
||||||
|
|
||||||
const createMessage = error => {
|
const createMessage = (error) => {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ const AddList = React.forwardRef(({ children, onCreate }, ref) => {
|
||||||
}, [open]);
|
}, [open]);
|
||||||
|
|
||||||
const handleFieldKeyDown = useCallback(
|
const handleFieldKeyDown = useCallback(
|
||||||
event => {
|
(event) => {
|
||||||
if (event.key === 'Escape') {
|
if (event.key === 'Escape') {
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ import { ReactComponent as PlusMathIcon } from '../../assets/images/plus-math-ic
|
||||||
|
|
||||||
import styles from './Board.module.css';
|
import styles from './Board.module.css';
|
||||||
|
|
||||||
const parseDndId = dndId => dndId.split(':')[1];
|
const parseDndId = (dndId) => dndId.split(':')[1];
|
||||||
|
|
||||||
const Board = React.memo(
|
const Board = React.memo(
|
||||||
({
|
({
|
||||||
|
|
|
@ -26,14 +26,14 @@ const Filter = React.memo(
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
|
|
||||||
const handleUserRemoveClick = useCallback(
|
const handleUserRemoveClick = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onUserRemove(id);
|
onUserRemove(id);
|
||||||
},
|
},
|
||||||
[onUserRemove],
|
[onUserRemove],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleLabelRemoveClick = useCallback(
|
const handleLabelRemoveClick = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onLabelRemove(id);
|
onLabelRemove(id);
|
||||||
},
|
},
|
||||||
[onLabelRemove],
|
[onLabelRemove],
|
||||||
|
@ -44,7 +44,7 @@ const Filter = React.memo(
|
||||||
<span className={styles.filter}>
|
<span className={styles.filter}>
|
||||||
<ProjectMembershipsPopup
|
<ProjectMembershipsPopup
|
||||||
items={allProjectMemberships}
|
items={allProjectMemberships}
|
||||||
currentUserIds={users.map(user => user.id)}
|
currentUserIds={users.map((user) => user.id)}
|
||||||
title={t('common.filterByMembers', {
|
title={t('common.filterByMembers', {
|
||||||
context: 'title',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
|
@ -56,7 +56,7 @@ const Filter = React.memo(
|
||||||
{users.length === 0 && <span className={styles.filterLabel}>{t('common.all')}</span>}
|
{users.length === 0 && <span className={styles.filterLabel}>{t('common.all')}</span>}
|
||||||
</button>
|
</button>
|
||||||
</ProjectMembershipsPopup>
|
</ProjectMembershipsPopup>
|
||||||
{users.map(user => (
|
{users.map((user) => (
|
||||||
<span key={user.id} className={styles.filterItem}>
|
<span key={user.id} className={styles.filterItem}>
|
||||||
<User
|
<User
|
||||||
name={user.name}
|
name={user.name}
|
||||||
|
@ -70,7 +70,7 @@ const Filter = React.memo(
|
||||||
<span className={styles.filter}>
|
<span className={styles.filter}>
|
||||||
<LabelsPopup
|
<LabelsPopup
|
||||||
items={allLabels}
|
items={allLabels}
|
||||||
currentIds={labels.map(label => label.id)}
|
currentIds={labels.map((label) => label.id)}
|
||||||
title={t('common.filterByLabels', {
|
title={t('common.filterByLabels', {
|
||||||
context: 'title',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
|
@ -85,7 +85,7 @@ const Filter = React.memo(
|
||||||
{labels.length === 0 && <span className={styles.filterLabel}>{t('common.all')}</span>}
|
{labels.length === 0 && <span className={styles.filterLabel}>{t('common.all')}</span>}
|
||||||
</button>
|
</button>
|
||||||
</LabelsPopup>
|
</LabelsPopup>
|
||||||
{labels.map(label => (
|
{labels.map((label) => (
|
||||||
<span key={label.id} className={styles.filterItem}>
|
<span key={label.id} className={styles.filterItem}>
|
||||||
<Label
|
<Label
|
||||||
name={label.name}
|
name={label.name}
|
||||||
|
|
|
@ -44,15 +44,15 @@ const Boards = React.memo(
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDelete = useCallback(
|
const handleDelete = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onDelete(id);
|
onDelete(id);
|
||||||
},
|
},
|
||||||
[onDelete],
|
[onDelete],
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderItems = useCallback(
|
const renderItems = useCallback(
|
||||||
safeItems =>
|
(safeItems) =>
|
||||||
safeItems.map(item => (
|
safeItems.map((item) => (
|
||||||
<div key={item.id} className={styles.tabWrapper}>
|
<div key={item.id} className={styles.tabWrapper}>
|
||||||
<div className={classNames(styles.tab, item.id === currentId && styles.tabActive)}>
|
<div className={classNames(styles.tab, item.id === currentId && styles.tabActive)}>
|
||||||
{item.isPersisted ? (
|
{item.isPersisted ? (
|
||||||
|
@ -73,7 +73,7 @@ const Boards = React.memo(
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderEditableItems = useCallback(
|
const renderEditableItems = useCallback(
|
||||||
safeItems =>
|
(safeItems) =>
|
||||||
safeItems.map((item, index) => (
|
safeItems.map((item, index) => (
|
||||||
<Draggable
|
<Draggable
|
||||||
key={item.id}
|
key={item.id}
|
||||||
|
@ -103,7 +103,7 @@ const Boards = React.memo(
|
||||||
{item.isPersisted && (
|
{item.isPersisted && (
|
||||||
<EditPopup
|
<EditPopup
|
||||||
defaultData={pick(item, 'name')}
|
defaultData={pick(item, 'name')}
|
||||||
onUpdate={data => handleUpdate(item.id, data)}
|
onUpdate={(data) => handleUpdate(item.id, data)}
|
||||||
onDelete={() => handleDelete(item.id)}
|
onDelete={() => handleDelete(item.id)}
|
||||||
>
|
>
|
||||||
<Button className={classNames(styles.editButton, styles.target)}>
|
<Button className={classNames(styles.editButton, styles.target)}>
|
||||||
|
|
|
@ -70,7 +70,7 @@ const ActionsStep = React.memo(
|
||||||
}, [openStep]);
|
}, [openStep]);
|
||||||
|
|
||||||
const handleDueDateUpdate = useCallback(
|
const handleDueDateUpdate = useCallback(
|
||||||
dueDate => {
|
(dueDate) => {
|
||||||
onUpdate({
|
onUpdate({
|
||||||
dueDate,
|
dueDate,
|
||||||
});
|
});
|
||||||
|
@ -79,7 +79,7 @@ const ActionsStep = React.memo(
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleTimerUpdate = useCallback(
|
const handleTimerUpdate = useCallback(
|
||||||
timer => {
|
(timer) => {
|
||||||
onUpdate({
|
onUpdate({
|
||||||
timer,
|
timer,
|
||||||
});
|
});
|
||||||
|
|
|
@ -49,7 +49,7 @@ const Card = React.memo(
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleNameUpdate = useCallback(
|
const handleNameUpdate = useCallback(
|
||||||
newName => {
|
(newName) => {
|
||||||
onUpdate({
|
onUpdate({
|
||||||
name: newName,
|
name: newName,
|
||||||
});
|
});
|
||||||
|
@ -65,7 +65,7 @@ const Card = React.memo(
|
||||||
<>
|
<>
|
||||||
{labels.length > 0 && (
|
{labels.length > 0 && (
|
||||||
<span className={styles.labels}>
|
<span className={styles.labels}>
|
||||||
{labels.map(label => (
|
{labels.map((label) => (
|
||||||
<span key={label.id} className={classNames(styles.attachment, styles.attachmentLeft)}>
|
<span key={label.id} className={classNames(styles.attachment, styles.attachmentLeft)}>
|
||||||
<Label name={label.name} color={label.color} size="tiny" />
|
<Label name={label.name} color={label.color} size="tiny" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -101,7 +101,7 @@ const Card = React.memo(
|
||||||
)}
|
)}
|
||||||
{users.length > 0 && (
|
{users.length > 0 && (
|
||||||
<span className={classNames(styles.attachments, styles.attachmentsRight)}>
|
<span className={classNames(styles.attachments, styles.attachmentsRight)}>
|
||||||
{users.map(user => (
|
{users.map((user) => (
|
||||||
<span key={user.id} className={classNames(styles.attachment, styles.attachmentRight)}>
|
<span key={user.id} className={classNames(styles.attachment, styles.attachmentRight)}>
|
||||||
<User name={user.name} avatar={user.avatar} size="tiny" />
|
<User name={user.name} avatar={user.avatar} size="tiny" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -136,9 +136,9 @@ const Card = React.memo(
|
||||||
isPersisted,
|
isPersisted,
|
||||||
}}
|
}}
|
||||||
projectMemberships={allProjectMemberships}
|
projectMemberships={allProjectMemberships}
|
||||||
currentUserIds={users.map(user => user.id)}
|
currentUserIds={users.map((user) => user.id)}
|
||||||
labels={allLabels}
|
labels={allLabels}
|
||||||
currentLabelIds={labels.map(label => label.id)}
|
currentLabelIds={labels.map((label) => label.id)}
|
||||||
onNameEdit={handleNameEdit}
|
onNameEdit={handleNameEdit}
|
||||||
onUpdate={onUpdate}
|
onUpdate={onUpdate}
|
||||||
onDelete={onDelete}
|
onDelete={onDelete}
|
||||||
|
|
|
@ -50,7 +50,7 @@ const EditName = React.forwardRef(({ children, defaultValue, onUpdate }, ref) =>
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleFieldKeyDown = useCallback(
|
const handleFieldKeyDown = useCallback(
|
||||||
event => {
|
(event) => {
|
||||||
switch (event.key) {
|
switch (event.key) {
|
||||||
case 'Enter':
|
case 'Enter':
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
@ -10,7 +10,7 @@ const Tasks = React.memo(({ items }) => {
|
||||||
const [isOpened, toggleOpened] = useToggle();
|
const [isOpened, toggleOpened] = useToggle();
|
||||||
|
|
||||||
const handleToggleClick = useCallback(
|
const handleToggleClick = useCallback(
|
||||||
event => {
|
(event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
toggleOpened();
|
toggleOpened();
|
||||||
|
@ -18,7 +18,7 @@ const Tasks = React.memo(({ items }) => {
|
||||||
[toggleOpened],
|
[toggleOpened],
|
||||||
);
|
);
|
||||||
|
|
||||||
const completedItems = items.filter(item => item.isCompleted);
|
const completedItems = items.filter((item) => item.isCompleted);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -47,7 +47,7 @@ const Tasks = React.memo(({ items }) => {
|
||||||
</div>
|
</div>
|
||||||
{isOpened && (
|
{isOpened && (
|
||||||
<ul className={styles.tasks}>
|
<ul className={styles.tasks}>
|
||||||
{items.map(item => (
|
{items.map((item) => (
|
||||||
<li
|
<li
|
||||||
key={item.id}
|
key={item.id}
|
||||||
className={classNames(styles.task, item.isCompleted && styles.taskCompleted)}
|
className={classNames(styles.task, item.isCompleted && styles.taskCompleted)}
|
||||||
|
|
|
@ -30,7 +30,7 @@ const Actions = React.memo(
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleCommentDelete = useCallback(
|
const handleCommentDelete = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onCommentDelete(id);
|
onCommentDelete(id);
|
||||||
},
|
},
|
||||||
[onCommentDelete],
|
[onCommentDelete],
|
||||||
|
@ -51,7 +51,7 @@ const Actions = React.memo(
|
||||||
<div className={styles.moduleHeader}>{t('common.actions')}</div>
|
<div className={styles.moduleHeader}>{t('common.actions')}</div>
|
||||||
<div className={styles.wrapper}>
|
<div className={styles.wrapper}>
|
||||||
<Comment.Group>
|
<Comment.Group>
|
||||||
{items.map(item =>
|
{items.map((item) =>
|
||||||
item.type === ActionTypes.COMMENT_CARD ? (
|
item.type === ActionTypes.COMMENT_CARD ? (
|
||||||
<Item.Comment
|
<Item.Comment
|
||||||
key={item.id}
|
key={item.id}
|
||||||
|
@ -60,7 +60,7 @@ const Actions = React.memo(
|
||||||
isPersisted={item.isPersisted}
|
isPersisted={item.isPersisted}
|
||||||
user={item.user}
|
user={item.user}
|
||||||
isEditable={isEditable}
|
isEditable={isEditable}
|
||||||
onUpdate={data => handleCommentUpdate(item.id, data)}
|
onUpdate={(data) => handleCommentUpdate(item.id, data)}
|
||||||
onDelete={() => handleCommentDelete(item.id)}
|
onDelete={() => handleCommentDelete(item.id)}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
@ -35,7 +35,7 @@ const AddComment = React.memo(({ onCreate }) => {
|
||||||
}, [onCreate, data, setData]);
|
}, [onCreate, data, setData]);
|
||||||
|
|
||||||
const handleFieldKeyDown = useCallback(
|
const handleFieldKeyDown = useCallback(
|
||||||
event => {
|
(event) => {
|
||||||
if (event.ctrlKey && event.key === 'Enter') {
|
if (event.ctrlKey && event.key === 'Enter') {
|
||||||
submit();
|
submit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ const EditComment = React.forwardRef(({ children, defaultData, onUpdate }, ref)
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleFieldKeyDown = useCallback(
|
const handleFieldKeyDown = useCallback(
|
||||||
event => {
|
(event) => {
|
||||||
if (event.ctrlKey && event.key === 'Enter') {
|
if (event.ctrlKey && event.key === 'Enter') {
|
||||||
submit();
|
submit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ const CardModal = React.memo(
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
|
|
||||||
const handleNameUpdate = useCallback(
|
const handleNameUpdate = useCallback(
|
||||||
newName => {
|
(newName) => {
|
||||||
onUpdate({
|
onUpdate({
|
||||||
name: newName,
|
name: newName,
|
||||||
});
|
});
|
||||||
|
@ -67,7 +67,7 @@ const CardModal = React.memo(
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDescriptionUpdate = useCallback(
|
const handleDescriptionUpdate = useCallback(
|
||||||
newDescription => {
|
(newDescription) => {
|
||||||
onUpdate({
|
onUpdate({
|
||||||
description: newDescription,
|
description: newDescription,
|
||||||
});
|
});
|
||||||
|
@ -76,7 +76,7 @@ const CardModal = React.memo(
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDueDateUpdate = useCallback(
|
const handleDueDateUpdate = useCallback(
|
||||||
newDueDate => {
|
(newDueDate) => {
|
||||||
onUpdate({
|
onUpdate({
|
||||||
dueDate: newDueDate,
|
dueDate: newDueDate,
|
||||||
});
|
});
|
||||||
|
@ -85,7 +85,7 @@ const CardModal = React.memo(
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleTimerUpdate = useCallback(
|
const handleTimerUpdate = useCallback(
|
||||||
newTimer => {
|
(newTimer) => {
|
||||||
onUpdate({
|
onUpdate({
|
||||||
timer: newTimer,
|
timer: newTimer,
|
||||||
});
|
});
|
||||||
|
@ -99,8 +99,8 @@ const CardModal = React.memo(
|
||||||
});
|
});
|
||||||
}, [isSubscribed, onUpdate]);
|
}, [isSubscribed, onUpdate]);
|
||||||
|
|
||||||
const userIds = users.map(user => user.id);
|
const userIds = users.map((user) => user.id);
|
||||||
const labelIds = labels.map(label => label.id);
|
const labelIds = labels.map((label) => label.id);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal open closeIcon size="small" centered={false} onClose={onClose}>
|
<Modal open closeIcon size="small" centered={false} onClose={onClose}>
|
||||||
|
@ -126,7 +126,7 @@ const CardModal = React.memo(
|
||||||
context: 'title',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
{users.map(user => (
|
{users.map((user) => (
|
||||||
<span key={user.id} className={styles.attachment}>
|
<span key={user.id} className={styles.attachment}>
|
||||||
<ProjectMembershipsPopup
|
<ProjectMembershipsPopup
|
||||||
items={allProjectMemberships}
|
items={allProjectMemberships}
|
||||||
|
@ -160,7 +160,7 @@ const CardModal = React.memo(
|
||||||
context: 'title',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
{labels.map(label => (
|
{labels.map((label) => (
|
||||||
<span key={label.id} className={styles.attachment}>
|
<span key={label.id} className={styles.attachment}>
|
||||||
<LabelsPopup
|
<LabelsPopup
|
||||||
key={label.id}
|
key={label.id}
|
||||||
|
|
|
@ -51,7 +51,7 @@ const EditDescription = React.forwardRef(({ children, defaultValue, onUpdate },
|
||||||
}, [open]);
|
}, [open]);
|
||||||
|
|
||||||
const handleFieldKeyDown = useCallback(
|
const handleFieldKeyDown = useCallback(
|
||||||
event => {
|
(event) => {
|
||||||
if (event.ctrlKey && event.key === 'Enter') {
|
if (event.ctrlKey && event.key === 'Enter') {
|
||||||
submit();
|
submit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ const NameField = React.memo(({ defaultValue, onUpdate }) => {
|
||||||
isFocused.current = true;
|
isFocused.current = true;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleKeyDown = useCallback(event => {
|
const handleKeyDown = useCallback((event) => {
|
||||||
if (event.key === 'Enter') {
|
if (event.key === 'Enter') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ const Add = React.forwardRef(({ children, onCreate }, ref) => {
|
||||||
}, [open]);
|
}, [open]);
|
||||||
|
|
||||||
const handleFieldKeyDown = useCallback(
|
const handleFieldKeyDown = useCallback(
|
||||||
event => {
|
(event) => {
|
||||||
if (event.key === 'Enter') {
|
if (event.key === 'Enter') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ const EditName = React.forwardRef(({ children, defaultValue, onUpdate }, ref) =>
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleFieldKeyDown = useCallback(
|
const handleFieldKeyDown = useCallback(
|
||||||
event => {
|
(event) => {
|
||||||
if (event.key === 'Enter') {
|
if (event.key === 'Enter') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ const Item = React.memo(({ name, isCompleted, isPersisted, onUpdate, onDelete })
|
||||||
}, [isPersisted]);
|
}, [isPersisted]);
|
||||||
|
|
||||||
const handleNameUpdate = useCallback(
|
const handleNameUpdate = useCallback(
|
||||||
newName => {
|
(newName) => {
|
||||||
onUpdate({
|
onUpdate({
|
||||||
name: newName,
|
name: newName,
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,13 +19,13 @@ const Tasks = React.memo(({ items, onCreate, onUpdate, onDelete }) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDelete = useCallback(
|
const handleDelete = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onDelete(id);
|
onDelete(id);
|
||||||
},
|
},
|
||||||
[onDelete],
|
[onDelete],
|
||||||
);
|
);
|
||||||
|
|
||||||
const completedItems = items.filter(item => item.isCompleted);
|
const completedItems = items.filter((item) => item.isCompleted);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -39,13 +39,13 @@ const Tasks = React.memo(({ items, onCreate, onUpdate, onDelete }) => {
|
||||||
className={styles.progress}
|
className={styles.progress}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{items.map(item => (
|
{items.map((item) => (
|
||||||
<Item
|
<Item
|
||||||
key={item.id}
|
key={item.id}
|
||||||
name={item.name}
|
name={item.name}
|
||||||
isCompleted={item.isCompleted}
|
isCompleted={item.isCompleted}
|
||||||
isPersisted={item.isPersisted}
|
isPersisted={item.isPersisted}
|
||||||
onUpdate={data => handleUpdate(item.id, data)}
|
onUpdate={(data) => handleUpdate(item.id, data)}
|
||||||
onDelete={() => handleDelete(item.id)}
|
onDelete={() => handleDelete(item.id)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -47,8 +47,8 @@ const EditDueDateStep = React.memo(({ defaultValue, onUpdate, onBack, onClose })
|
||||||
}, [data.date, t]);
|
}, [data.date, t]);
|
||||||
|
|
||||||
const handleDatePickerChange = useCallback(
|
const handleDatePickerChange = useCallback(
|
||||||
date => {
|
(date) => {
|
||||||
setData(prevData => ({
|
setData((prevData) => ({
|
||||||
...prevData,
|
...prevData,
|
||||||
date: t('format:date', {
|
date: t('format:date', {
|
||||||
postProcess: 'formatDate',
|
postProcess: 'formatDate',
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { createTimer, getTimerParts, startTimer, stopTimer, updateTimer } from '
|
||||||
|
|
||||||
import styles from './EditTimerStep.module.css';
|
import styles from './EditTimerStep.module.css';
|
||||||
|
|
||||||
const createData = timer => {
|
const createData = (timer) => {
|
||||||
if (!timer) {
|
if (!timer) {
|
||||||
return {
|
return {
|
||||||
hours: '0',
|
hours: '0',
|
||||||
|
|
|
@ -16,7 +16,7 @@ const NotificationsStep = React.memo(({ items, onDelete, onClose }) => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
|
|
||||||
const handleDelete = useCallback(
|
const handleDelete = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onDelete(id);
|
onDelete(id);
|
||||||
},
|
},
|
||||||
[onDelete],
|
[onDelete],
|
||||||
|
@ -77,7 +77,7 @@ const NotificationsStep = React.memo(({ items, onDelete, onClose }) => {
|
||||||
<Popup.Header>{t('common.notifications')}</Popup.Header>
|
<Popup.Header>{t('common.notifications')}</Popup.Header>
|
||||||
<Popup.Content>
|
<Popup.Content>
|
||||||
{items.length > 0
|
{items.length > 0
|
||||||
? items.map(item => (
|
? items.map((item) => (
|
||||||
<div key={item.id} className={styles.wrapper}>
|
<div key={item.id} className={styles.wrapper}>
|
||||||
{item.card && item.action ? (
|
{item.card && item.action ? (
|
||||||
<>
|
<>
|
||||||
|
|
|
@ -27,7 +27,7 @@ const LabelsStep = React.memo(
|
||||||
}, [openStep]);
|
}, [openStep]);
|
||||||
|
|
||||||
const handleEdit = useCallback(
|
const handleEdit = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
openStep(StepTypes.EDIT, {
|
openStep(StepTypes.EDIT, {
|
||||||
id,
|
id,
|
||||||
});
|
});
|
||||||
|
@ -36,14 +36,14 @@ const LabelsStep = React.memo(
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleSelect = useCallback(
|
const handleSelect = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onSelect(id);
|
onSelect(id);
|
||||||
},
|
},
|
||||||
[onSelect],
|
[onSelect],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDeselect = useCallback(
|
const handleDeselect = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onDeselect(id);
|
onDeselect(id);
|
||||||
},
|
},
|
||||||
[onDeselect],
|
[onDeselect],
|
||||||
|
@ -57,7 +57,7 @@ const LabelsStep = React.memo(
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDelete = useCallback(
|
const handleDelete = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onDelete(id);
|
onDelete(id);
|
||||||
},
|
},
|
||||||
[onDelete],
|
[onDelete],
|
||||||
|
@ -68,13 +68,13 @@ const LabelsStep = React.memo(
|
||||||
case StepTypes.ADD:
|
case StepTypes.ADD:
|
||||||
return <AddStep onCreate={onCreate} onBack={handleBack} />;
|
return <AddStep onCreate={onCreate} onBack={handleBack} />;
|
||||||
case StepTypes.EDIT: {
|
case StepTypes.EDIT: {
|
||||||
const currentItem = items.find(item => item.id === step.params.id);
|
const currentItem = items.find((item) => item.id === step.params.id);
|
||||||
|
|
||||||
if (currentItem) {
|
if (currentItem) {
|
||||||
return (
|
return (
|
||||||
<EditStep
|
<EditStep
|
||||||
defaultData={pick(currentItem, ['name', 'color'])}
|
defaultData={pick(currentItem, ['name', 'color'])}
|
||||||
onUpdate={data => handleUpdate(currentItem.id, data)}
|
onUpdate={(data) => handleUpdate(currentItem.id, data)}
|
||||||
onDelete={() => handleDelete(currentItem.id)}
|
onDelete={() => handleDelete(currentItem.id)}
|
||||||
onBack={handleBack}
|
onBack={handleBack}
|
||||||
/>
|
/>
|
||||||
|
@ -93,7 +93,7 @@ const LabelsStep = React.memo(
|
||||||
<>
|
<>
|
||||||
<Popup.Header onBack={onBack}>{t(title)}</Popup.Header>
|
<Popup.Header onBack={onBack}>{t(title)}</Popup.Header>
|
||||||
<Popup.Content>
|
<Popup.Content>
|
||||||
{items.map(item => (
|
{items.map((item) => (
|
||||||
<Item
|
<Item
|
||||||
key={item.id}
|
key={item.id}
|
||||||
name={item.name}
|
name={item.name}
|
||||||
|
|
|
@ -60,7 +60,7 @@ const AddCard = React.forwardRef(({ children, onCreate }, ref) => {
|
||||||
}, [open]);
|
}, [open]);
|
||||||
|
|
||||||
const handleFieldKeyDown = useCallback(
|
const handleFieldKeyDown = useCallback(
|
||||||
event => {
|
(event) => {
|
||||||
switch (event.key) {
|
switch (event.key) {
|
||||||
case 'Enter':
|
case 'Enter':
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
@ -42,12 +42,12 @@ const EditName = React.forwardRef(({ children, defaultValue, onUpdate }, ref) =>
|
||||||
[open, close],
|
[open, close],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleFieldClick = useCallback(event => {
|
const handleFieldClick = useCallback((event) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleFieldKeyDown = useCallback(
|
const handleFieldKeyDown = useCallback(
|
||||||
event => {
|
(event) => {
|
||||||
switch (event.key) {
|
switch (event.key) {
|
||||||
case 'Enter':
|
case 'Enter':
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
@ -28,7 +28,7 @@ const List = React.memo(
|
||||||
}, [isPersisted]);
|
}, [isPersisted]);
|
||||||
|
|
||||||
const handleNameUpdate = useCallback(
|
const handleNameUpdate = useCallback(
|
||||||
newName => {
|
(newName) => {
|
||||||
onUpdate({
|
onUpdate({
|
||||||
name: newName,
|
name: newName,
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { useForm } from '../../hooks';
|
||||||
|
|
||||||
import styles from './Login.module.css';
|
import styles from './Login.module.css';
|
||||||
|
|
||||||
const createMessage = error => {
|
const createMessage = (error) => {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ const Login = React.memo(
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'Password is not valid':
|
case 'Password is not valid':
|
||||||
setData(prevData => ({
|
setData((prevData) => ({
|
||||||
...prevData,
|
...prevData,
|
||||||
password: '',
|
password: '',
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -12,7 +12,7 @@ const AddMembershipStep = React.memo(({ users, currentUserIds, onCreate, onClose
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
|
|
||||||
const handleUserSelect = useCallback(
|
const handleUserSelect = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onCreate({
|
onCreate({
|
||||||
userId: id,
|
userId: id,
|
||||||
});
|
});
|
||||||
|
@ -31,7 +31,7 @@ const AddMembershipStep = React.memo(({ users, currentUserIds, onCreate, onClose
|
||||||
</Popup.Header>
|
</Popup.Header>
|
||||||
<Popup.Content>
|
<Popup.Content>
|
||||||
<div className={styles.menu}>
|
<div className={styles.menu}>
|
||||||
{users.map(user => (
|
{users.map((user) => (
|
||||||
<UserItem
|
<UserItem
|
||||||
key={user.id}
|
key={user.id}
|
||||||
name={user.name}
|
name={user.name}
|
||||||
|
|
|
@ -22,7 +22,7 @@ const Project = React.memo(
|
||||||
onMembershipDelete,
|
onMembershipDelete,
|
||||||
}) => {
|
}) => {
|
||||||
const handleMembershipDelete = useCallback(
|
const handleMembershipDelete = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onMembershipDelete(id);
|
onMembershipDelete(id);
|
||||||
},
|
},
|
||||||
[onMembershipDelete],
|
[onMembershipDelete],
|
||||||
|
@ -47,7 +47,7 @@ const Project = React.memo(
|
||||||
<span className={styles.name}>{name}</span>
|
<span className={styles.name}>{name}</span>
|
||||||
)}
|
)}
|
||||||
<span className={styles.users}>
|
<span className={styles.users}>
|
||||||
{memberships.map(membership => (
|
{memberships.map((membership) => (
|
||||||
<span key={membership.id} className={styles.user}>
|
<span key={membership.id} className={styles.user}>
|
||||||
<EditMembershipPopup
|
<EditMembershipPopup
|
||||||
user={membership.user}
|
user={membership.user}
|
||||||
|
@ -67,7 +67,7 @@ const Project = React.memo(
|
||||||
{isEditable && (
|
{isEditable && (
|
||||||
<AddMembershipPopup
|
<AddMembershipPopup
|
||||||
users={allUsers}
|
users={allUsers}
|
||||||
currentUserIds={memberships.map(membership => membership.user.id)}
|
currentUserIds={memberships.map((membership) => membership.user.id)}
|
||||||
onCreate={onMembershipCreate}
|
onCreate={onMembershipCreate}
|
||||||
>
|
>
|
||||||
<Button icon="add user" className={styles.addUser} />
|
<Button icon="add user" className={styles.addUser} />
|
||||||
|
|
|
@ -13,14 +13,14 @@ const ProjectMembershipsStep = React.memo(
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
|
|
||||||
const handleUserSelect = useCallback(
|
const handleUserSelect = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onUserSelect(id);
|
onUserSelect(id);
|
||||||
},
|
},
|
||||||
[onUserSelect],
|
[onUserSelect],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleUserDeselect = useCallback(
|
const handleUserDeselect = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onUserDeselect(id);
|
onUserDeselect(id);
|
||||||
},
|
},
|
||||||
[onUserDeselect],
|
[onUserDeselect],
|
||||||
|
@ -31,7 +31,7 @@ const ProjectMembershipsStep = React.memo(
|
||||||
<Popup.Header onBack={onBack}>{t(title)}</Popup.Header>
|
<Popup.Header onBack={onBack}>{t(title)}</Popup.Header>
|
||||||
<Popup.Content>
|
<Popup.Content>
|
||||||
<Menu secondary vertical className={styles.menu}>
|
<Menu secondary vertical className={styles.menu}>
|
||||||
{items.map(item => (
|
{items.map((item) => (
|
||||||
<Item
|
<Item
|
||||||
key={item.id}
|
key={item.id}
|
||||||
isPersisted={item.isPersisted}
|
isPersisted={item.isPersisted}
|
||||||
|
|
|
@ -19,7 +19,7 @@ const Projects = React.memo(({ items, currentId, isEditable, onAdd }) => {
|
||||||
return (
|
return (
|
||||||
<Container className={styles.cardsWrapper}>
|
<Container className={styles.cardsWrapper}>
|
||||||
<Grid className={styles.gridFix}>
|
<Grid className={styles.gridFix}>
|
||||||
{items.map(item => (
|
{items.map((item) => (
|
||||||
<Grid.Column key={item.id} mobile={8} computer={4}>
|
<Grid.Column key={item.id} mobile={8} computer={4}>
|
||||||
<Link
|
<Link
|
||||||
to={
|
to={
|
||||||
|
|
|
@ -55,7 +55,7 @@ const COLORS = [
|
||||||
'#2c3e50', // Midnight blue
|
'#2c3e50', // Midnight blue
|
||||||
];
|
];
|
||||||
|
|
||||||
const getColor = name => {
|
const getColor = (name) => {
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
for (let i = 0; i < name.length; i += 1) {
|
for (let i = 0; i < name.length; i += 1) {
|
||||||
sum += name.charCodeAt(i);
|
sum += name.charCodeAt(i);
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { useForm } from '../../hooks';
|
||||||
|
|
||||||
import styles from './EditNameStep.module.css';
|
import styles from './EditNameStep.module.css';
|
||||||
|
|
||||||
const createMessage = error => {
|
const createMessage = (error) => {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ const EditEmailStep = React.memo(
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'Current password is not valid':
|
case 'Current password is not valid':
|
||||||
setData(prevData => ({
|
setData((prevData) => ({
|
||||||
...prevData,
|
...prevData,
|
||||||
currentPassword: '',
|
currentPassword: '',
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { useForm } from '../../hooks';
|
||||||
|
|
||||||
import styles from './EditNameStep.module.css';
|
import styles from './EditNameStep.module.css';
|
||||||
|
|
||||||
const createMessage = error => {
|
const createMessage = (error) => {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ const EditPasswordStep = React.memo(
|
||||||
if (!error) {
|
if (!error) {
|
||||||
onClose();
|
onClose();
|
||||||
} else if (error.message === 'Current password is not valid') {
|
} else if (error.message === 'Current password is not valid') {
|
||||||
setData(prevData => ({
|
setData((prevData) => ({
|
||||||
...prevData,
|
...prevData,
|
||||||
currentPassword: '',
|
currentPassword: '',
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -57,7 +57,7 @@ const UserStep = React.memo(
|
||||||
}, [openStep]);
|
}, [openStep]);
|
||||||
|
|
||||||
const handleNameUpdate = useCallback(
|
const handleNameUpdate = useCallback(
|
||||||
newName => {
|
(newName) => {
|
||||||
onUpdate({
|
onUpdate({
|
||||||
name: newName,
|
name: newName,
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,7 +17,7 @@ const UsersModal = React.memo(({ items, onUpdate, onDelete, onClose }) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDelete = useCallback(
|
const handleDelete = useCallback(
|
||||||
id => {
|
(id) => {
|
||||||
onDelete(id);
|
onDelete(id);
|
||||||
},
|
},
|
||||||
[onDelete],
|
[onDelete],
|
||||||
|
@ -41,13 +41,13 @@ const UsersModal = React.memo(({ items, onUpdate, onDelete, onClose }) => {
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
</Table.Header>
|
</Table.Header>
|
||||||
<Table.Body>
|
<Table.Body>
|
||||||
{items.map(item => (
|
{items.map((item) => (
|
||||||
<Item
|
<Item
|
||||||
key={item.id}
|
key={item.id}
|
||||||
name={item.name}
|
name={item.name}
|
||||||
email={item.email}
|
email={item.email}
|
||||||
isAdmin={item.isAdmin}
|
isAdmin={item.isAdmin}
|
||||||
onUpdate={data => handleUpdate(item.id, data)}
|
onUpdate={(data) => handleUpdate(item.id, data)}
|
||||||
onDelete={() => handleDelete(item.id)}
|
onDelete={() => handleDelete(item.id)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -13,7 +13,7 @@ const PAIRS = [
|
||||||
['black', '#355263'],
|
['black', '#355263'],
|
||||||
];
|
];
|
||||||
|
|
||||||
const KEYS = PAIRS.map(pair => pair[0]);
|
const KEYS = PAIRS.map((pair) => pair[0]);
|
||||||
|
|
||||||
const MAP = fromPairs(PAIRS);
|
const MAP = fromPairs(PAIRS);
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ const mapStateToProps = ({ projectCreateForm: { data: defaultData, isSubmitting
|
||||||
isSubmitting,
|
isSubmitting,
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch =>
|
const mapDispatchToProps = (dispatch) =>
|
||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onCreate: createProject,
|
onCreate: createProject,
|
||||||
|
|
|
@ -10,7 +10,7 @@ const mapStateToProps = ({ userCreateForm: { data: defaultData, isSubmitting, er
|
||||||
error,
|
error,
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch =>
|
const mapDispatchToProps = (dispatch) =>
|
||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onCreate: createUser,
|
onCreate: createUser,
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { currentModalSelector } from '../selectors';
|
||||||
import ModalTypes from '../constants/ModalTypes';
|
import ModalTypes from '../constants/ModalTypes';
|
||||||
import App from '../components/App';
|
import App from '../components/App';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state) => {
|
||||||
const currentModal = currentModalSelector(state);
|
const currentModal = currentModalSelector(state);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { connect } from 'react-redux';
|
||||||
import { isAppInitializingSelector } from '../selectors';
|
import { isAppInitializingSelector } from '../selectors';
|
||||||
import AppWrapper from '../components/AppWrapper';
|
import AppWrapper from '../components/AppWrapper';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state) => {
|
||||||
const isAppInitializing = isAppInitializingSelector(state);
|
const isAppInitializing = isAppInitializingSelector(state);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -23,7 +23,7 @@ import {
|
||||||
} from '../actions/entry';
|
} from '../actions/entry';
|
||||||
import Board from '../components/Board';
|
import Board from '../components/Board';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state) => {
|
||||||
const { cardId } = pathSelector(state);
|
const { cardId } = pathSelector(state);
|
||||||
const allProjectMemberships = membershipsForCurrentProjectSelector(state);
|
const allProjectMemberships = membershipsForCurrentProjectSelector(state);
|
||||||
const listIds = listIdsForCurrentBoardSelector(state);
|
const listIds = listIdsForCurrentBoardSelector(state);
|
||||||
|
@ -41,7 +41,7 @@ const mapStateToProps = state => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch =>
|
const mapDispatchToProps = (dispatch) =>
|
||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onListCreate: createListInCurrentBoard,
|
onListCreate: createListInCurrentBoard,
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { connect } from 'react-redux';
|
||||||
import { currentBoardSelector } from '../selectors';
|
import { currentBoardSelector } from '../selectors';
|
||||||
import BoardWrapper from '../components/BoardWrapper';
|
import BoardWrapper from '../components/BoardWrapper';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state) => {
|
||||||
const { isFetching } = currentBoardSelector(state);
|
const { isFetching } = currentBoardSelector(state);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { boardsForCurrentProjectSelector, currentUserSelector, pathSelector } fr
|
||||||
import { createBoardInCurrentProject, deleteBoard, moveBoard, updateBoard } from '../actions/entry';
|
import { createBoardInCurrentProject, deleteBoard, moveBoard, updateBoard } from '../actions/entry';
|
||||||
import Boards from '../components/Boards';
|
import Boards from '../components/Boards';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state) => {
|
||||||
const { boardId } = pathSelector(state);
|
const { boardId } = pathSelector(state);
|
||||||
const { isAdmin } = currentUserSelector(state);
|
const { isAdmin } = currentUserSelector(state);
|
||||||
const boards = boardsForCurrentProjectSelector(state);
|
const boards = boardsForCurrentProjectSelector(state);
|
||||||
|
@ -17,7 +17,7 @@ const mapStateToProps = state => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch =>
|
const mapDispatchToProps = (dispatch) =>
|
||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onCreate: createBoardInCurrentProject,
|
onCreate: createBoardInCurrentProject,
|
||||||
|
|
|
@ -61,15 +61,15 @@ const makeMapStateToProps = () => {
|
||||||
const mapDispatchToProps = (dispatch, { id }) =>
|
const mapDispatchToProps = (dispatch, { id }) =>
|
||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onUpdate: data => updateCard(id, data),
|
onUpdate: (data) => updateCard(id, data),
|
||||||
onDelete: () => deleteCard(id),
|
onDelete: () => deleteCard(id),
|
||||||
onUserAdd: userId => addUserToCard(userId, id),
|
onUserAdd: (userId) => addUserToCard(userId, id),
|
||||||
onUserRemove: userId => removeUserFromCard(userId, id),
|
onUserRemove: (userId) => removeUserFromCard(userId, id),
|
||||||
onLabelAdd: labelId => addLabelToCard(labelId, id),
|
onLabelAdd: (labelId) => addLabelToCard(labelId, id),
|
||||||
onLabelRemove: labelId => removeLabelFromCard(labelId, id),
|
onLabelRemove: (labelId) => removeLabelFromCard(labelId, id),
|
||||||
onLabelCreate: data => createLabelInCurrentBoard(data),
|
onLabelCreate: (data) => createLabelInCurrentBoard(data),
|
||||||
onLabelUpdate: (labelId, data) => updateLabel(labelId, data),
|
onLabelUpdate: (labelId, data) => updateLabel(labelId, data),
|
||||||
onLabelDelete: labelId => deleteLabel(labelId),
|
onLabelDelete: (labelId) => deleteLabel(labelId),
|
||||||
},
|
},
|
||||||
dispatch,
|
dispatch,
|
||||||
);
|
);
|
||||||
|
|
|
@ -34,7 +34,7 @@ import {
|
||||||
import Paths from '../constants/Paths';
|
import Paths from '../constants/Paths';
|
||||||
import CardModal from '../components/CardModal';
|
import CardModal from '../components/CardModal';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state) => {
|
||||||
const { isAdmin } = currentUserSelector(state);
|
const { isAdmin } = currentUserSelector(state);
|
||||||
const allProjectMemberships = membershipsForCurrentProjectSelector(state);
|
const allProjectMemberships = membershipsForCurrentProjectSelector(state);
|
||||||
const allLabels = labelsForCurrentBoardSelector(state);
|
const allLabels = labelsForCurrentBoardSelector(state);
|
||||||
|
@ -74,7 +74,7 @@ const mapStateToProps = state => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch =>
|
const mapDispatchToProps = (dispatch) =>
|
||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onUpdate: updateCurrentCard,
|
onUpdate: updateCurrentCard,
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
} from '../actions/entry';
|
} from '../actions/entry';
|
||||||
import Header from '../components/Header';
|
import Header from '../components/Header';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state) => {
|
||||||
const currentUser = currentUserSelector(state);
|
const currentUser = currentUserSelector(state);
|
||||||
const notifications = notificationsForCurrentUserSelector(state);
|
const notifications = notificationsForCurrentUserSelector(state);
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ const mapStateToProps = state => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch =>
|
const mapDispatchToProps = (dispatch) =>
|
||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onUsers: openUsersModal, // TODO: rename
|
onUsers: openUsersModal, // TODO: rename
|
||||||
|
|
|
@ -26,9 +26,9 @@ const makeMapStateToProps = () => {
|
||||||
const mapDispatchToProps = (dispatch, { id }) =>
|
const mapDispatchToProps = (dispatch, { id }) =>
|
||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onUpdate: data => updateList(id, data),
|
onUpdate: (data) => updateList(id, data),
|
||||||
onDelete: () => deleteList(id),
|
onDelete: () => deleteList(id),
|
||||||
onCardCreate: data => createCard(id, data),
|
onCardCreate: (data) => createCard(id, data),
|
||||||
},
|
},
|
||||||
dispatch,
|
dispatch,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ const mapStateToProps = ({ authenticateForm: { data: defaultData, isSubmitting,
|
||||||
error,
|
error,
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch =>
|
const mapDispatchToProps = (dispatch) =>
|
||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onAuthenticate: authenticate,
|
onAuthenticate: authenticate,
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
} from '../actions/entry';
|
} from '../actions/entry';
|
||||||
import Project from '../components/Project';
|
import Project from '../components/Project';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state) => {
|
||||||
const allUsers = allUsersSelector(state);
|
const allUsers = allUsersSelector(state);
|
||||||
const { isAdmin } = currentUserSelector(state);
|
const { isAdmin } = currentUserSelector(state);
|
||||||
const { name } = currentProjectSelector(state);
|
const { name } = currentProjectSelector(state);
|
||||||
|
@ -29,7 +29,7 @@ const mapStateToProps = state => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch =>
|
const mapDispatchToProps = (dispatch) =>
|
||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onUpdate: updateCurrentProject,
|
onUpdate: updateCurrentProject,
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { connect } from 'react-redux';
|
||||||
import { pathSelector } from '../selectors';
|
import { pathSelector } from '../selectors';
|
||||||
import ProjectWrapper from '../components/ProjectWrapper';
|
import ProjectWrapper from '../components/ProjectWrapper';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state) => {
|
||||||
const { cardId, boardId, projectId } = pathSelector(state);
|
const { cardId, boardId, projectId } = pathSelector(state);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { currentUserSelector, pathSelector, projectsForCurrentUserSelector } fro
|
||||||
import { openAddProjectModal } from '../actions/entry';
|
import { openAddProjectModal } from '../actions/entry';
|
||||||
import Projects from '../components/Projects';
|
import Projects from '../components/Projects';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state) => {
|
||||||
const { projectId } = pathSelector(state);
|
const { projectId } = pathSelector(state);
|
||||||
const { isAdmin } = currentUserSelector(state);
|
const { isAdmin } = currentUserSelector(state);
|
||||||
const projects = projectsForCurrentUserSelector(state);
|
const projects = projectsForCurrentUserSelector(state);
|
||||||
|
@ -17,7 +17,7 @@ const mapStateToProps = state => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch =>
|
const mapDispatchToProps = (dispatch) =>
|
||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onAdd: openAddProjectModal,
|
onAdd: openAddProjectModal,
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { allUsersExceptCurrentSelector } from '../selectors';
|
||||||
import { closeModal, deleteUser, updateUser } from '../actions/entry';
|
import { closeModal, deleteUser, updateUser } from '../actions/entry';
|
||||||
import UsersModal from '../components/UsersModal';
|
import UsersModal from '../components/UsersModal';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = (state) => {
|
||||||
const items = allUsersExceptCurrentSelector(state);
|
const items = allUsersExceptCurrentSelector(state);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -13,7 +13,7 @@ const mapStateToProps = state => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch =>
|
const mapDispatchToProps = (dispatch) =>
|
||||||
bindActionCreators(
|
bindActionCreators(
|
||||||
{
|
{
|
||||||
onUpdate: updateUser,
|
onUpdate: updateUser,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
export default initialValue => {
|
export default (initialValue) => {
|
||||||
const [value, setValue] = useState(initialValue);
|
const [value, setValue] = useState(initialValue);
|
||||||
|
|
||||||
const handleChange = useCallback((_, { value: nextValue }) => {
|
const handleChange = useCallback((_, { value: nextValue }) => {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
export default initialData => {
|
export default (initialData) => {
|
||||||
const [data, setData] = useState(initialData);
|
const [data, setData] = useState(initialData);
|
||||||
|
|
||||||
const handleFieldChange = useCallback((_, { name: fieldName, value }) => {
|
const handleFieldChange = useCallback((_, { name: fieldName, value }) => {
|
||||||
setData(prevData => ({
|
setData((prevData) => ({
|
||||||
...prevData,
|
...prevData,
|
||||||
[fieldName]: value,
|
[fieldName]: value,
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -75,11 +75,11 @@ i18n
|
||||||
debug: process.env.NODE_ENV !== 'production',
|
debug: process.env.NODE_ENV !== 'production',
|
||||||
});
|
});
|
||||||
|
|
||||||
i18n.loadAppLocale = language =>
|
i18n.loadAppLocale = (language) =>
|
||||||
import(`./locales/${language}/app`).then(module => {
|
import(`./locales/${language}/app`).then((module) => {
|
||||||
const locale = module.default;
|
const locale = module.default;
|
||||||
|
|
||||||
Object.keys(locale).forEach(namespace => {
|
Object.keys(locale).forEach((namespace) => {
|
||||||
if (namespace === 'dateFns') {
|
if (namespace === 'dateFns') {
|
||||||
i18n.dateFns.addLocale(language, locale[namespace]);
|
i18n.dateFns.addLocale(language, locale[namespace]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -90,7 +90,7 @@ i18n.loadAppLocale = language =>
|
||||||
|
|
||||||
setDefaultLocale(i18n.language);
|
setDefaultLocale(i18n.language);
|
||||||
|
|
||||||
i18n.on('languageChanged', language => {
|
i18n.on('languageChanged', (language) => {
|
||||||
setDefaultLocale(language);
|
setDefaultLocale(language);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ const DragScroller = React.memo(({ children, ...props }) => {
|
||||||
const prevPosition = useRef(null);
|
const prevPosition = useRef(null);
|
||||||
|
|
||||||
const handleMouseDown = useCallback(
|
const handleMouseDown = useCallback(
|
||||||
event => {
|
(event) => {
|
||||||
if (event.target !== wrapper.current && !event.target.dataset.dragScroller) {
|
if (event.target !== wrapper.current && !event.target.dataset.dragScroller) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ const DragScroller = React.memo(({ children, ...props }) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleWindowMouseMove = useCallback(
|
const handleWindowMouseMove = useCallback(
|
||||||
event => {
|
(event) => {
|
||||||
if (!prevPosition.current) {
|
if (!prevPosition.current) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
||||||
import ReactMarkdown from 'react-markdown';
|
import ReactMarkdown from 'react-markdown';
|
||||||
|
|
||||||
const Markdown = React.memo(({ linkStopPropagation, ...props }) => {
|
const Markdown = React.memo(({ linkStopPropagation, ...props }) => {
|
||||||
const handleLinkClick = useCallback(event => {
|
const handleLinkClick = useCallback((event) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ const Markdown = React.memo(({ linkStopPropagation, ...props }) => {
|
||||||
jsx-a11y/click-events-have-key-events,
|
jsx-a11y/click-events-have-key-events,
|
||||||
jsx-a11y/no-static-element-interactions,
|
jsx-a11y/no-static-element-interactions,
|
||||||
react/jsx-props-no-spreading */
|
react/jsx-props-no-spreading */
|
||||||
linkProps => <a {...linkProps} onClick={handleLinkClick} />,
|
(linkProps) => <a {...linkProps} onClick={handleLinkClick} />,
|
||||||
/* eslint-enable jsx-a11y/anchor-has-content,
|
/* eslint-enable jsx-a11y/anchor-has-content,
|
||||||
jsx-a11y/click-events-have-key-events,
|
jsx-a11y/click-events-have-key-events,
|
||||||
jsx-a11y/no-static-element-interactions,
|
jsx-a11y/no-static-element-interactions,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { useEffect, useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
|
|
||||||
export default value => {
|
export default (value) => {
|
||||||
const prevValue = useRef();
|
const prevValue = useRef();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue