Component
Configuration
A service component for collecting and validating beneficiary data in FOD service requests. Supports manual entry for natural persons and legal entities, as well as MPower digital authorization.
Try the component with different configuration options. Toggle the checkboxes to see how the component adapts to various settings.
Component
Configuration
Real-time view of the beneficiary data model as you interact with the component.
Type: Other
EntityType: NaturalPerson
HasData: False
NaturalPerson:
IDNP: (empty)
Surname: (empty)
FirstName: (empty)
Phone: (empty)
Email: (empty)
Validation:
IsValid: True
Errors: 0Monitor events emitted by the component during interaction.
No events yet. Interact with the component above.
Minimal setup for the beneficiary component with two-way binding.
<FodBeneficiaryComponent
@bind-Value="beneficiaryData"
ShowBeneficiaryTypeSelector="true" />
@code {
private FodBeneficiaryData beneficiaryData = new();
}Configure phone and email as required fields for validation.
<FodBeneficiaryComponent
@bind-Value="beneficiaryData"
PhoneRequired="true"
EmailRequired="true"
OnValidationComplete="HandleValidation" />
@code {
private FodBeneficiaryData beneficiaryData = new();
private void HandleValidation(BeneficiaryValidationResult result)
{
if (!result.IsValid)
{
foreach (var error in result.Errors)
{
Console.WriteLine($"Validation error: {error.ErrorMessage}");
}
}
}
}Enable MPower digital authorization with proper context configuration.
<FodBeneficiaryComponent
@bind-Value="beneficiaryData"
AllowMPower="true"
RequestorContext="requestorContext"
ServiceType="documents"
OnMPowerAuthorized="HandleMPowerAuthorized"
OnPowerOfAttorneyRequired="HandlePoaRequired" />
@code {
private FodBeneficiaryData beneficiaryData = new();
private RequestorContext requestorContext = new()
{
RequestorIdnp = "1234567890123",
IsAuthenticated = true,
RequestorType = RequestorType.Person,
RequestorName = "John Doe"
};
private void HandleMPowerAuthorized(MPowerData data)
{
Console.WriteLine($"MPower authorized: {data.BeneficiaryIdnp}");
}
private void HandlePoaRequired(bool required)
{
// Configure FodAttachments step based on this value
Console.WriteLine($"Power of Attorney required: {required}");
}
}Handle various events to react to user interactions and validation results.
<FodBeneficiaryComponent
@bind-Value="beneficiaryData"
OnBeneficiaryChanged="HandleBeneficiaryChanged"
OnBeneficiaryTypeChanged="HandleTypeChanged"
OnBeneficiaryEntityTypeChanged="HandleEntityTypeChanged"
OnValidationComplete="HandleValidationComplete" />
@code {
private void HandleBeneficiaryChanged(FodBeneficiaryData data)
{
Console.WriteLine("Beneficiary data changed");
}
private void HandleTypeChanged(BeneficiaryType type)
{
Console.WriteLine($"Type changed to: {type}");
}
private void HandleEntityTypeChanged(BeneficiaryEntityType entityType)
{
Console.WriteLine($"Entity type changed to: {entityType}");
}
private void HandleValidationComplete(BeneficiaryValidationResult result)
{
Console.WriteLine($"Validation: {(result.IsValid ? "Valid" : "Invalid")}");
}
}Properties and events available on the FodBeneficiaryComponent.
The data model representing beneficiary information.
Context information about the person making the request (required for MPower).