diff --git a/backend/models/order.js b/backend/models/order.js index 19c644e..8abf13f 100644 --- a/backend/models/order.js +++ b/backend/models/order.js @@ -5,6 +5,7 @@ const orderSchema = mongoose.Schema({ session: {type: String, required: true}, timestamp: {type: Date, required: true, default: Date.now}, closed: { type: Boolean, required: true, default:false }, + price: { type: Number, required: true}, lines: [{ qty: {type: Number, required: true, default: 1}, name: { type: String, required: true}, diff --git a/src/app/order/order.model.ts b/src/app/order/order.model.ts index 0dd0991..efbd4df 100644 --- a/src/app/order/order.model.ts +++ b/src/app/order/order.model.ts @@ -6,5 +6,6 @@ export interface Order { session: string, timestamp?: string, closed: boolean, + price?: number, lines: LineItem[] } diff --git a/src/app/viewer/viewer.component.ts b/src/app/viewer/viewer.component.ts index 60ce54f..746ea94 100644 --- a/src/app/viewer/viewer.component.ts +++ b/src/app/viewer/viewer.component.ts @@ -4,14 +4,9 @@ import { MatDialog, MatDialogConfig } from '@angular/material/dialog'; import { UserService } from '../user.service'; import { FullnodeService } from '../fullnode.service'; import { ItemService } from '../items/items.service'; -//import { NameDialogComponent } from '../namedialog/namedialog.component'; // TODO: connect dialog import { Subscription, Observable } from 'rxjs'; import {Owner} from '../owner.model'; -//import { v4 as uuidv4 } from 'uuid'; -//var QRCode = require('easyqrcodejs'); -//var URLSafeBase64 = require('urlsafe-base64'); -//var Buffer = require('buffer/').Buffer; @Component({ @@ -42,6 +37,7 @@ export class ViewerComponent implements OnInit { } ngOnDestroy(){ + this.ownerUpdate.unsubscribe(); } }