From 55a657a38589b21403e4772e32be05edcc9f17e9 Mon Sep 17 00:00:00 2001 From: Rene Vergara A Date: Sun, 31 Jul 2022 17:54:50 -0500 Subject: [PATCH] Cancel Order Dialog updated to new Look&Feel --- src/app/cancel/cancel.component.css | 9 ++++++ src/app/cancel/cancel.component.html | 44 +++++++++++++++------------- src/app/cancel/cancel.component.ts | 1 + src/app/order/order.component.ts | 9 ++++-- 4 files changed, 41 insertions(+), 22 deletions(-) diff --git a/src/app/cancel/cancel.component.css b/src/app/cancel/cancel.component.css index a81a136..1e6cd7c 100644 --- a/src/app/cancel/cancel.component.css +++ b/src/app/cancel/cancel.component.css @@ -5,3 +5,12 @@ mat-dialog-content { max-width: 400px; } + +.cancelTitle { + font-family: 'Spartan', sans-serif; + background: #ff5722; + color: white; + font-size: 26px; + text-align: center; + padding: 5px; +} \ No newline at end of file diff --git a/src/app/cancel/cancel.component.html b/src/app/cancel/cancel.component.html index 2c68a3b..4b72834 100644 --- a/src/app/cancel/cancel.component.html +++ b/src/app/cancel/cancel.component.html @@ -1,24 +1,28 @@ -

{{title}}

+
- -

{{msg}}

-
+
{{title}}
- - - - - + + +
- + +

{{msg}}

+
-
- + + + + - -
+ -
-
+
+ + +
+
+ +
\ No newline at end of file diff --git a/src/app/cancel/cancel.component.ts b/src/app/cancel/cancel.component.ts index 212ab58..d5152aa 100644 --- a/src/app/cancel/cancel.component.ts +++ b/src/app/cancel/cancel.component.ts @@ -1,6 +1,7 @@ import { Inject, Component, OnInit, ViewEncapsulation} from '@angular/core'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog'; + @Component({ selector: 'app-cancel', templateUrl: './cancel.component.html', diff --git a/src/app/order/order.component.ts b/src/app/order/order.component.ts index 64f3db4..3b408c6 100644 --- a/src/app/order/order.component.ts +++ b/src/app/order/order.component.ts @@ -17,6 +17,7 @@ import { faTrashAlt } from '@fortawesome/free-solid-svg-icons'; import { faChevronRight } from '@fortawesome/free-solid-svg-icons'; import { faSignOut } from '@fortawesome/free-solid-svg-icons'; +import { NotifierService } from '../notifier.service'; @Component({ selector: 'app-order', @@ -66,8 +67,9 @@ export class OrderComponent implements OnInit{ constructor( public fullnodeService: FullnodeService, public orderService: OrderService, - private dialog: MatDialog - ) { + private dialog: MatDialog, + private notifierService: NotifierService ) + { this.priceUpdate = fullnodeService.priceUpdate; this.priceUpdate.subscribe((price) => { this.price = price; @@ -119,6 +121,9 @@ export class OrderComponent implements OnInit{ console.log('Canceling'); this.orderService.cancelOrder(this.order._id!).subscribe((response) => { this.orderService.getOrder(); + this.notifierService + .showNotification("Order successfully cancelled!", + "Close","success"); });; } else { console.log('Returning to page');