From 2899f8a7ff7b725bc3adc4138164ceede44579d0 Mon Sep 17 00:00:00 2001 From: Suyash Mittal Date: Sun, 28 Jul 2024 01:53:58 +0530 Subject: [PATCH] Added sorting to EMI and refactoring --- .idea/compiler.xml | 2 +- .idea/gradle.xml | 2 +- .idea/kotlinc.xml | 2 +- .idea/misc.xml | 3 +- app/build.gradle.kts | 24 ++-- .../suyash/creditmanager/domain/model/EMI.kt | 4 + .../use_case/credit_card/GetCreditCards.kt | 4 +- .../domain/use_case/emi/GetEMIs.kt | 6 +- .../use_case/transaction/GetTransactions.kt | 4 +- .../domain/util/CreditCardOrder.kt | 27 ---- .../creditmanager/domain/util/EMIOrder.kt | 10 -- .../creditmanager/domain/util/OrderType.kt | 6 - .../domain/util/order/CreditCardOrder.kt | 27 ++++ .../domain/util/order/EMIOrder.kt | 25 ++++ .../creditmanager/domain/util/order/Order.kt | 7 + .../domain/util/order/OrderType.kt | 13 ++ .../util/{ => order}/TransactionOrder.kt | 2 +- .../add_edit_emi/AddEditEMIViewModel.kt | 4 +- .../add_edit_txn/AddEditTxnViewModel.kt | 4 +- .../components/CustomActionBottomSheet.kt | 50 +++++++ ...nDialog.kt => CustomConfirmationDialog.kt} | 4 +- .../components/CustomSortingBottomSheet.kt | 72 ++++++++++ .../presentation/commons/model/ItemAction.kt | 10 ++ .../credit_cards/CreditCardsEvent.kt | 2 +- .../credit_cards/CreditCardsScreen.kt | 127 +++++------------- .../credit_cards/CreditCardsState.kt | 6 +- .../credit_cards/CreditCardsViewModel.kt | 4 +- .../presentation/emis/EMIsEvent.kt | 2 + .../presentation/emis/EMIsScreen.kt | 97 ++++++------- .../presentation/emis/EMIsState.kt | 4 +- .../presentation/emis/EMIsViewModel.kt | 9 +- .../transactions/TransactionsEvent.kt | 2 +- .../transactions/TransactionsScreen.kt | 4 +- .../transactions/TransactionsState.kt | 4 +- .../transactions/TransactionsViewModel.kt | 6 +- build.gradle.kts | 11 +- 36 files changed, 361 insertions(+), 229 deletions(-) delete mode 100644 app/src/main/java/com/suyash/creditmanager/domain/util/CreditCardOrder.kt delete mode 100644 app/src/main/java/com/suyash/creditmanager/domain/util/EMIOrder.kt delete mode 100644 app/src/main/java/com/suyash/creditmanager/domain/util/OrderType.kt create mode 100644 app/src/main/java/com/suyash/creditmanager/domain/util/order/CreditCardOrder.kt create mode 100644 app/src/main/java/com/suyash/creditmanager/domain/util/order/EMIOrder.kt create mode 100644 app/src/main/java/com/suyash/creditmanager/domain/util/order/Order.kt create mode 100644 app/src/main/java/com/suyash/creditmanager/domain/util/order/OrderType.kt rename app/src/main/java/com/suyash/creditmanager/domain/util/{ => order}/TransactionOrder.kt (79%) create mode 100644 app/src/main/java/com/suyash/creditmanager/presentation/commons/components/CustomActionBottomSheet.kt rename app/src/main/java/com/suyash/creditmanager/presentation/commons/components/{ConfirmationDialog.kt => CustomConfirmationDialog.kt} (97%) create mode 100644 app/src/main/java/com/suyash/creditmanager/presentation/commons/components/CustomSortingBottomSheet.kt create mode 100644 app/src/main/java/com/suyash/creditmanager/presentation/commons/model/ItemAction.kt diff --git a/.idea/compiler.xml b/.idea/compiler.xml index b589d56..b86273d 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 0897082..385bcfd 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,7 +5,7 @@