Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
68b03ee
wip
panasetskaya May 20, 2026
5958808
Merge branch 'develop' into feat/maker-days-swish-payin
panasetskaya May 20, 2026
c973287
setup invoice payin
panasetskaya May 20, 2026
4ce872c
di and renaming
panasetskaya May 20, 2026
3e9a3d1
PayinAccountOverviewDestination
panasetskaya May 20, 2026
fb10cc9
navgraph change
panasetskaya May 20, 2026
d0d5a42
active methods first iteration
panasetskaya May 20, 2026
425c908
SetAsDefaultUseCase
panasetskaya May 20, 2026
8aafceb
default and pending state
panasetskaya May 21, 2026
d4af5ce
swish payin impl
panasetskaya May 21, 2026
c31397a
always show Manage payment methods
panasetskaya May 21, 2026
6d760c9
help center nav
panasetskaya May 21, 2026
d6cafce
ReminderCardConnectPayment copy
panasetskaya May 21, 2026
493621d
qrcode and swish icon
panasetskaya May 21, 2026
fff8a29
don't pass on the error message if not user error
panasetskaya May 21, 2026
e7291a3
safeExecuteAllowingPartialResponses
panasetskaya May 22, 2026
cb10b86
icons in overview
panasetskaya May 22, 2026
f0da87a
icons in select
panasetskaya May 22, 2026
6762015
copy
panasetskaya May 22, 2026
9a1421a
bank name
panasetskaya May 22, 2026
ff702a1
format phone
panasetskaya May 22, 2026
0042aa5
copy
panasetskaya May 22, 2026
46c4633
icons in select payout method
panasetskaya May 22, 2026
f2c4c70
ktlint
panasetskaya May 22, 2026
a2463a0
border and color for qr
panasetskaya May 22, 2026
8f98db7
border and color for qr
panasetskaya May 22, 2026
d1c9929
copy
panasetskaya May 22, 2026
335c488
safeExecuteAllowingPartialResponses in SetAsDefaultUseCase.kt
panasetskaya May 22, 2026
cf0c0e0
copy and phone number digit filtering
panasetskaya May 22, 2026
c463111
remove logs
panasetskaya May 22, 2026
1d304ef
add multiscreen previews
panasetskaya May 22, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.hedvig.android.apollo.ApolloOperationError.OperationError
import com.hedvig.android.apollo.ApolloOperationError.OperationException
import com.hedvig.android.apollo.parseResponse
import com.hedvig.android.core.common.ErrorMessage
import com.hedvig.android.logger.logcat
import kotlin.jvm.JvmInline
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
Expand Down Expand Up @@ -175,9 +176,15 @@ private fun <D : Operation.Data> iorFromErrorsAndData(
data: D?,
): Ior<Nel<ApolloOperationError>, D> {
return when {
errors != null && data != null -> Ior.Both(errors, data)
errors != null -> Ior.Left(errors)
data != null -> Ior.Right(data)
errors != null && data != null -> {
Ior.Both(errors, data)
}
errors != null -> {
Ior.Left(errors)
}
data != null -> {
Ior.Right(data)
}
else -> error("Non compliant server")
}
}
Expand Down
1 change: 1 addition & 0 deletions app/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ dependencies {
implementation(projects.featureMovingflow)

implementation(projects.featureRemoveAddons)
implementation(projects.featurePayinAccount)
implementation(projects.featurePayoutAccount)
implementation(projects.featurePayments)
implementation(projects.featureProfile)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import com.hedvig.android.feature.insurance.certificate.di.insuranceEvidenceModu
import com.hedvig.android.feature.insurances.di.insurancesModule
import com.hedvig.android.feature.login.di.loginModule
import com.hedvig.android.feature.movingflow.di.movingFlowModule
import com.hedvig.android.feature.payin.account.di.payinAccountModule
import com.hedvig.android.feature.payments.di.paymentsModule
import com.hedvig.android.feature.payoutaccount.di.payoutAccountModule
import com.hedvig.android.feature.profile.di.profileModule
Expand Down Expand Up @@ -346,6 +347,7 @@ val applicationModule = module {
notificationBadgeModule,
notificationModule,
payoutAccountModule,
payinAccountModule,
paymentsModule,
profileModule,
settingsDatastoreModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ import com.hedvig.android.feature.insurances.navigation.insuranceGraph
import com.hedvig.android.feature.login.navigation.loginGraph
import com.hedvig.android.feature.movingflow.SelectContractForMoving
import com.hedvig.android.feature.movingflow.movingFlowGraph
import com.hedvig.android.feature.payin.account.navigation.PayinAccountDestination
import com.hedvig.android.feature.payin.account.navigation.payinAccountGraph
import com.hedvig.android.feature.payments.navigation.paymentsGraph
import com.hedvig.android.feature.payoutaccount.navigation.PayoutAccountDestination
import com.hedvig.android.feature.payoutaccount.navigation.payoutAccountGraph
Expand Down Expand Up @@ -110,6 +112,9 @@ internal fun HedvigNavHost(
val navController = hedvigAppState.navController

fun navigateToConnectPayment(builder: NavOptionsBuilder.() -> Unit = {}) {
navController.navigate(PayinAccountDestination.Graph, builder)
}
fun navigateToConnectTrustly(builder: NavOptionsBuilder.() -> Unit = {}) {
navController.navigate(TrustlyDestination, builder)
}
val navigateToInbox = {
Expand Down Expand Up @@ -357,6 +362,14 @@ internal fun HedvigNavHost(
navigateToConnectPayment = ::navigateToConnectPayment,
navigateUp = navController::navigateUp,
)
payinAccountGraph(
navController = navController,
globalSnackBarState = globalSnackBarState,
hedvigDeepLinkContainer = hedvigDeepLinkContainer,
navigateToConnectTrustly = ::navigateToConnectTrustly,
navigateUp = navController::navigateUp,
openUrl = openUrl
)
profileGraph(
settingsDestinationNestedGraphs = {
deleteAccountGraph(hedvigDeepLinkContainer, navController)
Expand Down Expand Up @@ -480,7 +493,7 @@ internal fun HedvigNavHost(
}

QuickLinkConnectPayment -> {
TrustlyDestination
PayinAccountDestination.Graph
}

QuickLinkTermination -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@
<string name="LETTER_TO_EIR_SUBJECT">Fråga angående skadeanmälan - Fordon reg. %1$s</string>
<string name="LOGIN_MARKET_PICKER_PREFERENCES">Välj land och språk</string>
<string name="LOGOUT_BUTTON">Logga ut</string>
<string name="MANAGE_BILLING_METHODS_BUTTON">Manage your payment methods</string>
<string name="MANUAL_CHARGE_CANCELLATION_WARNING">Aktivera ditt försäkringsskydd igen genom att kontakta oss när din betalning har registrerats</string>
<string name="MARKETING_GET_HEDVIG">Få ett prisförslag</string>
<string name="MISSING_CONTACT_INFO_CARD_BUTTON">Se över kontaktuppgifter</string>
Expand Down Expand Up @@ -680,7 +681,7 @@
<string name="PROFILE_ROW_TRAVEL_CERTIFICATE">Reseintyg</string>
<string name="PROFILE_TITLE">Din profil</string>
<string name="PUPPY_GUIDE_GO_BUTTON">Se guider</string>
<string name="PUPPY_GUIDE_INFO">I valpguiden hittar du användbara artiklar som hjälper dig med allt från första veterinärbesöket till hur du väljer rätt foder.</string>
<string name="PUPPY_GUIDE_INFO">I Valpguiden får du svar på de vanligaste frågorna som rör valpens första tid.</string>
<string name="PUPPY_GUIDE_LABEL">Utvalda guider</string>
<string name="PUPPY_GUIDE_LABEL_READ">Läst</string>
<string name="PUPPY_GUIDE_RATING_NOT_HELPFUL">Inte hjälpsam</string>
Expand Down Expand Up @@ -1279,6 +1280,19 @@
<string name="offer_screen_MULTIPLE_INSURANCES_coverage_paragraph">Läs om ditt fullständiga försäkringsskydd nedan.</string>
<string name="onboarding_contextual_menu_app_info_label">Appinformation</string>
<string name="onboarding_embark_flow_information_modal_title">Information</string>
<string name="ongoing_shop_session_action_button">Fortsätt köpet</string>
<plurals name="ongoing_shop_session_offer_expires_in_days">
<item quantity="one">Erbjudandet löper ut om %1$d dag</item>
<item quantity="other">Erbjudandet löper ut om %1$d dagar</item>
</plurals>
<plurals name="ongoing_shop_session_offer_expires_in_hours">
<item quantity="one">Erbjudandet löper ut om %1$d timme</item>
<item quantity="other">Erbjudandet löper ut om %1$d timmar</item>
</plurals>
<plurals name="ongoing_shop_session_offer_expires_in_minutes">
<item quantity="one">Erbjudandet löper ut om %1$d minut</item>
<item quantity="other">Erbjudandet löper ut om %1$d minuter</item>
</plurals>
<string name="open_chat">Skriv meddelande</string>
<string name="pay_in_confirmation_direct_debit_headline">Autogiro är anslutet!</string>
<string name="pay_in_error_body">Vi kunde inte ansluta ditt bankkonto. Vänligen försök igen eller skriv till oss direkt i appen.</string>
Expand Down
14 changes: 14 additions & 0 deletions app/core/core-resources/src/androidMain/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@
<string name="LETTER_TO_EIR_SUBJECT">Question regarding claim, Vehicle reg. %1$s</string>
<string name="LOGIN_MARKET_PICKER_PREFERENCES">Preferences</string>
<string name="LOGOUT_BUTTON">Logout</string>
<string name="MANAGE_BILLING_METHODS_BUTTON">Manage your payment methods</string>
<string name="MANUAL_CHARGE_CANCELLATION_WARNING">Activate your coverage again by contacting us once your payment has been processed</string>
<string name="MARKETING_GET_HEDVIG">Get a price quote</string>
<string name="MISSING_CONTACT_INFO_CARD_BUTTON">Review contact info</string>
Expand Down Expand Up @@ -1279,6 +1280,19 @@
<string name="offer_screen_MULTIPLE_INSURANCES_coverage_paragraph">Read the full coverage of your insurances below. </string>
<string name="onboarding_contextual_menu_app_info_label">App information</string>
<string name="onboarding_embark_flow_information_modal_title">Information</string>
<string name="ongoing_shop_session_action_button">Continue purchase</string>
<plurals name="ongoing_shop_session_offer_expires_in_days">
<item quantity="one">The offer expires in %1$d day</item>
<item quantity="other">The offer expires in %1$d days</item>
</plurals>
<plurals name="ongoing_shop_session_offer_expires_in_hours">
<item quantity="one">The offer expires in %1$d hour</item>
<item quantity="other">The offer expires in %1$d hours</item>
</plurals>
<plurals name="ongoing_shop_session_offer_expires_in_minutes">
<item quantity="one">The offer expires in %1$d minute</item>
<item quantity="other">The offer expires in %1$d minutes</item>
</plurals>
<string name="open_chat">Write message</string>
<string name="pay_in_confirmation_direct_debit_headline">Direct debit connected!</string>
<string name="pay_in_error_body">We were unable to add your payment method. Please try again or send us a message here in the app.</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@
<string name="LETTER_TO_EIR_SUBJECT">Fråga angående skadeanmälan - Fordon reg. %1$s</string>
<string name="LOGIN_MARKET_PICKER_PREFERENCES">Välj land och språk</string>
<string name="LOGOUT_BUTTON">Logga ut</string>
<string name="MANAGE_BILLING_METHODS_BUTTON">Manage your payment methods</string>
<string name="MANUAL_CHARGE_CANCELLATION_WARNING">Aktivera ditt försäkringsskydd igen genom att kontakta oss när din betalning har registrerats</string>
<string name="MARKETING_GET_HEDVIG">Få ett prisförslag</string>
<string name="MISSING_CONTACT_INFO_CARD_BUTTON">Se över kontaktuppgifter</string>
Expand Down Expand Up @@ -680,7 +681,7 @@
<string name="PROFILE_ROW_TRAVEL_CERTIFICATE">Reseintyg</string>
<string name="PROFILE_TITLE">Din profil</string>
<string name="PUPPY_GUIDE_GO_BUTTON">Se guider</string>
<string name="PUPPY_GUIDE_INFO">I valpguiden hittar du användbara artiklar som hjälper dig med allt från första veterinärbesöket till hur du väljer rätt foder.</string>
<string name="PUPPY_GUIDE_INFO">I Valpguiden får du svar på de vanligaste frågorna som rör valpens första tid.</string>
<string name="PUPPY_GUIDE_LABEL">Utvalda guider</string>
<string name="PUPPY_GUIDE_LABEL_READ">Läst</string>
<string name="PUPPY_GUIDE_RATING_NOT_HELPFUL">Inte hjälpsam</string>
Expand Down Expand Up @@ -1279,6 +1280,19 @@
<string name="offer_screen_MULTIPLE_INSURANCES_coverage_paragraph">Läs om ditt fullständiga försäkringsskydd nedan.</string>
<string name="onboarding_contextual_menu_app_info_label">Appinformation</string>
<string name="onboarding_embark_flow_information_modal_title">Information</string>
<string name="ongoing_shop_session_action_button">Fortsätt köpet</string>
<plurals name="ongoing_shop_session_offer_expires_in_days">
<item quantity="one">Erbjudandet löper ut om %1$d dag</item>
<item quantity="other">Erbjudandet löper ut om %1$d dagar</item>
</plurals>
<plurals name="ongoing_shop_session_offer_expires_in_hours">
<item quantity="one">Erbjudandet löper ut om %1$d timme</item>
<item quantity="other">Erbjudandet löper ut om %1$d timmar</item>
</plurals>
<plurals name="ongoing_shop_session_offer_expires_in_minutes">
<item quantity="one">Erbjudandet löper ut om %1$d minut</item>
<item quantity="other">Erbjudandet löper ut om %1$d minuter</item>
</plurals>
<string name="open_chat">Skriv meddelande</string>
<string name="pay_in_confirmation_direct_debit_headline">Autogiro är anslutet!</string>
<string name="pay_in_error_body">Vi kunde inte ansluta ditt bankkonto. Vänligen försök igen eller skriv till oss direkt i appen.</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@
<string name="LETTER_TO_EIR_SUBJECT">Question regarding claim, Vehicle reg. %1$s</string>
<string name="LOGIN_MARKET_PICKER_PREFERENCES">Preferences</string>
<string name="LOGOUT_BUTTON">Logout</string>
<string name="MANAGE_BILLING_METHODS_BUTTON">Manage your payment methods</string>
<string name="MANUAL_CHARGE_CANCELLATION_WARNING">Activate your coverage again by contacting us once your payment has been processed</string>
<string name="MARKETING_GET_HEDVIG">Get a price quote</string>
<string name="MISSING_CONTACT_INFO_CARD_BUTTON">Review contact info</string>
Expand Down Expand Up @@ -1279,6 +1280,19 @@
<string name="offer_screen_MULTIPLE_INSURANCES_coverage_paragraph">Read the full coverage of your insurances below. </string>
<string name="onboarding_contextual_menu_app_info_label">App information</string>
<string name="onboarding_embark_flow_information_modal_title">Information</string>
<string name="ongoing_shop_session_action_button">Continue purchase</string>
<plurals name="ongoing_shop_session_offer_expires_in_days">
<item quantity="one">The offer expires in %1$d day</item>
<item quantity="other">The offer expires in %1$d days</item>
</plurals>
<plurals name="ongoing_shop_session_offer_expires_in_hours">
<item quantity="one">The offer expires in %1$d hour</item>
<item quantity="other">The offer expires in %1$d hours</item>
</plurals>
<plurals name="ongoing_shop_session_offer_expires_in_minutes">
<item quantity="one">The offer expires in %1$d minute</item>
<item quantity="other">The offer expires in %1$d minutes</item>
</plurals>
<string name="open_chat">Write message</string>
<string name="pay_in_confirmation_direct_debit_headline">Direct debit connected!</string>
<string name="pay_in_error_body">We were unable to add your payment method. Please try again or send us a message here in the app.</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ fun HedvigButtonGhostWithBorder(
enabled: Boolean = true,
interactionSource: MutableInteractionSource? = null,
size: ButtonSize = ButtonSize.Medium,
isLoading: Boolean = false
) {
HedvigTextButton(
text = text,
Expand All @@ -215,6 +216,7 @@ fun HedvigButtonGhostWithBorder(
),
buttonSize = size,
interactionSource = interactionSource,
isLoading = isLoading
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.hedvig.android.design.system.hedvig

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
Expand Down Expand Up @@ -37,6 +38,7 @@ import com.hedvig.android.design.system.hedvig.icon.CheckFilled
import com.hedvig.android.design.system.hedvig.icon.HedvigIcons
import com.hedvig.android.design.system.hedvig.icon.InfoFilled
import com.hedvig.android.design.system.hedvig.icon.WarningFilled
import com.hedvig.android.design.system.hedvig.icon.colored.Swish
import com.hedvig.android.design.system.hedvig.tokens.EmptyStateTokens

@Composable
Expand Down Expand Up @@ -148,6 +150,15 @@ private fun ColumnScope.EmptyStateIcon(iconStyle: EmptyStateIconStyle) {
)
Spacer(Modifier.height(16.dp))
}

EmptyStateIconStyle.SWISH -> {
Image(
HedvigIcons.Swish,
null,
modifier = Modifier.size(48.dp),
)
Spacer(Modifier.height(16.dp))
}
}
}

Expand All @@ -161,7 +172,9 @@ object EmptyStateDefaults {
SUCCESS,
BANK_ID,
NO_ICON,
SUCCESS_WITH_WARNING
SUCCESS_WITH_WARNING,

SWISH
}

sealed class EmptyStateButtonStyle {
Expand Down
Loading
Loading