diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a7a111c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.otf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text diff --git a/.idea/.idea.WheresMyMoney/.idea/dataSources.xml b/.idea/.idea.WheresMyMoney/.idea/dataSources.xml new file mode 100644 index 0000000..39f843a --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/dataSources.xml @@ -0,0 +1,15 @@ + + + + + sqlite.xerial + true + org.sqlite.JDBC + jdbc:sqlite:wheresmymoney.sqlite + + + + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/deploymentTargetSelector.xml b/.idea/.idea.WheresMyMoney/.idea/deploymentTargetSelector.xml new file mode 100644 index 0000000..4ba3514 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/deploymentTargetSelector.xml @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/encodings.xml b/.idea/.idea.WheresMyMoney/.idea/encodings.xml new file mode 100644 index 0000000..df87cf9 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/indexLayout.xml b/.idea/.idea.WheresMyMoney/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_activity_activity.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_activity_activity.xml new file mode 100644 index 0000000..f9c4041 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_activity_activity.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_activity_activity_ktx.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_activity_activity_ktx.xml new file mode 100644 index 0000000..de630a6 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_activity_activity_ktx.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_annotation_annotation.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_annotation_annotation.xml new file mode 100644 index 0000000..1c5de9f --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_annotation_annotation.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_annotation_annotation_experimental.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_annotation_annotation_experimental.xml new file mode 100644 index 0000000..9c3fbbd --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_annotation_annotation_experimental.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_annotation_annotation_jvm.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_annotation_annotation_jvm.xml new file mode 100644 index 0000000..f856199 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_annotation_annotation_jvm.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_appcompat_appcompat.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_appcompat_appcompat.xml new file mode 100644 index 0000000..72460ec --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_appcompat_appcompat.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_appcompat_appcompat_resources.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_appcompat_appcompat_resources.xml new file mode 100644 index 0000000..aaa23cf --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_appcompat_appcompat_resources.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_arch_core_core_common.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_arch_core_core_common.xml new file mode 100644 index 0000000..c8f80f7 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_arch_core_core_common.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_arch_core_core_runtime.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_arch_core_core_runtime.xml new file mode 100644 index 0000000..62d717c --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_arch_core_core_runtime.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_browser_browser.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_browser_browser.xml new file mode 100644 index 0000000..8bf0a23 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_browser_browser.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_cardview_cardview.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_cardview_cardview.xml new file mode 100644 index 0000000..db7812b --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_cardview_cardview.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_collection_collection.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_collection_collection.xml new file mode 100644 index 0000000..69a2e0a --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_collection_collection.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_collection_collection_jvm.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_collection_collection_jvm.xml new file mode 100644 index 0000000..16e070c --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_collection_collection_jvm.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_collection_collection_ktx.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_collection_collection_ktx.xml new file mode 100644 index 0000000..1335891 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_collection_collection_ktx.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_concurrent_concurrent_futures.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_concurrent_concurrent_futures.xml new file mode 100644 index 0000000..8070186 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_concurrent_concurrent_futures.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_constraintlayout_constraintlayout.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_constraintlayout_constraintlayout.xml new file mode 100644 index 0000000..3b9a3fc --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_constraintlayout_constraintlayout.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_constraintlayout_constraintlayout_core.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_constraintlayout_constraintlayout_core.xml new file mode 100644 index 0000000..8dc8eda --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_constraintlayout_constraintlayout_core.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_coordinatorlayout_coordinatorlayout.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_coordinatorlayout_coordinatorlayout.xml new file mode 100644 index 0000000..be2b9cd --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_coordinatorlayout_coordinatorlayout.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_core_core.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_core_core.xml new file mode 100644 index 0000000..d937f68 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_core_core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_core_core_ktx.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_core_core_ktx.xml new file mode 100644 index 0000000..3203bb9 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_core_core_ktx.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_cursoradapter_cursoradapter.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_cursoradapter_cursoradapter.xml new file mode 100644 index 0000000..2e5715c --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_cursoradapter_cursoradapter.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_customview_customview.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_customview_customview.xml new file mode 100644 index 0000000..5d66dac --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_customview_customview.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_customview_customview_poolingcontainer.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_customview_customview_poolingcontainer.xml new file mode 100644 index 0000000..cdbdaa4 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_customview_customview_poolingcontainer.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_documentfile_documentfile.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_documentfile_documentfile.xml new file mode 100644 index 0000000..dfcc871 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_documentfile_documentfile.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_drawerlayout_drawerlayout.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_drawerlayout_drawerlayout.xml new file mode 100644 index 0000000..cfb80eb --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_drawerlayout_drawerlayout.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_dynamicanimation_dynamicanimation.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_dynamicanimation_dynamicanimation.xml new file mode 100644 index 0000000..2642196 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_dynamicanimation_dynamicanimation.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_emoji2_emoji2.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_emoji2_emoji2.xml new file mode 100644 index 0000000..868b903 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_emoji2_emoji2.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_emoji2_emoji2_views_helper.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_emoji2_emoji2_views_helper.xml new file mode 100644 index 0000000..4e0be82 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_emoji2_emoji2_views_helper.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_exifinterface_exifinterface.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_exifinterface_exifinterface.xml new file mode 100644 index 0000000..ba8cc43 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_exifinterface_exifinterface.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_fragment_fragment.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_fragment_fragment.xml new file mode 100644 index 0000000..0084d5f --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_fragment_fragment.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_fragment_fragment_ktx.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_fragment_fragment_ktx.xml new file mode 100644 index 0000000..6e3b224 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_fragment_fragment_ktx.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_interpolator_interpolator.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_interpolator_interpolator.xml new file mode 100644 index 0000000..c36b6fb --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_interpolator_interpolator.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_legacy_legacy_support_core_utils.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_legacy_legacy_support_core_utils.xml new file mode 100644 index 0000000..c28b504 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_legacy_legacy_support_core_utils.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_common.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_common.xml new file mode 100644 index 0000000..a14c23a --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_common.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_common_jvm.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_common_jvm.xml new file mode 100644 index 0000000..60f64f5 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_common_jvm.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_livedata.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_livedata.xml new file mode 100644 index 0000000..bc64a7a --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_livedata.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_livedata_core.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_livedata_core.xml new file mode 100644 index 0000000..dc898a6 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_livedata_core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_livedata_core_ktx.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_livedata_core_ktx.xml new file mode 100644 index 0000000..03b697f --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_livedata_core_ktx.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_process.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_process.xml new file mode 100644 index 0000000..6d3d921 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_process.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_runtime_android.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_runtime_android.xml new file mode 100644 index 0000000..ea09cda --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_runtime_android.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_runtime_ktx_android.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_runtime_ktx_android.xml new file mode 100644 index 0000000..b25e59b --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_runtime_ktx_android.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel_android.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel_android.xml new file mode 100644 index 0000000..29c746e --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel_android.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel_ktx.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel_ktx.xml new file mode 100644 index 0000000..f914307 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel_ktx.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel_savedstate.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel_savedstate.xml new file mode 100644 index 0000000..e5ea909 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel_savedstate.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_loader_loader.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_loader_loader.xml new file mode 100644 index 0000000..0a78fd0 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_loader_loader.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_localbroadcastmanager_localbroadcastmanager.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_localbroadcastmanager_localbroadcastmanager.xml new file mode 100644 index 0000000..33bb9ce --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_localbroadcastmanager_localbroadcastmanager.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_navigation_navigation_common.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_navigation_navigation_common.xml new file mode 100644 index 0000000..e7af6b1 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_navigation_navigation_common.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_navigation_navigation_fragment.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_navigation_navigation_fragment.xml new file mode 100644 index 0000000..5758eec --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_navigation_navigation_fragment.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_navigation_navigation_runtime.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_navigation_navigation_runtime.xml new file mode 100644 index 0000000..31fad25 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_navigation_navigation_runtime.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_navigation_navigation_ui.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_navigation_navigation_ui.xml new file mode 100644 index 0000000..0ab34b6 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_navigation_navigation_ui.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_print_print.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_print_print.xml new file mode 100644 index 0000000..ab89a08 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_print_print.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_profileinstaller_profileinstaller.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_profileinstaller_profileinstaller.xml new file mode 100644 index 0000000..d708c14 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_profileinstaller_profileinstaller.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_recyclerview_recyclerview.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_recyclerview_recyclerview.xml new file mode 100644 index 0000000..6d9e14d --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_recyclerview_recyclerview.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_resourceinspection_resourceinspection_annotation.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_resourceinspection_resourceinspection_annotation.xml new file mode 100644 index 0000000..cac94d7 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_resourceinspection_resourceinspection_annotation.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_savedstate_savedstate.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_savedstate_savedstate.xml new file mode 100644 index 0000000..8643e82 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_savedstate_savedstate.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_savedstate_savedstate_ktx.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_savedstate_savedstate_ktx.xml new file mode 100644 index 0000000..850eaba --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_savedstate_savedstate_ktx.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_security_security_crypto.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_security_security_crypto.xml new file mode 100644 index 0000000..a47f73e --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_security_security_crypto.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_slidingpanelayout_slidingpanelayout.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_slidingpanelayout_slidingpanelayout.xml new file mode 100644 index 0000000..0253a1c --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_slidingpanelayout_slidingpanelayout.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_startup_startup_runtime.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_startup_startup_runtime.xml new file mode 100644 index 0000000..820ea4a --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_startup_startup_runtime.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_swiperefreshlayout_swiperefreshlayout.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_swiperefreshlayout_swiperefreshlayout.xml new file mode 100644 index 0000000..55019e7 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_swiperefreshlayout_swiperefreshlayout.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_tracing_tracing.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_tracing_tracing.xml new file mode 100644 index 0000000..fbd138f --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_tracing_tracing.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_transition_transition.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_transition_transition.xml new file mode 100644 index 0000000..400df54 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_transition_transition.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_vectordrawable_vectordrawable.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_vectordrawable_vectordrawable.xml new file mode 100644 index 0000000..31e0359 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_vectordrawable_vectordrawable.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_vectordrawable_vectordrawable_animated.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_vectordrawable_vectordrawable_animated.xml new file mode 100644 index 0000000..2e45ca3 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_vectordrawable_vectordrawable_animated.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_versionedparcelable_versionedparcelable.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_versionedparcelable_versionedparcelable.xml new file mode 100644 index 0000000..414d770 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_versionedparcelable_versionedparcelable.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_viewpager2_viewpager2.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_viewpager2_viewpager2.xml new file mode 100644 index 0000000..8c71481 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_viewpager2_viewpager2.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_viewpager_viewpager.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_viewpager_viewpager.xml new file mode 100644 index 0000000..c7a9bc3 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_viewpager_viewpager.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_window_extensions_core_core.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_window_extensions_core_core.xml new file mode 100644 index 0000000..652c7ea --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_window_extensions_core_core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_window_window.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_window_window.xml new file mode 100644 index 0000000..020257a --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/androidx_window_window.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/annotations.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/annotations.xml new file mode 100644 index 0000000..33ab75c --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/annotations.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/com_google_android_material_material.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/com_google_android_material_material.xml new file mode 100644 index 0000000..cf5a8a9 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/com_google_android_material_material.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/disklrucache.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/disklrucache.xml new file mode 100644 index 0000000..704bba2 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/disklrucache.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/gifdecoder.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/gifdecoder.xml new file mode 100644 index 0000000..b96d216 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/gifdecoder.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/glide.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/glide.xml new file mode 100644 index 0000000..e9d1a59 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/glide.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/guava_listenablefuture.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/guava_listenablefuture.xml new file mode 100644 index 0000000..ce5be99 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/guava_listenablefuture.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/maui.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/maui.xml new file mode 100644 index 0000000..0d12ba1 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/maui.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_annotations_24_1_0.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_annotations_24_1_0.xml new file mode 100644 index 0000000..49883e0 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_annotations_24_1_0.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_2_0_10.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_2_0_10.xml new file mode 100644 index 0000000..08bdb0a --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_2_0_10.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_common_2_0_10.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_common_2_0_10.xml new file mode 100644 index 0000000..e6e2cec --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_common_2_0_10.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_atomicfu_0_25_0.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_atomicfu_0_25_0.xml new file mode 100644 index 0000000..5037ba4 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_atomicfu_0_25_0.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_atomicfu_jvm_0_25_0.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_atomicfu_jvm_0_25_0.xml new file mode 100644 index 0000000..16aad50 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_atomicfu_jvm_0_25_0.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_android_1_8_1.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_android_1_8_1.xml new file mode 100644 index 0000000..f0c52b1 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_android_1_8_1.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_core_1_8_1.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_core_1_8_1.xml new file mode 100644 index 0000000..648cfe6 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_core_1_8_1.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm_1_8_1.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm_1_8_1.xml new file mode 100644 index 0000000..ae65769 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm_1_8_1.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_serialization_core_1_7_1.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_serialization_core_1_7_1.xml new file mode 100644 index 0000000..1d3bcba --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_serialization_core_1_7_1.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_serialization_core_jvm_1_7_1.xml b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_serialization_core_jvm_1_7_1.xml new file mode 100644 index 0000000..35d0120 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/libraries/org_jetbrains_kotlinx_kotlinx_serialization_core_jvm_1_7_1.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.WheresMyMoney/.idea/vcs.xml b/.idea/.idea.WheresMyMoney/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/.idea.WheresMyMoney/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/caches/deviceStreaming.xml b/.idea/caches/deviceStreaming.xml new file mode 100644 index 0000000..2db523f --- /dev/null +++ b/.idea/caches/deviceStreaming.xml @@ -0,0 +1,413 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..50d3df5 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1737661300898 + + + + \ No newline at end of file diff --git a/WheresMyMoney.Maui.Core/Balance.cs b/WheresMyMoney.Maui.Core/Balance.cs new file mode 100644 index 0000000..8c82fb8 --- /dev/null +++ b/WheresMyMoney.Maui.Core/Balance.cs @@ -0,0 +1,3 @@ +namespace WheresMyMoney.Maui.Core; + +public record Balance(int Id, decimal Amount, DateTime Date); \ No newline at end of file diff --git a/WheresMyMoney.Maui.Core/PlannedPayment.cs b/WheresMyMoney.Maui.Core/PlannedPayment.cs new file mode 100644 index 0000000..4361978 --- /dev/null +++ b/WheresMyMoney.Maui.Core/PlannedPayment.cs @@ -0,0 +1,78 @@ +namespace WheresMyMoney.Maui.Core; + +public enum ReoccurenceType +{ + Days, + Weeks, + Months, + Years, + EveryLastDayOfMonth +} + +public record PlannedPayment( + int Id, + decimal Amount, + string Name, + DateTime DateStart, + DateTime? DateEnd, + bool IsSubscription, + int? Reoccurences, + ReoccurenceType? ReoccurenceType) +{ + public List ExpandSubscription(DateTime startDate, DateTime endDate) + { + var expandedPayments = new List(); + + if (!IsSubscription || Reoccurences is null || Reoccurences < 1 || ReoccurenceType is null) + return DateStart >= startDate && DateStart <= endDate ? [this] : []; + + var occurrence = DateStart; + + while (occurrence <= endDate && (DateEnd == null || occurrence <= DateEnd)) + { + if (occurrence >= startDate) + { + expandedPayments.Add(new PlannedPayment( + 0, // New ID not assigned + Amount, + Name, + occurrence, + null, + false, + null, + null + )); + } + + occurrence = GetNextOccurence(occurrence, Reoccurences.Value, ReoccurenceType.Value); + } + + return expandedPayments; + + DateTime GetNextOccurence(DateTime dateStart, int reoccurences, ReoccurenceType reoccurenceType) + { + switch (reoccurenceType) + { + case Core.ReoccurenceType.Days: + return dateStart.AddDays(reoccurences); + case Core.ReoccurenceType.Weeks: + return dateStart.AddDays(reoccurences * 7); + break; + case Core.ReoccurenceType.Months: + return dateStart.AddMonths(reoccurences); + break; + case Core.ReoccurenceType.Years: + return dateStart.AddYears(reoccurences); + break; + case Core.ReoccurenceType.EveryLastDayOfMonth: + var result = new DateTime(startDate.Year, startDate.Month, + DateTime.DaysInMonth(dateStart.Year, dateStart.Month)); + if (result.Date != dateStart.Date) return result; + result = result.AddDays(1); + return new DateTime(result.Year, result.Month, DateTime.DaysInMonth(result.Year, result.Month)); + default: + throw new ArgumentOutOfRangeException(nameof(reoccurenceType), reoccurenceType, null); + } + } + } +} \ No newline at end of file diff --git a/WheresMyMoney.Maui.Core/Platforms/Android/PlatformClass1.cs b/WheresMyMoney.Maui.Core/Platforms/Android/PlatformClass1.cs new file mode 100644 index 0000000..f8af361 --- /dev/null +++ b/WheresMyMoney.Maui.Core/Platforms/Android/PlatformClass1.cs @@ -0,0 +1,6 @@ +namespace WheresMyMoney.Maui.Core; + +// All the code in this file is only included on Android. +public class PlatformClass1 +{ +} \ No newline at end of file diff --git a/WheresMyMoney.Maui.Core/Platforms/MacCatalyst/PlatformClass1.cs b/WheresMyMoney.Maui.Core/Platforms/MacCatalyst/PlatformClass1.cs new file mode 100644 index 0000000..84554f9 --- /dev/null +++ b/WheresMyMoney.Maui.Core/Platforms/MacCatalyst/PlatformClass1.cs @@ -0,0 +1,6 @@ +namespace WheresMyMoney.Maui.Core; + +// All the code in this file is only included on Mac Catalyst. +public class PlatformClass1 +{ +} \ No newline at end of file diff --git a/WheresMyMoney.Maui.Core/Platforms/Tizen/PlatformClass1.cs b/WheresMyMoney.Maui.Core/Platforms/Tizen/PlatformClass1.cs new file mode 100644 index 0000000..f63510c --- /dev/null +++ b/WheresMyMoney.Maui.Core/Platforms/Tizen/PlatformClass1.cs @@ -0,0 +1,9 @@ +using System; + +namespace WheresMyMoney.Maui.Core +{ + // All the code in this file is only included on Tizen. + public class PlatformClass1 + { + } +} \ No newline at end of file diff --git a/WheresMyMoney.Maui.Core/Platforms/Windows/PlatformClass1.cs b/WheresMyMoney.Maui.Core/Platforms/Windows/PlatformClass1.cs new file mode 100644 index 0000000..6b9ff81 --- /dev/null +++ b/WheresMyMoney.Maui.Core/Platforms/Windows/PlatformClass1.cs @@ -0,0 +1,6 @@ +namespace WheresMyMoney.Maui.Core; + +// All the code in this file is only included on Windows. +public class PlatformClass1 +{ +} \ No newline at end of file diff --git a/WheresMyMoney.Maui.Core/Platforms/iOS/PlatformClass1.cs b/WheresMyMoney.Maui.Core/Platforms/iOS/PlatformClass1.cs new file mode 100644 index 0000000..fc33fd9 --- /dev/null +++ b/WheresMyMoney.Maui.Core/Platforms/iOS/PlatformClass1.cs @@ -0,0 +1,6 @@ +namespace WheresMyMoney.Maui.Core; + +// All the code in this file is only included on iOS. +public class PlatformClass1 +{ +} \ No newline at end of file diff --git a/WheresMyMoney.Maui.Core/Repository.cs b/WheresMyMoney.Maui.Core/Repository.cs new file mode 100644 index 0000000..3edaeec --- /dev/null +++ b/WheresMyMoney.Maui.Core/Repository.cs @@ -0,0 +1,253 @@ +using Microsoft.Data.Sqlite; + +namespace WheresMyMoney.Maui.Core; + +public class Repository +{ + private static Repository? _instance; + + public static Repository Instance + { + get + { + if (_instance is not null) return _instance; + string dbPath = Path.Combine(FileSystem.AppDataDirectory, "wheresmymoney.db"); + _instance = new Repository(new SqliteConnection($"Data Source={dbPath};")); + return _instance; + } + } + + private readonly SqliteConnection _connection; + + private Repository(SqliteConnection connection) + { + _connection = connection; + _connection.Open(); + CreateTables(); + } + + ~Repository() + { + _connection.Close(); + } + + public void CreateTables() + { + using var command = _connection.CreateCommand(); + command.CommandText = """ + CREATE TABLE IF NOT EXISTS planned_payment ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + amount INTEGER NOT NULL, + name TEXT NOT NULL, + date_start TEXT NOT NULL, + date_end TEXT NULL, + is_subscription BOOLEAN NOT NULL, + reoccurences INTEGER NULL, + reoccurence_type INTEGER NULL CHECK(CASE reoccurences IS NOT NULL AND reoccurence_type IS NOT NULL WHEN TRUE THEN is_subscription ELSE NOT is_subscription END) + ); + + CREATE TABLE IF NOT EXISTS balance ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + amount INTEGER NOT NULL, + date TEXT NOT NULL + ); + + CREATE TABLE IF NOT EXISTS settings ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + payday TINYINT NOT NULL CHECK(payday BETWEEN 1 AND 31) + ); + """; + + command.ExecuteNonQuery(); + } + + public void InsertPlannedPayment(decimal amount, string name, DateTime dateStart, DateTime? dateEnd, + bool isSubscription, + int? reoccurences, ReoccurenceType? reoccurenceType) + { + using var command = _connection.CreateCommand(); + command.CommandText = """ + INSERT INTO planned_payment (amount, name, date_start, date_end, is_subscription, reoccurences, reoccurence_type) + VALUES (@amount, @name, @date_start, @date_end, @is_subscription, @reoccurences, @reoccurence_type); + """; + + command.Parameters.AddWithValue("@amount", (int)(amount * 100)); + command.Parameters.AddWithValue("@name", name); + command.Parameters.AddWithValue("@date_start", dateStart); + command.Parameters.AddWithValue("@date_end", dateEnd.HasValue ? dateEnd.Value : DBNull.Value); + command.Parameters.AddWithValue("@is_subscription", isSubscription); + command.Parameters.AddWithValue("@reoccurences", reoccurences is null ? DBNull.Value : reoccurences.Value); + command.Parameters.AddWithValue("@reoccurence_type", + reoccurenceType is null ? DBNull.Value : (int)reoccurenceType.Value); + + command.ExecuteNonQuery(); + + DataChanged(this, EventArgs.Empty); + } + + public void InsertBalance(decimal amount, DateTime date) + { + using var command = _connection.CreateCommand(); + command.CommandText = """ + INSERT INTO balance (amount, date) + VALUES (@amount, @date); + """; + + command.Parameters.AddWithValue("@amount", (int)(amount * 100)); + command.Parameters.AddWithValue("@date", date); + + command.ExecuteNonQuery(); + + DataChanged(this, EventArgs.Empty); + } + + + public decimal GetNewestBalance() + { + using var command = _connection.CreateCommand(); + command.CommandText = @"SELECT amount FROM balance ORDER BY date DESC LIMIT 1;"; + var result = command.ExecuteScalar(); + return result != null ? Convert.ToDecimal(result) / 100m : 0m; + } + + public List GetAllBalances() + { + var balances = new List(); + + using var command = _connection.CreateCommand(); + command.CommandText = @"SELECT id, amount, date FROM balance ORDER BY date;"; + using var reader = command.ExecuteReader(); + while (reader.Read()) + { + balances.Add(new Balance( + reader.GetInt32(0), + reader.GetDecimal(1) / 100m, + reader.GetDateTime(2) + )); + } + + return balances; + } + + public byte GetPayday() + { + using var command = _connection.CreateCommand(); + command.CommandText = "SELECT payday FROM settings LIMIT 1;"; + var result = command.ExecuteScalar(); + return result != null ? Convert.ToByte(result) : (byte)10; + } + + public void ReplacePayday(byte newPayday) + { + using var command = _connection.CreateCommand(); + command.CommandText = """ + INSERT INTO settings (id, payday) + VALUES (1, @payday) + ON CONFLICT(id) DO UPDATE SET payday = excluded.payday; + """; + + command.Parameters.AddWithValue("@payday", newPayday); + + command.ExecuteNonQuery(); + + DataChanged(this, EventArgs.Empty); + } + + public List GetAllPlannedPayments() + { + var payments = new List(); + + using var command = _connection.CreateCommand(); + command.CommandText = + "SELECT id, amount, name, date_start, date_end, is_subscription, reoccurences, reoccurence_type FROM planned_payment ORDER BY DATETIME(date_start);"; + using var reader = command.ExecuteReader(); + while (reader.Read()) + { + payments.Add(new PlannedPayment( + reader.GetInt32(0), + reader.GetDecimal(1) / 100m, + reader.GetString(2), + reader.GetDateTime(3), + reader.IsDBNull(4) ? null : reader.GetDateTime(4), + reader.GetBoolean(5), + reader.IsDBNull(6) ? null : reader.GetInt32(6), + reader.IsDBNull(7) ? null : (ReoccurenceType)reader.GetInt32(7) + )); + } + + return payments; + } + + public List GetFilteredPlannedPayments() + { + var filteredPayments = new List(); + var now = DateTime.Now; + + var nearestPayday = GetNearestPayday(now); + + using var command = _connection.CreateCommand(); + command.CommandText = """ + SELECT id, amount, name, date_start, date_end, is_subscription, reoccurences, reoccurence_type + FROM planned_payment + WHERE ( + (is_subscription = 0 AND DATETIME(date_start) >= DATETIME(@currentDate) AND DATETIME(date_start) <= DATETIME(@nearestPayday)) OR + (is_subscription = 1 AND (date_end IS NULL OR DATETIME(date_end) >= DATETIME(@currentDate)) AND DATETIME(date_start) <= DATETIME(@nearestPayday)) + ) + ORDER BY DATETIME(date_start); + """; + + command.Parameters.AddWithValue("@currentDate", now); + command.Parameters.AddWithValue("@nearestPayday", nearestPayday); + + using var reader = command.ExecuteReader(); + while (reader.Read()) + { + filteredPayments.Add(new PlannedPayment( + reader.GetInt32(0), + reader.GetDecimal(1) / 100m, + reader.GetString(2), + reader.GetDateTime(3), + reader.IsDBNull(4) ? null : reader.GetDateTime(4), + reader.GetBoolean(5), + reader.IsDBNull(6) ? null : reader.GetInt32(6), + reader.IsDBNull(7) ? null : (ReoccurenceType)reader.GetInt32(7) + )); + } + + return filteredPayments; + } + + public DateTime GetNearestPayday(DateTime now) + { + var payday = GetPayday(); + var nearestPayday = + new DateOnly(now.Year, now.Month, + payday > DateTime.DaysInMonth(now.Year, now.Month) + ? DateTime.DaysInMonth(now.Year, now.Month) + : payday) + .ToDateTime(TimeOnly.MinValue); + if (now.Day <= payday) return nearestPayday; + var newDate = new DateOnly(now.Year, now.Month, DateTime.DaysInMonth(now.Year, now.Month)).AddDays(1); + nearestPayday = + new DateOnly(newDate.Year, newDate.Month, + payday > DateTime.DaysInMonth(newDate.Year, newDate.Month) + ? DateTime.DaysInMonth(newDate.Year, newDate.Month) + : payday).ToDateTime(TimeOnly.MinValue); + + return nearestPayday; + } + + public void RemovePlannedPayment(int id) + { + using var command = _connection.CreateCommand(); + command.CommandText = """ + DELETE FROM planned_payment + WHERE id = @id; + """; + command.Parameters.AddWithValue("@id", id); + command.ExecuteNonQuery(); + DataChanged(this, EventArgs.Empty); + } + + public event EventHandler DataChanged; +} \ No newline at end of file diff --git a/WheresMyMoney.Maui.Core/WheresMyMoney.Maui.Core.csproj b/WheresMyMoney.Maui.Core/WheresMyMoney.Maui.Core.csproj new file mode 100644 index 0000000..a0d02f4 --- /dev/null +++ b/WheresMyMoney.Maui.Core/WheresMyMoney.Maui.Core.csproj @@ -0,0 +1,26 @@ + + + + net9.0-android;net9.0-ios;net9.0-maccatalyst + $(TargetFrameworks);net9.0-windows10.0.19041.0 + + + true + true + enable + enable + + 15.0 + 15.0 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 + + + + + + + + diff --git a/WheresMyMoney.Maui/AddPlannedPaymentPage.xaml b/WheresMyMoney.Maui/AddPlannedPaymentPage.xaml new file mode 100644 index 0000000..567f543 --- /dev/null +++ b/WheresMyMoney.Maui/AddPlannedPaymentPage.xaml @@ -0,0 +1,74 @@ + + + + + +