mirror of
https://github.com/plankanban/planka.git
synced 2025-07-24 15:49:46 +02:00
Code formatting with prettier, change eslint config for the server
This commit is contained in:
parent
bc87c1d883
commit
7a3805e64c
191 changed files with 4321 additions and 2880 deletions
|
@ -42,11 +42,7 @@ const Projects = React.memo(({
|
|||
))}
|
||||
{isEditable && (
|
||||
<Grid.Column mobile={8} computer={4}>
|
||||
<button
|
||||
type="button"
|
||||
className={classNames(styles.card, styles.add)}
|
||||
onClick={onAdd}
|
||||
>
|
||||
<button type="button" className={classNames(styles.card, styles.add)} onClick={onAdd}>
|
||||
<div className={styles.addTitleWrapper}>
|
||||
<div className={styles.addTitle}>
|
||||
<PlusIcon className={styles.addGridIcon} />
|
||||
|
|
|
@ -37,135 +37,137 @@ const createMessage = (error) => {
|
|||
}
|
||||
};
|
||||
|
||||
const EditEmailStep = React.memo(({
|
||||
defaultData, email, isSubmitting, error, onUpdate, onMessageDismiss, onBack, onClose,
|
||||
}) => {
|
||||
const [t] = useTranslation();
|
||||
const wasSubmitting = usePrevious(isSubmitting);
|
||||
const EditEmailStep = React.memo(
|
||||
({
|
||||
defaultData, email, isSubmitting, error, onUpdate, onMessageDismiss, onBack, onClose,
|
||||
}) => {
|
||||
const [t] = useTranslation();
|
||||
const wasSubmitting = usePrevious(isSubmitting);
|
||||
|
||||
const [data, handleFieldChange, setData] = useForm({
|
||||
email: '',
|
||||
currentPassword: '',
|
||||
...defaultData,
|
||||
});
|
||||
const [data, handleFieldChange, setData] = useForm({
|
||||
email: '',
|
||||
currentPassword: '',
|
||||
...defaultData,
|
||||
});
|
||||
|
||||
const message = useMemo(() => createMessage(error), [error]);
|
||||
const [focusCurrentPasswordFieldState, focusCurrentPasswordField] = useToggle();
|
||||
const message = useMemo(() => createMessage(error), [error]);
|
||||
const [focusCurrentPasswordFieldState, focusCurrentPasswordField] = useToggle();
|
||||
|
||||
const emailField = useRef(null);
|
||||
const currentPasswordField = useRef(null);
|
||||
const emailField = useRef(null);
|
||||
const currentPasswordField = useRef(null);
|
||||
|
||||
const handleSubmit = useCallback(() => {
|
||||
const cleanData = {
|
||||
...data,
|
||||
email: data.email.trim(),
|
||||
};
|
||||
const handleSubmit = useCallback(() => {
|
||||
const cleanData = {
|
||||
...data,
|
||||
email: data.email.trim(),
|
||||
};
|
||||
|
||||
if (!isEmail(cleanData.email)) {
|
||||
emailField.current.select();
|
||||
return;
|
||||
}
|
||||
|
||||
if (cleanData.email === email) {
|
||||
onClose();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cleanData.currentPassword) {
|
||||
currentPasswordField.current.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
onUpdate(cleanData);
|
||||
}, [email, onUpdate, onClose, data]);
|
||||
|
||||
useEffect(() => {
|
||||
emailField.current.select();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (wasSubmitting && !isSubmitting) {
|
||||
if (error) {
|
||||
switch (error.message) {
|
||||
case 'User is already exist':
|
||||
emailField.current.select();
|
||||
|
||||
break;
|
||||
case 'Current password is not valid':
|
||||
setData((prevData) => ({
|
||||
...prevData,
|
||||
currentPassword: '',
|
||||
}));
|
||||
focusCurrentPasswordField();
|
||||
|
||||
break;
|
||||
default:
|
||||
}
|
||||
} else {
|
||||
onClose();
|
||||
if (!isEmail(cleanData.email)) {
|
||||
emailField.current.select();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}, [isSubmitting, wasSubmitting, error, onClose, setData, focusCurrentPasswordField]);
|
||||
|
||||
useDidUpdate(() => {
|
||||
currentPasswordField.current.focus();
|
||||
}, [focusCurrentPasswordFieldState]);
|
||||
if (cleanData.email === email) {
|
||||
onClose();
|
||||
return;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Popup.Header onBack={onBack}>
|
||||
{t('common.editEmail', {
|
||||
context: 'title',
|
||||
})}
|
||||
</Popup.Header>
|
||||
<Popup.Content>
|
||||
{message && (
|
||||
<Message
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
{...{
|
||||
[message.type]: true,
|
||||
}}
|
||||
visible
|
||||
content={t(message.content)}
|
||||
onDismiss={onMessageDismiss}
|
||||
/>
|
||||
)}
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<div className={styles.text}>{t('common.newEmail')}</div>
|
||||
<Input
|
||||
fluid
|
||||
ref={emailField}
|
||||
name="email"
|
||||
value={data.email}
|
||||
placeholder={email}
|
||||
className={styles.field}
|
||||
onChange={handleFieldChange}
|
||||
/>
|
||||
{data.email.trim() !== email && (
|
||||
<>
|
||||
<div className={styles.text}>{t('common.currentPassword')}</div>
|
||||
<Input
|
||||
fluid
|
||||
ref={currentPasswordField}
|
||||
type="password"
|
||||
name="currentPassword"
|
||||
value={data.currentPassword}
|
||||
className={styles.field}
|
||||
onChange={handleFieldChange}
|
||||
/>
|
||||
</>
|
||||
if (!cleanData.currentPassword) {
|
||||
currentPasswordField.current.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
onUpdate(cleanData);
|
||||
}, [email, onUpdate, onClose, data]);
|
||||
|
||||
useEffect(() => {
|
||||
emailField.current.select();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (wasSubmitting && !isSubmitting) {
|
||||
if (error) {
|
||||
switch (error.message) {
|
||||
case 'User is already exist':
|
||||
emailField.current.select();
|
||||
|
||||
break;
|
||||
case 'Current password is not valid':
|
||||
setData((prevData) => ({
|
||||
...prevData,
|
||||
currentPassword: '',
|
||||
}));
|
||||
focusCurrentPasswordField();
|
||||
|
||||
break;
|
||||
default:
|
||||
}
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
}, [isSubmitting, wasSubmitting, error, onClose, setData, focusCurrentPasswordField]);
|
||||
|
||||
useDidUpdate(() => {
|
||||
currentPasswordField.current.focus();
|
||||
}, [focusCurrentPasswordFieldState]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Popup.Header onBack={onBack}>
|
||||
{t('common.editEmail', {
|
||||
context: 'title',
|
||||
})}
|
||||
</Popup.Header>
|
||||
<Popup.Content>
|
||||
{message && (
|
||||
<Message
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
{...{
|
||||
[message.type]: true,
|
||||
}}
|
||||
visible
|
||||
content={t(message.content)}
|
||||
onDismiss={onMessageDismiss}
|
||||
/>
|
||||
)}
|
||||
<Button
|
||||
positive
|
||||
content={t('action.save')}
|
||||
loading={isSubmitting}
|
||||
disabled={isSubmitting}
|
||||
/>
|
||||
</Form>
|
||||
</Popup.Content>
|
||||
</>
|
||||
);
|
||||
});
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<div className={styles.text}>{t('common.newEmail')}</div>
|
||||
<Input
|
||||
fluid
|
||||
ref={emailField}
|
||||
name="email"
|
||||
value={data.email}
|
||||
placeholder={email}
|
||||
className={styles.field}
|
||||
onChange={handleFieldChange}
|
||||
/>
|
||||
{data.email.trim() !== email && (
|
||||
<>
|
||||
<div className={styles.text}>{t('common.currentPassword')}</div>
|
||||
<Input
|
||||
fluid
|
||||
ref={currentPasswordField}
|
||||
type="password"
|
||||
name="currentPassword"
|
||||
value={data.currentPassword}
|
||||
className={styles.field}
|
||||
onChange={handleFieldChange}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
<Button
|
||||
positive
|
||||
content={t('action.save')}
|
||||
loading={isSubmitting}
|
||||
disabled={isSubmitting}
|
||||
/>
|
||||
</Form>
|
||||
</Popup.Content>
|
||||
</>
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
EditEmailStep.propTypes = {
|
||||
defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
||||
|
|
|
@ -31,110 +31,112 @@ const createMessage = (error) => {
|
|||
}
|
||||
};
|
||||
|
||||
const EditPasswordStep = React.memo(({
|
||||
defaultData, isSubmitting, error, onUpdate, onMessageDismiss, onBack, onClose,
|
||||
}) => {
|
||||
const [t] = useTranslation();
|
||||
const wasSubmitting = usePrevious(isSubmitting);
|
||||
const EditPasswordStep = React.memo(
|
||||
({
|
||||
defaultData, isSubmitting, error, onUpdate, onMessageDismiss, onBack, onClose,
|
||||
}) => {
|
||||
const [t] = useTranslation();
|
||||
const wasSubmitting = usePrevious(isSubmitting);
|
||||
|
||||
const [data, handleFieldChange, setData] = useForm({
|
||||
password: '',
|
||||
currentPassword: '',
|
||||
...defaultData,
|
||||
});
|
||||
const [data, handleFieldChange, setData] = useForm({
|
||||
password: '',
|
||||
currentPassword: '',
|
||||
...defaultData,
|
||||
});
|
||||
|
||||
const message = useMemo(() => createMessage(error), [error]);
|
||||
const [focusCurrentPasswordFieldState, focusCurrentPasswordField] = useToggle();
|
||||
const message = useMemo(() => createMessage(error), [error]);
|
||||
const [focusCurrentPasswordFieldState, focusCurrentPasswordField] = useToggle();
|
||||
|
||||
const passwordField = useRef(null);
|
||||
const currentPasswordField = useRef(null);
|
||||
const passwordField = useRef(null);
|
||||
const currentPasswordField = useRef(null);
|
||||
|
||||
const handleSubmit = useCallback(() => {
|
||||
if (!data.password) {
|
||||
passwordField.current.select();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data.currentPassword) {
|
||||
currentPasswordField.current.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
onUpdate(data);
|
||||
}, [onUpdate, data]);
|
||||
|
||||
useEffect(() => {
|
||||
passwordField.current.select();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (wasSubmitting && !isSubmitting) {
|
||||
if (!error) {
|
||||
onClose();
|
||||
} else if (error.message === 'Current password is not valid') {
|
||||
setData((prevData) => ({
|
||||
...prevData,
|
||||
currentPassword: '',
|
||||
}));
|
||||
focusCurrentPasswordField();
|
||||
const handleSubmit = useCallback(() => {
|
||||
if (!data.password) {
|
||||
passwordField.current.select();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}, [isSubmitting, wasSubmitting, error, onClose, setData, focusCurrentPasswordField]);
|
||||
|
||||
useDidUpdate(() => {
|
||||
currentPasswordField.current.focus();
|
||||
}, [focusCurrentPasswordFieldState]);
|
||||
if (!data.currentPassword) {
|
||||
currentPasswordField.current.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Popup.Header onBack={onBack}>
|
||||
{t('common.editPassword', {
|
||||
context: 'title',
|
||||
})}
|
||||
</Popup.Header>
|
||||
<Popup.Content>
|
||||
{message && (
|
||||
<Message
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
{...{
|
||||
[message.type]: true,
|
||||
}}
|
||||
visible
|
||||
content={t(message.content)}
|
||||
onDismiss={onMessageDismiss}
|
||||
/>
|
||||
)}
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<div className={styles.text}>{t('common.newPassword')}</div>
|
||||
<Input
|
||||
fluid
|
||||
ref={passwordField}
|
||||
name="password"
|
||||
value={data.password}
|
||||
className={styles.field}
|
||||
onChange={handleFieldChange}
|
||||
/>
|
||||
<div className={styles.text}>{t('common.currentPassword')}</div>
|
||||
<Input
|
||||
fluid
|
||||
ref={currentPasswordField}
|
||||
type="password"
|
||||
name="currentPassword"
|
||||
value={data.currentPassword}
|
||||
className={styles.field}
|
||||
onChange={handleFieldChange}
|
||||
/>
|
||||
<Button
|
||||
positive
|
||||
content={t('action.save')}
|
||||
loading={isSubmitting}
|
||||
disabled={isSubmitting}
|
||||
/>
|
||||
</Form>
|
||||
</Popup.Content>
|
||||
</>
|
||||
);
|
||||
});
|
||||
onUpdate(data);
|
||||
}, [onUpdate, data]);
|
||||
|
||||
useEffect(() => {
|
||||
passwordField.current.select();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (wasSubmitting && !isSubmitting) {
|
||||
if (!error) {
|
||||
onClose();
|
||||
} else if (error.message === 'Current password is not valid') {
|
||||
setData((prevData) => ({
|
||||
...prevData,
|
||||
currentPassword: '',
|
||||
}));
|
||||
focusCurrentPasswordField();
|
||||
}
|
||||
}
|
||||
}, [isSubmitting, wasSubmitting, error, onClose, setData, focusCurrentPasswordField]);
|
||||
|
||||
useDidUpdate(() => {
|
||||
currentPasswordField.current.focus();
|
||||
}, [focusCurrentPasswordFieldState]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Popup.Header onBack={onBack}>
|
||||
{t('common.editPassword', {
|
||||
context: 'title',
|
||||
})}
|
||||
</Popup.Header>
|
||||
<Popup.Content>
|
||||
{message && (
|
||||
<Message
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
{...{
|
||||
[message.type]: true,
|
||||
}}
|
||||
visible
|
||||
content={t(message.content)}
|
||||
onDismiss={onMessageDismiss}
|
||||
/>
|
||||
)}
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<div className={styles.text}>{t('common.newPassword')}</div>
|
||||
<Input
|
||||
fluid
|
||||
ref={passwordField}
|
||||
name="password"
|
||||
value={data.password}
|
||||
className={styles.field}
|
||||
onChange={handleFieldChange}
|
||||
/>
|
||||
<div className={styles.text}>{t('common.currentPassword')}</div>
|
||||
<Input
|
||||
fluid
|
||||
ref={currentPasswordField}
|
||||
type="password"
|
||||
name="currentPassword"
|
||||
value={data.currentPassword}
|
||||
className={styles.field}
|
||||
onChange={handleFieldChange}
|
||||
/>
|
||||
<Button
|
||||
positive
|
||||
content={t('action.save')}
|
||||
loading={isSubmitting}
|
||||
disabled={isSubmitting}
|
||||
/>
|
||||
</Form>
|
||||
</Popup.Content>
|
||||
</>
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
EditPasswordStep.propTypes = {
|
||||
defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
||||
|
|
|
@ -15,7 +15,8 @@ export default {
|
|||
addUser_title: 'Add User',
|
||||
administrator: 'Administrator',
|
||||
all: 'All',
|
||||
allChangesWillBeAutomaticallySavedAfterConnectionRestored: 'All changes will be automatically saved<br />after connection restored',
|
||||
allChangesWillBeAutomaticallySavedAfterConnectionRestored:
|
||||
'All changes will be automatically saved<br />after connection restored',
|
||||
areYouSureYouWantToDeleteThisBoard: 'Are you sure you want to delete this board?',
|
||||
areYouSureYouWantToDeleteThisCard: 'Are you sure you want to delete this card?',
|
||||
areYouSureYouWantToDeleteThisComment: 'Are you sure you want to delete this comment?',
|
||||
|
@ -24,7 +25,8 @@ export default {
|
|||
areYouSureYouWantToDeleteThisProject: 'Are you sure you want to delete this project?',
|
||||
areYouSureYouWantToDeleteThisTask: 'Are you sure you want to delete this task?',
|
||||
areYouSureYouWantToDeleteThisUser: 'Are you sure you want to delete this user?',
|
||||
areYouSureYouWantToRemoveThisMemberFromProject: 'Are you sure you want to remove this member from project?',
|
||||
areYouSureYouWantToRemoveThisMemberFromProject:
|
||||
'Are you sure you want to remove this member from project?',
|
||||
boardNotFound_title: 'Board Not Found',
|
||||
cardActions_title: 'Card Actions',
|
||||
cardNotFound_title: 'Card Not Found',
|
||||
|
@ -77,7 +79,8 @@ export default {
|
|||
noUnreadNotifications: 'No unread notifications',
|
||||
openBoard_title: 'Open Board',
|
||||
projectNotFound_title: 'Project Not Found',
|
||||
refreshPageToLoadLastDataAndReceiveUpdates: '<0>Refresh the page</0> to load last data<br />and receive updates',
|
||||
refreshPageToLoadLastDataAndReceiveUpdates:
|
||||
'<0>Refresh the page</0> to load last data<br />and receive updates',
|
||||
removeMember_title: 'Remove Member',
|
||||
seconds: 'Seconds',
|
||||
taskActions_title: 'Task Actions',
|
||||
|
@ -89,7 +92,8 @@ export default {
|
|||
userIsAlreadyExist: 'User is already exist',
|
||||
userLeftNewCommentToCard: '{{user}} left a new comment «{{comment}}» to <2>{{card}}</2>',
|
||||
userMovedCardFromListToList: '{{user}} moved <2>{{card}}</2> from {{fromList}} to {{toList}}',
|
||||
userMovedThisCardFromListToList: '<0>{{user}}</0><1> moved this card from {{fromList}} to {{toList}}</1>',
|
||||
userMovedThisCardFromListToList:
|
||||
'<0>{{user}}</0><1> moved this card from {{fromList}} to {{toList}}</1>',
|
||||
users: 'Users',
|
||||
writeComment: 'Write a comment...',
|
||||
},
|
||||
|
|
|
@ -19,7 +19,8 @@ export default {
|
|||
addUser: 'Добавление пользователя',
|
||||
administrator: 'Администратор',
|
||||
all: 'Все',
|
||||
allChangesWillBeAutomaticallySavedAfterConnectionRestored: 'Все изменения сохранятся автоматически,<br />как только подключение восстановится',
|
||||
allChangesWillBeAutomaticallySavedAfterConnectionRestored:
|
||||
'Все изменения сохранятся автоматически,<br />как только подключение восстановится',
|
||||
areYouSureYouWantToDeleteThisBoard: 'Вы уверены, что хотите удалить эту доску?',
|
||||
areYouSureYouWantToDeleteThisCard: 'Вы уверены, что хотите удалить эту карточку?',
|
||||
areYouSureYouWantToDeleteThisComment: 'Вы уверены, что хотите удалить этот комментарий?',
|
||||
|
@ -28,7 +29,8 @@ export default {
|
|||
areYouSureYouWantToDeleteThisProject: 'Вы уверены, что хотите удалить этот проект?',
|
||||
areYouSureYouWantToDeleteThisTask: 'Вы уверены, что хотите удалить эту задачу?',
|
||||
areYouSureYouWantToDeleteThisUser: 'Вы уверены, что хотите удалить этого пользователя?',
|
||||
areYouSureYouWantToRemoveThisMemberFromProject: 'Вы уверены, что хотите удалить этого участника из проекта?',
|
||||
areYouSureYouWantToRemoveThisMemberFromProject:
|
||||
'Вы уверены, что хотите удалить этого участника из проекта?',
|
||||
boardNotFound: 'Доска не найдена',
|
||||
cardActions: 'Действия с карточкой',
|
||||
cardNotFound: 'Карточка не найдена',
|
||||
|
@ -81,7 +83,8 @@ export default {
|
|||
noUnreadNotifications: 'Уведомлений нет',
|
||||
openBoard: 'Откройте доску',
|
||||
projectNotFound: 'Доска не найдена',
|
||||
refreshPageToLoadLastDataAndReceiveUpdates: '<0>Обновите страницу</0>, чтобы загрузить<br />актуальные данные и получать обновления',
|
||||
refreshPageToLoadLastDataAndReceiveUpdates:
|
||||
'<0>Обновите страницу</0>, чтобы загрузить<br />актуальные данные и получать обновления',
|
||||
removeMember: 'Удаление участника',
|
||||
seconds: 'Секунды',
|
||||
taskActions: 'Действия с задачей',
|
||||
|
@ -92,8 +95,10 @@ export default {
|
|||
userAddedThisCardToList: '<0>{{user}}</0><1> добавил(а) эту карточку в {{list}}</1>',
|
||||
userIsAlreadyExist: 'Пользователь уже существует',
|
||||
userLeftNewCommentToCard: '{{user}} оставил(а) комментарий «{{comment}}» к <2>{{card}}</2>',
|
||||
userMovedCardFromListToList: '{{user}} переместил(а) <2>{{card}}</2> из {{fromList}} в {{toList}}',
|
||||
userMovedThisCardFromListToList: '<0>{{user}}</0><1> переместил(а) эту карточку из {{fromList}} в {{toList}}</1>',
|
||||
userMovedCardFromListToList:
|
||||
'{{user}} переместил(а) <2>{{card}}</2> из {{fromList}} в {{toList}}',
|
||||
userMovedThisCardFromListToList:
|
||||
'<0>{{user}}</0><1> переместил(а) эту карточку из {{fromList}} в {{toList}}</1>',
|
||||
users: 'Пользователи',
|
||||
writeComment: 'Напишите комментарий...',
|
||||
},
|
||||
|
|
|
@ -4,8 +4,6 @@ import { fetchActionsInCurrentCardService } from '../services';
|
|||
import EntryActionTypes from '../../../constants/EntryActionTypes';
|
||||
|
||||
export default function* () {
|
||||
yield takeLatest(
|
||||
EntryActionTypes.ACTIONS_IN_CURRENT_CARD_FETCH,
|
||||
() => fetchActionsInCurrentCardService(),
|
||||
);
|
||||
// eslint-disable-next-line max-len
|
||||
yield takeLatest(EntryActionTypes.ACTIONS_IN_CURRENT_CARD_FETCH, () => fetchActionsInCurrentCardService());
|
||||
}
|
||||
|
|
|
@ -10,18 +10,11 @@ import EntryActionTypes from '../../../constants/EntryActionTypes';
|
|||
|
||||
export default function* () {
|
||||
yield all([
|
||||
takeLatest(
|
||||
EntryActionTypes.BOARD_IN_CURRENT_PROJECT_CREATE,
|
||||
({ payload: { data } }) => createBoardInCurrentProjectService(data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.BOARD_UPDATE,
|
||||
({ payload: { id, data } }) => updateBoardService(id, data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.BOARD_MOVE,
|
||||
({ payload: { id, index } }) => moveBoardService(id, index),
|
||||
),
|
||||
/* eslint-disable max-len */
|
||||
takeLatest(EntryActionTypes.BOARD_IN_CURRENT_PROJECT_CREATE, ({ payload: { data } }) => createBoardInCurrentProjectService(data)),
|
||||
takeLatest(EntryActionTypes.BOARD_UPDATE, ({ payload: { id, data } }) => updateBoardService(id, data)),
|
||||
takeLatest(EntryActionTypes.BOARD_MOVE, ({ payload: { id, index } }) => moveBoardService(id, index)),
|
||||
/* eslint-enable max-len */
|
||||
takeLatest(EntryActionTypes.BOARD_DELETE, ({ payload: { id } }) => deleteBoardService(id)),
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -12,22 +12,12 @@ import EntryActionTypes from '../../../constants/EntryActionTypes';
|
|||
|
||||
export default function* () {
|
||||
yield all([
|
||||
takeLatest(
|
||||
EntryActionTypes.CARD_CREATE,
|
||||
({ payload: { listId, data } }) => createCardService(listId, data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.CARD_UPDATE,
|
||||
({ payload: { id, data } }) => updateCardService(id, data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.CURRENT_CARD_UPDATE,
|
||||
({ payload: { data } }) => updateCurrentCardService(data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.CARD_MOVE,
|
||||
({ payload: { id, listId, index } }) => moveCardService(id, listId, index),
|
||||
),
|
||||
/* eslint-disable max-len */
|
||||
takeLatest(EntryActionTypes.CARD_CREATE, ({ payload: { listId, data } }) => createCardService(listId, data)),
|
||||
takeLatest(EntryActionTypes.CARD_UPDATE, ({ payload: { id, data } }) => updateCardService(id, data)),
|
||||
takeLatest(EntryActionTypes.CURRENT_CARD_UPDATE, ({ payload: { data } }) => updateCurrentCardService(data)),
|
||||
takeLatest(EntryActionTypes.CARD_MOVE, ({ payload: { id, listId, index } }) => moveCardService(id, listId, index)),
|
||||
/* eslint-enable max-len */
|
||||
takeLatest(EntryActionTypes.CARD_DELETE, ({ payload: { id } }) => deleteCardService(id)),
|
||||
takeLatest(EntryActionTypes.CURRENT_CARD_DELETE, () => deleteCurrentCardService()),
|
||||
]);
|
||||
|
|
|
@ -9,17 +9,10 @@ import EntryActionTypes from '../../../constants/EntryActionTypes';
|
|||
|
||||
export default function* () {
|
||||
yield all([
|
||||
takeLatest(
|
||||
EntryActionTypes.COMMENT_ACTION_IN_CURRENT_CARD_CREATE,
|
||||
({ payload: { data } }) => createCommentActionInCurrentCardService(data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.COMMENT_ACTION_UPDATE,
|
||||
({ payload: { id, data } }) => updateCommentActionService(id, data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.COMMENT_ACTION_DELETE,
|
||||
({ payload: { id } }) => deleteCommentActionService(id),
|
||||
),
|
||||
/* eslint-disable max-len */
|
||||
takeLatest(EntryActionTypes.COMMENT_ACTION_IN_CURRENT_CARD_CREATE, ({ payload: { data } }) => createCommentActionInCurrentCardService(data)),
|
||||
takeLatest(EntryActionTypes.COMMENT_ACTION_UPDATE, ({ payload: { id, data } }) => updateCommentActionService(id, data)),
|
||||
takeLatest(EntryActionTypes.COMMENT_ACTION_DELETE, ({ payload: { id } }) => deleteCommentActionService(id)),
|
||||
/* eslint-enable max-len */
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -15,38 +15,18 @@ import EntryActionTypes from '../../../constants/EntryActionTypes';
|
|||
|
||||
export default function* () {
|
||||
yield all([
|
||||
takeLatest(
|
||||
EntryActionTypes.LABEL_IN_CURRENT_BOARD_CREATE,
|
||||
({ payload: { data } }) => createLabelInCurrentBoardService(data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.LABEL_UPDATE,
|
||||
({ payload: { id, data } }) => updateLabelService(id, data),
|
||||
),
|
||||
/* eslint-disable max-len */
|
||||
takeLatest(EntryActionTypes.LABEL_IN_CURRENT_BOARD_CREATE, ({ payload: { data } }) => createLabelInCurrentBoardService(data)),
|
||||
takeLatest(EntryActionTypes.LABEL_UPDATE, ({ payload: { id, data } }) => updateLabelService(id, data)),
|
||||
/* eslint-enable max-len */
|
||||
takeLatest(EntryActionTypes.LABEL_DELETE, ({ payload: { id } }) => deleteLabelService(id)),
|
||||
takeLatest(
|
||||
EntryActionTypes.LABEL_TO_CARD_ADD,
|
||||
({ payload: { id, cardId } }) => addLabelToCardService(id, cardId),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.LABEL_TO_CURRENT_CARD_ADD,
|
||||
({ payload: { id } }) => addLabelToCurrentCardService(id),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.LABEL_FROM_CARD_REMOVE,
|
||||
({ payload: { id, cardId } }) => removeLabelFromCardService(id, cardId),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.LABEL_FROM_CURRENT_CARD_REMOVE,
|
||||
({ payload: { id } }) => removeLabelFromCurrentCardService(id),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.LABEL_TO_FILTER_IN_CURRENT_BOARD_ADD,
|
||||
({ payload: { id } }) => addLabelToFilterInCurrentBoardService(id),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.LABEL_FROM_FILTER_IN_CURRENT_BOARD_REMOVE,
|
||||
({ payload: { id } }) => removeLabelFromFilterInCurrentBoardService(id),
|
||||
),
|
||||
/* eslint-disable max-len */
|
||||
takeLatest(EntryActionTypes.LABEL_TO_CARD_ADD, ({ payload: { id, cardId } }) => addLabelToCardService(id, cardId)),
|
||||
takeLatest(EntryActionTypes.LABEL_TO_CURRENT_CARD_ADD, ({ payload: { id } }) => addLabelToCurrentCardService(id)),
|
||||
takeLatest(EntryActionTypes.LABEL_FROM_CARD_REMOVE, ({ payload: { id, cardId } }) => removeLabelFromCardService(id, cardId)),
|
||||
takeLatest(EntryActionTypes.LABEL_FROM_CURRENT_CARD_REMOVE, ({ payload: { id } }) => removeLabelFromCurrentCardService(id)),
|
||||
takeLatest(EntryActionTypes.LABEL_TO_FILTER_IN_CURRENT_BOARD_ADD, ({ payload: { id } }) => addLabelToFilterInCurrentBoardService(id)),
|
||||
takeLatest(EntryActionTypes.LABEL_FROM_FILTER_IN_CURRENT_BOARD_REMOVE, ({ payload: { id } }) => removeLabelFromFilterInCurrentBoardService(id)),
|
||||
/* eslint-enable max-len */
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -10,18 +10,11 @@ import EntryActionTypes from '../../../constants/EntryActionTypes';
|
|||
|
||||
export default function* () {
|
||||
yield all([
|
||||
takeLatest(
|
||||
EntryActionTypes.LIST_IN_CURRENT_BOARD_CREATE,
|
||||
({ payload: { data } }) => createListInCurrentBoardService(data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.LIST_UPDATE,
|
||||
({ payload: { id, data } }) => updateListService(id, data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.LIST_MOVE,
|
||||
({ payload: { id, index } }) => moveListService(id, index),
|
||||
),
|
||||
/* eslint-disable max-len */
|
||||
takeLatest(EntryActionTypes.LIST_IN_CURRENT_BOARD_CREATE, ({ payload: { data } }) => createListInCurrentBoardService(data)),
|
||||
takeLatest(EntryActionTypes.LIST_UPDATE, ({ payload: { id, data } }) => updateListService(id, data)),
|
||||
takeLatest(EntryActionTypes.LIST_MOVE, ({ payload: { id, index } }) => moveListService(id, index)),
|
||||
/* eslint-enable max-len */
|
||||
takeLatest(EntryActionTypes.LIST_DELETE, ({ payload: { id } }) => deleteListService(id)),
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -4,8 +4,6 @@ import { deleteNotificationService } from '../services';
|
|||
import EntryActionTypes from '../../../constants/EntryActionTypes';
|
||||
|
||||
export default function* () {
|
||||
yield takeLatest(
|
||||
EntryActionTypes.NOTIFICATION_DELETE,
|
||||
({ payload: { id } }) => deleteNotificationService(id),
|
||||
);
|
||||
// eslint-disable-next-line max-len
|
||||
yield takeLatest(EntryActionTypes.NOTIFICATION_DELETE, ({ payload: { id } }) => deleteNotificationService(id));
|
||||
}
|
||||
|
|
|
@ -8,13 +8,9 @@ import EntryActionTypes from '../../../constants/EntryActionTypes';
|
|||
|
||||
export default function* () {
|
||||
yield all([
|
||||
takeLatest(
|
||||
EntryActionTypes.MEMBERSHIP_IN_CURRENT_PROJECT_CREATE,
|
||||
({ payload: { data } }) => createMembershipInCurrentProjectService(data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.PROJECT_MEMBERSHIP_DELETE,
|
||||
({ payload: { id } }) => deleteProjectMembershipService(id),
|
||||
),
|
||||
/* eslint-disable max-len */
|
||||
takeLatest(EntryActionTypes.MEMBERSHIP_IN_CURRENT_PROJECT_CREATE, ({ payload: { data } }) => createMembershipInCurrentProjectService(data)),
|
||||
takeLatest(EntryActionTypes.PROJECT_MEMBERSHIP_DELETE, ({ payload: { id } }) => deleteProjectMembershipService(id)),
|
||||
/* eslint-enable max-len */
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -9,14 +9,10 @@ import EntryActionTypes from '../../../constants/EntryActionTypes';
|
|||
|
||||
export default function* () {
|
||||
yield all([
|
||||
takeLatest(
|
||||
EntryActionTypes.PROJECT_CREATE,
|
||||
({ payload: { data } }) => createProjectService(data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.CURRENT_PROJECT_UPDATE,
|
||||
({ payload: { data } }) => updateCurrentProjectService(data),
|
||||
),
|
||||
/* eslint-disable max-len */
|
||||
takeLatest(EntryActionTypes.PROJECT_CREATE, ({ payload: { data } }) => createProjectService(data)),
|
||||
takeLatest(EntryActionTypes.CURRENT_PROJECT_UPDATE, ({ payload: { data } }) => updateCurrentProjectService(data)),
|
||||
/* eslint-enable max-len */
|
||||
takeLatest(EntryActionTypes.CURRENT_PROJECT_DELETE, () => deleteCurrentProjectService()),
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -5,14 +5,10 @@ import EntryActionTypes from '../../../constants/EntryActionTypes';
|
|||
|
||||
export default function* () {
|
||||
yield all([
|
||||
takeLatest(
|
||||
EntryActionTypes.TASK_IN_CURRENT_CARD_CREATE,
|
||||
({ payload: { data } }) => createTaskInCurrentCardService(data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.TASK_UPDATE,
|
||||
({ payload: { id, data } }) => updateTaskService(id, data),
|
||||
),
|
||||
/* eslint-disable max-len */
|
||||
takeLatest(EntryActionTypes.TASK_IN_CURRENT_CARD_CREATE, ({ payload: { data } }) => createTaskInCurrentCardService(data)),
|
||||
takeLatest(EntryActionTypes.TASK_UPDATE, ({ payload: { id, data } }) => updateTaskService(id, data)),
|
||||
/* eslint-enable max-len */
|
||||
takeLatest(EntryActionTypes.TASK_DELETE, ({ payload: { id } }) => deleteTaskService(id)),
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -24,58 +24,23 @@ export default function* () {
|
|||
yield all([
|
||||
takeLatest(EntryActionTypes.USER_CREATE, ({ payload: { data } }) => createUserService(data)),
|
||||
takeLatest(EntryActionTypes.USER_CREATE_ERROR_CLEAR, () => clearUserCreateErrorService()),
|
||||
takeLatest(
|
||||
EntryActionTypes.USER_UPDATE,
|
||||
({ payload: { id, data } }) => updateUserService(id, data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.CURRENT_USER_UPDATE,
|
||||
({ payload: { data } }) => updateCurrentUserService(data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.CURRENT_USER_EMAIL_UPDATE,
|
||||
({ payload: { data } }) => updateCurrentUserEmailService(data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.CURRENT_USER_EMAIL_UPDATE_ERROR_CLEAR,
|
||||
() => clearCurrentUserEmailUpdateErrorService(),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE,
|
||||
({ payload: { data } }) => updateCurrentUserPasswordService(data),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE_ERROR_CLEAR,
|
||||
() => clearCurrentUserPasswordUpdateErrorService(),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.CURRENT_USER_AVATAR_UPLOAD,
|
||||
({ payload: { file } }) => uploadCurrentUserAvatarService(file),
|
||||
),
|
||||
/* eslint-disable max-len */
|
||||
takeLatest(EntryActionTypes.USER_UPDATE, ({ payload: { id, data } }) => updateUserService(id, data)),
|
||||
takeLatest(EntryActionTypes.CURRENT_USER_UPDATE, ({ payload: { data } }) => updateCurrentUserService(data)),
|
||||
takeLatest(EntryActionTypes.CURRENT_USER_EMAIL_UPDATE, ({ payload: { data } }) => updateCurrentUserEmailService(data)),
|
||||
takeLatest(EntryActionTypes.CURRENT_USER_EMAIL_UPDATE_ERROR_CLEAR, () => clearCurrentUserEmailUpdateErrorService()),
|
||||
takeLatest(EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE, ({ payload: { data } }) => updateCurrentUserPasswordService(data)),
|
||||
takeLatest(EntryActionTypes.CURRENT_USER_PASSWORD_UPDATE_ERROR_CLEAR, () => clearCurrentUserPasswordUpdateErrorService()),
|
||||
takeLatest(EntryActionTypes.CURRENT_USER_AVATAR_UPLOAD, ({ payload: { file } }) => uploadCurrentUserAvatarService(file)),
|
||||
/* eslint-enable max-len */
|
||||
takeLatest(EntryActionTypes.USER_DELETE, ({ payload: { id } }) => deleteUserService(id)),
|
||||
takeLatest(
|
||||
EntryActionTypes.USER_TO_CARD_ADD,
|
||||
({ payload: { id, cardId } }) => addUserToCardService(id, cardId),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.USER_TO_CURRENT_CARD_ADD,
|
||||
({ payload: { id } }) => addUserToCurrentCardService(id),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.USER_FROM_CARD_REMOVE,
|
||||
({ payload: { id, cardId } }) => removeUserFromCardService(id, cardId),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.USER_FROM_CURRENT_CARD_REMOVE,
|
||||
({ payload: { id } }) => removeUserFromCurrentCardService(id),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.USER_TO_FILTER_IN_CURRENT_BOARD_ADD,
|
||||
({ payload: { id } }) => addUserToFilterInCurrentBoardService(id),
|
||||
),
|
||||
takeLatest(
|
||||
EntryActionTypes.USER_FROM_FILTER_IN_CURRENT_BOARD_REMOVE,
|
||||
({ payload: { id } }) => removeUserFromFilterInCurrentBoardService(id),
|
||||
),
|
||||
/* eslint-disable max-len */
|
||||
takeLatest(EntryActionTypes.USER_TO_CARD_ADD, ({ payload: { id, cardId } }) => addUserToCardService(id, cardId)),
|
||||
takeLatest(EntryActionTypes.USER_TO_CURRENT_CARD_ADD, ({ payload: { id } }) => addUserToCurrentCardService(id)),
|
||||
takeLatest(EntryActionTypes.USER_FROM_CARD_REMOVE, ({ payload: { id, cardId } }) => removeUserFromCardService(id, cardId)),
|
||||
takeLatest(EntryActionTypes.USER_FROM_CURRENT_CARD_REMOVE, ({ payload: { id } }) => removeUserFromCurrentCardService(id)),
|
||||
takeLatest(EntryActionTypes.USER_TO_FILTER_IN_CURRENT_BOARD_ADD, ({ payload: { id } }) => addUserToFilterInCurrentBoardService(id)),
|
||||
takeLatest(EntryActionTypes.USER_FROM_FILTER_IN_CURRENT_BOARD_REMOVE, ({ payload: { id } }) => removeUserFromFilterInCurrentBoardService(id)),
|
||||
/* eslint-enable max-len */
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -11,10 +11,8 @@ export const pathnameSelector = ({
|
|||
},
|
||||
}) => pathname;
|
||||
|
||||
export const pathsMatchSelector = createReselectSelector(
|
||||
pathnameSelector,
|
||||
(pathname) => matchPaths(pathname, Object.values(Paths)),
|
||||
);
|
||||
// eslint-disable-next-line max-len
|
||||
export const pathsMatchSelector = createReselectSelector(pathnameSelector, (pathname) => matchPaths(pathname, Object.values(Paths)));
|
||||
|
||||
export const pathSelector = createReduxOrmSelector(
|
||||
orm,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue