WEB-814 Make easier to upload client Identifiers#3300
WEB-814 Make easier to upload client Identifiers#3300Varun789-mx wants to merge 2 commits intoopenMF:devfrom
Conversation
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
Upload Document Dialog src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.ts |
onFileSelect now assigns the selected File to the file form control and additionally sets fileName to the file's name only if fileName is currently empty; JSDoc updated to reflect behavior. |
Environment Configuration src/environments/.env.ts |
Updated generated environment config values for mifos_x: version changed from '260108' to '260303' and hash from 'g5af11fe75' to 'g155aa7d0d'. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
- WEB-815 automatically the Filename #3259: Modifies
UploadDocumentDialogComponent.onFileSelectto auto-fillfileNameon selection; closely related change to the same method.
Suggested reviewers
- IOhacker
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately describes the main change: automatically populating the file name field when uploading client identifiers, making the upload process easier. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
Tip
Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.ts`:
- Around line 112-117: The onFileSelect handler currently only sets the fileName
control and leaves the file control as its initial empty string, causing uploads
to fail and .name access to throw in the consumer
(entity-documents-tab.component.ts). Update onFileSelect to also set the file
form control to the selected File object (use
uploadDocumentForm.get('file').setValue(file)) so dialogResponse.file is the
File, and optionally mark the control as touched/dirty or run validation after
setting; keep the existing fileName setValue behavior intact.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e28d4ead-37cf-45ce-813b-585eb7ac220f
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.jsonand included by**/*
📒 Files selected for processing (2)
src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.tssrc/environments/.env.ts
...ients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.ts
Show resolved
Hide resolved
IOhacker
left a comment
There was a problem hiding this comment.
Please review proposed fix, exclude from commit the json and the env files
There was a problem hiding this comment.
Exclude this file from commit
There was a problem hiding this comment.
Made the requested changes and also didn't commited the env file this sorry for the silly mistake i made earlier
Description
When adding a client identifier, the dialog required users to manually type the file name into a separate "File Name" field after already selecting a file via the Browse button. This was redundant and error-prone. The fix automatically populates the File Name field with the selected file's name when a file is chosen, improving the user experience and reducing unnecessary manual input.
Related issues and discussion
#WEB-814 Make easier to upload client Identifiers
Before
MIFOS-WEB-814-BEFORE.mp4
After
MIFOS-WEB-814-AFTER.mp4
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
If you have multiple commits please combine them into one commit by squashing them.
Read and understood the contribution guidelines at
web-app/.github/CONTRIBUTING.md.Summary by CodeRabbit
Bug Fixes
Chores