| @@ -39,7 +39,6 @@ | |||||
| "cordova-res": "^0.15.2", | "cordova-res": "^0.15.2", | ||||
| "es6-promise-plugin": "^4.2.2", | "es6-promise-plugin": "^4.2.2", | ||||
| "face-api.js": "^0.22.2", | "face-api.js": "^0.22.2", | ||||
| "faker": "^5.1.0", | |||||
| "hammerjs": "^2.0.8", | "hammerjs": "^2.0.8", | ||||
| "moment": "^2.29.1", | "moment": "^2.29.1", | ||||
| "rxjs": "~6.5.5", | "rxjs": "~6.5.5", | ||||
| @@ -1,5 +1,4 @@ | |||||
| import { Component, OnInit } from '@angular/core'; | import { Component, OnInit } from '@angular/core'; | ||||
| import * as faker from 'faker'; | |||||
| import { ModalController } from '@ionic/angular'; | import { ModalController } from '@ionic/angular'; | ||||
| @Component({ | @Component({ | ||||
| @@ -40,16 +39,6 @@ export class AddPartyPage implements OnInit { | |||||
| ngOnInit() { | ngOnInit() { | ||||
| for (let i = 0; i < 12; i += 1) { | |||||
| this.contactList.push({ | |||||
| name: faker.name.findName(), | |||||
| phone: faker.phone.phoneNumber() | |||||
| }); | |||||
| } | |||||
| this.tempContactList = JSON.parse(JSON.stringify(this.contactList)); | |||||
| } | } | ||||
| searchContact() { | searchContact() { | ||||
| @@ -1,6 +1,5 @@ | |||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { IonSlides, ModalController } from '@ionic/angular'; | import { IonSlides, ModalController } from '@ionic/angular'; | ||||
| import * as faker from 'faker'; | |||||
| import * as moment from 'moment'; | import * as moment from 'moment'; | ||||
| import { Router } from '@angular/router'; | import { Router } from '@angular/router'; | ||||
| import { ChatPage } from '../chat/chat.page'; | import { ChatPage } from '../chat/chat.page'; | ||||
| @@ -93,49 +92,7 @@ export class BookingPage implements OnInit { | |||||
| } | } | ||||
| ngOnInit() { | ngOnInit() { | ||||
| for (let i = 0; i < 3; i += 1) { | |||||
| this.bookingSeatsData.push({ | |||||
| dateTime: faker.date.future(), | |||||
| staduim : this.stadiums[i], | |||||
| matchType: 'T20 League', | |||||
| matchDetails: { | |||||
| home: i !==1 ? this.teams[i] : { name: 'KXIP', image: 'assets/home-team/KXIP.svg' }, | |||||
| away: i ===1 ? this.teams[i] : { name: 'KXIP', image: 'assets/home-team/KXIP.svg' } | |||||
| }, | |||||
| seatsAvailable: [{ | |||||
| stand: 'Grand', | |||||
| seats: [], | |||||
| }, { | |||||
| stand: 'Pavilion', | |||||
| seats: [], | |||||
| }, { | |||||
| stand: 'First', | |||||
| seats: [], | |||||
| }, { | |||||
| stand: 'Second', | |||||
| seats: [], | |||||
| }] | |||||
| }); | |||||
| } | |||||
| for (let i = 0; i < this.bookingSeatsData.length; i += 1) { | |||||
| for (let j = 0; j < this.bookingSeatsData[i].seatsAvailable.length; j += 1) { | |||||
| let price = faker.commerce.price(); | |||||
| let randomNumber = Math.random() * (15 - 0); | |||||
| for (let k = 0; k < randomNumber; k += 1) { | |||||
| this.bookingSeatsData[i].seatsAvailable[j].seats.push({ | |||||
| id: this.bookingSeatsData[i].seatsAvailable[j].stand + '##' + k.toString(), | |||||
| price | |||||
| }); | |||||
| } | |||||
| } | |||||
| } | |||||
| this.selectedDate = this.bookingSeatsData[0].dateTime; | |||||
| } | } | ||||
| @@ -1,6 +1,5 @@ | |||||
| import { Component, OnInit } from '@angular/core'; | import { Component, OnInit } from '@angular/core'; | ||||
| import { ModalController } from '@ionic/angular'; | import { ModalController } from '@ionic/angular'; | ||||
| import * as faker from 'faker'; | |||||
| import { ToastController } from '@ionic/angular'; | import { ToastController } from '@ionic/angular'; | ||||
| @@ -68,94 +67,6 @@ export class ChatPage implements OnInit { | |||||
| } | } | ||||
| ngOnInit() { | ngOnInit() { | ||||
| let myAccountIndex = Math.floor(Math.random() * 11); | |||||
| for (let i = 0; i < 12; i += 1) { | |||||
| this.members.push({ | |||||
| name: myAccountIndex === i ? 'You' : faker.name.findName(), | |||||
| image: 'assets/home-team/roster/' + (i + 1) + '.png', | |||||
| color: faker.vehicle.color() | |||||
| }); | |||||
| } | |||||
| this.myAccount = this.members[myAccountIndex]; | |||||
| for (let i = 0; i < 2; i += 1) { | |||||
| let options = []; | |||||
| for (let j = 0; j < 4; j += 1) { | |||||
| options.push({ | |||||
| text: faker.lorem.word(), | |||||
| pollUserCount: faker.random.number() | |||||
| }); | |||||
| } | |||||
| let ballChat = []; | |||||
| for (let balls = 0; balls < 6; balls += 1) { | |||||
| let randomNumber = Math.floor(Math.random() * 3) + 1; | |||||
| let chat = []; | |||||
| for (let k = 0; k < randomNumber; k += 1) { | |||||
| let randomMemberIndex = Math.floor(Math.random() * 3); | |||||
| chat.push({ | |||||
| user: this.members[randomMemberIndex], | |||||
| text: faker.lorem.sentence(), | |||||
| time: faker.time.recent(), | |||||
| }); | |||||
| } | |||||
| ballChat.push({ | |||||
| ball: balls, | |||||
| chat: chat | |||||
| }); | |||||
| } | |||||
| this.chatData.push({ | |||||
| over: i, | |||||
| ballChat: ballChat, | |||||
| triviaQuestion: { | |||||
| question: faker.lorem.sentence(), | |||||
| maxUserCount: Math.max.apply(Math, options.map(function(o) { return o.pollUserCount; })), | |||||
| options: options, | |||||
| selectedAnswer: Math.floor(Math.random() * 4), | |||||
| } | |||||
| }); | |||||
| } | |||||
| setTimeout(() => { | |||||
| let options = []; | |||||
| for (let j = 0; j < 4; j += 1) { | |||||
| options.push({ | |||||
| text: faker.lorem.word(), | |||||
| pollUserCount: faker.random.number() | |||||
| }); | |||||
| } | |||||
| this.chatData.push({ | |||||
| over: this.chatData.length - 1, | |||||
| ballChat: [{ | |||||
| ball: 0, | |||||
| chat: [], | |||||
| }], | |||||
| triviaQuestion: { | |||||
| question: faker.lorem.sentence(), | |||||
| maxUserCount: Math.max.apply(Math, options.map(function(o) { return o.pollUserCount; })), | |||||
| options: options, | |||||
| selectedAnswer: null, | |||||
| } | |||||
| }); | |||||
| setTimeout(() => { | |||||
| this.scrollToEnd(); | |||||
| }, 1000); | |||||
| }, 200); | |||||
| } | } | ||||
| scrollToEnd() { | scrollToEnd() { | ||||
| @@ -1,5 +1,4 @@ | |||||
| import { Component, OnInit } from '@angular/core'; | import { Component, OnInit } from '@angular/core'; | ||||
| import * as faker from 'faker'; | |||||
| import { Location } from '@angular/common'; | import { Location } from '@angular/common'; | ||||
| @Component({ | @Component({ | ||||