Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion public/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ window.pkp = {
EDITORIAL_TASK_STATUS_PENDING: 1,
EDITORIAL_TASK_STATUS_IN_PROGRESS: 2,
EDITORIAL_TASK_STATUS_CLOSED: 3,

citationProcessingStatus: {
NOT_PROCESSED: 0,
PID_EXTRACTED: 1,
CROSSREF: 2,
OPEN_ALEX: 3,
ORCID: 4,
PROCESSED: 5,
},
},

/**
Expand Down Expand Up @@ -962,7 +971,7 @@ window.pkp = {
'submission.citations': 'References',
'submission.citations.structured': 'Structured References',
'submission.citations.structured.citationsMetadataLookup.description':
'This section helps you structure your references. Clicking "Enable Metadata Lookup" will allow the system to process your references and retrieve DOIs and other metadata from external sources. This may take some time, but you can continue working on your submission and return to this page later to view the updated structured citations. ',
'Structuring and Metadata Lookup is enabled for this Journal. The system will process your references and retrieve DOIs and other metadata from external sources. This may take some time, but you can continue working on your submission and return to this page later to view the updated structured citations.',
'submission.citations.structured.collapseAll': 'Collapse All',
'submission.citations.structured.deleteAllDialog.confirm':
"This will remove all references currently listed. You'll need to re-enter and process your citations again if you continue.",
Expand Down
4 changes: 2 additions & 2 deletions src/managers/CitationManager/CitationManager.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const Base = {
firstPage: 'e0274693',
handle: null,
id: 285,
isProcessed: true,
processingStatus: pkp.const.citationProcessingStatus.PROCESSED,
isStructured: true,
issue: '9',
lastPage: 'e0274693',
Expand Down Expand Up @@ -154,7 +154,7 @@ export const Base = {
firstPage: 'e0247724',
handle: null,
id: 286,
isProcessed: true,
processingStatus: pkp.const.citationProcessingStatus.PROCESSED,
isStructured: true,
issue: '3',
lastPage: 'e0247724',
Expand Down
7 changes: 6 additions & 1 deletion src/managers/CitationManager/CitationManagerCellCitation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@
<!-- is not structured -->
<div v-else>
<div>{{ citation.rawCitation }}</div>
<div v-if="citation.isProcessed" class="mt-2">
<div
v-if="citation.processingStatus == citationProcessingStatus.PROCESSED"
class="mt-2"
>
<Badge :color-variant="'attention'" :size-variant="'compact'">
{{
t('submission.citations.structured.noStructuredInformationFound')
Expand Down Expand Up @@ -183,4 +186,6 @@ const citationStore = useCitationManagerStore();
const isExpanded = computed(() => {
return citationStore.expandedIds.includes(citation.value.id);
});

const citationProcessingStatus = pkp.const.citationProcessingStatus;
</script>
6 changes: 5 additions & 1 deletion src/managers/CitationManager/citationManagerStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ export const useCitationManagerStore = defineComponentStore(
const totalCitations = computed(() => citations.value?.length ?? 0);
const processedCitations = computed(
() =>
(citations.value || []).filter((c) => c?.isProcessed === true).length,
(citations.value || []).filter(
(c) =>
c?.processingStatus ===
pkp.const.citationProcessingStatus.PROCESSED,
).length,
);

/**
Expand Down