Make total ticket price dynamic

Refactored price display logic to use computed total price and formatted output in order and seat selection components. Disabled reservation and booking buttons when no seats are selected. Improved clarity by renaming totalPrice to totalCategoryPrice in seat selection.
This commit is contained in:
2025-11-13 09:03:32 +01:00
parent 31108859da
commit cb065c8e39
4 changed files with 17 additions and 7 deletions

View File

@@ -6,6 +6,6 @@
</mat-icon>
<p>{{ getPriceDisplay(seatCategory().price) }}</p>
</div>
<p>×&thinsp;{{selectedSeatsByCategory()}}</p>
<p class="w-2/7 text-right">{{ getPriceDisplay(totalPrice())}}</p>
<p>×&thinsp;{{ selectedSeatsByCategory() }}</p>
<p class="w-2/7 text-right">{{ getPriceDisplay(totalCategoryPrice()) }}</p>
</div>

View File

@@ -17,7 +17,7 @@ export class SeatSelectionComponent {
this.SelectedSeatsService.getSelectedSeatsByCategory(this.seatCategory().id).length
);
totalPrice = computed(() =>
totalCategoryPrice = computed(() =>
this.selectedSeatsByCategory() * this.seatCategory().price
);