Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
  • Loading branch information
Administrator authored and Administrator committed Jun 27, 2018
2 parents fc5aa86 + be3d421 commit 845ee0d
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 35 deletions.
Binary file modified .vs/CST04BackendApplikation/v15/.suo
Binary file not shown.
11 changes: 9 additions & 2 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
"ExpandedNodes": [
"",
"\\src",
"\\src\\app"
"\\src\\app",
"\\src\\app\\chocolates-view",
"\\src\\app\\ingredients-view",
"\\src\\app\\models",
"\\src\\app\\navmenu",
"\\src\\app\\order-activities-view",
"\\src\\app\\package-view",
"\\src\\app\\quick-view"
],
"SelectedNode": "\\src\\index.html",
"SelectedNode": "\\src\\app\\quick-view\\quick-view.component.ts",
"PreviewInSolutionExplorer": false
}
Binary file modified .vs/slnx.sqlite
Binary file not shown.
27 changes: 16 additions & 11 deletions src/app/chocolates-view/chocolates-view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
<div class="chocolate-view-chocolateList-element chocolate-view-list">
<div *ngIf="chocolates">
<div class="list-group" style="width:100%; margin:0" *ngFor="let chocolate of chocolates">
<a *ngIf="chocolate.Available" (click)="setSelectedChocolate(chocolate)" class="list-group-item"> {{chocolate.Name}} | {{chocolate.Wrapping.Name}} </a>
<a *ngIf="chocolate.Available" (click)="setSelectedChocolate(chocolate)" class="list-group-item"> {{chocolate.Name}}</a>
</div>
</div>

<div *ngIf="chocolates">
<div>
<!--<a class="list-group-item"> \--- - - - - - - - - - - not available - - - - - - - - - - ---/ </a>-->
</div>
<div class="list-group" style="width:100%; margin:0" *ngFor="let chocolate of chocolates">
<a *ngIf="!chocolate.Available" (click)="setSelectedChocolate(chocolate)" class="list-group-item"> \--- {{chocolate.Name}} | {{chocolate.Wrapping.Name}} </a>
<a *ngIf="!chocolate.Available" (click)="setSelectedChocolate(chocolate)" class="list-group-item"> \--- {{chocolate.Name}}</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -43,7 +46,7 @@
<div class="col-sm-6">
<input class="form-control" [(ngModel)]="selectedChocolate.Name" required />
</div><!--placeholder="name"-->
<div class="col-lg-3"> € {{chocolatePrice}}</div>
<label class="col-lg-3"> € {{chocolatePrice.toFixed(2)}}</label>
</div>

<div class="form-group form-group-element">
Expand Down Expand Up @@ -118,25 +121,26 @@

<div *ngIf="selectedIngredients">
<div class="list-group " style="width:100%; margin:0" *ngFor="let ingredient of selectedIngredients">
<a *ngIf="ingredient.Available && ingredient.Type == 'Base'" (click)="putInAivailableIngredients(ingredient)" class="list-group-item">{{ingredient.Type}} | € {{ingredient.Price}} | {{ingredient.Name}}</a>
<a *ngIf="ingredient.Available && ingredient.Type == 'Base'" (click)="putInAivailableIngredients(ingredient)" class="list-group-item">{{ingredient.Type}} | € {{ingredient.Price.toFixed(2)}} | {{ingredient.Name}}</a>
</div>
</div>

<div *ngIf="selectedIngredients">
<div class="list-group " style="width:100%; margin:0" *ngFor="let ingredient of selectedIngredients">
<a *ngIf="ingredient.Available && ingredient.Type == 'Filling'" (click)="putInAivailableIngredients(ingredient)" class="list-group-item">{{ingredient.Type}} | € {{ingredient.Price}} | {{ingredient.Name}}</a>
<a *ngIf="ingredient.Available && ingredient.Type == 'Filling'" (click)="putInAivailableIngredients(ingredient)" class="list-group-item">{{ingredient.Type}} | € {{ingredient.Price.toFixed(2)}} | {{ingredient.Name}}</a>
</div>
</div>

<div *ngIf="selectedIngredients">
<!--<a class="list-group-item"> \--- - - - - - - - - - - not available - - - - - - - - - - ---/ </a>-->
<div class="list-group " style="width:100%; margin:0" *ngFor="let ingredient of selectedIngredients">
<a *ngIf="!ingredient.Available && ingredient.Type == 'Base'" (click)="putInAivailableIngredients(ingredient)" class="list-group-item"> \-- {{ingredient.Type}} -| € {{ingredient.Price}} | {{ingredient.Name}}</a>
<a *ngIf="!ingredient.Available && ingredient.Type == 'Base'" (click)="putInAivailableIngredients(ingredient)" class="list-group-item"> \-- {{ingredient.Type}} -| € {{ingredient.Price.toFixed(2)}} | {{ingredient.Name}}</a>
</div>
</div>

<div *ngIf="selectedIngredients">
<div class="list-group " style="width:100%; margin:0" *ngFor="let ingredient of selectedIngredients">
<a *ngIf="!ingredient.Available && ingredient.Type == 'Filling'" (click)="putInAivailableIngredients(ingredient)" class="list-group-item"> \-- {{ingredient.Type}} -| € {{ingredient.Price}} | {{ingredient.Name}} </a>
<a *ngIf="!ingredient.Available && ingredient.Type == 'Filling'" (click)="putInAivailableIngredients(ingredient)" class="list-group-item"> \-- {{ingredient.Type}} -| € {{ingredient.Price.toFixed(2)}} | {{ingredient.Name}} </a>
</div>
</div>

Expand All @@ -154,25 +158,26 @@

<div *ngIf="availableIngredients">
<div class="list-group " style="width:100%; margin:0" *ngFor="let ingredient of availableIngredients">
<a *ngIf="ingredient.Available && ingredient.Type == 'Base'" (click)="putInSelectedIngredients(ingredient)" class="list-group-item">{{ingredient.Type}} | € {{ingredient.Price}} | {{ingredient.Name}}</a>
<a *ngIf="ingredient.Available && ingredient.Type == 'Base'" (click)="putInSelectedIngredients(ingredient)" class="list-group-item">{{ingredient.Type}} | € {{ingredient.Price.toFixed(2)}} | {{ingredient.Name}}</a>
</div>
</div>

<div *ngIf="availableIngredients">
<div class="list-group " style="width:100%; margin:0" *ngFor="let ingredient of availableIngredients">
<a *ngIf="ingredient.Available && ingredient.Type == 'Filling'" (click)="putInSelectedIngredients(ingredient)" class="list-group-item">{{ingredient.Type}} | € {{ingredient.Price}} | {{ingredient.Name}}</a>
<a *ngIf="ingredient.Available && ingredient.Type == 'Filling'" (click)="putInSelectedIngredients(ingredient)" class="list-group-item">{{ingredient.Type}} | € {{ingredient.Price.toFixed(2)}} | {{ingredient.Name}}</a>
</div>
</div>

<div *ngIf="availableIngredients">
<!--<a class="list-group-item"> \--- - - - - - - - - - not available - - - - - - - - - ---/ </a>-->
<div class="list-group " style="width:100%; margin:0" *ngFor="let ingredient of availableIngredients">
<a *ngIf="!ingredient.Available && ingredient.Type == 'Base'" (click)="putInSelectedIngredients(ingredient)" class="list-group-item"> \-- {{ingredient.Type}} -| € {{ingredient.Price}} | {{ingredient.Name}}</a>
<a *ngIf="!ingredient.Available && ingredient.Type == 'Base'" (click)="putInSelectedIngredients(ingredient)" class="list-group-item"> \-- {{ingredient.Type}} -| € {{ingredient.Price.toFixed(2)}} | {{ingredient.Name}}</a>
</div>
</div>

<div *ngIf="availableIngredients">
<div class="list-group " style="width:100%; margin:0" *ngFor="let ingredient of availableIngredients">
<a *ngIf="!ingredient.Available && ingredient.Type == 'Filling'" (click)="putInSelectedIngredients(ingredient)" class="list-group-item"> \-- {{ingredient.Type}} -| € {{ingredient.Price}} | {{ingredient.Name}}</a>
<a *ngIf="!ingredient.Available && ingredient.Type == 'Filling'" (click)="putInSelectedIngredients(ingredient)" class="list-group-item"> \-- {{ingredient.Type}} -| € {{ingredient.Price.toFixed(2)}} | {{ingredient.Name}}</a>
</div>
</div>

Expand Down
4 changes: 3 additions & 1 deletion src/app/ingredients-view/ingredients-view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
</div>
</div>
<div *ngIf="ingredients">
<!-- <a class="list-group-item"> \--- - - - - - - - - - not available - - - - - - - - - ---/ </a>-->
<div class="list-group" style="width:100%; margin:0" *ngFor="let ingredient of ingredients">
<div >
<div>
<a *ngIf="!ingredient.Available && ingredient.Type == 'Filling'" (click)="setSelectedIngredient(ingredient)" class="list-group-item"> \--- {{ingredient.Name}} </a>
</div>
</div>
Expand Down Expand Up @@ -123,6 +124,7 @@
</div>

<div *ngIf="ingredients">
<!--<a class="list-group-item"> \--- - - - - - - - - - - not available - - - - - - - - - - ---/ </a>-->
<div class="list-group" style="width:100%; margin:0" *ngFor="let ingredient of ingredients">
<div>
<a *ngIf="!ingredient.Available && ingredient.Type == 'Base'" (click)="setSelectedIngredient(ingredient)" class="list-group-item"> \--- {{ingredient.Name}} </a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}

.order-view-OrderDetails-element {
height: 38vw;
/*height: 38vw;*/
margin: auto;
}

26 changes: 16 additions & 10 deletions src/app/order-activities-view/order-activities-view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@

<!--Left Container delayed Orders-->
<div>
<p>Paused Orders:</p>
<label class="col-sm-12" style="margin-bottom:5px; margin-top:5px;"> pausedOrders: </label>
<!--<p>Paused Orders:</p>-->
<div class="order-view-body-element order-view-list">
<div class="list-group order-view-OrderDetails-element" style="width:100%; margin:0" *ngFor="let order of tempOrders">
<div *ngIf="order.Status.OrderStatusId == 'e9ea67d5-bee2-4372-9abb-408a2afe3640'">
<a (click)="setSelectedOrder(order)" class="list-group-item"> {{order.OrderId}} | {{order.Note}}</a>
<div (click)="setSelectedOrder(order)" class="list-group-item"> {{order.OrderId}} <br /> {{order.Note}}</div>
</div>
</div>
</div>
</div>

<!--Left Container paused Orders-->
<div>
<p>Delayed Orders:</p>
<label class="col-sm-12" style="margin-bottom:5px; margin-top:5px;"> delayedOrders: </label>
<!--<p>Delayed Orders:</p>-->
<div class="order-view-body-element order-view-list">
<div class="list-group order-view-OrderDetails-element" style="width:100%; margin:0" *ngFor="let order of tempOrders">
<div *ngIf="order.Status.OrderStatusId == '83d176ef-0c09-4fdb-9e8e-3f422bed7867'">
<a (click)="setSelectedOrder(order)" class="list-group-item"> {{order.OrderId}} | {{order.Note}}</a>
<div (click)="setSelectedOrder(order)" class="list-group-item"> {{order.OrderId}} <br /> {{order.Note}}</div>
</div>
</div>
</div>
Expand All @@ -32,7 +34,8 @@
<!--Detail View-->
<div class="col-sm-6">
<div *ngIf="selectedOrder">
<p>Detail View:</p>
<label class="col-sm-12" style="margin-bottom:5px; margin-top:5px;"> Detail View: </label>
<!-- <p>Detail View:</p>-->
<div class="col-sm-12 order-view-OrderDetails-element">
<table class="table table-striped">
<tr>
Expand Down Expand Up @@ -86,7 +89,7 @@
</table>

</div>
</div>
</div>
</div>

<!--Left Container progess and open Orders-->
Expand All @@ -95,23 +98,26 @@

<!--progress Orders-->
<div>
<p>Progess Order:</p>
<label class="col-sm-12" style="margin-bottom:5px; margin-top:5px;"> progressOrders: </label>
<!-- <p>Progess Order:</p>-->
<div class="order-view-list order-view-Orders-elment">
<div class="list-group order-view-OrderDetails-element" style="width:100%; margin:0" *ngFor="let order of tempOrders">

<div *ngIf="order.Status.OrderStatusId == '1d7ed2c9-e273-49e7-b7fd-b014f71a8a40'">
<a (click)="setSelectedOrder(order)" class="list-group-item"> {{order.OrderId}} | {{order.Note}}</a>
<div (click)="setSelectedOrder(order)" class="list-group-item"> {{order.OrderId}} <br /> {{order.Note}}</div>
</div>
</div>
</div>
</div>

<!--new Orders-->
<div>
<p>Open Orders:</p>
<label class="col-sm-12" style="margin-bottom:5px; margin-top:5px;"> openOrders: </label>
<!--<p>Open Orders:</p>-->
<div class="order-view-list">
<div class="list-group order-view-OrderDetails-element" style="width:100%; margin:0" *ngFor="let order of tempOrders">
<div *ngIf="order.Status.OrderStatusId == '0c16612c-9ad3-4ffe-bb58-3ea434e0f91f'">
<a (click)="setSelectedOrder(order)" class="list-group-item"> {{order.OrderId}} | {{order.Note}}</a>
<div (click)="setSelectedOrder(order)" class="list-group-item"> {{order.OrderId}} <br /> {{order.Note}}</div>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/app/package-view/package-view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<div class="package-view-packageList-element package-view-list">
<div *ngIf="packages">
<div class="list-group" style="width:100%; margin:0" *ngFor="let package of packages">
<a *ngIf="package.Available" (click)="setSelectedPackage(package)" class="list-group-item"> {{package.Name}} </a>
<div *ngIf="package.Available" (click)="setSelectedPackage(package)" class="list-group-item"> {{package.Name}} </div>
</div>
</div>
<div *ngIf="packages">
<div class="list-group" style="width:100%; margin:0" *ngFor="let package of packages">
<a *ngIf="!package.Available" (click)="setSelectedPackage(package)" class="list-group-item"> \--- {{package.Name}} </a>
<div *ngIf="!package.Available" (click)="setSelectedPackage(package)" class="list-group-item"> \--- {{package.Name}} </div>
</div>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion src/app/package-view/package-view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class PackageViewComponent implements OnInit {
this.selectedPackage.Wrapping.Name = "wrap no. 1";
this.setDefaultDemoData();
this.getWrappings();
this.packages = new Array<Package>();
this.getPackagesWithChocolates();

this.availableChocolates = new Array<Chocolate>();
Expand All @@ -71,6 +72,7 @@ export class PackageViewComponent implements OnInit {

getPackagesWithChocolates(): void {
console.error("getPackagesWithChocolates()");

this.synchronizerService.getPackagesWithChocolates()
.subscribe(packages => this.packages = packages);
}
Expand All @@ -86,7 +88,7 @@ export class PackageViewComponent implements OnInit {
this.setDefaultDemoData();
this.selectedChocolates = this.selectedPackage.Chocolates;

this.availableChocolates = new Array<Chocolate>()
//this.availableChocolates = new Array<Chocolate>()

this.getChocolatesForAvailableChocolates();
this.setAvailableChocolates();
Expand Down Expand Up @@ -130,6 +132,7 @@ export class PackageViewComponent implements OnInit {
this.synchronizerService.updatePackage(this.selectedPackage)
.subscribe(updateCheck => this.updateCheck = updateCheck);

this.packages = new Array<Package>();
this.getPackagesWithChocolates();
}

Expand All @@ -143,6 +146,7 @@ export class PackageViewComponent implements OnInit {
this.synchronizerService.createNewPackage(this.selectedPackage)
.subscribe(updateCheck => this.updateCheck = updateCheck);

//this.packages = new Array<Package>();
this.getPackagesWithChocolates();
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/quick-view/quick-view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>-->

<div class='col-sm-2'>
<p>Sales: {{SumSales}} €</p>
<p>Sales: {{SumSalesString}} €</p>
</div>


Expand Down
12 changes: 8 additions & 4 deletions src/app/quick-view/quick-view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class QuickViewComponent implements OnInit {
OrderContentList: OrderContent[];
IngredientList: Ingredient[];
packagePrice: number;
SumSalesString: string;


constructor(private synchronizerService: SynchronizerService)
Expand Down Expand Up @@ -59,16 +60,16 @@ export class QuickViewComponent implements OnInit {
var temp1 = tempOrder.DateOfOrder.split('(');
var temp2 = temp1[1].split('+');
var dateOfOrder: number = parseInt(temp2[0]);
console.error(dateOfOrder);
//console.error(dateOfOrder);
console.error('drinnen1');

if ((dateOfOrder >= this.startDateNumber) && (dateOfOrder <= this.todayNumber)) {
console.error('drinnen2');
this.getOrderContentChocolates(tempOrder.OrderId);
console.error(this.OrderContentList)
//console.error(this.OrderContentList)

for (var tempOrderContent of this.OrderContentList) {

console.error(tempOrderContent.Chocolate.ChocolateId);
if (tempOrderContent.Chocolate.ChocolateId) {
this.getIngredientsByChocolateId(tempOrderContent.Chocolate.ChocolateId);
Expand All @@ -77,8 +78,11 @@ export class QuickViewComponent implements OnInit {
for (var tempIngredient of this.IngredientList) {
console.error('drinnen4')
this.SumSales += tempIngredient.Price;
console.error(this.SumSales.toFixed(2))
console.error(this.SumSales)
}
this.SumSales = this.SumSales * tempOrderContent.Amount;
this.SumSalesString = this.SumSales.toFixed(2);

}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/synchronizer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const httpOptions = {
export class SynchronizerService {


private serviceUrl = 'http://localhost:8090/AppServiceService/';
// private serviceUrl = 'http://wi-gate.technikum-wien.at:60935/AppServiceService/'; // URL to web api
// private serviceUrl = 'http://localhost:8090/AppServiceService/';
private serviceUrl = 'http://wi-gate.technikum-wien.at:60935/AppServiceService/'; // URL to web api



Expand Down

0 comments on commit 845ee0d

Please sign in to comment.