Add ZEC price to order

This commit is contained in:
Rene Vergara 2021-11-05 08:21:19 -05:00
parent 971fd7ca41
commit 7e5210723e
3 changed files with 3 additions and 5 deletions

View file

@ -5,6 +5,7 @@ const orderSchema = mongoose.Schema({
session: {type: String, required: true}, session: {type: String, required: true},
timestamp: {type: Date, required: true, default: Date.now}, timestamp: {type: Date, required: true, default: Date.now},
closed: { type: Boolean, required: true, default:false }, closed: { type: Boolean, required: true, default:false },
price: { type: Number, required: true},
lines: [{ lines: [{
qty: {type: Number, required: true, default: 1}, qty: {type: Number, required: true, default: 1},
name: { type: String, required: true}, name: { type: String, required: true},

View file

@ -6,5 +6,6 @@ export interface Order {
session: string, session: string,
timestamp?: string, timestamp?: string,
closed: boolean, closed: boolean,
price?: number,
lines: LineItem[] lines: LineItem[]
} }

View file

@ -4,14 +4,9 @@ import { MatDialog, MatDialogConfig } from '@angular/material/dialog';
import { UserService } from '../user.service'; import { UserService } from '../user.service';
import { FullnodeService } from '../fullnode.service'; import { FullnodeService } from '../fullnode.service';
import { ItemService } from '../items/items.service'; import { ItemService } from '../items/items.service';
//import { NameDialogComponent } from '../namedialog/namedialog.component'; // TODO: connect dialog
import { Subscription, Observable } from 'rxjs'; import { Subscription, Observable } from 'rxjs';
import {Owner} from '../owner.model'; 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({ @Component({
@ -42,6 +37,7 @@ export class ViewerComponent implements OnInit {
} }
ngOnDestroy(){ ngOnDestroy(){
this.ownerUpdate.unsubscribe();
} }
} }