diff --git a/order-web-ui/app/event/PartyEdit.html b/order-web-ui/app/event/PartyEdit.html index 90c17d6..e7ec14f 100644 --- a/order-web-ui/app/event/PartyEdit.html +++ b/order-web-ui/app/event/PartyEdit.html @@ -85,15 +85,9 @@

Allgemeinen

-
- - - -
+
@@ -107,123 +101,120 @@

Allgemeinen

-
- -
diff --git a/order-web-ui/app/event/PartyEditComponent.ts b/order-web-ui/app/event/PartyEditComponent.ts index 07fa73e..e2e30ce 100644 --- a/order-web-ui/app/event/PartyEditComponent.ts +++ b/order-web-ui/app/event/PartyEditComponent.ts @@ -37,16 +37,21 @@ export class PartyEditComponent { this.party = this.routeParams.snapshot.data["party"]; this.condimentsStatistic = >this.routeParams.snapshot.data["condimentsStatistic"]; this.orders = >this.routeParams.snapshot.data["orders"]; + let condiments = >this.routeParams.snapshot.data["condiments"]; if (this.party === undefined) { this.party = new Party(); + this.party.blendStatistics = 50; + this.party.estimatedNumberOfPizzas = 8; this.orders = []; + for (let condiment of condiments) { + this.availableCondiments[condiment.id.value] = true; + } } else { for (let condimentId of this.party.condiments) { this.availableCondiments[condimentId.value] = true; } } - let condiments = >this.routeParams.snapshot.data["condiments"]; this.categories = ]>>CondimentCategoryService.groupCondimentsByCategory(condiments); for (let condiment of condiments) { this.condimentSettings[condiment.id.value] = { @@ -63,13 +68,6 @@ export class PartyEditComponent { return this.availableCondiments[condimentId.value] === true; } - changeEstimatedNumberOfPizzas(factor: number): void { - this.party.estimatedNumberOfPizzas = this.party.estimatedNumberOfPizzas + factor; - if (this.party.estimatedNumberOfPizzas < 0) { - this.party.estimatedNumberOfPizzas = 0; - } - } - blendCondimentStatistic(condiment: Condiment): number { let numberOfOrdersWithCondiment = 0; for (let order of this.orders) {