Skip to content

Comments

[CIAB:POS] Add team member avatar to POS bookings list#15381

Open
kidinov wants to merge 1 commit intotrunkfrom
woomob-2222-pos-bookings-team-member-name-not-shown-v1-resources-vs-v2
Open

[CIAB:POS] Add team member avatar to POS bookings list#15381
kidinov wants to merge 1 commit intotrunkfrom
woomob-2222-pos-bookings-team-member-name-not-shown-v1-resources-vs-v2

Conversation

@kidinov
Copy link
Contributor

@kidinov kidinov commented Feb 18, 2026

Closes WOOMOB-2222
Closes WOOMOB-2228

Description

Adds a team member avatar to each booking card in the POS bookings list. The avatar is a 24dp circle placed in the top-right corner of the card. When the team member has a photo, it loads the image via Coil. When there's no photo (or while loading), it shows the team member's initials on a gray background. A light border is shown around the avatar only when the image is loaded.

The data comes from the v2 team-members API (/wc-bookings/v2/resources/team-members/) which was already being fetched. The resource_id on each booking links to a team member, and we now pass the full resource through to the list item mapper.

Test Steps

  1. Open POS with a site that has bookings with v2 team members assigned
  2. Navigate to the Bookings tab
  3. Verify each booking card shows the team member avatar in the top-right
  4. For team members with a photo URL, verify the photo loads inside the circle with a border
  5. For team members without a photo, verify initials are shown (first letters of first and last name) without a border

Note: Currently you can create team members via the CIAB UI, but it looks like you can not assign them to bookings through the UI. To test this you need to either use the API directly and assign team members to a bookng or I can invite you to my test site.

Images/gif

02-18--19-17.mp4
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@kidinov kidinov added type: enhancement A request for an enhancement. feature: POS labels Feb 18, 2026
@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 11.11111% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.18%. Comparing base (6b07534) to head (6be178c).
⚠️ Report is 2 commits behind head on trunk.

Files with missing lines Patch % Lines
...ui/woopos/bookings/WooPosBookingViewStateMapper.kt 0.00% 8 Missing and 1 partial ⚠️
.../android/ui/woopos/bookings/WooPosBookingsState.kt 16.66% 5 Missing ⚠️
...roid/ui/woopos/bookings/WooPosBookingsViewModel.kt 33.33% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #15381      +/-   ##
============================================
- Coverage     39.18%   39.18%   -0.01%     
- Complexity    10921    10923       +2     
============================================
  Files          2237     2237              
  Lines        127215   127229      +14     
  Branches      17733    17735       +2     
============================================
+ Hits          49852    49854       +2     
- Misses        72287    72299      +12     
  Partials       5076     5076              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kidinov kidinov force-pushed the woomob-2222-pos-bookings-team-member-name-not-shown-v1-resources-vs-v2 branch from 38a52be to fafb301 Compare February 18, 2026 17:59
Display a circular avatar in each booking list card showing
the team member's photo or initials as fallback. Uses the v2
team-members API data already fetched by the repository.
@kidinov kidinov force-pushed the woomob-2222-pos-bookings-team-member-name-not-shown-v1-resources-vs-v2 branch from fafb301 to 6be178c Compare February 18, 2026 18:15
@kidinov kidinov added this to the 24.2 milestone Feb 18, 2026
@kidinov kidinov requested a review from malinajirka February 18, 2026 18:20
@kidinov kidinov changed the title [WOOMOB-2222] Add team member avatar to POS bookings list [CIAB:POS] Add team member avatar to POS bookings list Feb 18, 2026
@kidinov kidinov marked this pull request as ready for review February 18, 2026 18:20
@malinajirka malinajirka self-assigned this Feb 20, 2026
Copy link
Contributor

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I've left one minor comment.

}
}

private fun mapTeamMember(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Might be worth covering with tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants