-
Notifications
You must be signed in to change notification settings - Fork 47
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
Conversation
ce6b33f
to
c18d239
Compare
10f08af
to
5af9570
Compare
50d2e79
to
e2b7aab
Compare
2b83095
to
23647b7
Compare
23647b7
to
c40baa1
Compare
6ff6df5
to
8b7aa7a
Compare
if (store.invitationPayload[field.name] === null) { | ||
store.updatePayload(field.name, field.value, true); | ||
} else { | ||
store.updatePayload( |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
}, | ||
]; | ||
}); | ||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
c08bc49
to
75250e7
Compare
7f23535
to
d7c6245
Compare
No description provided.