mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
fix(crm-customer-card): Refresh after Lock, Unlock or Add Cards correctly, Adjusted Placeholder Text, Show Transactions based on first Card instead of first active card
Ref: #5503
This commit is contained in:
@@ -9,28 +9,30 @@
|
||||
[customerId]="customerId$ | async"
|
||||
[tabId]="processId$ | async"
|
||||
(navigateToPraemienshop)="onNavigateToPraemienshop()"
|
||||
(cardUpdated)="reloadCardTransactionsAndCards()"
|
||||
class="mt-4"
|
||||
/>
|
||||
@let cardCode = firstActiveCardCode();
|
||||
@let activeCardCode = firstActiveCardCode();
|
||||
|
||||
@if (cardCode) {
|
||||
@if (activeCardCode) {
|
||||
<crm-customer-bon-redemption
|
||||
[cardCode]="cardCode"
|
||||
[cardCode]="activeCardCode"
|
||||
class="mt-4"
|
||||
(redeemed)="reloadCardTransactionsAndCards()"
|
||||
/>
|
||||
<crm-customer-booking
|
||||
[cardCode]="cardCode"
|
||||
[cardCode]="activeCardCode"
|
||||
class="mt-4"
|
||||
(booked)="reloadCardTransactionsAndCards()"
|
||||
/>
|
||||
<crm-customer-card-transactions
|
||||
[cardCode]="cardCode"
|
||||
class="mt-8"
|
||||
(reload)="reloadCardTransactionsAndCards()"
|
||||
/>
|
||||
}
|
||||
|
||||
<crm-customer-card-transactions
|
||||
[cardCode]="firstCardCode()"
|
||||
class="mt-8"
|
||||
(reload)="reloadCardTransactionsAndCards()"
|
||||
/>
|
||||
|
||||
<utils-scroll-top-button
|
||||
[target]="hostElement"
|
||||
class="flex flex-col justify-self-end fixed bottom-6 right-6"
|
||||
|
||||
@@ -72,6 +72,15 @@ export class KundenkarteMainViewComponent implements OnDestroy {
|
||||
*/
|
||||
readonly customerId = toSignal(this.customerId$);
|
||||
|
||||
/**
|
||||
* Get the first card code
|
||||
*/
|
||||
readonly firstCardCode = computed(() => {
|
||||
const cards = this.#bonusCardsResource.resource.value();
|
||||
const firstCard = cards?.[0];
|
||||
return firstCard?.code;
|
||||
});
|
||||
|
||||
/**
|
||||
* Get the first active card code
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user