Compare commits

..

No commits in common. "master" and "v1.0.0" have entirely different histories.

8 changed files with 23 additions and 76 deletions

View file

@ -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)
{

View file

@ -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()
{

View file

@ -12,28 +12,20 @@
<h4>Order Locking</h4>
<button @onclick="ToggleOrdersLocked" class="btn btn-danger">
@if (GlobalStuffService.OrdersLocked)
{
<button @onclick="UnlockOrders" class="btn btn-danger">
<span>Unlock Orders</span>
</button>
}
else
{
<button @onclick="LockOrders" class="btn btn-danger">
<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>
}
<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()

View file

@ -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,8 +49,7 @@
<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>

View file

@ -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>

View file

@ -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 />

View file

@ -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>

View file

@ -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">