Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -78,7 +78,6 @@ class BookingMapper @Inject constructor(
staff = staffMemberStatus,
// TODO replace mocked values when available from API
location = "238 Willow Creek Drive, Montgomery AL 36109",
price = currencyFormatter.formatCurrency(cost, currency),
cancelStatus = cancelStatus,
cancelButtonVisible = isCancellable,
duration = duration,
Expand Down Expand Up @@ -149,7 +148,7 @@ class BookingMapper @Inject constructor(
val date = detailsDateFormatter.format(booking.start)
val time = timeRangeFormatter.format(booking.start)
return UiString.UiStringRes(
R.string.booking_cancel_dialog_message,
R.string.booking_cancel_dialog_message_v2,
listOf(
customerName,
UiString.UiStringText(serviceName),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fun BookingAppointmentDetails(
modifier: Modifier = Modifier,
) {
Column(modifier = modifier) {
BookingSectionHeader(R.string.booking_appointment_details_header)
BookingSectionHeader(R.string.booking_details_section_header)
Column(modifier = Modifier.background(color = MaterialTheme.colorScheme.surfaceContainer)) {
HorizontalDivider(thickness = 0.5.dp)
AppointmentDetailsRow(
Expand All @@ -46,7 +46,7 @@ fun BookingAppointmentDetails(
)
model.staff?.let {
AppointmentDetailsRow(
label = R.string.booking_appointment_label_staff
label = R.string.booking_appointment_label_team_member
) {
when (it) {
is BookingStaffMemberStatus.Loaded, is BookingStaffMemberStatus.Unavailable -> {
Expand Down Expand Up @@ -76,11 +76,7 @@ fun BookingAppointmentDetails(
)
AppointmentDetailsRow(
label = R.string.booking_appointment_label_duration,
value = model.duration
)
AppointmentDetailsRow(
label = R.string.booking_appointment_label_price,
value = model.price,
value = model.duration,
withDivider = model.cancelButtonVisible,
)
AnimatedVisibility(model.cancelButtonVisible) {
Expand Down Expand Up @@ -152,7 +148,6 @@ data class BookingAppointmentDetailsModel(
val staff: BookingStaffMemberStatus?,
val location: String,
val duration: String,
val price: String,
val cancelButtonVisible: Boolean,
val cancelStatus: CancelStatus,
) {
Expand All @@ -177,7 +172,6 @@ private fun BookingAppointmentDetailsPreview() {
staff = BookingStaffMemberStatus.Loading,
location = "238 Willow Creek Drive, Montgomery AL 36109",
duration = "60 min",
price = "$55.00",
cancelButtonVisible = true,
cancelStatus = CancelStatus.Idle,
),
Expand All @@ -198,7 +192,6 @@ private fun BookingAppointmentDetailsCancelHiddenPreview() {
staff = BookingStaffMemberStatus.Loading,
location = "238 Willow Creek Drive, Montgomery AL 36109",
duration = "60 min",
price = "$55.00",
cancelButtonVisible = false,
cancelStatus = CancelStatus.Idle,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ private fun BookingDetailsPreview() {
staff = BookingStaffMemberStatus.Loaded("Marianne Renoir"),
location = "238 Willow Creek Drive, Montgomery AL 36109",
duration = "60 min",
price = "$55.00",
cancelButtonVisible = true,
cancelStatus = CancelStatus.Idle,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class BookingDetailsViewModel @Inject constructor(
if (showCancelBooking && booking != null) {
val message = bookingMapper.buildCancelDialogMessage(booking)
DialogState(
title = UiString.UiStringRes(R.string.booking_cancel_dialog_title),
title = UiString.UiStringRes(R.string.booking_cancel_dialog_title_v2),
message = message,
positiveButton = DialogState.DialogButton(
text = UiString.UiStringRes(R.string.booking_cancel_dialog_confirm),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,11 @@ private fun EmptyListView(
text = when (selectedTab) {
BookingListTab.Today -> stringResource(R.string.bookings_empty_state_title_today)
BookingListTab.Upcoming -> stringResource(R.string.bookings_empty_state_title_upcoming)
BookingListTab.All -> stringResource(R.string.bookings_empty_state_title_default)
BookingListTab.All -> if (areFiltersActive) {
stringResource(R.string.bookings_empty_state_title_default)
} else {
stringResource(R.string.bookings_empty_state_title_all)
}
},
style = MaterialTheme.typography.titleLarge,
textAlign = TextAlign.Center
Expand All @@ -408,13 +412,13 @@ private fun EmptyListView(

Text(
text = when (selectedTab) {
BookingListTab.Today -> stringResource(R.string.bookings_empty_state_description_today)
BookingListTab.Upcoming -> stringResource(R.string.bookings_empty_state_description_upcoming)
BookingListTab.Today -> stringResource(R.string.bookings_empty_state_description_today_v2)
BookingListTab.Upcoming -> stringResource(R.string.bookings_empty_state_description_upcoming_v2)
else -> {
if (areFiltersActive) {
stringResource(R.string.bookings_empty_state_description_with_filters)
} else {
stringResource(R.string.bookings_empty_state_description_default)
stringResource(R.string.bookings_empty_state_description_all)
}
}
},
Expand Down
15 changes: 8 additions & 7 deletions WooCommerce/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4205,9 +4205,10 @@
<string name="bookings_empty_state_title_default">No bookings found</string>
<string name="bookings_empty_state_title_today">No bookings today</string>
<string name="bookings_empty_state_title_upcoming">No upcoming bookings</string>
<string name="bookings_empty_state_description_default">Incoming bookings will appear here, where you can view and manage them.</string>
<string name="bookings_empty_state_description_today">You don’t have any appointments or events scheduled for today.</string>
<string name="bookings_empty_state_description_upcoming">You don’t have any future appointments or events scheduled yet.</string>
<string name="bookings_empty_state_title_all">No bookings yet</string>
<string name="bookings_empty_state_description_all">Bookings will appear here once customers start scheduling your services or registering for events.</string>
<string name="bookings_empty_state_description_today_v2">Any bookings scheduled for today will appear here.</string>
<string name="bookings_empty_state_description_upcoming_v2">New bookings will appear here as customers schedule your services or register for events.</string>
<string name="bookings_search_no_results_without_filters">We couldn’t find any bookings with that name — try adjusting your search term to see more results.</string>
<string name="bookings_search_no_results_with_filters">We couldn’t find any bookings with that name — try adjusting your search term or your filters to see more results.</string>
<string name="bookings_empty_state_description_with_filters">No bookings match your filters. Try adjusting them to see more results.</string>
Expand Down Expand Up @@ -4237,13 +4238,12 @@

<!-- Booking details view-->
<string name="booking_details_title">Booking #%s</string>
<string name="booking_appointment_details_header">APPOINTMENT DETAILS</string>
<string name="booking_details_section_header">BOOKING DETAILS</string>
<string name="booking_appointment_label_date">Date</string>
<string name="booking_appointment_label_time">Time</string>
<string name="booking_appointment_label_staff">Assigned staff</string>
<string name="booking_appointment_label_team_member">Team member</string>
<string name="booking_appointment_label_location">Location</string>
<string name="booking_appointment_label_duration">Duration</string>
<string name="booking_appointment_label_price">Price</string>
<string name="booking_payment_status_unpaid">Unpaid</string>
<string name="booking_payment_status_paid">Paid</string>
<string name="booking_payment_status_pending_confirmation">Pending Confirmation</string>
Expand Down Expand Up @@ -4286,8 +4286,9 @@
<string name="booking_note_header">BOOKING NOTE</string>
<string name="booking_note_label_add_note">Add note</string>
<string name="booking_note_description_private">This is a private note. It’ll not be shared with the customer.</string>
<string name="booking_cancel_dialog_title">Cancel booking</string>
<string name="booking_cancel_dialog_title_v2">Cancel booking?</string>
<string name="booking_cancel_dialog_message">%1$s will no longer be able to attend “%2$s” on %3$s at %4$s.</string>
<string name="booking_cancel_dialog_message_v2">%1$s can no longer attend “%2$s” on %3$s at %4$s.</string>
<string name="booking_cancel_dialog_keep">No, keep it</string>
<string name="booking_cancel_dialog_confirm">Yes, cancel it</string>
<string name="booking_note_screen_title">Booking note</string>
Expand Down
Loading