-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* pkp/pkp-lib#10618 Initial display of notifications and emails on workflow page. Removed some code duplications in workflow configs. * pkp/pkp-lib#10618 Add OMP notifications for productiong stage * pkp/pkp-lib#10618 Remove some redundant logic from omp, which can be inherited from OJS * pkp/pkp-lib#10618 Fix config for Jats to control correctly whether its editable or not * pkp/pkp-lib#10618 Styling of email listing and individual notifications * pkp/pkp-lib#10618 fix typo * pkp/pkp-lib#10618 Refine submission status, clean up inherited configurations, various fixes * pkp/pkp-lib#10599 Add createnew internal round action
- Loading branch information
1 parent
145ce66
commit 14c7d53
Showing
24 changed files
with
593 additions
and
1,207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export function useApp() { | ||
function isOJS() { | ||
return pkp.context.app === 'ojs2'; | ||
} | ||
function isOMP() { | ||
return pkp.context.app === 'omp'; | ||
} | ||
function isOPS() { | ||
return pkp.context.app === 'ops'; | ||
} | ||
|
||
return {isOJS, isOMP, isOPS}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
src/pages/workflow/components/primary/WorkflowListingEmails.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<template> | ||
<div v-if="emails?.length" class="border border-light"> | ||
<h3 class="lg-bold m-3 text-heading"> | ||
{{ t('notification.notifications') }} | ||
</h3> | ||
<ul> | ||
<li | ||
v-for="email in emails" | ||
:key="email.id" | ||
class="flex items-center border-t border-light px-3 py-1" | ||
> | ||
<span class="flex-1 truncate"> | ||
<a | ||
class="text cursor-pointer text-base-normal hover:underline" | ||
@click.prevent="openEmail(email.id)" | ||
> | ||
{{ email.subject }} | ||
</a> | ||
</span> | ||
<span class="ms-4 shrink-0 text-base-normal text-secondary"> | ||
{{ formatDateAndTime(email.dateSent) }} | ||
</span> | ||
</li> | ||
</ul> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import {computed, watch} from 'vue'; | ||
import {useUrl} from '@/composables/useUrl'; | ||
import {useFetch} from '@/composables/useFetch'; | ||
import {useDate} from '@/composables/useDate'; | ||
import {useModal} from '@/composables/useModal'; | ||
import {useLocalize} from '@/composables/useLocalize'; | ||
const props = defineProps({ | ||
submission: {type: Object, required: true}, | ||
selectedStageId: {type: Number, required: true}, | ||
}); | ||
const {t} = useLocalize(); | ||
const {formatDateAndTime} = useDate(); | ||
const {apiUrl} = useUrl('emails/authorEmails'); | ||
const requestQuery = computed(() => { | ||
if (props.selectedStageId === pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW) { | ||
return { | ||
submissionId: props.submission.id, | ||
eventType: pkp.const.EMAIL_LOG_EVENT_TYPE_EDITOR_NOTIFY_AUTHOR, | ||
}; | ||
} | ||
return null; | ||
}); | ||
const {data: emails, fetch: fetchEmails} = useFetch(apiUrl, { | ||
// currently only used in review stage, this can be extended if used across multiple stages | ||
query: { | ||
submissionId: props.submission.id, | ||
eventType: pkp.const.EMAIL_LOG_EVENT_TYPE_EDITOR_NOTIFY_AUTHOR, | ||
}, | ||
}); | ||
watch( | ||
requestQuery, | ||
(newRequestQuery) => { | ||
if (newRequestQuery) { | ||
fetchEmails(); | ||
} | ||
}, | ||
{immediate: true}, | ||
); | ||
function openEmail(emailId) { | ||
const {openSideModal} = useModal(); | ||
//en/authorDashboard/readSubmissionEmail?submissionId=19&stageId=3&reviewRoundId=13&submissionEmailId=158 | ||
//en/authorDashboard/readSubmissionEmail?submissionId19&submissionEmailId=158 | ||
const {pageUrl} = useUrl( | ||
`authorDashboard/readSubmissionEmail?submissionId=${props.submission.id}&submissionEmailId=${emailId}`, | ||
); | ||
openSideModal('LegacyAjax', { | ||
legacyOptions: { | ||
title: t('notification.notifications'), | ||
url: pageUrl, | ||
}, | ||
}); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
src/pages/workflow/components/primary/WorkflowReviewRoundStatus.vue
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.