Show Car claims on claim card and history (RND-1677)#2930
Show Car claims on claim card and history (RND-1677)#2930hugokallstrom merged 36 commits intodevelopfrom
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extends the Home query to include partnerClaimsActive, merges them with regular claims sorted by date, and threads partnerClaimIds through ClaimStatusCardsData so the UI can dispatch to the correct details screen. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds onPartnerClaimDetailCardClicked parameter throughout the home composable stack (HomeGraph → HomeDestination → HomeScreen → HomeScreenSuccess), routing partner claim card taps to a separate details screen based on partnerClaimIds from ClaimStatusCardsData. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extends the claim history screen to include partner claims alongside regular claims, sorted by submission date. Partner claims dispatch to a separate navigation target on click. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use IconButton with wrapContentSize(CenterEnd) and Column padding, matching the established pattern from the regular claim details screen. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1982404 to
221c87c
Compare
The claims/claimsActive fields are mutually exclusive via @skip/@include directives, but `?:` treats an empty list as non-null, picking it over the populated field. Use `.orEmpty()` concatenation instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…etail Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rough ViewModel Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lbacks Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…details Since partner claims and regular claims share the same feature module, there's no need to extract these components to ui-claim-status. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…to reduce diff noise Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| */ | ||
| @SerialName("claimId") | ||
| val claimId: String, | ||
| val isPartnerClaim: Boolean = false, |
There was a problem hiding this comment.
Could it happen that if we deeplink to here with id for car claim, we'll hit error screen due to this being default false?
| ClaimStatus.REOPENED -> ClaimDetailUiState.Content.ClaimStatus.REOPENED | ||
| ClaimStatus.UNKNOWN__, null -> ClaimDetailUiState.Content.ClaimStatus.UNKNOWN | ||
| }, | ||
| claimOutcome = ClaimDetailUiState.Content.ClaimOutcome.UNKNOWN, |
There was a problem hiding this comment.
I remember there being some problems with having the outcome here from the BE, right? So we can't really have status "Paid" and payout can only be mentioned in the details?
There was a problem hiding this comment.
no "10000 kr", "Paid" pill on the card, I mean
There was a problem hiding this comment.
Correct, we dont get outcome from EIR.
| ClaimHistory( | ||
| id = history.id, | ||
| claimType = history.claimType, | ||
| submittedAt = history.submittedAt?.atStartOfDayIn(TimeZone.UTC) ?: Clock.System.now(), |
There was a problem hiding this comment.
should it be nullable, the submittedAt?
| @Immutable | ||
| data class ClaimStatusCardsData( | ||
| val claimStatusCardsUiState: NonEmptyList<ClaimStatusCardUiState>, | ||
| val partnerClaimIds: Set<String> = emptySet(), |
There was a problem hiding this comment.
could we have maybe isPartnerClaim boolean property inside ClaimStatusCardUiState instead of partnerClaimIds here?
panasetskaya
left a comment
There was a problem hiding this comment.
left a couple of comments
- Drop isPartnerClaim from claim detail navigation; use case now queries regular claims first and falls back to partner on NoClaimFound, so deep-linked partner claim IDs no longer hit the error screen. - Make submittedAt/submittedDate nullable through ClaimHistory and ClaimStatusCardUiState; sort with nullsLast and hide the subtitle when the BE does not return a submission date instead of substituting "now". - Drop partnerClaimIds from HomeData since the click handler no longer needs the discriminator. - Show iOS-style copyable Reference number / Email rows on the partner claim detail screen and the partner support paragraph above the details for active partner claims. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…Case Replace the nested while loop and shared mutable flags with a linear flow: first iteration runs the regular endpoint and falls back to partner on NoClaimFound, then a clean polling loop calls whichever endpoint matched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per Mariia's review: make the partner-vs-regular distinction explicit on the card UI state instead of leaving it implicit in pill types and nullable display fields. No consumer branches on it today, but it makes the model honest about a card knowing what kind of claim it represents. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This reverts commit a44fe35.
# Conflicts: # app/apollo/apollo-octopus-public/src/commonMain/graphql/com/hedvig/android/apollo/octopus/schema.graphqls # app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml # app/core/core-resources/src/androidMain/res/values/strings.xml # app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml # app/core/core-resources/src/commonMain/composeResources/values/strings.xml
Summary
PartnerClaimGraphQL type support and fetch partner claims alongside regular claimsDisplayItemsSection,ExplanationBottomSheet,TermsConditionsCard) fromfeature-claim-detailstoui-claim-statusfor reuseContext
Test plan
🤖 Generated with Claude Code