UBER-558: filter out overrides for action popup (#3499)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov 2023-07-13 16:23:53 +05:00 committed by GitHub
parent 9a7f75c1ed
commit d29a2df4d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@
// limitations under the License.
-->
<script lang="ts">
import { WithLookup, Doc } from '@hcengineering/core'
import { WithLookup, Doc, Ref } from '@hcengineering/core'
import { getResource, translate } from '@hcengineering/platform'
import { createQuery, getClient, ActionContext } from '@hcengineering/presentation'
import ui, {
@ -94,6 +94,13 @@
}
if (docs.length === 0) {
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(
(it) =>