Compare commits
No commits in common. "master" and "v1.0.0" have entirely different histories.
8 changed files with 23 additions and 76 deletions
|
|
@ -18,7 +18,7 @@
|
|||
<QuickGrid Pagination="Pagination" Items="@ArchiveService.GetAllEntries().AsQueryable()">
|
||||
@if (ShowDate)
|
||||
{
|
||||
<PropertyColumn Property="@(e => e.date)" Format="dd.MM.yyyy" Sortable="true" InitialSortDirection="SortDirection.Descending" IsDefaultSortColumn="true" />
|
||||
<PropertyColumn Property="@(e => e.date)" Format="yyyy.MM.dd" Sortable="true" InitialSortDirection="SortDirection.Descending" IsDefaultSortColumn="true" />
|
||||
}
|
||||
@if (ShowPizzaTotal)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,19 +7,10 @@
|
|||
}
|
||||
@if (GlobalStuffService.Message.Length >= 2)
|
||||
{
|
||||
<div class="global_message"> @((MarkupString)Markdig.Markdown.ToHtml(GlobalStuffService.Message)) </div>
|
||||
<p style="font-size: 1.5em; color: limegreen;"> @GlobalStuffService.Message </p>
|
||||
|
||||
}
|
||||
|
||||
<style>
|
||||
.global_message > * {
|
||||
color: limegreen;
|
||||
}
|
||||
|
||||
.global_message > p {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
</style>
|
||||
|
||||
@code{
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,28 +12,20 @@
|
|||
|
||||
|
||||
<h4>Order Locking</h4>
|
||||
@if (GlobalStuffService.OrdersLocked)
|
||||
{
|
||||
<button @onclick="UnlockOrders" class="btn btn-danger">
|
||||
<button @onclick="ToggleOrdersLocked" class="btn btn-danger">
|
||||
@if (GlobalStuffService.OrdersLocked)
|
||||
{
|
||||
<span>Unlock Orders</span>
|
||||
</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button @onclick="LockOrders" class="btn btn-danger">
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>Lock Orders</span>
|
||||
</button>
|
||||
}
|
||||
|
||||
@if (ShowUnlockConfirmation)
|
||||
{
|
||||
<p style="font-size: 1em; color: red;">Order(s) have already been marked as payed. If you unlock payment information WILL be lost!</p>
|
||||
<button @onclick="ConfirmedUnlockOrders" class="btn btn-danger">I understand the consequences. Unlock anyways</button>
|
||||
}
|
||||
}
|
||||
</button>
|
||||
|
||||
|
||||
<h4>Global Message</h4>
|
||||
<InputTextArea @bind-Value=GlobalMessage id="Message" />
|
||||
<InputText @bind-Value=GlobalMessage id="Message" />
|
||||
<button @onclick="SetGlobalMessage">
|
||||
Confirm Message
|
||||
</button>
|
||||
|
|
@ -144,33 +136,15 @@ else
|
|||
bool WrongDeletionPasscode = false;
|
||||
string DeletionPasscode = "";
|
||||
|
||||
bool ShowUnlockConfirmation = false;
|
||||
|
||||
void SaveNewPizzaConfig(EditContext editContext)
|
||||
{
|
||||
GlobalStuffService.SetConfig(PConfig);
|
||||
GlobalStuffService.ShouldBalance = true;
|
||||
}
|
||||
|
||||
void LockOrders()
|
||||
void ToggleOrdersLocked()
|
||||
{
|
||||
GlobalStuffService.SetOrdersLocked(true);
|
||||
}
|
||||
|
||||
void UnlockOrders()
|
||||
{
|
||||
if(PizzaDBService.GetAllResults().Where(o => o.hasPaid).Count() > 0)
|
||||
{
|
||||
ShowUnlockConfirmation = true;
|
||||
return;
|
||||
}
|
||||
GlobalStuffService.SetOrdersLocked(false);
|
||||
}
|
||||
|
||||
void ConfirmedUnlockOrders()
|
||||
{
|
||||
ShowUnlockConfirmation = false;
|
||||
GlobalStuffService.SetOrdersLocked(false);
|
||||
GlobalStuffService.SetOrdersLocked(!GlobalStuffService.OrdersLocked);
|
||||
}
|
||||
|
||||
void SetGlobalMessage()
|
||||
|
|
@ -190,4 +164,4 @@ else
|
|||
{
|
||||
PConfig = GlobalStuffService.GetConfig() ?? new PizzaConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -27,8 +27,7 @@
|
|||
<ValidationMessage For="() => Order.Name" />
|
||||
</div>
|
||||
<label for="PiecesGroup" style="margin-top: 1em;">Pieces</label>
|
||||
<span style="font-size: 0.6em; color: gray;">One slice = ca. @GlobalStuffService.GetSizeOfSliceInCM2().ToString("F0") cm<sup>2</sup></span>
|
||||
<PricePerPieceDisplay />
|
||||
<span style="font-size: 0.7em;">One slice = ca. @GlobalStuffService.GetSizeOfSliceInCM2().ToString("F0") cm<sup>2</sup></span>
|
||||
<div class="row" id="PiecesGroup">
|
||||
<div class="form-group col">
|
||||
<label for="meatPieces">🍖</label>
|
||||
|
|
@ -50,16 +49,15 @@
|
|||
<label for="priorityMeat" style="text-align:center;"> Priority </label>
|
||||
<p style="text-align:center; font-size: 0.8em; margin: 0;">
|
||||
The balancing algorithm tries to avoid changes of the corresponding Variable <br />
|
||||
<i style="font-size: 0.8em;">E.g. If you want to only get pieces from your chosen category put the slider all the way to the left</i>
|
||||
</p>
|
||||
|
||||
<i style="font-size: 0.8em;">E.g. If you want to only get pieces from your chosen category put the slider all the way to the left</i></p>
|
||||
|
||||
<div class="priority-slider-container">
|
||||
<div> Category </div>
|
||||
<RadzenSlider @bind-Value=Order.priority TValue="float" Min="0" Max="1" Step="0.01" id="priorityMeat" />
|
||||
<div> Total Count</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" value="Submit" class="btn btn-primary" />
|
||||
<input type="submit" value="Submit" class="btn btn-primary"/>
|
||||
</EditForm>
|
||||
|
||||
<style>
|
||||
|
|
@ -80,10 +78,10 @@
|
|||
margin: 2rem 3px;
|
||||
}
|
||||
|
||||
.priority-slider-container {
|
||||
.priority-slider-container{
|
||||
padding-bottom: 1rem;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-direction:row;
|
||||
align-items: center;
|
||||
gap: 1em;
|
||||
font-size: 0.75em;
|
||||
|
|
@ -114,7 +112,7 @@
|
|||
submissionSuccessful = true;
|
||||
|
||||
Order = new PizzaRequest();
|
||||
|
||||
|
||||
NavigationManager.NavigateTo("/orderlist");
|
||||
}
|
||||
}
|
||||
|
|
@ -22,8 +22,7 @@
|
|||
@Order.Name
|
||||
</h3>
|
||||
<label for="PiecesGroup" style="margin-top: 1em;">Pieces</label>
|
||||
<span style="font-size: 0.6em; color: gray;">One slice = ca. @GlobalStuffService.GetSizeOfSliceInCM2().ToString("F0") cm<sup>2</sup></span>
|
||||
<PricePerPieceDisplay />
|
||||
<span style="font-size: 0.7em;">One slice = ca. @GlobalStuffService.GetSizeOfSliceInCM2().ToString("F0") cm<sup>2</sup></span>
|
||||
<div class="row" id="PiecesGroup">
|
||||
<div class="form-group col">
|
||||
<label for="meatPieces">🍖</label>
|
||||
|
|
|
|||
|
|
@ -10,10 +10,7 @@
|
|||
<PageTitle>Pizza List</PageTitle>
|
||||
|
||||
<div style="display: flex; ">
|
||||
<div style="display: flex; flex-direction:column;">
|
||||
<TotalPizzasDisplay />
|
||||
<PricePerPieceDisplay />
|
||||
</div>
|
||||
<div style ="display: flex; flex-direction:column; margin-left:auto; align-items:flex-end;">
|
||||
<OrderButton />
|
||||
<HelpButton />
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
@inject GlobalStuffService GlobalStuffService
|
||||
@using System.Globalization
|
||||
|
||||
<p>Price per 🍕: @((GlobalStuffService.GetConfig().Price / (GlobalStuffService.GetConfig().Fragments * 100.0f)).ToString("C2", CultureInfo.CreateSpecificCulture("de-DE")))</p>
|
||||
|
||||
<style>
|
||||
p{
|
||||
font-size: 0.6em;
|
||||
color: gray;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -15,7 +15,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Markdig" Version="0.37.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid" Version="8.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue