Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Frontend
Commits
91b4dda6
Commit
91b4dda6
authored
3 years ago
by
Bastien Abadie
Browse files
Options
Downloads
Plain Diff
Merge branch 'order-transcriptions' into 'master'
Order transcriptions by worker name Closes
#752
See merge request
!1039
parents
562b9473
4147908d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1039
Order transcriptions by worker name
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vue/Element/DetailsPanel.vue
+10
-8
10 additions, 8 deletions
vue/Element/DetailsPanel.vue
with
10 additions
and
8 deletions
vue/Element/DetailsPanel.vue
+
10
−
8
View file @
91b4dda6
...
...
@@ -79,16 +79,16 @@
<
template
v-if=
"elementType.folder === false"
>
<DropdownContent
title=
"Transcriptions"
>
<GroupedTranscriptions
v-for=
"
(
transcription
s, workerId)
in elementTranscriptions"
:key=
"
workerId
"
:transcriptions=
"transcription
s
"
:worker-id=
"
workerId
"
v-for=
"transcription
Group
in elementTranscriptions"
:key=
"
transcriptionGroup[0]
"
:transcriptions=
"transcription
Group[1]
"
:worker-id=
"
transcriptionGroup[0]
"
/>
<template
v-if=
"canWrite(corpus)"
>
<a
v-on:click=
"transcriptionModal = true"
>
<i
class=
"icon-add-square"
></i>
Add
<template
v-if=
"
Object.keys(
elementTranscriptions
)
.length"
>
<template
v-if=
"elementTranscriptions.length"
>
or edit
</
template
>
a manual transcription
...
...
@@ -123,7 +123,7 @@ import { mapState, mapActions } from 'vuex'
import
{
corporaMixin
}
from
'
~/js/mixins
'
import
{
CLASSIFICATIONS_HELP
}
from
'
~/js/help
'
import
{
MANUAL_WORKER_VERSION
}
from
'
~/js/config
'
import
{
groupBy
}
from
'
lodash
'
import
{
groupBy
,
orderBy
}
from
'
lodash
'
import
Modal
from
'
~/vue/Modal
'
import
GroupedTranscriptions
from
'
./Transcription
'
...
...
@@ -183,7 +183,7 @@ export default {
}),
computed
:
{
...
mapState
(
'
elements
'
,
[
'
elements
'
,
'
transcriptions
'
,
'
neighbors
'
]),
...
mapState
(
'
process
'
,
[
'
workerVersions
'
]),
...
mapState
(
'
process
'
,
[
'
workerVersions
'
,
'
workers
'
]),
element
()
{
return
this
.
elements
[
this
.
elementId
]
},
...
...
@@ -266,10 +266,12 @@ export default {
if
(
workerVersionId
&&
!
(
workerVersionId
in
this
.
workerVersions
))
await
this
.
getWorkerVersion
(
workerVersionId
)
}
// Group transcriptions by worker
return
groupBy
(
transcriptions
,
t
=>
{
const
grouped
=
groupBy
(
transcriptions
,
t
=>
{
if
(
!
t
.
worker_version_id
)
return
MANUAL_WORKER_VERSION
return
this
.
workerVersions
[
t
.
worker_version_id
].
worker
.
id
})
// Order by worker name
return
orderBy
(
Object
.
entries
(
grouped
),
([
id
])
=>
id
===
MANUAL_WORKER_VERSION
?
''
:
this
.
workers
[
id
].
name
)
},
default
:
{}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment