Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a04d7ca
pkp/pkp-lib#11291 Add subLabel when displaying options for FieldOptions
blesildaramirez Jul 3, 2025
f9d927b
pkp/pkp-lib#11291 Add addFieldOptions and addFieldRichTextArea method…
blesildaramirez Jul 3, 2025
a4dbd60
pkp/pkp-lib#11291 Add submissionStageId prop to DiscussionManager com…
blesildaramirez Jul 3, 2025
69b3768
pkp/pkp-lib#11291 Add participant.userName information
blesildaramirez Jul 3, 2025
2436a44
pkp/pkp-lib#11291 Add form story for discussion manager component
blesildaramirez Jul 4, 2025
b5c5e64
pkp/pkp-lib#11291 Add fields to add new discussion form
blesildaramirez Jul 4, 2025
4fe0a63
pkp/pkp-lib#11291 Add global locale keys
blesildaramirez Jul 4, 2025
b2c99da
pkp/pkp-lib#11291 Add FieldCheckbox component
blesildaramirez Jul 7, 2025
352add6
pkp/pkp-lib#11291 Update locale keys used for tasks and discussions form
blesildaramirez Jul 7, 2025
aac7bfe
pkp/pkp-lib#11291 Add fields to the Task information group and correc…
blesildaramirez Jul 7, 2025
fde04cb
pkp/pkp-lib#11291 Add getRelativeTargetDate method to date utils
blesildaramirez Jul 12, 2025
619996c
pkp/pkp-lib#11291 Add watch event to checkbox value
blesildaramirez Jul 12, 2025
5793461
pkp/pkp-lib#11291 Add groupComponents prop to display components to F…
blesildaramirez Jul 12, 2025
6e5c9e3
pkp/pkp-lib#11291 Add discussion templates component
blesildaramirez Jul 12, 2025
c41b9ac
pkp/pkp-lib#11291 Add more mockdata to discussion manager stories
blesildaramirez Jul 12, 2025
896c2dd
pkp/pkp-lib#11291 Add handler when a template is selected in form
blesildaramirez Jul 12, 2025
9427d06
pkp/pkp-lib#11291 Update template data mock
blesildaramirez Jul 13, 2025
73f7ec6
pkp/pkp-lib#11291 Update FormFieldLabel to only display the label if …
blesildaramirez Jul 14, 2025
8db688e
pkp/pkp-lib#11291 Add FormGroupHeader to display label and description
blesildaramirez Jul 14, 2025
cc4492c
pkp/pkp-lib#11291 Use slot forwarding to allow custom layout to use f…
blesildaramirez Jul 14, 2025
b87d3a1
pkp/pkp-lib#11291 Use group-layout slot to display for Discussion add…
blesildaramirez Jul 14, 2025
db3003e
pkp/pkp-lib#11291 Add locale keys for discussion form
blesildaramirez Jul 14, 2025
0fd9901
pkp/pkp-lib#11291 Remove added groupComponents prop
blesildaramirez Jul 14, 2025
424f87f
pkp/pkp-lib#11291 Convert group layout slot to configurable props in …
blesildaramirez Jul 18, 2025
47a189c
pkp/pkp-lib#111291 Remove added FieldCheckbox component
blesildaramirez Jul 18, 2025
e114cbf
pkp/pkp-lib#11291 Update story files for discussions
blesildaramirez Jul 22, 2025
0c1f7c9
pkp/pkp-lib#11291 Open side modal when edit button is clicked on disc…
blesildaramirez Jul 22, 2025
0bc4129
pkp/pkp-lib#11291 Add handler for viewing a task or discussion
blesildaramirez Jul 23, 2025
1576222
pkp/pkp-lib#11291 Use props to bind events on group components
blesildaramirez Jul 23, 2025
722956a
pkp/pkp-lib#11291 Remove addGroupComponent and just add it to addGrou…
blesildaramirez Jul 23, 2025
c7fba9f
pkp/pkp-lib#11291 Remove added addFieldCheckbox method
blesildaramirez Jul 23, 2025
de63a4f
pkp/pkp-lib#11291 Cleanup removed groupLayout slot
blesildaramirez Jul 23, 2025
70f7a40
pkp/pkp-lib#11291 Load the DiscussionManagerForm when viewing a discu…
blesildaramirez Jul 23, 2025
fd2dd70
pkp/pkp-lib#11291 Remove groupComponent prop and add it to the group …
blesildaramirez Jul 29, 2025
ac369cf
pkp/pkp-lib#11291 Add role list to templates list and use finishedCal…
blesildaramirez Jul 29, 2025
4a6e406
pkp/pkp-lib#11291 Pass an array instead of computed for defining fiel…
blesildaramirez Jul 29, 2025
7aa9fab
pkp/pkp-lib#11291 Add heading-element prop to form group header compo…
blesildaramirez Jul 27, 2025
fb5d90a
pkp/pkp-lib#11291 Change font styling of FormDisplayItemBasic component
blesildaramirez Jul 27, 2025
bc05312
pkp/pkp-lib#11291 Update FormDisplay to display group section
blesildaramirez Jul 27, 2025
2d8d134
pkp/pkp-lib#11291 Add FieldOptionsDisplay component
blesildaramirez Jul 27, 2025
aac9ff2
pkp/pkp-lib#11291 Add readonly version of the task or discussion item
blesildaramirez Jul 27, 2025
aad0a77
pkp/pkp-lib#11291 Add addFieldComponent method to useForm api
blesildaramirez Jul 30, 2025
bb04f0f
pkp/pkp-lib#11291 Make the FormDisplay be able to render custom compo…
blesildaramirez Jul 30, 2025
466c228
pkp/pkp-lib#11291 Add component to render discussion messages
blesildaramirez Jul 30, 2025
70441e7
pkp/pkp-lib#11291 Update classes used for form heading labels
blesildaramirez Jul 30, 2025
e77c1ed
pkp/pkp-lib#11291 Move rich textarea props from discussion form manag…
blesildaramirez Jul 31, 2025
473e096
pkp/pkp-lib#11291 Add submission and discussion props to discussion m…
blesildaramirez Jul 31, 2025
eec2f01
pkp/pkp-lib#11291 Bind the componentProps when rendering field.component
blesildaramirez Jul 31, 2025
150822e
pkp/pkp-lib#11291 Localize discussion status when rendering the table…
blesildaramirez Jul 31, 2025
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
45 changes: 39 additions & 6 deletions public/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ window.pkp = {
'common.deselect': 'Deselect',
'common.details': 'Details',
'common.download': 'Download',
'common.dueDate': 'Due Date',
'common.edit': 'Edit',
'common.editItem': 'Edit {$name}',
'common.emailTemplates': 'Email Templates',
Expand All @@ -210,6 +211,7 @@ window.pkp = {
'common.lastActivity': 'Last activity recorded on {$date}.',
'common.loaded': 'Loaded',
'common.loading': 'Loading',
'common.me': 'Me',
'common.moreActions': 'More Actions',
'common.name': 'Name',
'common.navigation.user': 'User Navigation',
Expand Down Expand Up @@ -263,6 +265,9 @@ window.pkp = {
'common.viewWithName': 'View {$name}',
'common.yes': 'Yes',
'common.yesContinue': 'Yes, Continue',
'common.yetToBegin': 'Yet to begin',
'common.inProgress': 'In Progress',
'common.closed': 'Closed',
'context.context': 'Journal',
'contributor.listPanel.preview': 'Preview',
'contributor.listPanel.preview.abbreviated': 'Abbreviated',
Expand Down Expand Up @@ -374,6 +379,38 @@ window.pkp = {
'Confirm Delete of Incomplete Submissions',
'dashboard.submitRevisions': 'Submit revisions',
'dashboard.toBePublishedInIssue': 'To be published in issue {$issue}',
'discussion.title': 'Desk Review Tasks & Discussions',
'discussion.description':
'Use this space to start discussions, assign tasks to others, or create your personal task list to help you move this submission to the next stage.',
'discussion.form.templatesLabel': 'Templates to get you started!',
'discussion.form.description':
'Open for What? Open to What? Beyond Content',
'discussion.form.detailsDescription':
'Use this space to share essential information.',
'discussion.form.detailsNameDescription':
'Please enter the name for this task and discussion.',
'discussion.form.detailsParticipantsDescription':
'You have the option to assign participants or allocate it solely to yourself.',
'discussion.form.discussionDescription':
'You can start a discussion thread here by adding a message. This space is also available for providing a brief overview of the task, including any key details, goals, or specific instructions to help guide the assignees.',
'discussion.form.taskInfoLabel': 'Enter task information',
'discussion.form.taskInformation': 'Task Information',
'discussion.form.taskInfoDescription':
'Please enter the tasks details here to help manage this task effectively.',
'discussion.form.taskInfoAssigneesLabel':
'Responsible to complete this task',
'discussion.form.taskInfoAssigneesDescription':
'If there is a specific participant designated to complete this task, please assign it to them here.',
'discussion.form.taskInfoDueDateDescription':
'If there is a deadline for this task, you can indicate it here. The due date will be communicated and established for each participant assigned to this task.',
'discussion.form.createDontStartTask': 'Create Task (Do Not Start)',
'discussion.form.startTaskUponSaving': 'Begin Task Upon Saving',
'discussion.template.taskDescription':
'This task template auto-fills the task name, due date, description, and roles. After selecting the template, you can modify any details before saving the task.',
'discussion.template.discussionDescription':
'This discussion template pre-fills the name, participants, and starting message. You can adjust the details before starting.',
'discussion.messageFrom': 'Message from {$from}',
'discussion.addNewMessage': 'Add New Message',
'doi.manager.versions.countStatement': 'There are {$count} versions.',
'doi.manager.versions.modalTitle': 'DOIs for all versions',
'doi.manager.versions.view': 'View all',
Expand Down Expand Up @@ -790,6 +827,8 @@ window.pkp = {
'submission.citations': 'References',
'submission.contributors': 'List of Contributors',
'submission.copyediting': 'Copyediting',
'submission.discussion': 'Discussion',
'submission.task': 'Task',
'submission.files': 'Files',
'submission.files.downloadAll': 'Download All Files',
'submission.finalDraft': 'Draft Files',
Expand Down Expand Up @@ -851,12 +890,6 @@ window.pkp = {
'submission.wizard.submissionCancel': 'Cancel submission',
'submissions.declined': 'Declined',
'submissions.incomplete': 'Incomplete',
'tasks.discussions.title': 'Desk Review Tasks & Discussions',
'tasks.discussions.description':
'Use this space to start discussions, assign tasks to others, or create your personal task list to help you move this submission to the next stage.',
'tasks.discussions.form.title': 'Desk Review Discussions and Tasks',
'tasks.discussions.form.description':
'Open for What? Open to What? Beyond Content',
'user.affiliation': 'Affiliation',
'user.affiliations': 'Affiliations',
'user.affiliations.deleteModal.message':
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form/FormFieldLabel.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<label :for="controlId" class="pkpFormFieldLabel">
<label v-if="label" :for="controlId" class="pkpFormFieldLabel">
<template v-if="localeLabel">
<span class="aria-hidden">{{ localeLabel }}</span>
<span class="-screenReader">{{ multilingualLabel }}</span>
Expand Down
22 changes: 13 additions & 9 deletions src/components/Form/FormGroup.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<template>
<fieldset class="pkpFormGroup -pkpClearfix" :class="spacingStyle">
<div v-if="label" class="pkpFormGroup__heading">
<legend class="pkpFormGroup__legend">{{ label }}</legend>
<div
v-if="description"
v-strip-unsafe-html="description"
class="pkpFormGroup__description semantic-defaults"
></div>
<div v-if="label || groupComponent" class="pkpFormGroup__heading">
<template v-if="groupComponent">
<component
:is="groupComponent.component"
v-bind="groupComponent.props"
></component>
</template>
<FormGroupHeader v-else :heading="label" :description="description" />
</div>
<div class="pkpFormGroup__fields">
<template v-for="field in fieldsInGroup">
Expand All @@ -24,7 +25,7 @@
>
<component
:is="field.component"
v-bind="field"
v-bind="{...field, ...field.componentProps}"
:all-errors="errors"
:locale-key="locale.key"
:form-id="formId"
Expand All @@ -39,7 +40,7 @@
<template v-else>
<component
:is="field.component"
v-bind="field"
v-bind="{...field, ...field.componentProps}"
:key="field.name"
:all-errors="errors"
:form-id="formId"
Expand All @@ -55,6 +56,7 @@
</template>

<script>
import FormGroupHeader from './FormGroupHeader.vue';
import FieldAffiliations from './fields/FieldAffiliations.vue';
import FieldArchivingPn from './fields/FieldArchivingPn.vue';
import FieldAutosuggestPreset from './fields/FieldAutosuggestPreset.vue';
Expand Down Expand Up @@ -89,6 +91,7 @@ import {shouldShowFieldWithinGroup} from './formHelpers';
export default {
name: 'FormGroup',
components: {
FormGroupHeader,
FieldAffiliations,
FieldArchivingPn,
FieldAutosuggestPreset,
Expand Down Expand Up @@ -123,6 +126,7 @@ export default {
label: String,
description: String,
pageId: String,
groupComponent: Object,
fields: Array,
errors: Object,
formId: String,
Expand Down
30 changes: 30 additions & 0 deletions src/components/Form/FormGroupHeader.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<template>
<component
:is="headingElement"
class="mb-2 inline-block text-2xl-bold font-bold"
>
{{ heading }}
</component>
<div
v-if="description"
v-strip-unsafe-html="description"
class="semantic-defaults text-lg-normal"
></div>
</template>

<script setup>
defineProps({
heading: {
type: String,
default: () => '',
},
headingElement: {
type: String,
default: () => 'h3',
},
description: {
type: String,
default: () => '',
},
});
</script>
14 changes: 10 additions & 4 deletions src/components/Form/fields/FieldOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,16 @@
:disabled="option.disabled"
/>
</template>
<span
v-strip-unsafe-html="option.label"
class="pkpFormField--options__optionLabel"
/>
<div class="flex flex-col">
<span
v-strip-unsafe-html="option.label"
class="pkpFormField--options__optionLabel"
/>
<span
v-strip-unsafe-html="option.subLabel"
class="pkpFormField--options__optionLabel"
/>
</div>
<Orderer
v-if="isOrderable"
:item-id="option.value"
Expand Down
39 changes: 39 additions & 0 deletions src/components/FormDisplay/FieldOptionsDisplay.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<template>
<component :is="headingElement" class="text-lg mb-1 inline-block font-bold">
{{ field.label }}
</component>
<div class="flex flex-col gap-y-2">
<div
v-for="(option, i) of selectedValues"
:key="option.value"
class="flex flex-col text-lg-normal"
>
<span>
<template v-if="field.showNumberedList">{{ i + 1 }}.</template>
{{ option.label }}
</span>
<span v-if="option.subLabel">
{{ option.subLabel }}
</span>
</div>
</div>
</template>

<script setup>
import {computed} from 'vue';

const props = defineProps({
field: {type: Object, required: true},
headingElement: {required: true, type: String},
});

const selectedValues = computed(() => {
if (!props.field?.value?.length) {
return '-';
}

return props.field.options.filter((option) =>
props.field.value.includes(option.value),
);
});
</script>
Loading