-
Notifications
You must be signed in to change notification settings - Fork 658
MIFOSAC-577 Client Profile Documents #2501
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
Merged
therajanmaurya
merged 78 commits into
openMF:development
from
TheKalpeshPawar:clientDocument
Sep 12, 2025
Merged
MIFOSAC-577 Client Profile Documents #2501
therajanmaurya
merged 78 commits into
openMF:development
from
TheKalpeshPawar:clientDocument
Sep 12, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # core/ui/src/commonMain/kotlin/com/mifos/core/ui/components/MifosActionsListingCardComponent.kt # feature/client/src/commonMain/kotlin/com/mifos/feature/client/di/ClientModule.kt # feature/client/src/commonMain/kotlin/com/mifos/feature/client/navigation/ClientNavigation.kt
# Conflicts: # feature/client/src/commonMain/kotlin/com/mifos/feature/client/di/ClientModule.kt
revanthkumarJ
suggested changes
Sep 12, 2025
...nMain/kotlin/com/mifos/feature/client/clientAddDocuments/ClientAddDocumentScreenViewmodel.kt
Show resolved
Hide resolved
...nMain/kotlin/com/mifos/feature/client/clientAddDocuments/ClientAddDocumentScreenViewmodel.kt
Show resolved
Hide resolved
...nMain/kotlin/com/mifos/feature/client/clientAddDocuments/ClientAddDocumentScreenViewmodel.kt
Show resolved
Hide resolved
...nMain/kotlin/com/mifos/feature/client/clientAddDocuments/ClientAddDocumentScreenViewmodel.kt
Show resolved
Hide resolved
...rc/commonMain/kotlin/com/mifos/feature/client/clientAddDocuments/ClientAddDocumentsScreen.kt
Outdated
Show resolved
Hide resolved
...rc/commonMain/kotlin/com/mifos/feature/client/clientAddDocuments/ClientAddDocumentsScreen.kt
Show resolved
Hide resolved
revanthkumarJ
approved these changes
Sep 12, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
##Video
Record_2025-09-12-20-19-12_026f621985d6cfa1a169c52d305dc178.mp4
---## Goal not achieved yet:
**Show preview for pdf documents.**
I haven't found a kmp library yet for this.
Actually I found one this morning, but it doesn't suppot IOS
Link: [compose-pdf](https://klibs.io/project/zt64/compose-pdf)
But I was busy making the screen work, I haven't properly looked into this issue yet.
Important things to note
How is the preview for documents implemented?
Image as Documents
in which case they can update the document too.
PDF as Documents
before upload. They can replace the file too.
What I have done in this PR ?
My task was to create feature for clients documents upload and preview.
-- ClientDocumentList Screen: This screen lists documents of the client.
-- ClientAddDocument Screen: This screen is for adding and updating client documents.
-- DocumentPreviewScreen: This is for show preview of document and choosing a new one if needed.
One thing about the DocumentPreview Screen, it is used with other screen too, therefore I wanted it to be a separate screen.
I don't know If I have succeeded in doing so.
Since, these are three different screens they have their own different states and also their own view model.
As they were state dependent on each other, I had to find out some way of sharing states between these three screens.
Navigation arguments were a terrible option.
I tried using shared viewmodel then, which also didn't work, because of too many states and having to host a shared view model in a navgraph, which created issue with navigation.
My solution
I have used a repository and hosted common states in it and injected it in these three screens.
I rewrote this feature many times, and this time it worked properly. I think it can be improved. So, help me improve it.