From cbac13b373953ebd1ca4d5d28d3c49b5aae535b3 Mon Sep 17 00:00:00 2001 From: Rene Vergara A Date: Sat, 16 Jul 2022 20:49:58 -0500 Subject: [PATCH] Trash can icon added to new order list - deleting line is not enabled yet. --- src/app/listorders/listorders.component.ts | 12 +++--- src/app/order/order.component.css | 37 +++++++++++++++--- src/app/order/order.component.html | 45 +++++++++++----------- src/app/order/order.component.ts | 18 +++++++++ 4 files changed, 80 insertions(+), 32 deletions(-) diff --git a/src/app/listorders/listorders.component.ts b/src/app/listorders/listorders.component.ts index fdf4aee..9ad26f8 100644 --- a/src/app/listorders/listorders.component.ts +++ b/src/app/listorders/listorders.component.ts @@ -6,11 +6,12 @@ import { UserService } from '../user.service'; import {Owner} from '../owner.model'; import { OrderService } from '../order/order.service'; -import { faTimes } from '@fortawesome/free-solid-svg-icons' -import { faTimesCircle } from '@fortawesome/free-solid-svg-icons' -import { faCheck } from '@fortawesome/free-solid-svg-icons' -import { faCheckCircle } from '@fortawesome/free-solid-svg-icons' -import { faHourglass } from '@fortawesome/free-solid-svg-icons' +import { faTimes } from '@fortawesome/free-solid-svg-icons'; +import { faTimesCircle } from '@fortawesome/free-solid-svg-icons'; +import { faCheck } from '@fortawesome/free-solid-svg-icons'; +import { faCheckCircle } from '@fortawesome/free-solid-svg-icons'; +import { faHourglass } from '@fortawesome/free-solid-svg-icons'; +import { faTrash } from '@fortawesome/free-solid-svg-icons'; @Component({ selector: 'app-list-orders', @@ -32,6 +33,7 @@ export class ListOrdersComponent implements OnInit, OnDestroy{ faCheck = faCheck; faCheckCircle = faCheckCircle; faHourglass = faHourglass; + faTrash = faTrash; // ------------------------------------- diff --git a/src/app/order/order.component.css b/src/app/order/order.component.css index 7446731..3e881d4 100644 --- a/src/app/order/order.component.css +++ b/src/app/order/order.component.css @@ -11,14 +11,41 @@ img.icon{ height: 18px; } -.tbheader { - font-family: Roboto Mono; +.noOrderMsg { + font-family: Roboto Mono; + font-size: 14px; + font-weight: 700; + margin-top: 5px; + align-items: center; +} + +.newOrder { + font-family: Roboto Mono !important; +} + +.newOrderTitle1 { + font-size: 19px; + font-weight: 700; + height: 20px; +} + +.newOrderTitle2 { + font-size: 16px; + font-weight: 400; + height: 18px; +} + +.newOrdertbheader { font-size: 14px; font-weight: 700; } -.tbdetail { - font-family: Roboto Mono; +.newOrdertbdetail { font-size: 14px; font-weight: 400; -} \ No newline at end of file +} + +.lineTrashCan { + cursor: pointer; +} + diff --git a/src/app/order/order.component.html b/src/app/order/order.component.html index c67f8af..7be2b7f 100644 --- a/src/app/order/order.component.html +++ b/src/app/order/order.component.html @@ -1,20 +1,14 @@ -
+
No open order!
-
+
- + - + - - - + - - - +
Order Total: @@ -22,10 +16,7 @@ >{{(total/price) | number: '1.0-6'}}
Item + width="50%">Item Qty. Total
{{item.name}} + width="50%">{{item.name}} {{item.qty}} {{item.qty * item.cost | number:'1.02' | currency: getCurrency() }} + + + + +
diff --git a/src/app/order/order.component.ts b/src/app/order/order.component.ts index 93e99b9..cd480fe 100644 --- a/src/app/order/order.component.ts +++ b/src/app/order/order.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { MatDialog, MatDialogConfig} from '@angular/material/dialog'; import { Observable } from 'rxjs'; +import { LineItem } from '../items/lineitem.model'; import { Order } from './order.model'; import { FullnodeService } from '../fullnode.service'; import { OrderService } from './order.service'; @@ -10,6 +11,10 @@ import { PromptInvoiceComponent } from '../prompt-invoice/prompt-invoice.compone import { ReceiptQRComponent} from '../receipt-qr/receipt-qr.component'; import { faFileInvoiceDollar } from '@fortawesome/free-solid-svg-icons'; +import { faTrash } from '@fortawesome/free-solid-svg-icons'; +import { faTrashAlt } from '@fortawesome/free-solid-svg-icons'; + + @Component({ selector: 'app-order', templateUrl: './order.component.html', @@ -42,6 +47,14 @@ export class OrderComponent implements OnInit{ public priceUpdate: Observable; public totalUpdate: Observable; + // ------------------------------------ + // + faTrash = faTrash; + faTrashAlt = faTrashAlt; + // ------------------------------------- + + + constructor( public fullnodeService: FullnodeService, public orderService: OrderService, @@ -145,4 +158,9 @@ export class OrderComponent implements OnInit{ getCurrency(){ return this.order.currency.toUpperCase(); } + + trashCanClicked(item : LineItem, lines: LineItem[]) { + console.log(item); + console.log(lines); + } }