2025-05-10 02:09:06 +02:00
|
|
|
/*!
|
|
|
|
* Copyright (c) 2024 PLANKA Software GmbH
|
|
|
|
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
|
|
|
*/
|
|
|
|
|
2019-08-31 04:07:25 +05:00
|
|
|
import ActionTypes from '../constants/ActionTypes';
|
|
|
|
|
2022-08-04 13:31:14 +02:00
|
|
|
const handleSocketDisconnect = () => ({
|
2021-06-24 01:05:22 +05:00
|
|
|
type: ActionTypes.SOCKET_DISCONNECT_HANDLE,
|
|
|
|
payload: {},
|
|
|
|
});
|
2019-08-31 04:07:25 +05:00
|
|
|
|
2022-08-04 13:31:14 +02:00
|
|
|
const handleSocketReconnect = (
|
2025-05-10 02:09:06 +02:00
|
|
|
config,
|
2021-06-24 01:05:22 +05:00
|
|
|
user,
|
|
|
|
board,
|
|
|
|
users,
|
|
|
|
projects,
|
|
|
|
projectManagers,
|
2025-05-10 02:09:06 +02:00
|
|
|
backgroundImages,
|
|
|
|
baseCustomFieldGroups,
|
2021-06-24 01:05:22 +05:00
|
|
|
boards,
|
|
|
|
boardMemberships,
|
|
|
|
labels,
|
|
|
|
lists,
|
|
|
|
cards,
|
|
|
|
cardMemberships,
|
|
|
|
cardLabels,
|
2025-05-10 02:09:06 +02:00
|
|
|
taskLists,
|
2021-06-24 01:05:22 +05:00
|
|
|
tasks,
|
|
|
|
attachments,
|
2025-05-10 02:09:06 +02:00
|
|
|
customFieldGroups,
|
|
|
|
customFields,
|
|
|
|
customFieldValues,
|
2021-06-24 01:05:22 +05:00
|
|
|
notifications,
|
2025-05-10 02:09:06 +02:00
|
|
|
notificationServices,
|
2021-06-24 01:05:22 +05:00
|
|
|
) => ({
|
|
|
|
type: ActionTypes.SOCKET_RECONNECT_HANDLE,
|
2019-08-31 04:07:25 +05:00
|
|
|
payload: {
|
2025-05-10 02:09:06 +02:00
|
|
|
config,
|
2021-06-24 01:05:22 +05:00
|
|
|
user,
|
|
|
|
board,
|
|
|
|
users,
|
|
|
|
projects,
|
|
|
|
projectManagers,
|
2025-05-10 02:09:06 +02:00
|
|
|
backgroundImages,
|
|
|
|
baseCustomFieldGroups,
|
2021-06-24 01:05:22 +05:00
|
|
|
boards,
|
|
|
|
boardMemberships,
|
|
|
|
labels,
|
|
|
|
lists,
|
|
|
|
cards,
|
|
|
|
cardMemberships,
|
|
|
|
cardLabels,
|
2025-05-10 02:09:06 +02:00
|
|
|
taskLists,
|
2021-06-24 01:05:22 +05:00
|
|
|
tasks,
|
|
|
|
attachments,
|
2025-05-10 02:09:06 +02:00
|
|
|
customFieldGroups,
|
|
|
|
customFields,
|
|
|
|
customFieldValues,
|
2021-06-24 01:05:22 +05:00
|
|
|
notifications,
|
2025-05-10 02:09:06 +02:00
|
|
|
notificationServices,
|
2019-08-31 04:07:25 +05:00
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2021-06-24 01:05:22 +05:00
|
|
|
handleSocketReconnect.fetchCore = (currentUserId, currentBoardId) => ({
|
|
|
|
type: ActionTypes.SOCKET_RECONNECT_HANDLE__CORE_FETCH,
|
2019-08-31 04:07:25 +05:00
|
|
|
payload: {
|
2021-06-24 01:05:22 +05:00
|
|
|
currentUserId,
|
|
|
|
currentBoardId,
|
2019-08-31 04:07:25 +05:00
|
|
|
},
|
|
|
|
});
|
2022-08-04 13:31:14 +02:00
|
|
|
|
|
|
|
export default {
|
|
|
|
handleSocketDisconnect,
|
|
|
|
handleSocketReconnect,
|
|
|
|
};
|