mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 04:23:58 +03:00
Fix recruit (#2543)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
d58d2b7b29
commit
d1cb89c5de
@ -22,7 +22,7 @@
|
||||
</script>
|
||||
|
||||
<div class="grid">
|
||||
{#each items as item (item.label)}
|
||||
{#each items as item (item._id)}
|
||||
<div>
|
||||
{item.label}
|
||||
</div>
|
||||
|
@ -205,6 +205,7 @@ export interface PopupOptions {
|
||||
}
|
||||
|
||||
export interface DashboardItem {
|
||||
_id: string
|
||||
label: string
|
||||
values: DashboardGroup[]
|
||||
tooltip?: LabelAndProps
|
||||
|
@ -105,6 +105,7 @@
|
||||
return [
|
||||
p._id,
|
||||
{
|
||||
_id: p._id,
|
||||
label: p.title,
|
||||
values: [
|
||||
{ color: 10, value: 0 },
|
||||
|
@ -14,16 +14,16 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { Class, DocumentQuery, FindOptions, Ref, SortingOrder, Space } from '@hcengineering/core'
|
||||
import { Class, DocumentQuery, FindOptions, Ref, SortingOrder } from '@hcengineering/core'
|
||||
import { createQuery, getClient } from '@hcengineering/presentation'
|
||||
import { DoneState, SpaceWithStates, State, Task } from '@hcengineering/task'
|
||||
import { TabList } from '@hcengineering/ui'
|
||||
import type { TabItem } from '@hcengineering/ui'
|
||||
import { TabList } from '@hcengineering/ui'
|
||||
import { TableBrowser } from '@hcengineering/view-resources'
|
||||
import task from '../plugin'
|
||||
import StatesBar from './state/StatesBar.svelte'
|
||||
import Won from './icons/Won.svelte'
|
||||
import Lost from './icons/Lost.svelte'
|
||||
import Won from './icons/Won.svelte'
|
||||
import StatesBar from './state/StatesBar.svelte'
|
||||
|
||||
export let _class: Ref<Class<Task>>
|
||||
export let space: Ref<SpaceWithStates>
|
||||
@ -81,16 +81,9 @@
|
||||
|
||||
const client = getClient()
|
||||
|
||||
async function updateQuery (
|
||||
query: DocumentQuery<Task>,
|
||||
selectedDoneStates: Set<Ref<DoneState>>,
|
||||
space?: Ref<Space>
|
||||
): Promise<void> {
|
||||
async function updateQuery (query: DocumentQuery<Task>, selectedDoneStates: Set<Ref<DoneState>>): Promise<void> {
|
||||
resConfig = updateConfig(config)
|
||||
const result = client.getHierarchy().clone(query)
|
||||
if (result.space) {
|
||||
result.space = space
|
||||
}
|
||||
if (state) {
|
||||
result.state = state
|
||||
}
|
||||
@ -115,17 +108,17 @@
|
||||
selectedDS = ['NoDoneState']
|
||||
withoutDone = true
|
||||
}
|
||||
updateQuery(query, selectedDoneStates, space)
|
||||
updateQuery(query, selectedDoneStates)
|
||||
}
|
||||
|
||||
function noDoneClick (): void {
|
||||
withoutDone = true
|
||||
selectedDS = ['NoDoneState']
|
||||
selectedDoneStates.clear()
|
||||
updateQuery(query, selectedDoneStates, space)
|
||||
updateQuery(query, selectedDoneStates)
|
||||
}
|
||||
|
||||
$: updateQuery(query, selectedDoneStates, space)
|
||||
$: updateQuery(query, selectedDoneStates)
|
||||
const handleSelect = (result: any) => {
|
||||
if (result.type === 'select') {
|
||||
const res = result.detail
|
||||
@ -134,12 +127,12 @@
|
||||
state = undefined
|
||||
withoutDone = false
|
||||
selectedDoneStates.clear()
|
||||
updateQuery(query, selectedDoneStates, space)
|
||||
updateQuery(query, selectedDoneStates)
|
||||
} else if (res.id === 'DoneStates') {
|
||||
doneStatusesView = true
|
||||
state = undefined
|
||||
selectedDoneStates.clear()
|
||||
updateQuery(query, selectedDoneStates, space)
|
||||
updateQuery(query, selectedDoneStates)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -165,7 +158,7 @@
|
||||
{#if doneStatusesView}
|
||||
<TabList items={itemsDS} bind:selected={selectedDS} multiselect on:select={handleDoneSelect} size={'small'} />
|
||||
{:else}
|
||||
<StatesBar bind:state {space} gap={'none'} on:change={() => updateQuery(query, selectedDoneStates, space)} />
|
||||
<StatesBar bind:state {space} gap={'none'} on:change={() => updateQuery(query, selectedDoneStates)} />
|
||||
{/if}
|
||||
</div>
|
||||
<div class="statustableview-container">
|
||||
|
@ -14,7 +14,7 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import type { Class, Doc, DocumentQuery, Ref, Space, WithLookup } from '@hcengineering/core'
|
||||
import type { Class, Doc, Ref, Space, WithLookup } from '@hcengineering/core'
|
||||
import { IntlString } from '@hcengineering/platform'
|
||||
import { createQuery } from '@hcengineering/presentation'
|
||||
import { AnyComponent, Component, Loading } from '@hcengineering/ui'
|
||||
@ -33,9 +33,8 @@
|
||||
let preference: ViewletPreference | undefined
|
||||
let loading = true
|
||||
|
||||
let resultQuery: DocumentQuery<Doc> = {}
|
||||
|
||||
$: searchQuery = search === '' ? { space } : { $search: search, space }
|
||||
$: resultQuery = searchQuery
|
||||
|
||||
$: viewlet &&
|
||||
preferenceQuery.query(
|
||||
|
Loading…
Reference in New Issue
Block a user