|
|
|
@ -13,6 +13,10 @@ namespace WF_WebAdmin.Pages
|
|
|
|
|
|
|
|
|
|
private int totalItem;
|
|
|
|
|
|
|
|
|
|
private bool showEditQuote = false;
|
|
|
|
|
|
|
|
|
|
private Quote? selectedQuote;
|
|
|
|
|
|
|
|
|
|
[Inject]
|
|
|
|
|
public IQuoteService QuoteService { get; set; }
|
|
|
|
|
|
|
|
|
@ -23,7 +27,6 @@ namespace WF_WebAdmin.Pages
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var response = await QuoteService.getSomeQuote(e.PageSize, e.Page);
|
|
|
|
|
|
|
|
|
|
if (!e.CancellationToken.IsCancellationRequested)
|
|
|
|
@ -32,5 +35,25 @@ namespace WF_WebAdmin.Pages
|
|
|
|
|
quotes = response.ToArray();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnEditButtonClicked(Quote quote)
|
|
|
|
|
{
|
|
|
|
|
if (selectedQuote == null) return;
|
|
|
|
|
selectedQuote = quote;
|
|
|
|
|
showEditQuote = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ClosePopup()
|
|
|
|
|
{
|
|
|
|
|
showEditQuote = false;
|
|
|
|
|
selectedQuote = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task EditQuote()
|
|
|
|
|
{
|
|
|
|
|
await QuoteService.updateQuote(selectedQuote);
|
|
|
|
|
selectedQuote = null;
|
|
|
|
|
ClosePopup();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|