Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
WIP: Monefy import + update app icons for import
Browse files Browse the repository at this point in the history
  • Loading branch information
Iliyan Germanov committed Dec 7, 2021
1 parent cd9fffb commit dc376e6
Show file tree
Hide file tree
Showing 13 changed files with 71 additions and 61 deletions.
5 changes: 3 additions & 2 deletions app/src/main/java/com/ivy/wallet/logic/csv/CSVMapper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ class CSVMapper {
ivyMappingV1()
}
}
ImportType.MONEY_MANAGER_PRASE -> moneyManagerPrase()
ImportType.MONEY_MANAGER -> moneyManager()
ImportType.WALLET_BY_BUDGET_BAKERS -> walletByBudgetBakers()
ImportType.SPENDEE -> spendee()
ImportType.MONEFY -> TODO()
ImportType.ONE_MONEY -> oneMoney()
ImportType.BLUE_COINS -> blueCoins()
ImportType.KTW_MONEY_MANAGER -> ktwMoneyManager()
Expand Down Expand Up @@ -74,7 +75,7 @@ class CSVMapper {
)

//Praseto - https://play.google.com/store/apps/details?id=com.realbyteapps.moneymanagerfree&hl=en&gl=US
private fun moneyManagerPrase() = RowMapping(
private fun moneyManager() = RowMapping(
type = 6,
amount = 8,
account = 1,
Expand Down
33 changes: 17 additions & 16 deletions app/src/main/java/com/ivy/wallet/logic/csv/model/ImportType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import com.ivy.wallet.ui.theme.*

enum class ImportType {
IVY,
MONEY_MANAGER_PRASE,
MONEY_MANAGER,
WALLET_BY_BUDGET_BAKERS,
SPENDEE,
MONEFY,
ONE_MONEY,
BLUE_COINS,
KTW_MONEY_MANAGER,
Expand All @@ -20,9 +21,10 @@ enum class ImportType {

fun color(): Color = when (this) {
IVY -> Ivy
MONEY_MANAGER_PRASE -> Red
MONEY_MANAGER -> Red
WALLET_BY_BUDGET_BAKERS -> Green
SPENDEE -> RedLight
MONEFY -> Green
ONE_MONEY -> Red3
BLUE_COINS -> Blue
KTW_MONEY_MANAGER -> Yellow
Expand All @@ -32,9 +34,10 @@ enum class ImportType {

fun appId(): String = when (this) {
IVY -> "com.ivy.wallet"
MONEY_MANAGER_PRASE -> "com.realbyteapps.moneymanagerfree"
MONEY_MANAGER -> "com.realbyteapps.moneymanagerfree"
WALLET_BY_BUDGET_BAKERS -> "com.droid4you.application.wallet"
SPENDEE -> "com.cleevio.spendee"
MONEFY -> "com.monefy.app.lite"
ONE_MONEY -> "org.pixelrush.moneyiq"
BLUE_COINS -> "com.rammigsoftware.bluecoins"
KTW_MONEY_MANAGER -> "com.ktwapps.walletmanager"
Expand All @@ -44,10 +47,11 @@ enum class ImportType {

@DrawableRes
fun logo(): Int = when (this) {
IVY -> R.drawable.ivy_wallet_logo_import
MONEY_MANAGER_PRASE -> R.drawable.ic_money_manager_prase
IVY -> R.drawable.ivywallet_logo
MONEY_MANAGER -> R.drawable.moneymanager_logo
WALLET_BY_BUDGET_BAKERS -> R.drawable.wallet_by_budgetbakers_logo
SPENDEE -> R.drawable.speende_logo_png
SPENDEE -> R.drawable.spendee_logo
MONEFY -> R.drawable.monefy_logo
ONE_MONEY -> R.drawable.one_money_logo
BLUE_COINS -> R.drawable.bluecoins
KTW_MONEY_MANAGER -> R.drawable.ktw_money_manager_logo
Expand All @@ -57,9 +61,10 @@ enum class ImportType {

fun listName(): String = when (this) {
IVY -> "Ivy Wallet CSV"
MONEY_MANAGER_PRASE -> "Money Manager"
MONEY_MANAGER -> "Money Manager"
WALLET_BY_BUDGET_BAKERS -> "Wallet by BudgetBakers"
SPENDEE -> "Spendee"
MONEFY -> "Monefy"
ONE_MONEY -> "1Money"
BLUE_COINS -> "Bluecoins Finance"
KTW_MONEY_MANAGER -> "Money Manager (KTW)"
Expand All @@ -69,14 +74,7 @@ enum class ImportType {

fun appName(): String = when (this) {
IVY -> "Ivy Wallet"
MONEY_MANAGER_PRASE -> "Money Manager"
WALLET_BY_BUDGET_BAKERS -> "Wallet by BudgetBakers"
SPENDEE -> "Spendee"
ONE_MONEY -> "1Money"
BLUE_COINS -> "Bluecoins Finance"
KTW_MONEY_MANAGER -> "Money Manager (KTW)"
FORTUNE_CITY -> "Fortune City"
FINANCISTO -> "Financisto"
else -> listName()
}

@Composable
Expand All @@ -89,7 +87,7 @@ enum class ImportType {
onUploadClick = onUploadClick
)
}
MONEY_MANAGER_PRASE -> {
MONEY_MANAGER -> {
MoneyManagerPraseSteps(
onUploadClick = onUploadClick
)
Expand All @@ -102,6 +100,9 @@ enum class ImportType {
SPENDEE -> SpendeeSteps(
onUploadClick = onUploadClick
)
MONEFY -> MonefySteps(
onUploadClick = onUploadClick
)
ONE_MONEY -> OneMoneySteps(
onUploadClick = onUploadClick
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ private fun Preview() {
IvyAppPreview {
ImportInstructions(
hasSkip = true,
importType = ImportType.MONEY_MANAGER_PRASE,
importType = ImportType.MONEY_MANAGER,
onSkip = {}
) {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package com.ivy.wallet.ui.csvimport.flow.instructions

import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp

@Composable
fun MonefySteps(
onUploadClick: () -> Unit
) {
Spacer(Modifier.height(12.dp))

//TODO: Implement

StepTitle(
number = 1,
title = "Export CSV file"
)

Spacer(Modifier.height(12.dp))

VideoArticleRow(
videoUrl = null,
articleUrl = "https://help.spendee.com/article/137-export-transactions"
)

Spacer(Modifier.height(12.dp))

StepTitle(
number = 2,
title = "Check your email's \"Promotions\" and \"Spam\" folders"
)

Spacer(Modifier.height(24.dp))

StepTitle(
number = 3,
title = "Download the \"transactions_export...\" file attached to the email.",
description = "If you have more than one currency you'll have to download each \"transactions_export...\" file and import it in Ivy."
)

Spacer(Modifier.height(24.dp))

UploadFileStep(
stepNumber = 4,
onUploadClick = onUploadClick
)
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-nodpi/monefy_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-nodpi/spendee_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 0 additions & 12 deletions app/src/main/res/drawable/ic_money_manager_prase.xml

This file was deleted.

30 changes: 0 additions & 30 deletions app/src/main/res/drawable/ivy_wallet_logo_import.xml

This file was deleted.

Binary file removed app/src/main/res/drawable/speende_logo_png.png
Binary file not shown.
Binary file not shown.

0 comments on commit dc376e6

Please sign in to comment.