Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple author affiliations #417

Open
wants to merge 68 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
fb85937
Author Affiliations (work in progress)
GaziYucel Sep 27, 2024
c08a298
Author Affiliations (work in progress)
GaziYucel Oct 2, 2024
60cb44a
Author Affiliations (work in progress)
GaziYucel Oct 2, 2024
23bed2e
Ror icon
GaziYucel Oct 3, 2024
d699409
Ror icon
GaziYucel Oct 3, 2024
2aff46c
Author affiliations (work in progress)
GaziYucel Oct 3, 2024
b83c294
Author affiliations (work in progress)
GaziYucel Oct 3, 2024
f7efca9
Merge branch 'pkp:main' into multiple-author-affiliations
GaziYucel Oct 4, 2024
869632a
Author Affiliations (work in progress)
GaziYucel Oct 4, 2024
98896f0
Merge branch 'pkp:main' into multiple-author-affiliations
GaziYucel Oct 7, 2024
4e242a1
FieldAffiliations.vue
GaziYucel Oct 7, 2024
059d2ab
Merge branch 'multiple-author-affiliations' of https://github.com/Gaz…
GaziYucel Oct 7, 2024
5209485
Author Affiliations (work in progress)
GaziYucel Oct 7, 2024
ab70b5e
Author Affiliations (work in progress)
GaziYucel Oct 7, 2024
5c4f851
Merge branch 'pkp:main' into multiple-author-affiliations
GaziYucel Oct 8, 2024
84eb8c0
Author Affiliations (work in progress)
GaziYucel Oct 8, 2024
d469b62
Author affiliations (work in progress)
GaziYucel Oct 8, 2024
b1c24d0
Author affiliations (work in progress)
GaziYucel Oct 8, 2024
199c0c3
Author affiliations (work in progress)
GaziYucel Oct 9, 2024
e905764
Author affiliations (work in progress)
GaziYucel Oct 9, 2024
1d3a086
Author affiliations (work in progress)
GaziYucel Oct 9, 2024
1b74faf
Author affiliations (work in progress)
GaziYucel Oct 9, 2024
81b3696
Author affiliations (work in progress)
GaziYucel Oct 9, 2024
622593f
Author affiliations (work in progress)
GaziYucel Oct 9, 2024
2c81740
Author affiliations (work in progress)
GaziYucel Oct 9, 2024
87ec4d5
Author affiliations (work in progress)
GaziYucel Oct 9, 2024
013c7c5
Merge branch 'pkp:main' into multiple-author-affiliations
GaziYucel Oct 10, 2024
889e1ba
Add parameter id to action
GaziYucel Oct 11, 2024
6242ffa
Preliminary solution, still buggy
GaziYucel Oct 14, 2024
2684c9f
Merge branch 'multiple-author-affiliations' of https://github.com/Gaz…
GaziYucel Oct 14, 2024
2724545
Storybook fix
GaziYucel Oct 20, 2024
8c98941
Merge branch 'pkp:main' into multiple-author-affiliations
GaziYucel Oct 21, 2024
854bf8d
Debugging errors
GaziYucel Oct 21, 2024
b05ed32
Debugging errors
GaziYucel Oct 21, 2024
3eb5dcb
Bug fix delete affiliation
GaziYucel Oct 21, 2024
315b228
Merge branch 'pkp:main' into multiple-author-affiliations
GaziYucel Oct 21, 2024
1df9ec2
Bug fixes add new contributor
GaziYucel Oct 21, 2024
c2df375
Translations globals for storybook
GaziYucel Oct 21, 2024
5e91a6f
Bug fixes
GaziYucel Oct 21, 2024
e214ed0
Typo
GaziYucel Oct 21, 2024
a3ff837
Cleanup
GaziYucel Oct 21, 2024
917bb72
Storybook fix
GaziYucel Oct 22, 2024
48bd4c1
Lorem ipsum in storybook; add mode manually close; component label / …
GaziYucel Oct 23, 2024
25eaa1f
bug fixes editable, addMode
GaziYucel Oct 23, 2024
77cea93
Merge branch 'pkp:main' into multiple-author-affiliations
GaziYucel Oct 23, 2024
6e4c341
fix: mock data; underscore in schema; api lookup storybook; translati…
GaziYucel Oct 24, 2024
4ff0508
Merge branch 'pkp:main' into multiple-author-affiliations
GaziYucel Oct 24, 2024
eb5f608
Cleanup
GaziYucel Oct 24, 2024
c92aeeb
Merge branch 'multiple-author-affiliations' of https://github.com/Gaz…
GaziYucel Oct 24, 2024
7381c87
localeDisplayNames; styling
GaziYucel Oct 25, 2024
c6d3f26
Error if no english name for affiliation found
GaziYucel Oct 25, 2024
1d98427
Merge conflict
GaziYucel Oct 28, 2024
0745a7e
Merge branch 'pkp:main' into multiple-author-affiliations
GaziYucel Oct 28, 2024
9b5f89b
Merge conflict
GaziYucel Oct 28, 2024
04ffd4d
Merge branch 'multiple-author-affiliations' of https://github.com/Gaz…
GaziYucel Oct 28, 2024
e5d4c14
Merge conflict
GaziYucel Oct 28, 2024
14b3502
Merge conflict
GaziYucel Oct 28, 2024
31e63d3
Merge branch 'pkp:main' into multiple-author-affiliations
GaziYucel Oct 30, 2024
3a1f378
Merge branch 'pkp:main' into multiple-author-affiliations
GaziYucel Nov 4, 2024
4f90b46
Styling new affiliation
GaziYucel Nov 7, 2024
10b5aff
Merge conflicts
GaziYucel Nov 8, 2024
692cce3
Merge conflicts
GaziYucel Nov 8, 2024
0349713
Merge conflicts
GaziYucel Nov 8, 2024
1d646a1
Adjustments for review of Bozana (work in progress)
GaziYucel Nov 11, 2024
bc6d878
authorId in component + eslint
GaziYucel Nov 12, 2024
b943488
ror lookup fix
GaziYucel Nov 13, 2024
2ba0c9f
supportedFormLocales; refactoring
GaziYucel Nov 14, 2024
9549dc9
when to show search phrase lookup dropdown
GaziYucel Nov 15, 2024
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
99 changes: 58 additions & 41 deletions public/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,7 @@ window.pkp = {
'invitation.role.addRole.button': 'Add Another Role',
'invitation.role.dateStart': 'Start Date',
'invitation.role.masthead': 'Journal Masthead',
'invitation.role.removeRole.button':
'Remove Role',
'invitation.role.removeRole.button': 'Remove Role',
'invitation.role.selectRole': 'Select a new role',
'invitation.wizard.completeSteps': '##invitation.wizard.completeSteps##',
'invitation.wizard.errors': '##invitation.wizard.errors##',
Expand Down Expand Up @@ -686,50 +685,68 @@ window.pkp = {
'user.password': 'Password',
'user.username': 'Username',
'validator.required': 'This field is required.',
'invitation.notification.closeBtn':'View all users',
'invitation.orcid.acceptInvitation.message':'Not verified. You can verify your ORCID iD from your profile section in OJS',
'userInvitation.emailField.description':'e.g. aeinstein@example.com',
'userInvitation.usernameField.description':'e.g. mickeymouse',
'userInvitation.orcidField.description':'e.g. 0000-0000-0000-0000',
'userInvitation.roleTable.role':'Role',
'userInvitation.roleTable.startDate':'Start Date',
'userInvitation.roleTable.endDate':'End Date',
'userInvitation.roleTable.journalMasthead':'Journal Masthead',
'userInvitation.modal.title':'Invitation Sent',
'userInvitation.modal.message':'{$email} has been invited to new role in OJS.You can be updated about users on the User and Roles page, your ojs notification and/ or your email',
'userInvitation.modal.button':'View All Users',
'acceptInvitation.usernameField.description':'It should be 10 characters long and could be a combination of uppercase letters, lowercase letters or numbers',
'acceptInvitation.passwordField.description':'It should be 12 characters long and should be a combination of uppercase letters, lowercase letters, numbers and symbols',
'acceptInvitation.review.userDetails':'User Details',
'acceptInvitation.review.accountDetails':'Account Details',
'acceptInvitation.verifyOrcid':'Verify ORCID iD',
'acceptInvitation.skipVerifyOrcid':'Skip ORCID verification',
'acceptInvitation.modal.title':"You've been assigned a new role in OJS",
'acceptInvitation.modal.message':'Congratulations on your new role in OJS! You might now have access to new options. If you need assistance navigating the system, please click on the “Help” buttons throughout the interface for guidance',
'acceptInvitation.modal.button':'View All Submissions',
'acceptInvitation.privacyStatement.btn':'Privacy Statement',
'acceptInvitation.privacyStatement.label':'Yes, I agree to have my data collected and stored according to the {$url}',
'invitation.notification.closeBtn': 'View all users',
'invitation.orcid.acceptInvitation.message':
'Not verified. You can verify your ORCID iD from your profile section in OJS',
'userInvitation.emailField.description': 'e.g. aeinstein@example.com',
'userInvitation.usernameField.description': 'e.g. mickeymouse',
'userInvitation.orcidField.description': 'e.g. 0000-0000-0000-0000',
'userInvitation.roleTable.role': 'Role',
'userInvitation.roleTable.startDate': 'Start Date',
'userInvitation.roleTable.endDate': 'End Date',
'userInvitation.roleTable.journalMasthead': 'Journal Masthead',
'userInvitation.modal.title': 'Invitation Sent',
'userInvitation.modal.message':
'{$email} has been invited to new role in OJS.You can be updated about users on the User and Roles page, your ojs notification and/ or your email',
'userInvitation.modal.button': 'View All Users',
'acceptInvitation.usernameField.description':
'It should be 10 characters long and could be a combination of uppercase letters, lowercase letters or numbers',
'acceptInvitation.passwordField.description':
'It should be 12 characters long and should be a combination of uppercase letters, lowercase letters, numbers and symbols',
'acceptInvitation.review.userDetails': 'User Details',
'acceptInvitation.review.accountDetails': 'Account Details',
'acceptInvitation.verifyOrcid': 'Verify ORCID iD',
'acceptInvitation.skipVerifyOrcid': 'Skip ORCID verification',
'acceptInvitation.modal.title': "You've been assigned a new role in OJS",
'acceptInvitation.modal.message':
'Congratulations on your new role in OJS! You might now have access to new options. If you need assistance navigating the system, please click on the “Help” buttons throughout the interface for guidance',
'acceptInvitation.modal.button': 'View All Submissions',
'acceptInvitation.privacyStatement.btn': 'Privacy Statement',
'acceptInvitation.privacyStatement.label':
'Yes, I agree to have my data collected and stored according to the {$url}',
'invitation.cancel': 'Cancel Invite',
'invitation.inviteToRole.btn': 'Invite to a role',
'invitation.header': 'Invitation',
'invitation.tableHeader.name': 'Name',
'invitation.searchForm.emptyError': 'At least provide one search criteria.',
'invitation.cancelInvite.actionName':'Cancel Invite',
'invitation.cancelInvite.title':'Cancel Invitation',
'invitation.cancelInvite.message': 'Cancel the invitation sent to {$givenName} {$familyName} will deactivate acceptance link sent via email. Here are the invitation details:',
'invitation.role.modifyRole.button':'Modify Role',
'invitation.masthead.show':'Appear on the masthead',
'invitation.masthead.hidden':'Does not appear on the masthead',
'invitation.removeRoles':'Remove Role',
'invitation.management.options':'Invitation management options',
'userInvitation.cancel.message':'Are you sure wnat to cancel this invitation ?',
'userInvitation.cancel.keepWorking':'Keep Working',
'userInvitation.status.invited':'Invited {$date}',
'userInvitation.search.userNotFound':'The user does not have a role in this journal',
'userInvitation.search.userFound':'The user already exists in the journal',
'userInvitation.edit.title':'Edit Invitation',
'userInvitation.edit.message':'If you edit the existing invitation or add a new role, the current invitation will be canceled and, a new one will be sent. Are you sure you want to proceed?',
'invitation.step':'STEP',
'invitation.cancelInvite.actionName': 'Cancel Invite',
'invitation.cancelInvite.title': 'Cancel Invitation',
'invitation.cancelInvite.message':
'Cancel the invitation sent to {$givenName} {$familyName} will deactivate acceptance link sent via email. Here are the invitation details:',
'invitation.role.modifyRole.button': 'Modify Role',
'invitation.masthead.show': 'Appear on the masthead',
'invitation.masthead.hidden': 'Does not appear on the masthead',
'invitation.removeRoles': 'Remove Role',
'invitation.management.options': 'Invitation management options',
'userInvitation.cancel.message':
'Are you sure wnat to cancel this invitation ?',
'userInvitation.cancel.goBack': 'Go Back',
'userInvitation.status.invited': 'Invited {$date}',
'userInvitation.search.userNotFound':
'The user does not have a role in this journal',
'userInvitation.search.userFound': 'The user already exists in the journal',
'userInvitation.edit.title': 'Edit Invitation',
'userInvitation.edit.message':
'If you edit the existing invitation or add a new role, the current invitation will be canceled and, a new one will be sent. Are you sure you want to proceed?',
'invitation.step': 'STEP',
'acceptInvitation.cancelInvite.title': 'Cancel Role Invitation Process?',
'acceptInvitation.cancel.message':
"Are you sure you want to cancel? Canceling now will stop the role acceptance process, and you’ll need to restart from the invitation email to accept the role again.If you’re already a user, you’ll be taken back to the dashboard. If not, you’ll need to access the invitation email to start the process again.",
'acceptInvitation.cancelInvite.button': 'Cancel Invitation Process',
'acceptInvitation.authorization.shouldBeAnonymous':
"Invitation not accepted. You're logged in as a different user.",
'acceptInvitation.authorization.message':
'Please log out and sign in with the correct account to accept this invitation.',
},

tinyMCE: {
Expand Down
4 changes: 3 additions & 1 deletion src/components/DropdownActions/DropdownActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ const emit = defineEmits([
]);

const emitAction = (action) => {
if (action.name) {
if (action.name && (action.id || action.id === 0)) {
emit('action', [action.name, action.id]);
} else if (action.name) {
emit('action', action.name);
}
};
Expand Down
2 changes: 2 additions & 0 deletions src/components/Form/FormGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
</template>

<script>
import FieldAffiliations from './fields/FieldAffiliations.vue';
import FieldArchivingPn from './fields/FieldArchivingPn.vue';
import FieldAutosuggestPreset from './fields/FieldAutosuggestPreset.vue';
import FieldBaseAutosuggest from './fields/FieldBaseAutosuggest.vue';
Expand Down Expand Up @@ -84,6 +85,7 @@ import {shouldShowFieldWithinGroup} from './formHelpers';
export default {
name: 'FormGroup',
components: {
FieldAffiliations,
FieldArchivingPn,
FieldAutosuggestPreset,
FieldBaseAutosuggest,
Expand Down
26 changes: 26 additions & 0 deletions src/components/Form/fields/FieldAffiliations.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {Primary, Controls, Stories, Meta, ArgTypes} from '@storybook/blocks';

import * as FieldAffiliationsStories from './FieldAffiliations.stories.js';

<Meta of={FieldAffiliationsStories} />

# FieldAffiliation

## Usage

A special component to maintain affiliations (institutions) of authors (contributors).

The Affiliations currently saved are shown in a tabular way.

The default locale name and a clickable status message is shown, which shows which translations are saved.
The affiliation name can be retrieved from an API or entered manually.
If retrieved from the API, the values will be read only.

The data of the API is from a cached data dump from https://ror.org.
Getting and saving the data dump is done with the classes in the namespace "PKP\ror".

The `value` are an array of Affiliation objects.

<Primary />
<Controls />
<Stories />
40 changes: 40 additions & 0 deletions src/components/Form/fields/FieldAffiliations.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import FieldAffiliations from './FieldAffiliations.vue';
import FieldAffiliationsMock from '@/components/Form/mocks/field-affiliations';
import {http, HttpResponse} from "msw";

const args = {...FieldAffiliationsMock};

export default {
title: 'Forms/FieldAffiliations',
component: FieldAffiliations,
args: {},
parameters: {
msw: {
handlers: [
http.get(
'https://mock/index.php/publicknowledge/api/v1/rors/?searchPhrase=Simon+Fraser+University',
async () => {
return HttpResponse.json(args.apiResponse);
},
),
],
},
},
render: (args) => ({
components: {FieldAffiliations},
setup() {
return {args}
},
template: `
<FieldAffiliations v-bind="args"/>`
}),
decorators: [
() => ({
template: '<div style="height: 600px"><story/></div>',
}),
],
};

export const Base = {
args: {...FieldAffiliationsMock},
};
Loading