diff --git a/app/src/main/res/layout/event_layout.xml b/app/src/main/res/layout/event_layout.xml index 0aac9708d..742caf7bb 100644 --- a/app/src/main/res/layout/event_layout.xml +++ b/app/src/main/res/layout/event_layout.xml @@ -19,6 +19,10 @@ + + + app:progress_with_animation="@{orderStats.tickets.total == 0 ? 0 : (int) ((orderStats.tickets.completed*100)/orderStats.tickets.total)}" /> @@ -140,14 +144,14 @@ android:layout_height="wrap_content" android:layout_marginLeft="@dimen/spacing_medium" android:layout_marginStart="@dimen/spacing_medium" - android:text="@{event.ticketsSold}" + android:text="@{orderStats.tickets.completed}" android:textSize="@dimen/text_size_normal" android:textStyle="bold" /> diff --git a/app/src/main/res/layout/fragment_event_details.xml b/app/src/main/res/layout/fragment_event_details.xml index 52524ce1f..6f6c1c79c 100644 --- a/app/src/main/res/layout/fragment_event_details.xml +++ b/app/src/main/res/layout/fragment_event_details.xml @@ -263,7 +263,7 @@ android:layout_marginLeft="@dimen/spacing_normal" android:layout_marginTop="@dimen/spacing_normal" android:layout_marginBottom="@dimen/spacing_normal" - android:text='@{ContextManager.getCurrency() + " " + event.analytics.totalSale}' + android:text='@{ContextManager.getCurrency() + " " + orderStats.sales.total}' android:textColor="@color/color_accent" android:textSize="@dimen/text_size_extra_large" bind:layout_constraintStart_toStartOf="parent" @@ -301,14 +301,14 @@ @@ -338,7 +338,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:max="100" - android:progress="@{event.analytics.totalTickets == 0 ? 0 : (int) ((event.analytics.totalAttendees*100)/event.analytics.totalTickets)}" /> + android:progress="@{event.ticketsAvailable == 0 ? 0 : (int) ((orderStats.tickets.completed*100)/event.ticketsAvailable)}" /> + android:text='@{(event.ticketsAvailable == 0 ? 0 : (int) ((orderStats.tickets.completed*100)/event.ticketsAvailable)) + "%"}' /> @@ -382,7 +382,7 @@ @@ -412,14 +412,14 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:max="100" - android:progress="@{event.analytics.totalAttendees == 0 ? 0 : (int) ((event.analytics.checkedIn*100)/event.analytics.totalAttendees)}" /> + android:progress="@{orderStats.tickets.completed == 0 ? 0 : (int) ((event.analytics.checkedIn*100)/orderStats.tickets.completed)}" /> + android:text='@{(orderStats.tickets.completed == 0 ? 0 : (int) ((event.analytics.checkedIn*100)/orderStats.tickets.completed)) + "%"}' />