Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ subprojects {
ncg {
dimension "branding"
resValue "string", "application_name", "Jataayu NCG"
buildConfigField "boolean", "is_ncg", "true"
// applicationId "com.ncg"
}
nhs {
dimension "branding"
resValue "string", "application_name", "Jataayu NHS"
buildConfigField "boolean", "is_ncg", "false"
// applicationId "com.nhs"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package `in`.projecteka.jataayu.provider.viewmodel

import `in`.projecteka.jataayu.core.BuildConfig
import `in`.projecteka.jataayu.core.model.*
import `in`.projecteka.jataayu.core.repository.UserAccountsRepository
import `in`.projecteka.jataayu.network.utils.*
Expand Down Expand Up @@ -37,6 +38,8 @@ class ProviderSearchViewModel(private val providerRepository: ProviderRepository
val otpText = ObservableField<String>()
val errorLbl = ObservableField<String>()
val setEnableButton = ObservableBoolean()
var showAyushmanId = ObservableBoolean(BuildConfig.is_ncg)


companion object {
const val OTP_LENGTH = 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@
android:layout_marginTop="@dimen/content_margin_medium"
android:drawablePadding="@dimen/content_padding_medium"
android:text="@string/ayushman_bharat_id"
app:toggledVisibility="@{viewModel.showAyushmanId}"
android:textSize="@dimen/text_size_small"
app:layout_constraintTop_toBottomOf="@id/gender"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -476,6 +477,7 @@
android:drawablePadding="@dimen/content_padding_small"
android:textSize="@dimen/text_size_medium"
android:text="@{ayushmanId}"
app:toggledVisibility="@{viewModel.showAyushmanId}"
app:layout_constraintTop_toBottomOf="@id/ayushman_bharat_id_lbl"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package `in`.projecteka.jataayu.user.account.ui.fragment

import `in`.projecteka.jataayu.core.ConsentScopeType
import `in`.projecteka.jataayu.network.utils.Loading
import `in`.projecteka.jataayu.user.account.R
import `in`.projecteka.jataayu.user.account.databinding.FragmentViewProfileBinding
import `in`.projecteka.jataayu.user.account.viewmodel.ProfileFragmentViewModel
import `in`.projecteka.jataayu.user.account.viewmodel.ProfileFragmentViewModel.Companion.KEY_SCOPE_TYPE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class ReadValuesToRecoverCmidFragment : Fragment(), AdapterView.OnItemSelectedLi
initSpinner()
}


private fun initSpinner() {
val arrayAdapter = ArrayAdapter<String>(
activity!!,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package `in`.projecteka.jataayu.user.account.viewmodel

import `in`.projecteka.jataayu.core.BuildConfig
import `in`.projecteka.jataayu.presentation.ui.viewmodel.BaseViewModel
import `in`.projecteka.jataayu.user.account.R
import `in`.projecteka.jataayu.util.repository.PreferenceRepository
Expand Down Expand Up @@ -33,6 +34,7 @@ class CreateAccountViewModel : BaseViewModel(), ChipGroup.OnCheckedChangeListene
val showErrorAyushmanId = ObservableBoolean(false)
val showErrorGender = ObservableBoolean(false)
val submitEnabled = ObservableBoolean(false)
var showAyushmanId = ObservableBoolean(BuildConfig.is_ncg)


fun validateFields(): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import `in`.projecteka.jataayu.network.utils.PayloadLiveData
import `in`.projecteka.jataayu.network.utils.fetch
import `in`.projecteka.jataayu.network.utils.partialFailure
import `in`.projecteka.jataayu.presentation.ui.viewmodel.BaseViewModel
import `in`.projecteka.jataayu.user.account.BuildConfig
import `in`.projecteka.jataayu.user.account.R
import `in`.projecteka.jataayu.util.livedata.SingleLiveEvent
import `in`.projecteka.jataayu.util.repository.CredentialsRepository
Expand All @@ -23,6 +24,7 @@ class ProfileFragmentViewModel(val repository: UserAccountsRepository,

var pinCreateOrEdit = ObservableField<Int>(R.string.create)
var showPinNotCreated = ObservableBoolean(true)
var showAyushmanId = ObservableBoolean(BuildConfig.is_ncg)

companion object {
private const val INDIA_COUNTRY_CODE = "+91"
Expand Down Expand Up @@ -81,4 +83,5 @@ class ProfileFragmentViewModel(val repository: UserAccountsRepository,
showPinNotCreated.set(false)
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import `in`.projecteka.jataayu.core.repository.UserAccountsRepository
import `in`.projecteka.jataayu.network.utils.PayloadLiveData
import `in`.projecteka.jataayu.network.utils.fetch
import `in`.projecteka.jataayu.presentation.ui.viewmodel.BaseViewModel
import `in`.projecteka.jataayu.user.account.BuildConfig
import `in`.projecteka.jataayu.user.account.R
import `in`.projecteka.jataayu.util.repository.PreferenceRepository
import `in`.projecteka.jataayu.util.repository.PreferenceRepository.Companion.COUNTRY_CODE_SEPARATOR
Expand Down Expand Up @@ -49,11 +50,10 @@ class ReadValuesFragmentViewModel(private val repository: UserAccountsRepository
val showErrorName = ObservableBoolean(false)
val showErrorGender = ObservableBoolean(false)
val showErrorMobile = ObservableBoolean(false)

var showAyushmanId = ObservableBoolean(BuildConfig.is_ncg)

val recoverCmidResponse = PayloadLiveData<GenerateOTPResponse>()


fun validateFields(): Boolean {

val listOfEvents: List<Boolean> = listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
android:layout_marginTop="@dimen/content_margin_extra_small"
app:layout_constraintStart_toStartOf="parent"
android:hint="@string/ayushman_bharat_id"
app:toggledVisibility="@{viewModel.showAyushmanId}"
android:id="@+id/til_ayushman_id"
app:layout_constraintTop_toBottomOf="@+id/til_yob"
style="@style/TextInputLayout">
Expand Down
1 change: 1 addition & 0 deletions user/account/src/main/res/layout/fragment_read_values.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
app:layout_constraintStart_toStartOf="parent"
android:hint="@string/ayushman_bharat_id"
app:layout_constraintTop_toBottomOf="@+id/cg_gender"
app:toggledVisibility="@{viewModel.showAyushmanId}"
style="@style/TextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_ayushman_bharat_id"
Expand Down
1 change: 1 addition & 0 deletions user/account/src/main/res/layout/fragment_view_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginTop="@dimen/content_margin_extra_extra_large"
android:hint="@string/ayushman_id"
app:toggledVisibility="@{viewModel.showAyushmanId}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cg_gender"
style="@style/TextInputLayout">
Expand Down