mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 00:10:37 +00:00
fix lint issues
Signed-off-by: Anna No <anna.no@xored.com>
This commit is contained in:
parent
d1a3139b94
commit
e5b3f434d4
@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Card, CardLabel } from '@anticrm/board'
|
import { Card, CardLabel } from '@anticrm/board'
|
||||||
import type { Ref, WithLookup } from '@anticrm/core'
|
import type { Ref } from '@anticrm/core'
|
||||||
import { getClient } from '@anticrm/presentation'
|
import { getClient } from '@anticrm/presentation'
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
@ -18,7 +18,7 @@
|
|||||||
import board from '../../plugin'
|
import board from '../../plugin'
|
||||||
import { getBoardLabels } from '../../utils/BoardUtils'
|
import { getBoardLabels } from '../../utils/BoardUtils'
|
||||||
|
|
||||||
export let object: WithLookup<Card>
|
export let object: Card
|
||||||
export let search: string | undefined = undefined
|
export let search: string | undefined = undefined
|
||||||
export let onEdit: (label: CardLabel) => void
|
export let onEdit: (label: CardLabel) => void
|
||||||
export let onCreate: () => void
|
export let onCreate: () => void
|
||||||
@ -60,14 +60,13 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = { labels: label._id }
|
|
||||||
if (object?.labels?.includes(label._id)) {
|
if (object?.labels?.includes(label._id)) {
|
||||||
await client.update(object, {
|
await client.update(object, {
|
||||||
$pull: data
|
$pull: { labels: label._id as any } // TODO: fix as any
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
await client.update(object, {
|
await client.update(object, {
|
||||||
$push: data
|
$push: { labels: label._id }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user