Skip to content

Commit

Permalink
# This is a combination of 2 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

refactor: User Profile Module

# This is the commit message openMF#2:

refactor: savings module (openMF#2635)

refactor: qr module (openMF#2638)

refactor: transfer process module (openMF#2644)

Refactor login module (openMF#2639)

* refactor: Login module

* refactor: Login module

refactor: Account Module (openMF#2640)

refactor: Client Charge Module (openMF#2641)

refactor: Recent Transaction Module (openMF#2642)

refactor: third party transfer module (openMF#2643)

refactor: help module (openMF#2645)

refactor: notification module (openMF#2646)

refactor: location module (openMF#2647)

refactor: about us module (openMF#2648)

refactor: settings module (openMF#2649)

refactor: update password module (openMF#2650)
  • Loading branch information
akashmeruva9 committed Jul 9, 2024
1 parent dc68f7a commit 467c363
Show file tree
Hide file tree
Showing 309 changed files with 4,252 additions and 2,882 deletions.
19 changes: 16 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,25 @@ dependencies {
implementation(projects.core.data)
implementation(projects.core.datastore)
implementation(projects.ui)

implementation(projects.feature.loan)
implementation(projects.feature.login)
implementation(projects.feature.registration)
implementation(projects.feature.beneficiary)
implementation(projects.feature.guarantor)
implementation(projects.feature.savings)
implementation(projects.feature.qr)
implementation(projects.feature.transferProcess)
implementation(projects.feature.account)
implementation(projects.feature.clientCharge)
implementation(projects.feature.recentTransaction)
implementation(projects.feature.thirdPartyTransfer)
implementation(projects.feature.help)
implementation(projects.feature.notification)
implementation(projects.feature.location)
implementation(projects.feature.about)
implementation(projects.feature.settings)
implementation(projects.feature.updatePassword)


implementation("androidx.legacy:legacy-support-v4:1.0.0")
Expand All @@ -88,7 +103,7 @@ dependencies {
implementation(libs.androidx.appcompat)
implementation(libs.material)
implementation(libs.androidx.preference)
implementation(libs.play.services.maps)


// DBFlow
implementation(libs.dbflow)
Expand Down Expand Up @@ -186,8 +201,6 @@ dependencies {
debugApi(libs.androidx.compose.ui.tooling)
api(libs.androidx.hilt.navigation.compose)

// google maps
implementation ("com.google.maps.android:maps-compose:4.4.1")

//image cropper
implementation("com.github.CanHub:Android-Image-Cropper:4.0.0")
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/mifos/mobile/MifosSelfServiceApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import com.raizlabs.android.dbflow.config.FlowConfig
import com.raizlabs.android.dbflow.config.FlowManager
import dagger.hilt.android.HiltAndroidApp
import org.mifos.mobile.core.datastore.PreferencesHelper
import org.mifos.mobile.ui.settings.applySavedTheme
import org.mifos.mobile.core.common.utils.LanguageHelper.onAttach
import org.mifos.mobile.feature.settings.applySavedTheme

/**
* @author ishan
Expand Down
65 changes: 27 additions & 38 deletions app/src/main/java/org/mifos/mobile/ui/about/AboutUsFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,59 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.platform.ViewCompositionStrategy
import androidx.fragment.app.viewModels
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
import dagger.hilt.android.AndroidEntryPoint
import org.mifos.mobile.core.ui.theme.MifosMobileTheme
import org.mifos.mobile.ui.activities.PrivacyPolicyActivity
import org.mifos.mobile.core.model.enums.AboutUsListItemId
import org.mifos.mobile.ui.fragments.base.BaseFragment
import org.mifos.mobile.core.common.Constants.LICENSE_LINK
import org.mifos.mobile.core.common.Constants.SOURCE_CODE_LINK
import org.mifos.mobile.core.common.Constants.WEBSITE_LINK
import org.mifos.mobile.core.model.enums.AboutUsListItemId
import org.mifos.mobile.core.ui.component.mifosComposeView
import org.mifos.mobile.feature.about.ui.AboutUsScreen


/*
~This project is licensed under the open source MPL V2.
~See https://github.com/openMF/self-service-app/blob/master/LICENSE.md
*/
@AndroidEntryPoint
class AboutUsFragment : BaseFragment() {

private val viewModel: AboutUsViewModel by viewModels()

@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter")
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?,
): View {
return ComposeView(requireContext()).apply {
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
setContent {
MifosMobileTheme {
AboutUsScreen(viewModel)
return mifosComposeView(requireContext()) {
AboutUsScreen(
navigateToItem = {
navigateToItem(it.itemId)
}
}
)
}
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
viewModel.aboutUsItemEvent.observe(viewLifecycleOwner) {
when (it) {
AboutUsListItemId.OFFICE_WEBSITE -> {
startActivity(WEBSITE_LINK)
}

AboutUsListItemId.LICENSES -> {
startActivity(LICENSE_LINK)
}
private fun navigateToItem(aboutUsItem: AboutUsListItemId) {
when(aboutUsItem) {
AboutUsListItemId.OFFICE_WEBSITE -> {
startActivity(WEBSITE_LINK)
}

AboutUsListItemId.PRIVACY_POLICY -> {
startActivity(PrivacyPolicyActivity::class.java)
}
AboutUsListItemId.LICENSES -> {
startActivity(LICENSE_LINK)
}

AboutUsListItemId.SOURCE_CODE -> {
startActivity(SOURCE_CODE_LINK)
}
AboutUsListItemId.PRIVACY_POLICY -> {
startActivity(PrivacyPolicyActivity::class.java)
}

AboutUsListItemId.LICENSES_STRING_WITH_VALUE -> {
startActivity(OssLicensesMenuActivity::class.java)
}
AboutUsListItemId.SOURCE_CODE -> {
startActivity(SOURCE_CODE_LINK)
}

else -> {}
AboutUsListItemId.LICENSES_STRING_WITH_VALUE -> {
startActivity(OssLicensesMenuActivity::class.java)
}

AboutUsListItemId.APP_VERSION_TEXT -> Unit
}
}

Expand Down
74 changes: 0 additions & 74 deletions app/src/main/java/org/mifos/mobile/ui/about/AboutUsScreen.kt

This file was deleted.

61 changes: 0 additions & 61 deletions app/src/main/java/org/mifos/mobile/ui/about/AboutUsViewModel.kt

This file was deleted.

12 changes: 6 additions & 6 deletions app/src/main/java/org/mifos/mobile/ui/activities/HomeActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ import org.mifos.mobile.core.datastore.PreferencesHelper
import org.mifos.mobile.core.model.entity.client.Client
import org.mifos.mobile.utils.TextDrawable
import org.mifos.mobile.utils.Toaster
import org.mifos.mobile.utils.UserDetailUiState
import org.mifos.mobile.feature.user_profile.utils.UserDetailState
import org.mifos.mobile.utils.fcm.RegistrationIntentService
import org.mifos.mobile.ui.user_profile.UserDetailViewModel
import org.mifos.mobile.ui.user_profile.UserProfileActivity
import org.mifos.mobile.core.common.utils.ParcelableAndSerializableUtils.getCheckedParcelable
import org.mifos.mobile.feature.user_profile.viewmodel.UserDetailViewModel
import javax.inject.Inject
import org.mifos.mobile.ui.settings.SettingsActivity

Expand Down Expand Up @@ -117,16 +117,16 @@ class HomeActivity :
lifecycleScope.launchWhenStarted {
viewModel.userDetailUiState.collect {
when (it) {
is UserDetailUiState.Loading -> showProgress()
is UserDetailUiState.ShowUserDetails -> {
is UserDetailState.Loading -> showProgress()
is UserDetailState.ShowUserDetails -> {
hideProgress()
showUserDetails(it.client)
}
is UserDetailUiState.ShowUserImage -> {
is UserDetailState.ShowUserImage -> {
hideProgress()
showUserImage(it.image)
}
is UserDetailUiState.ShowError -> {
is UserDetailState.ShowError -> {
hideProgress()
showError(getString(it.message))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.mifos.mobile.R
import org.mifos.mobile.databinding.ActivitySavingsAccountApplicationBinding
import org.mifos.mobile.ui.activities.base.BaseActivity
import org.mifos.mobile.core.model.enums.SavingsAccountState
import org.mifos.mobile.ui.savings_account_application.SavingsAccountApplicationFragment.Companion.newInstance
import org.mifos.mobile.ui.savings_account.SavingsAccountApplicationFragment.Companion.newInstance

/*
* Created by saksham on 30/June/2018
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ import org.mifos.mobile.R
import org.mifos.mobile.core.ui.theme.MifosMobileTheme
import org.mifos.mobile.databinding.FragmentBeneficiaryAddOptionsBinding
import org.mifos.mobile.ui.activities.base.BaseActivity
import org.mifos.mobile.ui.beneficiary_application.BeneficiaryApplicationComposeFragment
import org.mifos.mobile.core.model.enums.BeneficiaryState
import org.mifos.mobile.core.model.enums.RequestAccessType
import org.mifos.mobile.ui.fragments.base.BaseFragment
import org.mifos.mobile.ui.qr.QrCodeReaderFragment
import org.mifos.mobile.ui.qr_code_import.QrCodeImportComposeFragment
import org.mifos.mobile.ui.qr.QrCodeImportComposeFragment
import org.mifos.mobile.utils.CheckSelfPermissionAndRequest
import org.mifos.mobile.utils.CheckSelfPermissionAndRequest.checkSelfPermission
import org.mifos.mobile.utils.CheckSelfPermissionAndRequest.requestPermission
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.mifos.mobile.ui.client_accounts


import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
Expand All @@ -16,6 +15,7 @@ import org.mifos.mobile.ui.activities.base.BaseActivity
import org.mifos.mobile.core.model.enums.AccountType
import org.mifos.mobile.ui.fragments.base.BaseFragment
import org.mifos.mobile.core.common.Constants
import org.mifos.mobile.feature.account.client_account.screens.ClientAccountsScreen

/*
~This project is licensed under the open source MPL V2.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import org.mifos.mobile.ui.enums.AccountType
import org.mifos.mobile.ui.fragments.base.BaseFragment
import org.mifos.mobile.core.common.Constants
import org.mifos.mobile.core.common.utils.ParcelableAndSerializableUtils.getCheckedSerializable
import org.mifos.mobile.utils.StatusUtils
import org.mifos.mobile.feature.account.utils.StatusUtils
import javax.inject.Inject
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import org.mifos.mobile.core.model.enums.ChargeType
import org.mifos.mobile.ui.fragments.base.BaseFragment
import org.mifos.mobile.core.common.Constants
import org.mifos.mobile.core.common.utils.ParcelableAndSerializableUtils.getCheckedSerializable
import org.mifos.mobile.feature.client_charge.screens.ClientChargeScreen
import org.mifos.mobile.feature.client_charge.viewmodel.ClientChargeViewModel

/**
* @author Vishwajeet
Expand Down Expand Up @@ -39,7 +41,7 @@ class ClientChargeComposeFragment : BaseFragment() {
savedInstanceState: Bundle?,
): View {
return mifosComposeView(requireContext()) {
ClientChargeScreen (
ClientChargeScreen(
navigateBack = { activity?.onBackPressed() }
)
}
Expand Down
Loading

0 comments on commit 467c363

Please sign in to comment.