Hide/show app users on search
This commit is contained in:
parent
3829797e3c
commit
80874c77c7
|
@ -209,18 +209,25 @@
|
||||||
const viewV2Table = options.find(x => x._id === viewsV2.selected?.tableId)
|
const viewV2Table = options.find(x => x._id === viewsV2.selected?.tableId)
|
||||||
return viewV2Table != null
|
return viewV2Table != null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const appUsersTableName = "App users"
|
||||||
|
$: showAppUsersTable =
|
||||||
|
!searchTerm ||
|
||||||
|
appUsersTableName.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $database?._id}
|
{#if $database?._id}
|
||||||
<div class="hierarchy-items-container">
|
<div class="hierarchy-items-container">
|
||||||
|
{#if showAppUsersTable}
|
||||||
<NavItem
|
<NavItem
|
||||||
icon="UserGroup"
|
icon="UserGroup"
|
||||||
text="App users"
|
text={appUsersTableName}
|
||||||
selected={$isActive("./table/:tableId") &&
|
selected={$isActive("./table/:tableId") &&
|
||||||
$tables.selected?._id === TableNames.USERS}
|
$tables.selected?._id === TableNames.USERS}
|
||||||
on:click={() => selectTable(TableNames.USERS)}
|
on:click={() => selectTable(TableNames.USERS)}
|
||||||
selectedBy={$userSelectedResourceMap[TableNames.USERS]}
|
selectedBy={$userSelectedResourceMap[TableNames.USERS]}
|
||||||
/>
|
/>
|
||||||
|
{/if}
|
||||||
{#each enrichedDataSources.filter(ds => ds.show) as datasource}
|
{#each enrichedDataSources.filter(ds => ds.show) as datasource}
|
||||||
<NavItem
|
<NavItem
|
||||||
border
|
border
|
||||||
|
|
Loading…
Reference in New Issue