Add file attachments

This commit is contained in:
Maksim Eltyshev
2020-04-21 05:04:34 +05:00
parent 202abacaec
commit 6a68ec9c1e
103 changed files with 1847 additions and 305 deletions

View File

@@ -5,6 +5,7 @@ import omit from 'lodash/omit';
import {
actionsForCurrentCardSelector,
attachmentsForCurrentCardSelector,
currentCardSelector,
currentUserSelector,
labelsForCurrentBoardSelector,
@@ -16,9 +17,11 @@ import {
import {
addLabelToCurrentCard,
addUserToCurrentCard,
createAttachmentInCurrentCard,
createCommentActionInCurrentCard,
createLabelInCurrentBoard,
createTaskInCurrentCard,
deleteAttachment,
deleteCommentAction,
deleteCurrentCard,
deleteLabel,
@@ -26,6 +29,7 @@ import {
fetchActionsInCurrentCard,
removeLabelFromCurrentCard,
removeUserFromCurrentCard,
updateAttachment,
updateCommentAction,
updateCurrentCard,
updateLabel,
@@ -53,6 +57,7 @@ const mapStateToProps = (state) => {
const users = usersForCurrentCardSelector(state);
const labels = labelsForCurrentCardSelector(state);
const tasks = tasksForCurrentCardSelector(state);
const attachments = attachmentsForCurrentCardSelector(state);
const actions = actionsForCurrentCardSelector(state);
return {
@@ -66,6 +71,7 @@ const mapStateToProps = (state) => {
users,
labels,
tasks,
attachments,
actions,
allProjectMemberships,
allLabels,
@@ -89,6 +95,9 @@ const mapDispatchToProps = (dispatch) =>
onTaskCreate: createTaskInCurrentCard,
onTaskUpdate: updateTask,
onTaskDelete: deleteTask,
onAttachmentCreate: createAttachmentInCurrentCard,
onAttachmentUpdate: updateAttachment,
onAttachmentDelete: deleteAttachment,
onActionsFetch: fetchActionsInCurrentCard,
onCommentActionCreate: createCommentActionInCurrentCard,
onCommentActionUpdate: updateCommentAction,

View File

@@ -8,10 +8,10 @@ import {
clearCurrentUserUsernameUpdateError,
closeModal,
updateCurrentUser,
updateCurrentUserAvatar,
updateCurrentUserEmail,
updateCurrentUserPassword,
updateCurrentUserUsername,
uploadCurrentUserAvatar,
} from '../actions/entry';
import UserSettingsModal from '../components/UserSettingsModal';
@@ -20,11 +20,11 @@ const mapStateToProps = (state) => {
email,
name,
username,
avatar,
avatarUrl,
phone,
organization,
subscribeToOwnCards,
isAvatarUploading,
isAvatarUpdating,
emailUpdateForm,
passwordUpdateForm,
usernameUpdateForm,
@@ -34,11 +34,11 @@ const mapStateToProps = (state) => {
email,
name,
username,
avatar,
avatarUrl,
phone,
organization,
subscribeToOwnCards,
isAvatarUploading,
isAvatarUpdating,
emailUpdateForm,
passwordUpdateForm,
usernameUpdateForm,
@@ -49,7 +49,7 @@ const mapDispatchToProps = (dispatch) =>
bindActionCreators(
{
onUpdate: updateCurrentUser,
onAvatarUpload: uploadCurrentUserAvatar,
onAvatarUpdate: updateCurrentUserAvatar,
onUsernameUpdate: updateCurrentUserUsername,
onUsernameUpdateMessageDismiss: clearCurrentUserUsernameUpdateError,
onEmailUpdate: updateCurrentUserEmail,