feat: add club membership contract dialog and city autocomplete
This commit is contained in:
@@ -28,13 +28,34 @@
|
||||
Required="true"
|
||||
RequiredError="کد پستی الزامی است." />
|
||||
|
||||
<MudTextField @bind-Value="_request.CityId"
|
||||
For="@(() => _request.CityId)"
|
||||
Label="شناسه شهر"
|
||||
Variant="Variant.Outlined"
|
||||
InputType="InputType.Number"
|
||||
Required="true"
|
||||
RequiredError="شهر الزامی است." />
|
||||
<MudAutocomplete T="CityProto.GetAllCitiesByFilterResponseModel"
|
||||
@bind-Value="_selectedCity"
|
||||
Label="شهر"
|
||||
Variant="Variant.Outlined"
|
||||
SearchFunc="SearchCities"
|
||||
ToStringFunc="@(city => city != null ? $"{city.Native} ({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>@city.Native</MudText>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">(@city.StateName)</MudText>
|
||||
</MudStack>
|
||||
</ItemTemplate>
|
||||
<NoItemsTemplate>
|
||||
<MudText Typo="Typo.body2" Class="mud-text-secondary pa-2">شهری یافت نشد</MudText>
|
||||
</NoItemsTemplate>
|
||||
</MudAutocomplete>
|
||||
</MudStack>
|
||||
</MudForm>
|
||||
</DialogContent>
|
||||
|
||||
Reference in New Issue
Block a user