1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-24 15:49:46 +02:00
planka/client/src/actions/socket.js

78 lines
1.4 KiB
JavaScript
Raw Normal View History

/*!
* 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 = () => ({
type: ActionTypes.SOCKET_DISCONNECT_HANDLE,
payload: {},
});
2019-08-31 04:07:25 +05:00
2022-08-04 13:31:14 +02:00
const handleSocketReconnect = (
config,
user,
board,
users,
projects,
projectManagers,
backgroundImages,
baseCustomFieldGroups,
boards,
boardMemberships,
labels,
lists,
cards,
cardMemberships,
cardLabels,
taskLists,
tasks,
attachments,
customFieldGroups,
customFields,
customFieldValues,
notifications,
notificationServices,
) => ({
type: ActionTypes.SOCKET_RECONNECT_HANDLE,
2019-08-31 04:07:25 +05:00
payload: {
config,
user,
board,
users,
projects,
projectManagers,
backgroundImages,
baseCustomFieldGroups,
boards,
boardMemberships,
labels,
lists,
cards,
cardMemberships,
cardLabels,
taskLists,
tasks,
attachments,
customFieldGroups,
customFields,
customFieldValues,
notifications,
notificationServices,
2019-08-31 04:07:25 +05:00
},
});
handleSocketReconnect.fetchCore = (currentUserId, currentBoardId) => ({
type: ActionTypes.SOCKET_RECONNECT_HANDLE__CORE_FETCH,
2019-08-31 04:07:25 +05:00
payload: {
currentUserId,
currentBoardId,
2019-08-31 04:07:25 +05:00
},
});
2022-08-04 13:31:14 +02:00
export default {
handleSocketDisconnect,
handleSocketReconnect,
};