This commit is contained in:
mmrbnjd
2024-07-27 23:20:15 +03:30
parent 97c30ce438
commit 888b63dcd4
6 changed files with 132 additions and 26 deletions

View File

@@ -179,9 +179,9 @@
private async Task OnClickPay()
{
// result.Status = ComponentStatus.success;
// result.Action = ComponentAction.add;
// await OnMultipleOfThree.InvokeAsync(result);
// result.Action = ComponentAction.add;
// await OnMultipleOfThree.InvokeAsync(result);
}
private async Task OnClickCancel()
@@ -193,15 +193,16 @@
if (confirmation)
{
PreloadService.Show(SpinnerColor.Dark);
var rsp = await hc.Get($"Orders/CancelOrder/{order.ID}");
PreloadService.Hide();
if (rsp.IsSuccessStatusCode)
{
if(await rsp.Content.ReadFromJsonAsync<bool>())
PreloadService.Show(SpinnerColor.Dark);
var rsp = await hc.Get($"Orders/CancelOrder/{order.ID}");
PreloadService.Hide();
if (rsp.IsSuccessStatusCode)
{
result.Status = ComponentStatus.success;
if(await rsp.Content.ReadFromJsonAsync<bool>())
{
order.Status = StatusOrder.Cancel;
result.Status = ComponentStatus.success;
result.Action = ComponentAction.delete;
await OnMultipleOfThree.InvokeAsync(result);
}