Skip to content

Commit 086aee6

Browse files
committed
pkp/pkp-lib#9453 Add sections to the round history modal
1 parent aeaa864 commit 086aee6

File tree

4 files changed

+114
-9
lines changed

4 files changed

+114
-9
lines changed

src/pages/reviewerSubmission/ReviewerSubmissionPage.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<template>
22
<div class="mb-4 space-x-2">
3+
<span class="bg-medium text-lg-normal">
4+
{{ t('reviewer.submission.reviewRound.info') }}
5+
</span>
36
<PkpButton
47
v-for="review in store.reviewRoundHistories"
58
:key="review.reviewRoundId"
Lines changed: 108 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,89 @@
11
<template>
22
<SideModalBody>
3-
<template #title>Title TODO</template>
3+
<template #title>
4+
<h1>{{ t('reviewer.submission.reviewRound.info.history') }}</h1>
5+
</template>
6+
<template v-if="store.submission" #description>
7+
<h2>
8+
{{ t(
9+
'reviewer.submission.reviewRound.info.modal.title',
10+
{reviewRoundNumber: store.reviewRoundNumber, submissionTitle: localize(store.submission.publications[0].title)}
11+
) }}
12+
</h2>
13+
</template>
414
<div class="p-4">
515
<div class="bg-lightest p-5">
6-
Here goes all metadata, submissionId: {{ store.submissionId }}, roundId:
7-
{{ store.reviewRoundId }}
16+
<div v-if="isReviewAssignmentDeclined">
17+
<Panel v-bind="panelOptions" class="mb-4">
18+
<PanelSection>
19+
<template #header>
20+
<h2>{{ t('reviewer.submission.reviewDeclineDate') }}</h2>
21+
</template>
22+
<p>{{ formatShortDate(dateConfirmed) }}</p>
23+
</PanelSection>
24+
</Panel>
825

9-
<div v-if="store.submission">
10-
<div class="text-xl-bold">
11-
{{ localize(store.submission.publications[0].title) }}
26+
<Panel v-if="declinedEmail" v-bind="panelOptions" class="mb-4">
27+
<PanelSection>
28+
<template #header>
29+
<h2>{{ t('reviewer.submission.emailLog') }}</h2>
30+
</template>
31+
<p>{{ declinedEmail.subject }}<br />{{ declinedEmail.body }}</p>
32+
</PanelSection>
33+
</Panel>
34+
<p v-else>{{ t('reviewer.submission.emailLog.defaultMessage') }}</p>
35+
</div>
36+
<div v-else>
37+
<Panel v-if="recommendation" v-bind="panelOptions" class="mb-4">
38+
<PanelSection>
39+
<template #header>
40+
<h2>{{ t('reviewer.article.recommendation') }}</h2>
41+
</template>
42+
<p>{{ recommendation }}</p>
43+
</PanelSection>
44+
</Panel>
45+
46+
<Panel v-if="reviewComments.length" v-bind="panelOptions" class="mb-4">
47+
<PanelSection>
48+
<template #header>
49+
<h2>{{ t('reviewer.submission.comments.review') }}</h2>
50+
</template>
51+
<p v-for="reviewComment in reviewComments">
52+
<b v-if="reviewComment.isViewable">{{ t('reviewer.submission.comments.authorAndEditor') }}</b>
53+
<b v-else>{{ t('reviewer.submission.comments.editorOnly') }}</b>
54+
{{ reviewComment.content }}
55+
</p>
56+
</PanelSection>
57+
</Panel>
58+
59+
<Panel v-bind="panelOptions" class="mb-4">
60+
<PanelSection>
61+
<template #header>
62+
<h2>{{ t('manager.setup.generalInformation') }}</h2>
63+
</template>
64+
<List>
65+
<ListItem>
66+
<b>{{ t('reviewer.submission.reviewRequestDate') }}:</b> {{ formatShortDate(dateNotified) }}
67+
</ListItem>
68+
<ListItem>
69+
<b>{{ t('reviewer.submission.responseDueDate') }}:</b> {{ formatShortDate(dateResponseDue) }}
70+
</ListItem>
71+
<ListItem>
72+
<b>{{ t('reviewer.submission.reviewDueDate') }}:</b> {{ formatShortDate(dateDue) }}
73+
</ListItem>
74+
<ListItem>
75+
<b>{{ t('common.dateCompleted') }}:</b> {{ formatShortDate(dateCompleted) }}
76+
</ListItem>
77+
</List>
78+
</PanelSection>
79+
</Panel>
80+
81+
<div v-if="hasAttachments" class="mb-4">
82+
<p>TODO: display attachments grid</p>
83+
</div>
84+
85+
<div v-if="hasFiles" class="mb-4">
86+
<p>TODO: display files grid</p>
1287
</div>
1388
</div>
1489
</div>
@@ -21,13 +96,39 @@ import {defineProps} from 'vue';
2196
import SideModalBody from '@/components/Modal/SideModalBody.vue';
2297
import {useTranslation} from '@/composables/useTranslation';
2398
import {useRoundHistoryModalStore} from './roundHistoryModalStore';
99+
import moment from 'moment';
100+
import List from "@/components/List/List.vue";
101+
import ListItem from "@/components/List/ListItem.vue";
102+
103+
function formatShortDate(dateString) {
104+
return moment(dateString).format('YYYY-MM-DD');
105+
}
106+
107+
const isReviewAssignmentDeclined = false;
108+
const reviewComments = [
109+
{'isViewable': true, 'content': 'Comment #1'},
110+
{'isViewable': false, 'content': 'Comment #2'},
111+
{'isViewable': true, 'content': 'Comment #3'},
112+
];
113+
const dateConfirmed = '2024-12-25 12:00:00';
114+
const dateNotified = '2024-01-17 12:00:00';
115+
const dateResponseDue = '2023-06-24 12:00:00';
116+
const dateDue = '2025-12-31 12:00:00';
117+
const dateCompleted = '2025-02-14 12:00:00';
118+
const hasAttachments = true;
119+
const hasFiles = true;
120+
const declinedEmail = {'subject': 'Email Subject', 'body': 'Email Body'};
121+
const recommendation = "This is the recommendation";
122+
123+
const panelOptions = { stack: true };
24124
25125
const props = defineProps({
26126
submissionId: {type: Number, required: true},
27127
reviewRoundId: {type: Number, required: true},
128+
reviewRoundNumber: {type: Number, required: true},
28129
});
29130
30-
const {localize} = useTranslation();
131+
const {t, localize} = useTranslation();
31132
32133
const store = useRoundHistoryModalStore(props);
33134
</script>

src/pages/reviewerSubmission/reviewerSubmissionPageStore.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export const useReviewerSubmissionPageStore = defineComponentStore(
66
(pageInitConfig) => {
77
const isRoundHistoryModalOpened = ref(false);
88
const roundHistoryModalProps = ref(null);
9-
function openRoundHistoryModal({submissionId, reviewRoundId}) {
10-
roundHistoryModalProps.value = {submissionId, reviewRoundId};
9+
function openRoundHistoryModal({submissionId, reviewRoundId, reviewRoundNumber}) {
10+
roundHistoryModalProps.value = {submissionId, reviewRoundId, reviewRoundNumber};
1111
isRoundHistoryModalOpened.value = true;
1212
}
1313
function closeRoundHistoryModal() {

src/pages/reviewerSubmission/roundHistoryModalStore.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const useRoundHistoryModalStore = defineComponentStore(
1818
submission,
1919
submissionId: props.submissionId,
2020
reviewRoundId: props.reviewRoundId,
21+
reviewRoundNumber: props.reviewRoundNumber,
2122
};
2223
},
2324
);

0 commit comments

Comments
 (0)