mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 00:37:47 +00:00
UBER-558: filter out overrides for action popup (#3499)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
9a7f75c1ed
commit
d29a2df4d9
@ -13,7 +13,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { WithLookup, Doc } from '@hcengineering/core'
|
import { WithLookup, Doc, Ref } from '@hcengineering/core'
|
||||||
import { getResource, translate } from '@hcengineering/platform'
|
import { getResource, translate } from '@hcengineering/platform'
|
||||||
import { createQuery, getClient, ActionContext } from '@hcengineering/presentation'
|
import { createQuery, getClient, ActionContext } from '@hcengineering/presentation'
|
||||||
import ui, {
|
import ui, {
|
||||||
@ -94,6 +94,13 @@
|
|||||||
}
|
}
|
||||||
if (docs.length === 0) {
|
if (docs.length === 0) {
|
||||||
fActions = fActions.filter((it) => it.input === 'none')
|
fActions = fActions.filter((it) => it.input === 'none')
|
||||||
|
const overrideRemove: Array<Ref<Action>> = []
|
||||||
|
for (const fAction of fActions) {
|
||||||
|
if (fAction.override !== undefined) {
|
||||||
|
overrideRemove.push(...fAction.override)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fActions = fActions.filter((it) => !overrideRemove.includes(it._id))
|
||||||
}
|
}
|
||||||
fActions = fActions.filter(
|
fActions = fActions.filter(
|
||||||
(it) =>
|
(it) =>
|
||||||
|
Loading…
Reference in New Issue
Block a user