27a3ea76c5
- Introduced a new section in the Profile hub for viewing invitees, enhancing user engagement and tracking of referrals. - Added buttons for accessing the invitees page from the Profile index, improving navigation. - Enhanced the AuthDialog and PhoneVerifyForm components to support inviter mobile input, allowing users to specify who referred them. - Updated RouteConstants to include a new route for invitees, ensuring proper navigation within the application. These changes improve the user experience by facilitating better referral tracking and enhancing the profile management features.
51 lines
1.9 KiB
C#
51 lines
1.9 KiB
C#
using CMSMicroservice.Protobuf.Protos.User;
|
|
using Microsoft.AspNetCore.Components;
|
|
using MudBlazor;
|
|
using static FrontOffice.Main.Shared.AuthDialog;
|
|
|
|
namespace FrontOffice.Main.Shared;
|
|
|
|
public partial class PhoneVerifyForm
|
|
{
|
|
// ── Step state ──
|
|
[Parameter, EditorRequired] public AuthStep CurrentStep { get; set; }
|
|
|
|
// ── Phone step ──
|
|
[Parameter, EditorRequired] public CreateNewOtpTokenRequest PhoneRequest { get; set; } = default!;
|
|
|
|
// ── Verify step ──
|
|
[Parameter, EditorRequired] public VerifyOtpTokenRequest VerifyRequest { get; set; } = default!;
|
|
|
|
// ── Captcha ──
|
|
[Parameter] public string? CaptchaCode { get; set; }
|
|
[Parameter] public string? CaptchaInput { get; set; }
|
|
[Parameter] public EventCallback<string?> CaptchaInputChanged { get; set; }
|
|
[Parameter] public EventCallback OnRefreshCaptcha { get; set; }
|
|
|
|
// ── Shared state ──
|
|
[Parameter] public bool IsBusy { get; set; }
|
|
[Parameter] public string? ErrorMessage { get; set; }
|
|
[Parameter] public string? InfoMessage { get; set; }
|
|
[Parameter] public string? PhoneNumber { get; set; }
|
|
[Parameter] public int ResendRemaining { get; set; }
|
|
|
|
// ── Referral ──
|
|
[Parameter] public string? ReferralCode { get; set; }
|
|
[Parameter] public EventCallback<string?> ReferralCodeChanged { get; set; }
|
|
|
|
// ── Inviter (دعوتکننده) ──
|
|
[Parameter] public string? InviterMobile { get; set; }
|
|
[Parameter] public EventCallback<string?> InviterMobileChanged { get; set; }
|
|
|
|
// ── Verify actions ──
|
|
[Parameter] public EventCallback OnChangePhone { get; set; }
|
|
[Parameter] public EventCallback OnResendOtp { get; set; }
|
|
|
|
// ── Internal form refs (exposed via public methods) ──
|
|
private MudForm? _phoneForm;
|
|
private MudForm? _verifyForm;
|
|
|
|
public MudForm? GetPhoneForm() => _phoneForm;
|
|
public MudForm? GetVerifyForm() => _verifyForm;
|
|
}
|