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

@@ -9,18 +9,18 @@
<div class="modal" id="product-modal" tabindex="-1" role="dialog"> <div class="modal" id="product-modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">Contribution Perks Management</h5> <h5 class="modal-title">Contribution Perks Management</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="js-product-save btn btn-primary">Save Changes</button> <button type="button" class="js-product-save btn btn-primary">Save Changes</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -189,12 +189,12 @@
<input asp-for="DisqusShortname" class="form-control" /> <input asp-for="DisqusShortname" class="form-control" />
<span asp-validation-for="DisqusShortname" class="text-danger"></span> <span asp-validation-for="DisqusShortname" class="text-danger"></span>
</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>
</form> </form>
</div> </div>
@@ -221,38 +221,38 @@
</script> </script>
<script id="template-product-content" type="text/template"> <script id="template-product-content" type="text/template">
<div class="mb-3"> <div class="mb-3">
<input class="js-product-id" type="hidden" name="id" value="{id}"> <input class="js-product-id" type="hidden" name="id" value="{id}">
<input class="js-product-index" type="hidden" name="index" value="{index}"> <input class="js-product-index" type="hidden" name="index" value="{index}">
<div class="form-row"> <div class="form-row">
<div class="col-sm-6"> <div class="col-sm-6">
<label>Title</label>* <label>Title</label>*
<input type="text" class="js-product-title form-control mb-2" value="{title}" autofocus /> <input type="text" class="js-product-title form-control mb-2" value="{title}" autofocus />
</div>
<div class="col-sm-3">
<label>Price</label>*
<input type="number" step="any" class="js-product-price form-control mb-2" value="{price}" />
</div>
<div class="col-sm-3">
<label>Custom price</label>
<select class="js-product-custom form-control">
{custom}
</select>
</div>
</div> </div>
<div class="col-sm-3"> <div class="form-row">
<label>Price</label>* <div class="col">
<input type="number" step="any" class="js-product-price form-control mb-2" value="{price}" /> <label>Image</label>
<input type="text" class="js-product-image form-control mb-2" value="{image}" />
</div>
</div> </div>
<div class="col-sm-3"> <div class="form-row">
<label>Custom price</label> <div class="col">
<select class="js-product-custom form-control"> <label>Description</label>
{custom} <textarea rows="3" cols="40" class="js-product-description form-control mb-2">{description}</textarea>
</select> </div>
</div> </div>
</div> </div>
<div class="form-row">
<div class="col">
<label>Image</label>
<input type="text" class="js-product-image form-control mb-2" value="{image}" />
</div>
</div>
<div class="form-row">
<div class="col">
<label>Description</label>
<textarea rows="3" cols="40" class="js-product-description form-control mb-2">{description}</textarea>
</div>
</div>
</div>
</script> </script>
} }