manage conflict (generic way) use toast to show error (#588)
* manage conflict (generic way) use toast to show error * fix httpservice after merge conflict, adapt to use new repository
This commit is contained in:
1 parent
935167daaf
commit
8f55b1b56a
17 files changed
+337
-29
No files matched your search
@@ -106,13 +106,13 @@
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public IEnumerable<CatalogBrand> Brands { get; set; }
|
||||
[Parameter]
|
||||
public IEnumerable<CatalogType> Types { get; set; }
|
||||
[Parameter]
|
||||
public IEnumerable<CatalogBrand> Brands { get; set; }
|
||||
[Parameter]
|
||||
public IEnumerable<CatalogType> Types { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> OnSaveClick { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<string> OnSaveClick { get; set; }
|
||||
|
||||
private string LoadPicture => string.IsNullOrEmpty(_item.PictureBase64) ? string.Empty : $"data:image/png;base64, {_item.PictureBase64}";
|
||||
private bool HasPicture => !string.IsNullOrEmpty(_item.PictureBase64);
|
||||
@@ -124,13 +124,17 @@
|
||||
|
||||
private async Task CreateClick()
|
||||
{
|
||||
await CatalogItemService.Create(_item);
|
||||
await OnSaveClick.InvokeAsync(null);
|
||||
await Close();
|
||||
var result = await CatalogItemService.Create(_item);
|
||||
if (result != null)
|
||||
{
|
||||
await OnSaveClick.InvokeAsync(null);
|
||||
await Close();
|
||||
}
|
||||
}
|
||||
|
||||
public async Task Open()
|
||||
{
|
||||
|
||||
Logger.LogInformation("Now loading... /Catalog/Create");
|
||||
|
||||
await new Css(JSRuntime).HideBodyOverflow();
|
||||
|
||||
Reference in new issue
Block a user