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

feat(condo): DOMA-8429 added user import help request #4513

Merged

Conversation

nomerdvadcatpyat
Copy link
Member

After the user requests help with the import, UserHelpRequest will be created and sent to managers via webhooks

изображение
изображение
изображение

@nomerdvadcatpyat nomerdvadcatpyat added ✋🙂 Review please Comments are resolved, take a look, please 🚨 Migrations We have a database migrations here! labels Mar 25, 2024
@nomerdvadcatpyat nomerdvadcatpyat force-pushed the feat/condo/DOMA-8429/added-user-import-help-request branch from 928c80b to 27f5edf Compare March 25, 2024 07:00
apps/condo/domains/onboarding/schema/UserHelpRequest.js Outdated Show resolved Hide resolved
apps/condo/domains/onboarding/schema/UserHelpRequest.js Outdated Show resolved Hide resolved
const files = await UserHelpRequestFile.getAll(context, { userHelpRequest: { id: userHelpRequestId } })

if (!isEmpty(files)) {
const currentMeta = { ...get(existingItem, fieldPath, {}), ...get(resolvedData, fieldPath, {}) }
Copy link
Contributor

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?

Copy link
Contributor

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:

  1. If there are files, then save only the new data
  2. If there are no files, then save both old and new data

Why does the behavior differ?

Copy link
Member Author

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

apps/condo/domains/onboarding/access/UserHelpRequest.js Outdated Show resolved Hide resolved
Comment on lines +29 to +31
hooks: {
afterChange: fileMetaAfterChange,
},
Copy link
Contributor

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?

Copy link
Member Author

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}>
Copy link
Contributor

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'?

@nomerdvadcatpyat nomerdvadcatpyat force-pushed the feat/condo/DOMA-8429/added-user-import-help-request branch 3 times, most recently from 11ee6b3 to 521b391 Compare April 3, 2024 10:04
@nomerdvadcatpyat nomerdvadcatpyat force-pushed the feat/condo/DOMA-8429/added-user-import-help-request branch from 7f49148 to 70cca59 Compare April 5, 2024 13:22
Copy link

sonarcloud bot commented Apr 5, 2024

Quality Gate Passed Quality Gate passed

Issues
39 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@nomerdvadcatpyat nomerdvadcatpyat merged commit ff046be into master Apr 5, 2024
23 checks passed
@nomerdvadcatpyat nomerdvadcatpyat deleted the feat/condo/DOMA-8429/added-user-import-help-request branch April 5, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 Migrations We have a database migrations here! ✋🙂 Review please Comments are resolved, take a look, please
Development

Successfully merging this pull request may close these issues.

None yet

3 participants