POS: Use views instead of partials

This commit is contained in:
Dennis Reimann 2020-05-28 08:50:04 +02:00
parent 58f56eac90
commit e12aa9e657
No known key found for this signature in database
GPG key ID: 5009E1797F03F8D0
4 changed files with 4 additions and 3 deletions

View file

@ -66,7 +66,7 @@ namespace BTCPayServer.Controllers
var numberFormatInfo = _AppService.Currencies.GetNumberFormatInfo(settings.Currency) ?? _AppService.Currencies.GetNumberFormatInfo("USD"); var numberFormatInfo = _AppService.Currencies.GetNumberFormatInfo(settings.Currency) ?? _AppService.Currencies.GetNumberFormatInfo("USD");
double step = Math.Pow(10, -(numberFormatInfo.CurrencyDecimalDigits)); double step = Math.Pow(10, -(numberFormatInfo.CurrencyDecimalDigits));
return View(new ViewPointOfSaleViewModel() return View("PointOfSale/" + viewType, new ViewPointOfSaleViewModel()
{ {
Title = settings.Title, Title = settings.Title,
Step = step.ToString(CultureInfo.InvariantCulture), Step = step.ToString(CultureInfo.InvariantCulture),

View file

@ -1,5 +1,6 @@
@model BTCPayServer.Models.AppViewModels.ViewPointOfSaleViewModel @model BTCPayServer.Models.AppViewModels.ViewPointOfSaleViewModel
@{ @{
Layout = "_LayoutPos";
int[] customTipPercentages = Model.CustomTipPercentages; int[] customTipPercentages = Model.CustomTipPercentages;
var anyInventoryItems = Model.Items.Any(item => item.Inventory.HasValue); var anyInventoryItems = Model.Items.Any(item => item.Inventory.HasValue);
} }

View file

@ -1,5 +1,6 @@
@model BTCPayServer.Models.AppViewModels.ViewPointOfSaleViewModel @model BTCPayServer.Models.AppViewModels.ViewPointOfSaleViewModel
@{ @{
Layout = "_LayoutPos";
var anyInventoryItems = Model.Items.Any(item => item.Inventory.HasValue); var anyInventoryItems = Model.Items.Any(item => item.Inventory.HasValue);
} }

View file

@ -80,12 +80,11 @@
</head> </head>
<body class="h-100"> <body class="h-100">
@if (this.TempData.HasStatusMessage()) @if (this.TempData.HasStatusMessage())
{ {
<partial name="_StatusMessage" /> <partial name="_StatusMessage" />
} }
<partial name="./PointOfSale/@Model.ViewType" /> @RenderBody()
</body> </body>
</html> </html>