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

Temp #37

Open
wants to merge 22 commits into
base: ut
Choose a base branch
from
Open

Temp #37

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d196f06
implement API for register but still doesnt work clearly
fajarnasrullah Jul 25, 2024
516d67d
created a successful Register Feature, and successfully sent the requ…
fajarnasrullah Jul 27, 2024
28f95ff
just adding a note
fajarnasrullah Jul 27, 2024
0fa5ce3
just adding a note
fajarnasrullah Jul 27, 2024
84165bc
Add calendar for BiodataFragment & remove nav for ktpVerification
Jul 29, 2024
21a96e4
Merge pull request #22 from arrister1/register_fix
arrister1 Jul 29, 2024
f8a65f1
ini disaat ganti ke multipart dan nambahin fitur upload image (tapi m…
fajarnasrullah Jul 31, 2024
ddebd1e
Create upload e-KTP feature with base64 (encode & decode image), and …
fajarnasrullah Jul 31, 2024
979c423
add accessibility for input email & phone number screen
Moirand Aug 1, 2024
7c54657
change pin layout, calendar on BiodataFragment, add logic for HomeFra…
Aug 1, 2024
23d4c98
Merge pull request #26 from arrister1/register_fix
arrister1 Aug 1, 2024
e97074c
back to Body Request
fajarnasrullah Aug 1, 2024
0c1bbb0
back to Body request and solved conflicts
fajarnasrullah Aug 1, 2024
695e763
fix error on HomeFragment
Aug 2, 2024
f9dadf9
Merge pull request #29 from arrister1/register_fix
arrister1 Aug 2, 2024
d561353
complete the registration error validation and correct the register r…
fajarnasrullah Aug 2, 2024
523a90a
integration API for ektp_photo request
fajarnasrullah Aug 3, 2024
9180be6
Remove unnecessary code and slightly modify and unify the code
fajarnasrullah Aug 4, 2024
95fc422
error logic from input email & password
fajarnasrullah Aug 5, 2024
118a435
setup acessiblity for ktp fragment and error response for login
fajarnasrullah Aug 5, 2024
625e382
repisi dikit
fajarnasrullah Aug 5, 2024
645d9b6
send username to home, get balance, and save account to local
fajarnasrullah Aug 5, 2024
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
7 changes: 2 additions & 5 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions .idea/other.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ dependencies {

implementation(project(":feature_auth"))
implementation(project(":feature_mutasi"))
implementation(project(":feature_dashboard"))
implementation(project(":common"))
implementation(project(":shared"))
implementation("androidx.activity:activity:1.8.0")
implementation("com.google.firebase:firebase-crashlytics:19.0.3")

Expand Down
5 changes: 4 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />


<application
android:name=".Application"
android:name=".MyApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
Expand Down
26 changes: 0 additions & 26 deletions app/src/main/java/com/synrgy7team4/bankingapps/Application.kt

This file was deleted.

14 changes: 13 additions & 1 deletion app/src/main/java/com/synrgy7team4/bankingapps/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package com.synrgy7team4.bankingapps

import android.content.Context
import android.content.SharedPreferences
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import androidx.navigation.fragment.NavHostFragment


Expand All @@ -15,7 +18,16 @@ class MainActivity : AppCompatActivity() {

// Navigate to the main destination

navController.navigate(com.synrgy7team4.feature_auth.R.id.splashScreenFragment)
val sharedPreferences: SharedPreferences = getSharedPreferences("RegisterPrefs", Context.MODE_PRIVATE)
val token = sharedPreferences.getString("token", null)

if (token != null) {
navController.navigate(com.synrgy7team4.feature_auth.R.id.homeFragment)
} else {
navController.navigate(com.synrgy7team4.feature_auth.R.id.splashScreenFragment)

}
// navController.navigate(com.synrgy7team4.feature_auth.R.id.splashScreenFragment)


}
Expand Down
48 changes: 48 additions & 0 deletions app/src/main/java/com/synrgy7team4/bankingapps/MyApplication.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.synrgy7team4.bankingapps

import android.app.Application
import androidx.lifecycle.ViewModelProvider
import com.jer.shared.ViewModelFactoryProvider
import com.synrgy7team4.feature_auth.di.AuthKoin

import com.synrgy7team4.feature_auth.di.Module

import com.synrgy7team4.feature_auth.presentation.viewmodel.AuthViewModelKoin
import com.synrgy7team4.feature_dashboard.di.DashboardKoin
import com.synrgy7team4.feature_dashboard.presentation.viewmodel.DashboardViewModelKoin
import com.synrgy7team4.feature_mutasi.di.MutasiKoin
import com.synrgy7team4.feature_mutasi.presentation.viewmodel.MutasiViewModelKoin
import org.koin.android.ext.koin.androidContext
import org.koin.android.ext.koin.androidLogger
import org.koin.core.context.startKoin

class MyApplication : Application(), ViewModelFactoryProvider {

lateinit var module: Module
lateinit var viewModelFactory: ViewModelFactory

override fun onCreate() {
super.onCreate()

module = Module(this)
viewModelFactory = ViewModelFactory(module)

startKoin {
androidLogger()
androidContext(this@MyApplication)
modules(

AuthKoin,
AuthViewModelKoin,
DashboardKoin,
MutasiKoin,
MutasiViewModelKoin,
DashboardViewModelKoin
)
}
}

override fun provideViewModelFactory(): ViewModelProvider.Factory {
return viewModelFactory
}
}
24 changes: 24 additions & 0 deletions app/src/main/java/com/synrgy7team4/bankingapps/ViewModelFactory.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.synrgy7team4.bankingapps

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.synrgy7team4.feature_auth.di.Module
import com.synrgy7team4.feature_auth.presentation.viewmodel.LoginViewModel
import com.synrgy7team4.feature_auth.presentation.viewmodel.RegisterViewModel

class ViewModelFactory(private val module: Module): ViewModelProvider.Factory {

override fun <T : ViewModel> create(modelClass: Class<T>): T {
return when (modelClass) {

RegisterViewModel::class.java-> RegisterViewModel(authRepository = module.authRepository) as T
LoginViewModel::class.java -> LoginViewModel(repository = module.authRepository) as T

else -> {
throw IllegalArgumentException("Unknown ViewModel class: " + modelClass.name)
}
}


}
}
7 changes: 7 additions & 0 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildFeatures {
viewBinding = true
dataBinding = true
}

buildTypes {
release {
isMinifyEnabled = false
Expand All @@ -33,6 +38,8 @@ android {

dependencies {



implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
Expand Down
1 change: 1 addition & 0 deletions common/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application

android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
Expand Down
2 changes: 2 additions & 0 deletions common/src/main/java/com/synrgy7team4/common/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ class Constants {
companion object {

const val BASE_URL = "https://staging-main-www.zoodmall.com/interface/"
// const val BASE_URL_AUTH = "https://virtserver.swaggerhub.com/IAMRECAL10/lumi-api/1.0.0/api/"
const val BASE_URL_AUTH = "https://backend-dev-synrgy-team4.koyeb.app/api/"
const val API_INTERNET_MESSAGE="No Internet Connection"
const val API_SOMETHING_WENT_WRONG_MESSAGE="Something went wrong"
const val API_FAILED_CODE="2222"
Expand Down
40 changes: 40 additions & 0 deletions common/src/main/res/drawable/bg_acc_card.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="344dp"
android:height="250dp"
android:viewportWidth="344"
android:viewportHeight="250">
<group>
<clip-path
android:pathData="M23,6L321,6A15,15 0,0 1,336 21L336,225A15,15 0,0 1,321 240L23,240A15,15 0,0 1,8 225L8,21A15,15 0,0 1,23 6z"/>
<path
android:pathData="M23,6L321,6A15,15 0,0 1,336 21L336,225A15,15 0,0 1,321 240L23,240A15,15 0,0 1,8 225L8,21A15,15 0,0 1,23 6z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="81.4"
android:startY="13.39"
android:endX="297.1"
android:endY="185.76"
android:type="linear">
<item android:offset="0" android:color="#FF0066AE"/>
<item android:offset="1" android:color="#FF0A3967"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M234.73,72.78H218.76C213.62,72.78 209.46,68.66 209.46,63.59C209.46,58.52 213.63,54.4 218.76,54.4H234.73C239.86,54.4 244.03,50.27 244.03,45.21V5.21C244.03,0.13 248.2,-3.98 253.33,-3.98C258.46,-3.98 262.64,0.14 262.64,5.21V45.21C262.64,60.42 250.11,72.79 234.71,72.79L234.73,72.78Z"
android:fillColor="#E4EDFF"/>
<path
android:pathData="M271.5,126.93H259.84C254.7,126.93 250.54,122.81 250.54,117.74C250.54,112.67 254.71,108.55 259.84,108.55H271.5C279.01,108.55 285.11,102.52 285.11,95.11V5.2C285.11,0.12 289.28,-3.99 294.41,-3.99C299.55,-3.99 303.72,0.13 303.72,5.2V95.11C303.72,112.66 289.26,126.94 271.49,126.94L271.5,126.93Z"
android:fillColor="#E4EDFF"/>
<path
android:pathData="M333.13,166.9C327.98,166.9 323.82,162.78 323.82,157.71V5.19C323.82,0.11 327.99,-4 333.13,-4C338.26,-4 342.43,0.12 342.43,5.19V157.71C342.43,162.79 338.26,166.9 333.13,166.9Z"
android:fillColor="#E4EDFF"/>
<path
android:pathData="M-88.16,21.45C-87.07,-41.74 -44.85,-93.97 15.5,-108.32C49.14,-116.31 81.07,-111.16 110.82,-94.21C145.61,-74.39 167.15,-44.63 175.97,-5.94C178.61,5.67 179.24,17.49 178.69,29.32C178.45,34.62 177.96,39.99 175.47,45.01C171.26,53.47 164.41,58.09 155.3,60.06C150.23,61.15 145.5,60.27 140.84,58.4C138.32,57.39 135.77,56.43 133.29,55.31C123.8,51.05 114.23,50.9 104.49,54.45C100.05,56.07 95.59,57.68 90.89,58.46C83.18,59.74 76.22,57.52 69.68,53.72C64.95,50.97 60.13,48.52 54.67,47.57C43.72,45.65 33.21,46.63 23.45,52.33C19.3,54.75 15.07,56.94 10.35,58.1C3.96,59.66 -2.15,58.43 -8.21,56.39C-12.62,54.9 -16.99,53.25 -21.6,52.39C-28.48,51.1 -35.04,52.27 -41.43,54.83C-44.38,56.01 -47.31,57.21 -50.24,58.43C-59.95,62.46 -68.85,60.55 -77.02,54.6C-83.37,49.97 -86.44,43.43 -87.41,35.76C-88.09,30.39 -88.23,25.02 -88.15,21.44L-88.16,21.45Z"
android:fillColor="#0A3967"/>
<path
android:pathData="M276.51,217.24C276.51,217.38 276.51,217.49 276.49,217.59C276.48,217.67 276.46,217.75 276.42,217.82C276.4,217.88 276.36,217.93 276.31,217.96C276.27,217.99 276.22,218 276.16,218H270.38C270.23,218 270.08,217.95 269.94,217.85C269.8,217.74 269.74,217.56 269.74,217.29V205.19C269.74,205.14 269.75,205.09 269.78,205.05C269.8,205.01 269.85,204.98 269.92,204.96C269.99,204.93 270.08,204.91 270.19,204.9C270.31,204.88 270.44,204.87 270.61,204.87C270.77,204.87 270.91,204.88 271.02,204.9C271.13,204.91 271.23,204.93 271.29,204.96C271.36,204.98 271.41,205.01 271.43,205.05C271.46,205.09 271.47,205.14 271.47,205.19V216.49H276.16C276.22,216.49 276.27,216.51 276.31,216.55C276.36,216.57 276.4,216.62 276.42,216.68C276.46,216.73 276.48,216.8 276.49,216.9C276.51,216.99 276.51,217.11 276.51,217.24ZM286.23,217.75C286.23,217.8 286.22,217.85 286.19,217.89C286.17,217.92 286.13,217.95 286.07,217.98C286.01,218.01 285.93,218.03 285.83,218.04C285.73,218.05 285.61,218.06 285.47,218.06C285.32,218.06 285.19,218.05 285.09,218.04C284.99,218.03 284.92,218.01 284.86,217.98C284.8,217.95 284.77,217.92 284.75,217.89C284.73,217.85 284.72,217.8 284.72,217.75V216.55C284.2,217.12 283.69,217.54 283.18,217.8C282.68,218.06 282.16,218.19 281.65,218.19C281.04,218.19 280.53,218.09 280.11,217.89C279.7,217.69 279.37,217.41 279.11,217.07C278.86,216.72 278.67,216.32 278.56,215.86C278.45,215.39 278.39,214.83 278.39,214.17V208.66C278.39,208.6 278.4,208.56 278.42,208.53C278.45,208.49 278.5,208.45 278.57,208.43C278.63,208.39 278.72,208.37 278.83,208.37C278.94,208.35 279.07,208.35 279.23,208.35C279.39,208.35 279.53,208.35 279.64,208.37C279.74,208.37 279.83,208.39 279.89,208.43C279.96,208.45 280,208.49 280.03,208.53C280.06,208.56 280.07,208.6 280.07,208.66V213.95C280.07,214.48 280.11,214.91 280.18,215.23C280.26,215.55 280.38,215.82 280.54,216.05C280.7,216.27 280.9,216.45 281.14,216.58C281.38,216.7 281.67,216.76 281.99,216.76C282.41,216.76 282.82,216.61 283.23,216.31C283.65,216.02 284.09,215.58 284.55,215.01V208.66C284.55,208.6 284.57,208.56 284.58,208.53C284.61,208.49 284.66,208.45 284.73,208.43C284.79,208.39 284.88,208.37 284.98,208.37C285.09,208.35 285.22,208.35 285.39,208.35C285.55,208.35 285.69,208.35 285.8,208.37C285.9,208.37 285.99,208.39 286.05,208.43C286.11,208.45 286.15,208.49 286.18,208.53C286.21,208.56 286.23,208.6 286.23,208.66V217.75ZM302.99,217.75C302.99,217.8 302.97,217.85 302.95,217.89C302.92,217.92 302.88,217.95 302.82,217.98C302.76,218.01 302.67,218.03 302.56,218.04C302.45,218.05 302.32,218.06 302.16,218.06C301.99,218.06 301.85,218.05 301.74,218.04C301.64,218.03 301.55,218.01 301.48,217.98C301.42,217.95 301.38,217.92 301.35,217.89C301.32,217.85 301.31,217.8 301.31,217.75V212.22C301.31,211.84 301.28,211.49 301.21,211.17C301.14,210.86 301.04,210.58 300.89,210.35C300.74,210.13 300.55,209.95 300.32,209.83C300.09,209.71 299.82,209.65 299.51,209.65C299.13,209.65 298.74,209.8 298.35,210.09C297.97,210.39 297.54,210.82 297.08,211.4V217.75C297.08,217.8 297.07,217.85 297.04,217.89C297.01,217.92 296.96,217.95 296.9,217.98C296.84,218.01 296.75,218.03 296.64,218.04C296.54,218.05 296.4,218.06 296.24,218.06C296.09,218.06 295.95,218.05 295.84,218.04C295.73,218.03 295.64,218.01 295.58,217.98C295.51,217.95 295.47,217.92 295.44,217.89C295.42,217.85 295.41,217.8 295.41,217.75V212.22C295.41,211.84 295.38,211.49 295.3,211.17C295.23,210.86 295.12,210.58 294.97,210.35C294.82,210.13 294.63,209.95 294.4,209.83C294.18,209.71 293.92,209.65 293.61,209.65C293.22,209.65 292.83,209.8 292.44,210.09C292.05,210.39 291.63,210.82 291.17,211.4V217.75C291.17,217.8 291.16,217.85 291.13,217.89C291.1,217.92 291.06,217.95 291,217.98C290.94,218.01 290.86,218.03 290.75,218.04C290.64,218.05 290.5,218.06 290.33,218.06C290.17,218.06 290.04,218.05 289.93,218.04C289.82,218.03 289.73,218.01 289.67,217.98C289.61,217.95 289.56,217.92 289.54,217.89C289.52,217.85 289.51,217.8 289.51,217.75V208.66C289.51,208.6 289.52,208.56 289.54,208.53C289.55,208.49 289.6,208.45 289.66,208.43C289.72,208.39 289.79,208.37 289.89,208.37C289.98,208.35 290.11,208.35 290.26,208.35C290.41,208.35 290.53,208.35 290.63,208.37C290.73,208.37 290.8,208.39 290.86,208.43C290.91,208.45 290.95,208.49 290.97,208.53C291,208.56 291.01,208.6 291.01,208.66V209.86C291.52,209.29 292.02,208.87 292.49,208.61C292.98,208.34 293.47,208.2 293.96,208.2C294.34,208.2 294.67,208.25 294.97,208.34C295.27,208.42 295.54,208.55 295.77,208.71C295.99,208.86 296.19,209.05 296.35,209.27C296.51,209.49 296.65,209.73 296.76,210C297.06,209.67 297.35,209.39 297.61,209.16C297.89,208.93 298.15,208.75 298.4,208.61C298.66,208.47 298.9,208.37 299.14,208.3C299.38,208.24 299.62,208.2 299.87,208.2C300.45,208.2 300.94,208.31 301.34,208.52C301.74,208.72 302.06,208.99 302.3,209.34C302.55,209.68 302.73,210.08 302.83,210.55C302.93,211.01 302.99,211.49 302.99,212V217.75ZM307.89,217.75C307.89,217.8 307.87,217.85 307.85,217.89C307.82,217.92 307.78,217.95 307.72,217.98C307.65,218.01 307.57,218.03 307.46,218.04C307.36,218.05 307.22,218.06 307.05,218.06C306.89,218.06 306.75,218.05 306.64,218.04C306.54,218.03 306.45,218.01 306.38,217.98C306.32,217.95 306.28,217.92 306.25,217.89C306.23,217.85 306.22,217.8 306.22,217.75V208.66C306.22,208.61 306.23,208.57 306.25,208.53C306.28,208.49 306.32,208.45 306.38,208.43C306.45,208.4 306.54,208.38 306.64,208.37C306.75,208.35 306.89,208.35 307.05,208.35C307.22,208.35 307.36,208.35 307.46,208.37C307.57,208.38 307.65,208.4 307.72,208.43C307.78,208.45 307.82,208.49 307.85,208.53C307.87,208.57 307.89,208.61 307.89,208.66V217.75ZM308.08,205.59C308.08,205.98 308.01,206.24 307.86,206.39C307.71,206.53 307.44,206.6 307.04,206.6C306.65,206.6 306.38,206.53 306.23,206.4C306.09,206.26 306.02,205.99 306.02,205.61C306.02,205.22 306.09,204.95 306.24,204.81C306.39,204.67 306.66,204.6 307.06,204.6C307.45,204.6 307.72,204.67 307.86,204.81C308.01,204.95 308.08,205.2 308.08,205.59Z"
android:fillColor="#ffffff"/>
</group>
</vector>
Loading