diff --git a/frontend/components/discrepancy/DiscrepancyList.vue b/frontend/components/discrepancy/DiscrepancyList.vue index 609824f6..27fb9f66 100644 --- a/frontend/components/discrepancy/DiscrepancyList.vue +++ b/frontend/components/discrepancy/DiscrepancyList.vue @@ -141,32 +141,7 @@ - + @@ -329,8 +304,7 @@ export default Vue.extend({ selectedItemText: '', selectedItemUserVotes: null as { [label: string]: { users: Array<{ id: number, name: string }> } } | null, dialogTab: 0, - selectedItems: [] as ExampleDTO[], - selectedUsersByItem: {} as { [itemId: number]: number[] } + selectedItems: [] as ExampleDTO[] } }, @@ -341,8 +315,7 @@ export default Vue.extend({ { text: 'Label Percentage', value: 'labelPercentages', sortable: false }, { text: 'Participation', value: 'participation', sortable: false }, { text: 'Discrepancy', value: 'discrepancyPercentage', sortable: true }, - { text: 'Status', value: 'status', sortable: false }, - { text: 'Action', value: 'action', sortable: false } + { text: 'Status', value: 'status', sortable: false } ] }, projectId(): string { @@ -869,38 +842,7 @@ loadLabelsIfNeeded() { return mapping[projectType] || `/projects/${projectId}/text-classification` }, - getAvailableUsers(item: ExampleDTO): { id: number; username: string }[] { - const userIds = new Set(); - if (item.annotations) { - item.annotations.forEach(annotation => { - const userId = annotation.user ?? annotation.user_id ?? annotation.created_by; - if (userId) { - userIds.add(userId); - } - }); - } - return Array.from(userIds).map(id => { - console.log(`DiscrepancyList - Buscando username para ID: ${id}. memberNames atual:`, JSON.stringify(this.memberNames, null, 2)); - return { - id, - username: this.memberNames[id] || `User ${id}`, - }; - }); - }, - compareUsersForDocument(exampleId: number, userIds: number[]) { - console.log(`Comparar exemplo ${exampleId} para usuários: ${userIds.join(', ')}`) - - // Navegar para a página de comparação com os IDs como query parameters - this.$router.push({ - path: this.$nuxt.localePath(`/projects/${this.projectId}/compare`), - query: { - exampleId: exampleId.toString(), - user1Id: userIds[0].toString(), - user2Id: userIds[1].toString() - } - }); - } } }) diff --git a/frontend/components/layout/TheSideBar.vue b/frontend/components/layout/TheSideBar.vue index c71949ba..03c4afde 100644 --- a/frontend/components/layout/TheSideBar.vue +++ b/frontend/components/layout/TheSideBar.vue @@ -44,7 +44,8 @@ import { mdiFileDocumentOutline, mdiEyeOutline, mdiVote, - mdiFileChartOutline + mdiFileChartOutline, + mdiCompareHorizontal } from '@mdi/js' import { getLinkToAnnotationPage } from '~/presenter/linkToAnnotationPage' @@ -136,6 +137,12 @@ export default { link: 'discrepancies', // LEVA PARA /projects/:id/discrepancies isVisible: this.isProjectAdmin }, + { + icon: mdiCompareHorizontal, // ÍCONE DE COMPARAÇÃO + text: 'Compare Annotations', + link: 'compare-annotations', // LEVA PARA /projects/:id/compare-annotations + isVisible: this.isProjectAdmin + }, { icon: mdiRobotOutline, // ÍCONE DE DISCREPÂNCIAS AUTOMÁTICAS text: 'Automatic Discrepancies', diff --git a/frontend/pages/projects/_id/compare-annotations/index.vue b/frontend/pages/projects/_id/compare-annotations/index.vue new file mode 100644 index 00000000..25c32025 --- /dev/null +++ b/frontend/pages/projects/_id/compare-annotations/index.vue @@ -0,0 +1,439 @@ + + + + + \ No newline at end of file diff --git a/frontend/pages/projects/_id/compare.vue b/frontend/pages/projects/_id/compare.vue deleted file mode 100644 index 4b981d0f..00000000 --- a/frontend/pages/projects/_id/compare.vue +++ /dev/null @@ -1,254 +0,0 @@ - - - - - \ No newline at end of file