mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-24 12:06:57 +03:00
Board: Use for join action
Signed-off-by: Anna No <anna.no@xored.com>
This commit is contained in:
parent
5b54ab7c46
commit
121b4abbda
@ -40,14 +40,12 @@ export function hasDate (card: Card): boolean {
|
||||
|
||||
export function addCurrentUser (card: Card, client: Client): void {
|
||||
const employee = (getCurrentAccount() as EmployeeAccount).employee
|
||||
const members = card.members ?? []
|
||||
|
||||
if (members.includes(employee)) {
|
||||
if (card.members?.includes(employee)) {
|
||||
return
|
||||
}
|
||||
|
||||
members.push(employee)
|
||||
updateCard(client, card, 'members', members)
|
||||
client.update(card, { $push: { members: employee } })
|
||||
}
|
||||
|
||||
export function archiveCard (card: Card, client: Client): void {
|
||||
|
Loading…
Reference in New Issue
Block a user