...
This commit is contained in:
@@ -343,7 +343,7 @@
|
||||
<Button class="mt-3" Color="ButtonColor.Primary" @onclick="ShowReport" Type="ButtonType.Button">
|
||||
pdf
|
||||
</Button>
|
||||
<Button class="mt-3" Color="ButtonColor.Info" @onclick="onClickExternalAccessCode" Type="ButtonType.Button">
|
||||
<Button class="mt-3" Color="ButtonColor.Info" @onclick="onClickLink" Type="ButtonType.Button">
|
||||
لینک
|
||||
</Button>
|
||||
}
|
||||
@@ -489,43 +489,14 @@
|
||||
{
|
||||
if (InvoiceID.HasValue)
|
||||
{
|
||||
|
||||
hc._nav.NavigateTo($"TaxPayerInvoiceItem/{InvoiceID}");
|
||||
}
|
||||
}
|
||||
private async Task onClickExternalAccessCode()
|
||||
private async Task onClickLink()
|
||||
{
|
||||
|
||||
PreloadService.Show(SpinnerColor.Dark);
|
||||
if (!string.IsNullOrEmpty(invoice.ExternalAccessCode))
|
||||
{
|
||||
ExUrl = $"{fv.Domin}/InvoiceReport/" + invoice.ExternalAccessCode;
|
||||
await Codemodal.ShowAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
var rsp = await hc.Put($"Invoice/SetExternalAccessCode/{InvoiceID}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
var str = await rsp.Content.ReadAsStringAsync();
|
||||
if (string.IsNullOrEmpty(str))
|
||||
ShowDangerAlert("مشکلی در ساخت فایل رخ داده لطفا مجدد تلاش کنید");
|
||||
else
|
||||
{
|
||||
ExUrl = $"{fv.Domin}/InvoiceReport/" + str;
|
||||
await Codemodal.ShowAsync();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||
ShowDangerAlert(request[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PreloadService.Hide();
|
||||
ExUrl = $"{fv.Domin}/InvoiceReport/" + InvoiceID;
|
||||
await Codemodal.ShowAsync();
|
||||
}
|
||||
private async Task ShowReport()
|
||||
{
|
||||
|
Reference in New Issue
Block a user