Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2022-05-19 17:35:43 +07:00 committed by GitHub
parent 6152d55eb1
commit 59e86ce484
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 17 deletions

View File

@ -14,24 +14,21 @@
-->
<script lang="ts">
import { Attachment } from '@anticrm/attachment'
import contact, { Employee } from '@anticrm/contact'
import { EmployeeAccount } from '@anticrm/contact'
import contact, { Employee, EmployeeAccount } from '@anticrm/contact'
import core, { Class, getCurrentAccount, Ref, Space } from '@anticrm/core'
import view from '@anticrm/view'
import { getClient } from '@anticrm/presentation'
import ui, {
EditWithIcon,
getCurrentLocation,
location,
Icon,
IconSearch,
Label,
navigate,
EditWithIcon,
Spinner,
Tooltip,
Icon
Tooltip
} from '@anticrm/ui'
import { onDestroy } from 'svelte'
import { FileBrowserSortMode, dateFileBrowserFilters, fileTypeFileBrowserFilters, sortModeToOptionObject } from '..'
import view from '@anticrm/view'
import { dateFileBrowserFilters, FileBrowserSortMode, fileTypeFileBrowserFilters, sortModeToOptionObject } from '..'
import attachment from '../plugin'
import AttachmentsGalleryView from './AttachmentsGalleryView.svelte'
import AttachmentsListView from './AttachmentsListView.svelte'
@ -41,6 +38,12 @@
const client = getClient()
const loc = getCurrentLocation()
const spaceId: Ref<Space> | undefined = loc.query?.spaceId as Ref<Space> | undefined
$: if (spaceId !== undefined) {
const loc = getCurrentLocation()
loc.query = undefined
navigate(loc)
}
export let requestedSpaceClasses: Ref<Class<Space>>[] = []
const currentUser = getCurrentAccount() as EmployeeAccount
let selectedParticipants: Ref<Employee>[] = [currentUser.employee]
@ -103,13 +106,6 @@
)
isLoading = false
}
onDestroy(
location.subscribe(async (loc) => {
loc.query = undefined
navigate(loc)
})
)
</script>
<div class="ac-header full divide">

View File

@ -83,7 +83,7 @@
}
function isSelected (value: Doc, values: any[]): boolean {
return values.includes(value._id)
return values.includes(value?._id ?? '')
}
function checkMode () {