mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-09 19:27:44 +02:00
UBER-408 Issue as task (#3497)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
})
|
||||
)
|
||||
for (const value of result) {
|
||||
const group = template.get(value.state)
|
||||
const group = template.get(value.status)
|
||||
if (group === undefined) continue
|
||||
if (value.doneState === null) {
|
||||
group.values[0].value++
|
||||
@@ -127,13 +127,13 @@
|
||||
const index = won ? 1 : 2
|
||||
group.values[index].value++
|
||||
}
|
||||
template.set(value.state, group)
|
||||
template.set(value.status, group)
|
||||
}
|
||||
items = Array.from(template.values())
|
||||
},
|
||||
{
|
||||
projection: {
|
||||
state: 1,
|
||||
status: 1,
|
||||
doneState: 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
function updateConfig (config: string[]): string[] {
|
||||
if (state !== undefined) {
|
||||
return config.filter((p) => p !== 'state')
|
||||
return config.filter((p) => p !== 'status')
|
||||
}
|
||||
if (selectedDoneStates.size === 1) {
|
||||
return config.filter((p) => p !== 'doneState')
|
||||
@@ -85,7 +85,7 @@
|
||||
resConfig = updateConfig(config)
|
||||
const result = client.getHierarchy().clone(query)
|
||||
if (state) {
|
||||
result.state = state
|
||||
result.status = state
|
||||
}
|
||||
if (selectedDoneStates.size > 0) {
|
||||
result.doneState = {
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
return contact.class.Employee
|
||||
}
|
||||
|
||||
const taskKeys = ['state', 'assignee', 'doneState']
|
||||
const taskKeys = ['status', 'assignee', 'doneState']
|
||||
|
||||
$: filtredKeys = keys.filter((p) => !taskKeys.includes(p.key)) // todo
|
||||
</script>
|
||||
@@ -76,7 +76,7 @@
|
||||
<AttributesBar {object} _class={object._class} keys={filtredKeys} />
|
||||
</div>
|
||||
</div>
|
||||
<AttributesBar {object} _class={object._class} keys={['doneState', 'state']} showHeader={false} />
|
||||
<AttributesBar {object} _class={object._class} keys={['doneState', 'status']} showHeader={false} />
|
||||
</div>
|
||||
{:else}
|
||||
<DocAttributeBar {object} {ignoreKeys} {mixins} {allowedCollections} on:update />
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
lookup: {
|
||||
...options?.lookup,
|
||||
space: task.class.SpaceWithStates,
|
||||
state: task.class.State,
|
||||
status: task.class.State,
|
||||
doneState: task.class.DoneState
|
||||
},
|
||||
sort: {
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
if (hierarchy.isDerived(state._class, task.class.DoneState)) {
|
||||
query = { doneState: state._id }
|
||||
} else {
|
||||
query = { state: state._id }
|
||||
query = { status: state._id }
|
||||
}
|
||||
|
||||
const objectsInThisState = await client.findAll(containingClass, query)
|
||||
|
||||
Reference in New Issue
Block a user