The invoices link of crowdfund show all invoices of the store if it is set to use all store's invoice

This commit is contained in:
nicolas.dorier
2019-02-19 11:45:04 +09:00
parent 3816b36131
commit 85d75a013a
2 changed files with 56 additions and 55 deletions

View File

@@ -82,6 +82,7 @@ namespace BTCPayServer.Controllers
ResetEvery = Enum.GetName(typeof(CrowdfundResetEvery), settings.ResetEvery), ResetEvery = Enum.GetName(typeof(CrowdfundResetEvery), settings.ResetEvery),
UseAllStoreInvoices = settings.UseAllStoreInvoices, UseAllStoreInvoices = settings.UseAllStoreInvoices,
AppId = appId, AppId = appId,
SearchTerm = settings.UseAllStoreInvoices ? $"storeid:{app.StoreDataId}" : $"orderid:{AppsHelper.GetCrowdfundOrderId(appId)}",
DisplayPerksRanking = settings.DisplayPerksRanking, DisplayPerksRanking = settings.DisplayPerksRanking,
SortPerksByPopularity = settings.SortPerksByPopularity SortPerksByPopularity = settings.SortPerksByPopularity
}; };

View File

@@ -191,7 +191,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<input type="submit" class="btn btn-primary" value="Save Settings" /> <input type="submit" class="btn btn-primary" value="Save Settings" />
<a class="btn btn-secondary" target="_blank" asp-action="ListInvoices" asp-controller="Invoice" asp-route-searchterm="@($"orderid:{CrowdfundHubStreamer.CrowdfundInvoiceOrderIdPrefix}{Model.AppId}")">Invoices generated by app</a> <a class="btn btn-secondary" target="_blank" asp-action="ListInvoices" asp-controller="Invoice" asp-route-searchterm="@Model.SearchTerm">Invoices</a>
<a class="btn btn-secondary" target="_blank" asp-action="ViewCrowdfund" asp-controller="AppsPublic" asp-route-appId="@Model.AppId">View App</a> <a class="btn btn-secondary" target="_blank" asp-action="ViewCrowdfund" asp-controller="AppsPublic" asp-route-appId="@Model.AppId">View App</a>
<a class="btn btn-secondary" target="_blank" asp-action="ListApps">Back to the app list</a> <a class="btn btn-secondary" target="_blank" asp-action="ListApps">Back to the app list</a>
</div> </div>