Merged PR 2031: feat(crm): add customer bon redemption feature

feat(crm): add customer bon redemption feature

- New library @isa/crm/feature/customer-bon-redemption
- Implement bon validation and redemption flow
- Add SignalStore for state management
- Add resource pattern for reactive data loading
- Add facade for business logic abstraction
- Add Zod schemas for runtime validation
- Integrate with loyalty card API endpoints
- Add accessibility and E2E test attributes
- Remove mock provider (use real facade)
- Exclude generated swagger files from linting

Components:
- BonInputFieldComponent - input with validation
- BonDetailsDisplayComponent - shows validated bon
- BonRedemptionButtonComponent - redemption action

Data Access:
- CustomerBonRedemptionFacade - business logic
- CustomerBonCheckResource - reactive validation
- BonRedemptionStore - component state
- CrmSearchService - API integration (checkBon, addBon)

Issue: 5314

Related work items: #5314
This commit is contained in:
Lorenz Hilpert
2025-11-19 12:51:58 +00:00
committed by Nino Righi
parent 8c0de558a4
commit fc6d29d62f
43 changed files with 1358 additions and 49 deletions

View File

@@ -1,5 +1,5 @@
.ui-text-field-clear {
ui-icon-button {
@apply text-isa-neutral-900;
}
}
.ui-text-field-clear {
ui-icon-button {
@apply text-isa-neutral-900 bg-transparent;
}
}

View File

@@ -1,31 +1,31 @@
import {
ChangeDetectionStrategy,
Component,
computed,
inject,
} from '@angular/core';
import { TextFieldComponent } from './text-field.component';
import { provideIcons } from '@ng-icons/core';
import { isaActionClose } from '@isa/icons';
import { IconButtonComponent } from '@isa/ui/buttons';
@Component({
selector: 'ui-text-field-clear',
templateUrl: './text-field-clear.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
host: {
'[class]': '["ui-text-field-clear", sizeClass()]',
},
providers: [provideIcons({ isaActionClose })],
imports: [IconButtonComponent],
})
export class TextFieldClearComponent {
hostComponent = inject(TextFieldComponent, { host: true });
size = this.hostComponent.size;
sizeClass = computed(() => {
return `ui-text-field-clear__${this.size()}`;
});
}
import {
ChangeDetectionStrategy,
Component,
computed,
inject,
} from '@angular/core';
import { TextFieldComponent } from './text-field.component';
import { provideIcons } from '@ng-icons/core';
import { isaActionClose } from '@isa/icons';
import { IconButtonComponent } from '@isa/ui/buttons';
@Component({
selector: 'ui-text-field-clear',
templateUrl: './text-field-clear.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
host: {
'[class]': '["ui-text-field-clear", sizeClass()]',
},
providers: [provideIcons({ isaActionClose })],
imports: [IconButtonComponent],
})
export class TextFieldClearComponent {
hostComponent = inject(TextFieldComponent, { host: true });
size = this.hostComponent.size;
sizeClass = computed(() => {
return `ui-text-field-clear__${this.size()}`;
});
}