eab978188a
- Changed Protobuf imports from FrontOffice.BFF to CMSMicroservice in Profile components (EditAddressDialog, Index, PaymentCallback, Personal, Settings). - Updated CheckoutSummary, OrderDetail, OrderTracking, and Orders pages to use new UserOrder Protobuf definitions. - Refactored WalletService, PackageService, and other utility services to align with new Protobuf structure. - Adjusted appsettings.json for local development URL. - Removed unused validators and simplified validation logic in AuthDialog. - Enhanced ClubMembershipContractDialog to utilize new OtpToken service for OTP handling.
74 lines
3.8 KiB
Plaintext
74 lines
3.8 KiB
Plaintext
|
|
@using CMSMicroservice.Protobuf.Protos.City
|
|
<MudDialog>
|
|
<TitleContent>
|
|
<MudText Typo="Typo.h4" Align="Align.Center">افزودن آدرس جدید</MudText>
|
|
</TitleContent>
|
|
<DialogContent>
|
|
<MudForm @ref="_form" Model="_request">
|
|
<MudStack Spacing="3">
|
|
<MudTextField @bind-Value="_request.Title"
|
|
For="@(() => _request.Title)"
|
|
Label="عنوان آدرس"
|
|
Variant="Variant.Outlined"
|
|
Required="true"
|
|
RequiredError="عنوان آدرس الزامی است." />
|
|
|
|
<MudTextField @bind-Value="_request.Address"
|
|
For="@(() => _request.Address)"
|
|
Label="آدرس کامل"
|
|
Variant="Variant.Outlined"
|
|
Lines="3"
|
|
Required="true"
|
|
RequiredError="آدرس الزامی است." />
|
|
|
|
<MudTextField @bind-Value="_request.PostalCode"
|
|
For="@(() => _request.PostalCode)"
|
|
Label="کد پستی"
|
|
Variant="Variant.Outlined"
|
|
InputType="InputType.Text"
|
|
Required="true"
|
|
RequiredError="کد پستی الزامی است." />
|
|
|
|
<MudAutocomplete T="object"
|
|
@bind-Value="_selectedCity"
|
|
Label="شهر"
|
|
Variant="Variant.Outlined"
|
|
SearchFunc="SearchCities"
|
|
ToStringFunc="@(city => city != null ? $"{((CMSMicroservice.Protobuf.Protos.City.CityDto)city).Native} ({((CMSMicroservice.Protobuf.Protos.City.CityDto)city).StateName})" : string.Empty)"
|
|
Required="true"
|
|
RequiredError="شهر الزامی است."
|
|
Clearable="true"
|
|
ResetValueOnEmptyText="true"
|
|
CoerceText="false"
|
|
CoerceValue="false"
|
|
Dense="true"
|
|
DebounceInterval="300"
|
|
MaxItems="20"
|
|
MinCharacters="2"
|
|
ProgressIndicatorColor="Color.Primary">
|
|
<ItemTemplate Context="city">
|
|
<MudStack Row="true" Spacing="2" AlignItems="AlignItems.Center">
|
|
<MudIcon Icon="@Icons.Material.Filled.LocationCity" Size="Size.Small" />
|
|
<MudText>@(((CMSMicroservice.Protobuf.Protos.City.CityDto)city).Native)</MudText>
|
|
<MudText Typo="Typo.caption" Class="mud-text-secondary">(@(((CMSMicroservice.Protobuf.Protos.City.CityDto)city).StateName))</MudText>
|
|
</MudStack>
|
|
</ItemTemplate>
|
|
<NoItemsTemplate>
|
|
<MudText Typo="Typo.body2" Class="mud-text-secondary pa-2">شهری یافت نشد</MudText>
|
|
</NoItemsTemplate>
|
|
</MudAutocomplete>
|
|
</MudStack>
|
|
</MudForm>
|
|
</DialogContent>
|
|
<DialogActions>
|
|
<MudButton Variant="Variant.Text" OnClick="Cancel" Disabled="_isSaving">لغو</MudButton>
|
|
<MudButton Variant="Variant.Filled"
|
|
Color="Color.Primary"
|
|
OnClick="SaveAddress"
|
|
Disabled="_isSaving"
|
|
FullWidth="true">
|
|
افزودن آدرس
|
|
</MudButton>
|
|
</DialogActions>
|
|
</MudDialog> |