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
feat(condo): DOMA-8429 added user import help request #4513
feat(condo): DOMA-8429 added user import help request #4513
Conversation
928c80b
to
27f5edf
Compare
const files = await UserHelpRequestFile.getAll(context, { userHelpRequest: { id: userHelpRequestId } }) | ||
|
||
if (!isEmpty(files)) { | ||
const currentMeta = { ...get(existingItem, fieldPath, {}), ...get(resolvedData, fieldPath, {}) } |
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.
Should we merge old data with new?
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.
It turns out like this:
- If there are files, then save only the new data
- If there are no files, then save both old and new data
Why does the behavior differ?
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.
User can not disconnect file after he create UserHelpRequest
.
There will be no case where a file related to a help request will be deleted
hooks: { | ||
afterChange: fileMetaAfterChange, | ||
}, |
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.
Should we update UserHelpRequest.meta
after deleting the connected file?
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 no, user can not update UserHelpRequestFile
if it's linked with UserHelpRequest
} | ||
</Upload> | ||
</div> | ||
<StyledUpload {...options}> |
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.
why not className='upload-control-wrapper'
?
11ee6b3
to
521b391
Compare
7f49148
to
70cca59
Compare
Quality Gate passedIssues Measures |
After the user requests help with the import,
UserHelpRequest
will be created and sent to managers via webhooks