mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-23 20:13:20 +00:00
UBERF-4812 (#4297)
This commit is contained in:
parent
639b4317f9
commit
a6acb34d92
@ -108,11 +108,6 @@
|
||||
}
|
||||
)
|
||||
|
||||
$: statusCounter = tasks.reduce(
|
||||
(map, task) => map.set(task.status, (map.get(task.status) ?? 0) + 1),
|
||||
new Map<Ref<Status>, number>()
|
||||
)
|
||||
|
||||
// $: spaceCounter = tasks.reduce(
|
||||
// (map, task) => map.set(task.space, (map.get(task.space) ?? 0) + 1),
|
||||
// new Map<Ref<Space>, number>()
|
||||
@ -295,7 +290,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<TaskTypeEditor taskType={selectedTaskType} projectType={type} {taskTypes} {taskTypeCounter} {statusCounter} />
|
||||
<TaskTypeEditor taskType={selectedTaskType} projectType={type} {taskTypes} {taskTypeCounter} />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -39,7 +39,6 @@
|
||||
export let taskType: TaskType
|
||||
export let type: ProjectType
|
||||
export let states: Status[] = []
|
||||
export let statusCounter = new Map<Ref<Status>, number>()
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
const client = getClient()
|
||||
@ -205,7 +204,6 @@
|
||||
<div class="flex-col flex-no-shrink mt-3">
|
||||
{#each states as state, i}
|
||||
{@const color = getColor(type, state, categoriesMap)}
|
||||
{@const counter = statusCounter.get(state._id)}
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
bind:this={elements[prevIndex + i]}
|
||||
@ -226,31 +224,26 @@
|
||||
selected = undefined
|
||||
}}
|
||||
>
|
||||
<div class="bar"><IconCircles size={'small'} /></div>
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
class="color"
|
||||
on:click={(ev) => {
|
||||
if (state.category !== undefined) {
|
||||
selectIcon(elements[i + prevIndex], state)
|
||||
} else {
|
||||
onColor(state, color, elements[i + prevIndex])
|
||||
}
|
||||
}}
|
||||
>
|
||||
<ObjectPresenter
|
||||
_class={state._class}
|
||||
objectId={state._id}
|
||||
value={state}
|
||||
props={{ projectType: type._id, taskType: taskType._id }}
|
||||
/>
|
||||
</div>
|
||||
<div class="flex-grow caption-color no-word-wrap">
|
||||
<!-- <StringPresenter value={state.name} oneLine /> -->
|
||||
|
||||
{#if counter !== undefined}
|
||||
- {counter}
|
||||
{/if}
|
||||
<div class="flex-row-center">
|
||||
<div class="bar"><IconCircles size={'small'} /></div>
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
class="color"
|
||||
on:click={(ev) => {
|
||||
if (state.category !== undefined) {
|
||||
selectIcon(elements[i + prevIndex], state)
|
||||
} else {
|
||||
onColor(state, color, elements[i + prevIndex])
|
||||
}
|
||||
}}
|
||||
>
|
||||
<ObjectPresenter
|
||||
_class={state._class}
|
||||
objectId={state._id}
|
||||
value={state}
|
||||
props={{ projectType: type._id, taskType: taskType._id }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
|
@ -32,7 +32,6 @@
|
||||
export let taskType: TaskType
|
||||
|
||||
export let taskTypeCounter: Map<Ref<TaskType>, number>
|
||||
export let statusCounter: Map<Ref<Status>, number>
|
||||
|
||||
export let taskTypes: TaskType[]
|
||||
|
||||
@ -113,7 +112,6 @@
|
||||
{taskType}
|
||||
type={projectType}
|
||||
{states}
|
||||
{statusCounter}
|
||||
on:delete={async (evt) => {
|
||||
const index = taskType.statuses.findIndex((p) => p === evt.detail.state._id)
|
||||
taskType.statuses.splice(index, 1)
|
||||
|
Loading…
Reference in New Issue
Block a user