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

Invitation table view #382

Merged
merged 11 commits into from
Oct 24, 2024
Merged

Conversation

ipula
Copy link
Contributor

@ipula ipula commented Jul 15, 2024

No description provided.

@ipula ipula force-pushed the invitation-landing-page branch from ce6b33f to c18d239 Compare July 18, 2024 11:49
@ipula ipula changed the title [TEST ONLY]Invitation landing page [TEST ONLY]Invitation table view Jul 19, 2024
@ipula ipula force-pushed the invitation-landing-page branch 4 times, most recently from 10f08af to 5af9570 Compare July 26, 2024 15:51
@ipula ipula force-pushed the invitation-landing-page branch 7 times, most recently from 50d2e79 to e2b7aab Compare August 12, 2024 21:46
@ipula ipula force-pushed the invitation-landing-page branch 7 times, most recently from 2b83095 to 23647b7 Compare August 20, 2024 12:58
@ipula ipula force-pushed the invitation-landing-page branch from 23647b7 to c40baa1 Compare August 21, 2024 18:24
@ipula ipula force-pushed the invitation-landing-page branch 2 times, most recently from 6ff6df5 to 8b7aa7a Compare September 3, 2024 18:20
if (store.invitationPayload[field.name] === null) {
store.updatePayload(field.name, field.value, true);
} else {
store.updatePayload(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating invitation payload with the value it already has? Does it do anything? Or maybe could be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this now. Please have look after the commit

},
];
});

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need filter by validateFields anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will check I used this most cases

currentStep.value.sections.forEach((element, index) => {
let sectionPayload = {};
element.props.validateFields.forEach((field) => {
if (Object.keys(updatedPayload.value).includes(field)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need to check the validateFields? If we are sending only the updated fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But in the mockups familyname country etc.. are required therefor we need to add those somehow.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right.. I still have bit unclear understanding how exactly the updatedPayload works.

I thought that your intention was to update updatedPayload when given section is displayed.. to ensure that all metadata are included there? In other words that you rely on the fact that everything on the page which is there either from the start or updated from user ends up in updatedPayload - and thats what you send to server.

Therefore I am bit confused what validateFields are addressing here?

@@ -338,7 +396,8 @@ export const useAcceptInvitationPageStore = defineComponentStore(
{
label: t('acceptInvitation.modal.button'),
callback: (close) => {
close();
const {redirectToPage} = useUrl('submissions');
Copy link
Collaborator

@jardakotesovec jardakotesovec Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just asked @defstat about what error scenario might happen on finalise - ideally it would be handled as well - and we would show error. Please follow-up with @defstat on some particular scenario that could be tested.

Example that I can think of is if the invitation gets cancelled meanwhile. But there might be more.

<div v-for="step in store.formSteps" :key="step.id">
<template v-if="step.id === 'userDetails'">
<div v-for="section in step.sections" :key="section.id">
<div
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that you already iterate over the sections array in the AcceptInvitationPage? So maybe unnecessary to do it here again?

Copy link
Contributor Author

@ipula ipula Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a section array that's why used like this.I can use like step.sections[0]. Is it ok?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is intention here just to find the form from the userDetails to reuse it?

If thats the case I would suggest just pass this form to both steps, so its available to both independently.

@ipula ipula force-pushed the invitation-landing-page branch 2 times, most recently from c08bc49 to 75250e7 Compare October 22, 2024 16:28
@withanage withanage mentioned this pull request Oct 23, 2024
4 tasks
@ipula ipula force-pushed the invitation-landing-page branch from 7f23535 to d7c6245 Compare October 23, 2024 21:59
@jardakotesovec jardakotesovec merged commit d5e96c7 into pkp:main Oct 24, 2024
3 of 5 checks passed
@ipula ipula changed the title [TEST ONLY]Invitation table view Invitation table view Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants