Merge branch 'zgo-test' of gitlab.com:pitmutt/zgo into zgo-test
This commit is contained in:
commit
15ec498595
7 changed files with 72 additions and 30 deletions
|
@ -5,3 +5,12 @@
|
||||||
mat-dialog-content {
|
mat-dialog-content {
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cancelTitle {
|
||||||
|
font-family: 'Spartan', sans-serif;
|
||||||
|
background: #ff5722;
|
||||||
|
color: white;
|
||||||
|
font-size: 26px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
|
@ -1,4 +1,6 @@
|
||||||
<h3 mat-dialog-title class="text">{{title}}</h3>
|
<div class="container" style="margin-top: 10px;">
|
||||||
|
|
||||||
|
<div class="cancelTitle">{{title}}</div>
|
||||||
|
|
||||||
<mat-dialog-content>
|
<mat-dialog-content>
|
||||||
<p class="text">{{msg}}</p>
|
<p class="text">{{msg}}</p>
|
||||||
|
@ -22,3 +24,5 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</mat-dialog-actions>
|
</mat-dialog-actions>
|
||||||
|
|
||||||
|
</div>
|
|
@ -1,6 +1,7 @@
|
||||||
import { Inject, Component, OnInit, ViewEncapsulation} from '@angular/core';
|
import { Inject, Component, OnInit, ViewEncapsulation} from '@angular/core';
|
||||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
|
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-cancel',
|
selector: 'app-cancel',
|
||||||
templateUrl: './cancel.component.html',
|
templateUrl: './cancel.component.html',
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
.text {
|
.text {
|
||||||
font-family: 'Spartan', sans-serif;
|
font-family: 'Spartan', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.itemDataTitle {
|
||||||
|
font-family: 'Spartan', sans-serif;
|
||||||
|
background: #ff5722;
|
||||||
|
color: white;
|
||||||
|
font-size: 26px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,20 @@
|
||||||
<h2 mat-dialog-title class="text">Delete item</h2>
|
<div class='itemDataTitle'>Delete Item</div>
|
||||||
|
|
||||||
|
<div class='container' style="margin-top: 20px;">
|
||||||
|
<mat-dialog-content >
|
||||||
|
|
||||||
|
<span style="line-height: 10px;"></span>
|
||||||
|
|
||||||
<mat-dialog-content>
|
<mat-dialog-content>
|
||||||
<p class="text">Are you sure you want to delete "{{item.name}}"?</p>
|
<p class="text">Are you sure you want to delete "{{item.name}}"?</p>
|
||||||
</mat-dialog-content>
|
</mat-dialog-content>
|
||||||
|
|
||||||
<mat-dialog-actions>
|
</mat-dialog-content>
|
||||||
<button mat-raised-button (click)="close()" class="text">Cancel</button>
|
|
||||||
<button mat-raised-button color="primary" class="text" (click)="save()">Delete</button>
|
<div style="display: flex;
|
||||||
</mat-dialog-actions>
|
justify-content: space-between;">
|
||||||
|
<button mat-raised-button class="text" (click)="close()">Close</button>
|
||||||
|
<button mat-raised-button class="text" color="primary" (click)="save()">Delete</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
|
@ -158,6 +158,9 @@ export class ItemListComponent implements OnInit{
|
||||||
// console.log('Deleting', val);
|
// console.log('Deleting', val);
|
||||||
this.itemService.deleteItem(val);
|
this.itemService.deleteItem(val);
|
||||||
this.items = [];
|
this.items = [];
|
||||||
|
this.notifierService
|
||||||
|
.showNotification("Item deleted!!",
|
||||||
|
"Close","success");
|
||||||
}
|
}
|
||||||
this.itemService.getItems(this.owner.address);
|
this.itemService.getItems(this.owner.address);
|
||||||
this.itemsUpdate.subscribe((items) => {
|
this.itemsUpdate.subscribe((items) => {
|
||||||
|
|
|
@ -17,6 +17,7 @@ import { faTrashAlt } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { faChevronRight } from '@fortawesome/free-solid-svg-icons';
|
import { faChevronRight } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { faSignOut } from '@fortawesome/free-solid-svg-icons';
|
import { faSignOut } from '@fortawesome/free-solid-svg-icons';
|
||||||
|
|
||||||
|
import { NotifierService } from '../notifier.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-order',
|
selector: 'app-order',
|
||||||
|
@ -66,8 +67,9 @@ export class OrderComponent implements OnInit{
|
||||||
constructor(
|
constructor(
|
||||||
public fullnodeService: FullnodeService,
|
public fullnodeService: FullnodeService,
|
||||||
public orderService: OrderService,
|
public orderService: OrderService,
|
||||||
private dialog: MatDialog
|
private dialog: MatDialog,
|
||||||
) {
|
private notifierService: NotifierService )
|
||||||
|
{
|
||||||
this.priceUpdate = fullnodeService.priceUpdate;
|
this.priceUpdate = fullnodeService.priceUpdate;
|
||||||
this.priceUpdate.subscribe((price) => {
|
this.priceUpdate.subscribe((price) => {
|
||||||
this.price = price;
|
this.price = price;
|
||||||
|
@ -119,6 +121,9 @@ export class OrderComponent implements OnInit{
|
||||||
console.log('Canceling');
|
console.log('Canceling');
|
||||||
this.orderService.cancelOrder(this.order._id!).subscribe((response) => {
|
this.orderService.cancelOrder(this.order._id!).subscribe((response) => {
|
||||||
this.orderService.getOrder();
|
this.orderService.getOrder();
|
||||||
|
this.notifierService
|
||||||
|
.showNotification("Order successfully cancelled!",
|
||||||
|
"Close","success");
|
||||||
});;
|
});;
|
||||||
} else {
|
} else {
|
||||||
console.log('Returning to page');
|
console.log('Returning to page');
|
||||||
|
|
Loading…
Reference in a new issue