-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* LDBR-4.8: Реализовать добавление юзеров по ссылке * LDBR-4.8: Реализовать приглашение на карточку (нужны тесты) * LDBR-4.8: Исправить замечания линтера * LDBR-4.8: Добавить получение инвайта при создании карточки * LDBR-4.8: Overwrite * LDBR-4.8: Исправить скобку в стиле Co-authored-by: DPeshkoff <[email protected]>
- Loading branch information
Showing
13 changed files
with
489 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
'use strict'; | ||
|
||
// Modules | ||
import Dispatcher from '../modules/Dispatcher/Dispatcher.js'; | ||
|
||
/** | ||
* Константа, содержащая в себе типы действий для ссылок-приглашений | ||
*/ | ||
export const InviteActionTypes = { | ||
GO_BOARD_INVITE: 'go/invite/board', | ||
GO_CARD_INVITE: 'go/invite/card', | ||
REFRESH_BOARD_LINK: 'refresh/invite/board', | ||
REFRESH_CARD_LINK: 'refresh/invite/card', | ||
COPY_BOARD_LINK: 'copy/invite/board', | ||
COPY_CARD_LINK: 'copy/invite/card', | ||
}; | ||
|
||
/** | ||
* Объект, содержащий в себе действия в системе связанные с приглашениями. | ||
*/ | ||
export const inviteActions = { | ||
|
||
/** | ||
* Приглашает пользователя в доску | ||
* @param {String} accessPath | ||
*/ | ||
openBoardInvite(accessPath) { | ||
Dispatcher.dispatch({ | ||
actionName: InviteActionTypes.GO_BOARD_INVITE, | ||
data: {accessPath}, | ||
}); | ||
}, | ||
|
||
/** | ||
* Приглашает пользователя в карточку | ||
* @param {String} accessPath | ||
*/ | ||
openCardInvite(accessPath) { | ||
Dispatcher.dispatch({ | ||
actionName: InviteActionTypes.GO_CARD_INVITE, | ||
data: {accessPath}, | ||
}); | ||
}, | ||
|
||
/** | ||
* Обновляет ссылку приглашение на доску | ||
*/ | ||
refreshBoardInvite() { | ||
Dispatcher.dispatch({ | ||
actionName: InviteActionTypes.REFRESH_BOARD_LINK, | ||
}); | ||
}, | ||
|
||
/** | ||
* Обновляет ссылку приглашение на карточку | ||
*/ | ||
refreshCardInvite() { | ||
Dispatcher.dispatch({ | ||
actionName: InviteActionTypes.REFRESH_CARD_LINK, | ||
}); | ||
}, | ||
|
||
/** | ||
* Скопировать приглашение на доску | ||
*/ | ||
copyBoardInvite() { | ||
Dispatcher.dispatch({ | ||
actionName: InviteActionTypes.COPY_BOARD_LINK, | ||
}); | ||
}, | ||
|
||
/** | ||
* Скопировать приглашение на карточку | ||
*/ | ||
copyCardInvite() { | ||
Dispatcher.dispatch({ | ||
actionName: InviteActionTypes.COPY_CARD_LINK, | ||
}); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.