Skip to content

feat: add invoice apartment thumbnail#209

Merged
sotoJ24 merged 2 commits into
safetrustcr:mainfrom
prissca:feat/176-apartment-thumbnail
Jun 23, 2026
Merged

feat: add invoice apartment thumbnail#209
sotoJ24 merged 2 commits into
safetrustcr:mainfrom
prissca:feat/176-apartment-thumbnail

Conversation

@prissca

@prissca prissca commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Closes #183

Summary by CodeRabbit

  • Bug Fixes
    • Improved escrow “paid” stub product rendering by showing the apartment name and a proper thumbnail when available.
    • Added a reliable thumbnail fallback to an icon-based display when images are missing.
    • Updated the paid confirmation table to use the structured stub escrow data for consistent product row presentation and layout.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 729767b2-e162-4c34-8bff-b6f70e83e720

📥 Commits

Reviewing files that changed from the base of the PR and between 123f77d and 8f4498b.

📒 Files selected for processing (1)
  • apps/frontend/src/app/hotel/[id]/escrow/[escrowId]/page.tsx

📝 Walkthrough

Walkthrough

The escrow detail page gains typed stub interfaces for invoice apartment/escrow, a STUB_INVOICE_ESCROW constant, and a ProductCell subcomponent. ProductCell renders a 40×40 thumbnail from apartment.image_urls[0] or falls back to a Home icon. The PaidStubView table's PRODUCT cell is updated to use ProductCell instead of a plain string, and the old MOCK_PAID_ESCROW constant is removed.

Changes

ProductCell thumbnail for escrow invoice

Layer / File(s) Summary
Stub types and constant
apps/frontend/src/app/hotel/[id]/escrow/[escrowId]/page.tsx
Defines module-level InvoiceApartment and InvoiceEscrow types and introduces the STUB_INVOICE_ESCROW constant used as the data source for the paid stub view.
ProductCell component, styles, and PaidStubView integration
apps/frontend/src/app/hotel/[id]/escrow/[escrowId]/page.tsx
Adds productRow, productThumbnail, and productThumbnailFallback style entries; implements the ProductCell component rendering an image thumbnail or Home icon fallback; wires ProductCell into the PaidStubView PRODUCT cell; removes the old MOCK_PAID_ESCROW constant.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • safetrustcr/dApp-SafeTrust#210: Both PRs modify the escrow detail page's paid stub UI; #210 changes the stub-view/config selection logic while this PR updates the PRODUCTS cell to render ProductCell using the stub escrow apartment model.
  • safetrustcr/dApp-SafeTrust#214: Both PRs modify the escrow detail route's paid-state UI and related mock/stub escrow data structures.

Suggested reviewers

  • sotoJ24

Poem

🐇 Hop hop, a thumbnail appears in the row,
A cozy apartment, all aglow.
If no photo is found, a Home icon stands tall,
The stub escrow constant — it handles it all.
No more plain text, now a picture resides,
Where the invoice table proudly abides! 🏠

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR implements the core thumbnail feature with ProductCell component rendering apartment images with proper fallback (Home icon), but modifies the wrong file—changes are in the escrow page instead of the specified EscrowPayFlow component. Move the ProductCell component and thumbnail rendering logic to 'apps/frontend/src/components/escrow/EscrowPayFlow.tsx' as specified in issue #183, ensuring the invoice product table displays the thumbnail correctly.
Out of Scope Changes check ⚠️ Warning The changes introduce stub data and UI helpers in the escrow page component that appear to be development/testing utilities rather than the production feature specified in the linked issue. Remove stub data and testing utilities; implement the feature directly in EscrowPayFlow.tsx using actual escrow data as specified in issue #183 without development mocks.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add invoice apartment thumbnail' directly matches the main feature being implemented and clearly summarizes the primary change of adding apartment thumbnails to invoice product line items.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sotoJ24 sotoJ24 self-requested a review June 23, 2026 00:40
@sotoJ24 sotoJ24 merged commit b665d67 into safetrustcr:main Jun 23, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add apartment image thumbnail to invoice product line item

2 participants