mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 2030: feat(crm-customer-booking): add loyalty card booking component
feat(crm-customer-booking): add loyalty card booking component Implement new component for customer loyalty card credit/debit bookings with booking type selection and real-time transaction updates. Includes automatic reload of transaction history after successful bookings. Key changes: - Add CrmFeatureCustomerBookingComponent with booking form UI - Create CustomerCardBookingFacade for booking API calls - Add CustomerBookingReasonsResource for loading booking types - Extend CrmSearchService with booking methods (addBooking, fetchBookingReasons, fetchCurrentBookingPartnerStore) - Add AddBookingSchema with Zod validation - Integrate component into KundenkarteMainViewComponent - Update CustomerCardTransactionsResource to providedIn: 'root' for shared access - Improve transaction list UX (hide header/center empty state when no data) Technical details: - New library: @isa/crm/feature/customer-booking (Vitest-based) - Signals-based state management with computed properties - Automatic points calculation based on booking type multiplier - Error handling with feedback dialogs - 500ms delay before transaction reload to ensure API consistency - Data attributes for E2E testing (data-what, data-which) Ref: #5315
This commit is contained in:
committed by
Lorenz Hilpert
parent
71af23544f
commit
a855e79196
@@ -10,6 +10,7 @@
|
||||
[tabId]="processId$ | async"
|
||||
class="mt-4"
|
||||
/>
|
||||
<crm-customer-booking [cardCode]="firstActiveCardCode()" class="mt-4" />
|
||||
<crm-customer-card-transactions
|
||||
[cardCode]="firstActiveCardCode()"
|
||||
class="mt-8"
|
||||
|
||||
@@ -15,6 +15,7 @@ import { CustomerLoyaltyCardsComponent } from '@isa/crm/feature/customer-loyalty
|
||||
import { CrmFeatureCustomerCardTransactionsComponent } from '@isa/crm/feature/customer-card-transactions';
|
||||
import { toSignal } from '@angular/core/rxjs-interop';
|
||||
import { CustomerBonusCardsResource } from '@isa/crm/data-access';
|
||||
import { CrmFeatureCustomerBookingComponent } from '@isa/crm/feature/customer-booking';
|
||||
import { ScrollTopButtonComponent } from '@isa/utils/scroll-position';
|
||||
|
||||
@Component({
|
||||
@@ -28,6 +29,7 @@ import { ScrollTopButtonComponent } from '@isa/utils/scroll-position';
|
||||
AsyncPipe,
|
||||
CustomerLoyaltyCardsComponent,
|
||||
CrmFeatureCustomerCardTransactionsComponent,
|
||||
CrmFeatureCustomerBookingComponent,
|
||||
ScrollTopButtonComponent,
|
||||
],
|
||||
providers: [CustomerBonusCardsResource],
|
||||
|
||||
Reference in New Issue
Block a user