mirror of
https://github.com/yummy4friends/y4f.git
synced 2024-12-30 21:17:09 +01:00
Compare commits
No commits in common. "c05d31975aa9ebcf223a43818fcf187ae8f8397d" and "314c8667e6a986160c83ef2605d117fefea97aaa" have entirely different histories.
c05d31975a
...
314c8667e6
@ -221,8 +221,8 @@ public partial class WebApiContext : DbContext
|
|||||||
|
|
||||||
entity.ToTable("bestellungsposition_has_menuitem");
|
entity.ToTable("bestellungsposition_has_menuitem");
|
||||||
|
|
||||||
entity.Property(e => e.Bestellungsposition_IDBestellung).HasColumnType("int(11)").HasColumnName("Bestellungsposition_IDBestellung");
|
entity.Property(e => e.Bestellungsposition_IDBestellung).HasColumnType("int(11)").HasColumnName("bestellungsposition_IDBestellung");
|
||||||
entity.Property(e => e.MenuItem_IDMenuItem).HasColumnType("int(11)").HasColumnName("MenuItem_IDMenuItem");
|
entity.Property(e => e.MenuItem_IDMenuItem).HasColumnType("int(11)").HasColumnName("menuItem_IDMenuItem");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<MenuitemHasAllergie>(entity =>
|
modelBuilder.Entity<MenuitemHasAllergie>(entity =>
|
||||||
|
@ -89,15 +89,14 @@
|
|||||||
{
|
{
|
||||||
localStorage.SetItem("RabattEinloesen", false);
|
localStorage.SetItem("RabattEinloesen", false);
|
||||||
localStorage.SetItem("Summe", summe);
|
localStorage.SetItem("Summe", summe);
|
||||||
|
// if summe > 8€ add treuepunkte
|
||||||
if (summe >= 8)
|
if (summe >= 8)
|
||||||
{
|
|
||||||
if (kunde.Treuepunkte < 10)
|
|
||||||
{
|
{
|
||||||
kunde.Treuepunkte++;
|
kunde.Treuepunkte++;
|
||||||
|
// add treuepunkte to API
|
||||||
Http.PutAsJsonAsync("https://localhost:7076/api/kunden/" + kunde.Idkunde, kunde);
|
Http.PutAsJsonAsync("https://localhost:7076/api/kunden/" + kunde.Idkunde, kunde);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// add bestellung to API
|
// add bestellung to API
|
||||||
// add all bestellungspositionen to API
|
// add all bestellungspositionen to API
|
||||||
@ -139,20 +138,12 @@
|
|||||||
|
|
||||||
Http.PostAsJsonAsync("https://localhost:7076/api/bestellungspositionen", bestellungsposition);
|
Http.PostAsJsonAsync("https://localhost:7076/api/bestellungspositionen", bestellungsposition);
|
||||||
|
|
||||||
////Add menuitems to bestellungspositionHasMenuItem
|
//Add menuitems to bestellungspositionHasMenuItem
|
||||||
//BestellungspositionHasMenuitem bestellungspositionHasMenuItem = new BestellungspositionHasMenuitem();
|
BestellungspositionHasMenuitem bestellungspositionHasMenuItem = new BestellungspositionHasMenuitem();
|
||||||
//bestellungspositionHasMenuItem.Bestellungsposition_IDBestellung = bestellungsposition.Idbestellung;
|
bestellungspositionHasMenuItem.Bestellungsposition_IDBestellung = bestellungsposition.Idbestellung;
|
||||||
//bestellungspositionHasMenuItem.MenuItem_IDMenuItem = item.Key;
|
bestellungspositionHasMenuItem.MenuItem_IDMenuItem = item.Key;
|
||||||
|
|
||||||
//Http.PostAsJsonAsync("https://localhost:7076/api/bestellungspositionhasmenuitems", bestellungspositionHasMenuItem);
|
Http.PostAsJsonAsync("https://localhost:7076/api/bestellungspositionhasmenuitems", bestellungspositionHasMenuItem);
|
||||||
|
|
||||||
var newBestellungsposition = new BestellungspositionHasMenuitem()
|
|
||||||
{
|
|
||||||
Bestellungsposition_IDBestellung = bestellungsposition.Idbestellung,
|
|
||||||
MenuItem_IDMenuItem = item.Key
|
|
||||||
};
|
|
||||||
|
|
||||||
Http.PostAsJsonAsync("https://localhost:7076/api/bestellungspositionhasmenuitems", newBestellungsposition);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,20 +42,9 @@
|
|||||||
month = bestellungsposition.Datum.Month;
|
month = bestellungsposition.Datum.Month;
|
||||||
year = bestellungsposition.Datum.Year;
|
year = bestellungsposition.Datum.Year;
|
||||||
|
|
||||||
@*print only if date is higher than now datum, all expired hh:mm unvisible *@
|
@*print kunde.code, hour and minute from last bestellungsposition*@
|
||||||
@*if (bestellungsposition.Datum > DateTime.Now)
|
@*print only if date is higher than now datum *@
|
||||||
{
|
if (bestellungsposition.Datum > DateTime.Now)
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<p @onclick="@(()=>BDetail(@kunde.Idkunde))" class="mb-0 pb-0">
|
|
||||||
#@kunde.Code
|
|
||||||
@hour:@minute
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
}*@
|
|
||||||
@*print only if date is in current day month year *@
|
|
||||||
if (bestellungsposition.Datum.Day == DateTime.Now.Day && bestellungsposition.Datum.Month == DateTime.Now.Month && bestellungsposition.Datum.Year == DateTime.Now.Year)
|
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@ -66,6 +55,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
@*}*@
|
||||||
firstTime = false;
|
firstTime = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -75,7 +65,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
@* <p id="text" readonly>Abholzeit</p>
|
<p id="text" readonly>Abholzeit</p>
|
||||||
<br />
|
<br />
|
||||||
<form id="button" action="Bestelluebersicht">
|
<form id="button" action="Bestelluebersicht">
|
||||||
<input type="submit" value="30 Min" class="btn">
|
<input type="submit" value="30 Min" class="btn">
|
||||||
@ -85,7 +75,7 @@
|
|||||||
</form>
|
</form>
|
||||||
<form id="button" action="Bestelluebersicht">
|
<form id="button" action="Bestelluebersicht">
|
||||||
<input type="submit" value="1 Std" class="btn">
|
<input type="submit" value="1 Std" class="btn">
|
||||||
</form>*@
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -128,22 +118,6 @@
|
|||||||
month = DateTime.Now.Month;
|
month = DateTime.Now.Month;
|
||||||
year = DateTime.Now.Year;
|
year = DateTime.Now.Year;
|
||||||
|
|
||||||
//sort bestellungspositions by datum
|
|
||||||
bestellungspositions = bestellungspositions.OrderByDescending(x => x.Datum).ToList();
|
|
||||||
//sort kunden by the order of bestellungspositions
|
|
||||||
List<Kunde> kundenSorted = new List<Kunde>();
|
|
||||||
foreach (var bestellungsposition in bestellungspositions)
|
|
||||||
{
|
|
||||||
foreach (var kunde in kunden)
|
|
||||||
{
|
|
||||||
if (bestellungsposition.KundeIdkunde == kunde.Idkunde && !kundenSorted.Contains(kunde))
|
|
||||||
{
|
|
||||||
kundenSorted.Add(kunde);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
kunden = kundenSorted;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Bestellungsposition
|
public class Bestellungsposition
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
|
|
||||||
<div class="d-flex flex-column" style="align-items: center; margin-left: 100px;">
|
<div class="d-flex flex-column" style="align-items: center; margin-left: 100px;">
|
||||||
@*<button class="btn_back w-75">Zurück</button>*@
|
@*<button class="btn_back w-75">Zurück</button>*@
|
||||||
@*<button class="btn btn-danger w-75" style="border-radius: 50px; padding-top:12px; padding-bottom:12px; color:black;" @onclick="Aufloesen">Bestellung auflösen</button>*@
|
@*<button class="btn btn-danger w-75" style="border-radius: 50px; padding-top:12px; padding-bottom:12px; color:black;">Bestellung auflösen</button>*@
|
||||||
@*<button class="btn_forward w-75">Bestellung abschließen</button>*@
|
@*<button class="btn_forward w-75">Bestellung abschließen</button>*@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -150,25 +150,6 @@
|
|||||||
localStorage.Clear();
|
localStorage.Clear();
|
||||||
_navigationManager.NavigateTo("/");
|
_navigationManager.NavigateTo("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
//public void Aufloesen()
|
|
||||||
//{
|
|
||||||
// foreach (var bestellungsposition in bestellungspositions)
|
|
||||||
// {
|
|
||||||
// foreach (var bestellungspositionHasMenuitem in bestellungspositionHasMenuitems)
|
|
||||||
// {
|
|
||||||
// if (bestellungsposition.Idbestellung == bestellungspositionHasMenuitem.Bestellungsposition_IDBestellung)
|
|
||||||
// {
|
|
||||||
// Http.DeleteAsync("https://localhost:7076/api/BestellungspositionHasMenuitems/" + bestellungspositionHasMenuitem.Bestellungsposition_IDBestellung + "/" + bestellungspositionHasMenuitem.MenuItem_IDMenuItem);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (bestellungsposition.KundeIdkunde == kunde.Idkunde)
|
|
||||||
// {
|
|
||||||
// Http.DeleteAsync("https://localhost:7076/api/Bestellungspositionen/" + bestellungsposition.Idbestellung);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
// get data from api
|
// get data from api
|
||||||
|
Loading…
Reference in New Issue
Block a user