feat: implement VAT management service and integrate VAT calculations across components
This commit is contained in:
@@ -40,7 +40,7 @@ public partial class Addresses : ComponentBase
|
||||
{
|
||||
var dialog = await DialogService.ShowAsync<AddAddressDialog>("افزودن آدرس جدید");
|
||||
var result = await dialog.Result;
|
||||
if (!result.Canceled)
|
||||
if (result is not null && !result.Canceled)
|
||||
await LoadAddresses();
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public partial class Addresses : ComponentBase
|
||||
{ x => x.Model, address }
|
||||
});
|
||||
var result = await dialog.Result;
|
||||
if (!result.Canceled)
|
||||
if (result is not null && !result.Canceled)
|
||||
await LoadAddresses();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<MudDialog>
|
||||
<MudDialog >
|
||||
<TitleContent>
|
||||
<MudText Typo="Typo.h4" Align="Align.Center">افزودن آدرس جدید</MudText>
|
||||
</TitleContent>
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace FrontOffice.Main.Pages.Profile.Components;
|
||||
|
||||
public partial class AddAddressDialog : ComponentBase
|
||||
{
|
||||
[CascadingParameter] private IDialogReference MudDialog { get; set; } = default!;
|
||||
[CascadingParameter] private IMudDialogInstance MudDialog { get; set; } = default!;
|
||||
[Inject] private UserAddressContract.UserAddressContractClient UserAddressContract { get; set; } = default!;
|
||||
[Inject] private CityProto.CityContract.CityContractClient CityContract { get; set; } = default!;
|
||||
|
||||
@@ -19,7 +19,8 @@ public partial class AddAddressDialog : ComponentBase
|
||||
private CreateNewUserAddressRequest _request = new();
|
||||
private CityProto.GetAllCitiesByFilterResponseModel? _selectedCity;
|
||||
|
||||
private async Task<IEnumerable<CityProto.GetAllCitiesByFilterResponseModel>> SearchCities(string value, CancellationToken ct)
|
||||
private async Task<IEnumerable<CityProto.GetAllCitiesByFilterResponseModel>> SearchCities(string value,
|
||||
CancellationToken ct)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value) || value.Length < 2)
|
||||
return Enumerable.Empty<CityProto.GetAllCitiesByFilterResponseModel>();
|
||||
@@ -71,5 +72,6 @@ public partial class AddAddressDialog : ComponentBase
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void Cancel() => MudDialog.Close(DialogResult.Cancel());
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace FrontOffice.Main.Pages.Profile.Components;
|
||||
|
||||
public partial class EditAddressDialog : ComponentBase
|
||||
{
|
||||
[CascadingParameter] private IDialogReference MudDialog { get; set; } = default!;
|
||||
[CascadingParameter] private IMudDialogInstance MudDialog { get; set; } = default!;
|
||||
[Inject] private UserAddressContract.UserAddressContractClient UserAddressContract { get; set; } = default!;
|
||||
[Inject] private CityProto.CityContract.CityContractClient CityContract { get; set; } = default!;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user