diff --git a/config.xml b/config.xml index b4df1c7..ddb4494 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + NA Italia NA Italia NA Italia diff --git a/package-lock.json b/package-lock.json index ea5b700..22d23da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1871,6 +1871,14 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", "dev": true }, + "@types/moment-precise-range-plugin": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@types/moment-precise-range-plugin/-/moment-precise-range-plugin-0.2.0.tgz", + "integrity": "sha512-YQKQxgAzKAskABzJIrMfKjEJENHtKvWmCvPjiy+sdaAwvYZF9y5P/NqBWVNCIPoYPix1yG8Aocj/0uhfLFoexg==", + "requires": { + "moment": ">=2.14.0" + } + }, "@types/node": { "version": "12.12.45", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.45.tgz", @@ -4317,6 +4325,74 @@ "resolved": "https://registry.npmjs.org/cordova-app-hello-world/-/cordova-app-hello-world-5.0.0.tgz", "integrity": "sha512-5My01wsYoeYwS0f/t5Ck52xPm0+2zYJ0SlvxG9vUsndDGtgiP6t/G8upPgWcyDRRz7Rs/50yZuOntmHqmJxccQ==" }, + "cordova-browser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cordova-browser/-/cordova-browser-6.0.0.tgz", + "integrity": "sha512-G61S7fhnVVJC98lvkGeKCVpfFtoW0a1P1Sg9TK+n03g3yupDMIM7XuecWuJ3KEMRhED4+CEc2hauruAff7oXrw==", + "requires": { + "cordova-common": "^3.1.0", + "cordova-serve": "^3.0.0", + "nopt": "^4.0.1", + "shelljs": "^0.5.3" + }, + "dependencies": { + "bplist-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", + "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", + "requires": { + "big-integer": "^1.6.7" + } + }, + "cordova-common": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-3.2.1.tgz", + "integrity": "sha512-xg0EnjnA6EipxXG8cupdlYQYeDA6+ghbN+Pjq88xN1LInwP6Bo7IyGBdSV5QnfjOvzShF9BBwSxBAv0FOO0C2Q==", + "requires": { + "ansi": "^0.3.1", + "bplist-parser": "^0.1.0", + "cross-spawn": "^6.0.5", + "elementtree": "0.1.7", + "endent": "^1.1.1", + "fs-extra": "^8.0.0", + "glob": "^7.1.2", + "minimatch": "^3.0.0", + "plist": "^3.0.1", + "q": "^1.4.1", + "strip-bom": "^3.0.0", + "underscore": "^1.8.3", + "which": "^1.3.0" + } + }, + "cordova-serve": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cordova-serve/-/cordova-serve-3.0.0.tgz", + "integrity": "sha512-h479g/5a0PXn//yiFuMrD5MDEbB+mtihNkWcE6uD/aCh/6z0FRZ9sWH3NfZbHDB+Bp1yGLYsjbH8LZBL8KOQ0w==", + "requires": { + "chalk": "^2.4.1", + "compression": "^1.6.0", + "express": "^4.13.3", + "opn": "^5.3.0", + "which": "^1.3.0" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "shelljs": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", + "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=" + } + } + }, "cordova-common": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-4.0.2.tgz", @@ -4574,12 +4650,12 @@ } }, "cordova-ios": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-6.1.0.tgz", - "integrity": "sha512-FlX17lC2w78CqEQXypSeFIW3vUFF7VkCjNNLN+EbvOlLld5LUIbNJWepBdKlEg1/ZMmTwAuucMuKSZTr37ra+Q==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-6.1.1.tgz", + "integrity": "sha512-WHNvjVhkuwRpq95rISVXtcRyd6UGZapbmU+hO/CAn1c0AIT5WnO8mg2mOjv0WDNa0mt/V5P+N2Vig1UWwfxa5Q==", "dev": true, "requires": { - "cordova-common": "^4.0.1", + "cordova-common": "^4.0.2", "fs-extra": "^9.0.0", "ios-sim": "^8.0.2", "nopt": "^4.0.3", @@ -8494,7 +8570,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, "requires": { "graceful-fs": "^4.1.6" } @@ -9614,6 +9689,16 @@ "minimist": "^1.2.5" } }, + "moment": { + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz", + "integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==" + }, + "moment-precise-range-plugin": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/moment-precise-range-plugin/-/moment-precise-range-plugin-1.3.0.tgz", + "integrity": "sha1-YKwHX9/RRon20QKvdR0XGoC0q2A=" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -10126,7 +10211,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", - "dev": true, "requires": { "is-wsl": "^1.1.0" }, @@ -10134,8 +10218,7 @@ "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" } } }, @@ -13684,8 +13767,7 @@ "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" }, "strip-eof": { "version": "1.0.0", @@ -14375,8 +14457,7 @@ "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, "unorm": { "version": "1.6.0", diff --git a/package.json b/package.json index 28017ba..02ae149 100644 --- a/package.json +++ b/package.json @@ -32,9 +32,13 @@ "@ngx-translate/core": "^12.1.2", "@ngx-translate/http-loader": "^5.0.0", "@types/googlemaps": "^3.39.8", + "@types/moment-precise-range-plugin": "^0.2.0", "cordova": "^10.0.0", "cordova-androidx-build": "^1.0.3", + "cordova-browser": "6.0.0", "cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git", + "moment": "^2.27.0", + "moment-precise-range-plugin": "^1.3.0", "rxjs": "~6.5.1", "thenby": "^1.3.3", "tslib": "^1.10.0", @@ -53,7 +57,7 @@ "codelyzer": "^5.1.2", "com-badrit-base64": "^0.2.0", "cordova-android": "^9.0.0", - "cordova-ios": "^6.1.0", + "cordova-ios": "^6.1.1", "cordova-plugin-advanced-http": "^3.0.1", "cordova-plugin-device": "^2.0.2", "cordova-plugin-file": "^6.0.2", @@ -96,6 +100,7 @@ "com-badrit-base64": {} }, "platforms": [ + "browser", "ios", "android" ] diff --git a/src/app/pages/calc/calc.page.html b/src/app/pages/calc/calc.page.html index 72d731f..0d4460b 100644 --- a/src/app/pages/calc/calc.page.html +++ b/src/app/pages/calc/calc.page.html @@ -15,6 +15,8 @@ {{'ENTERCLEANDATE' | translate}}-> + + +

{{ cleanHumanized.years}} {{ 'YEARS' | translate}}, {{ cleanHumanized.months }} {{'MONTHS' | translate }}, {{ cleanHumanized.days }} {{ 'DAYS' | translate}}

+
+
+
{{'BIRTHDAY' | translate}} @@ -34,25 +42,4 @@

{{ tagTime }} {{ tag | translate }}

- - {{'CLEANTIMEINDAYS' | translate }} - -

{{ cleanTimeInDays }} {{'DAYS' | translate}}

-
-
- - - {{'CLEANTIMEINWEEKS' | translate }} - -

{{ cleanTimeInWeeks }} {{'WEEKS' | translate}}

-
-
- - - {{'CLEANTIMEINYEARS' | translate }} - -

{{ cleanTimeInYears }} {{'YEARS' | translate}}

-
-
- diff --git a/src/app/pages/calc/calc.page.ts b/src/app/pages/calc/calc.page.ts index ee3889c..74b226d 100644 --- a/src/app/pages/calc/calc.page.ts +++ b/src/app/pages/calc/calc.page.ts @@ -1,6 +1,8 @@ import { Component, OnInit } from '@angular/core'; import { Storage } from '@ionic/storage'; import { TranslateService } from '@ngx-translate/core'; +import * as moment from 'moment'; +import 'moment-precise-range-plugin'; @Component({ selector: 'app-datetime', @@ -10,9 +12,11 @@ import { TranslateService } from '@ngx-translate/core'; export class CalcPage implements OnInit { myDate: any; - + cleanHumanized; + todayInMilliseconds: any; todayDate; + maxDisplayDate; todayDay; todayMonth; todayYear; @@ -41,11 +45,121 @@ export class CalcPage implements OnInit { private translate: TranslateService ) { } + ngOnInit() { + let cleanDate; + + this.storage.ready().then(() => { + this.storage.get('cleanDate').then(value => { + if (value) { + cleanDate = moment(value).toISOString(); + } else { + cleanDate = moment().toISOString(); + } + + this.maxDisplayDate = moment().toISOString(); + this.todayDate = moment(); + + this.todayInMilliseconds = this.todayDate.valueOf(); + this.todayDay = this.todayDate.date(); + this.todayMonth = this.todayDate.month(); + this.todayYear = this.todayDate.year(); + + this.myDate = cleanDate; + + this.tag = 'none'; + this.wait = false; + this.getCleanTime(); + }); + }); + + this.translate.get('JANUARY').subscribe(value1 => { + this.monthNames.push(value1); + this.translate.get('FEBRUARY').subscribe(value2 => { + this.monthNames.push(value2); + this.translate.get('MARCH').subscribe(value3 => { + this.monthNames.push(value3); + this.translate.get('APRIL').subscribe(value4 => { + this.monthNames.push(value4); + this.translate.get('MAYL').subscribe(value5 => { + this.monthNames.push(value5); + this.translate.get('JUNE').subscribe(value6 => { + this.monthNames.push(value6); + this.translate.get('JULY').subscribe(value7 => { + this.monthNames.push(value7); + this.translate.get('AUGUST').subscribe(value8 => { + this.monthNames.push(value8); + this.translate.get('SPETEMBER').subscribe(value9 => { + this.monthNames.push(value9); + this.translate.get('OCTOBER').subscribe(value10 => { + this.monthNames.push(value10); + this.translate.get('NOVEMBER').subscribe(value11 => { + this.monthNames.push(value11); + this.translate.get('DECEMBER').subscribe(value12 => { + this.monthNames.push(value12); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); + + this.translate.get('JAN').subscribe(value1 => { + this.monthShortNames.push(value1); + this.translate.get('FEB').subscribe(value2 => { + this.monthShortNames.push(value2); + this.translate.get('MAR').subscribe(value3 => { + this.monthShortNames.push(value3); + this.translate.get('APR').subscribe(value4 => { + this.monthShortNames.push(value4); + this.translate.get('MAYS').subscribe(value5 => { + this.monthShortNames.push(value5); + this.translate.get('JUN').subscribe(value6 => { + this.monthShortNames.push(value6); + this.translate.get('JUL').subscribe(value7 => { + this.monthShortNames.push(value7); + this.translate.get('AUG').subscribe(value8 => { + this.monthShortNames.push(value8); + this.translate.get('SEP').subscribe(value9 => { + this.monthShortNames.push(value9); + this.translate.get('OCT').subscribe(value10 => { + this.monthShortNames.push(value10); + this.translate.get('NOV').subscribe(value11 => { + this.monthShortNames.push(value11); + this.translate.get('DEC').subscribe(value12 => { + this.monthShortNames.push(value12); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); + + this.translate.get('CANCEL').subscribe(value => { + this.cancelText = value; + }); + + this.translate.get('DONE').subscribe(value => { + this.doneText = value; + }); + } + getCleanTime() { if (!this.wait) { - const oneDay = 1000 * 60 * 60 * 24; + const oneDay = 86400000; // in milliseconds const oneWeek = oneDay * 7; - const oneYear = oneDay * 365; + const oneYear = 31556952000; // inmillseconds const cleanDateInMilliseconds = Date.parse(this.myDate); this.storage.set('cleanDate', cleanDateInMilliseconds); @@ -55,7 +169,8 @@ export class CalcPage implements OnInit { this.cleanMonth = this.cleanTimeDate.getMonth(); this.cleanYear = this.cleanTimeDate.getFullYear(); - this.cleanTimeInMilliseconds = (this.todayInMilliseconds - cleanDateInMilliseconds) + oneDay; // ?? + // this.cleanTimeInMilliseconds = (this.todayInMilliseconds - cleanDateInMilliseconds) + oneDay; // ?? + this.cleanTimeInMilliseconds = (this.todayInMilliseconds - cleanDateInMilliseconds); // ?? this.cleanTimeInDays = Math.floor(this.cleanTimeInMilliseconds / oneDay); this.cleanTimeInWeeks = Math.floor(this.cleanTimeInMilliseconds / oneWeek); this.cleanTimeInYears = Math.floor(this.cleanTimeInMilliseconds / oneYear); @@ -64,6 +179,15 @@ export class CalcPage implements OnInit { this.cleanTimeTag(); } + const todayMoment = moment(this.todayInMilliseconds); + const cleanMoment = moment(cleanDateInMilliseconds); + this.cleanHumanized = moment.preciseDiff(cleanMoment, todayMoment, true); + console.log('Today : ', todayMoment); + console.log('Clean : ', cleanMoment); + + console.log('YEARS : ', this.cleanHumanized.years); + console.log('MONTHS: ', this.cleanHumanized.months); + console.log('DAYS : ', this.cleanHumanized.days); } } @@ -137,115 +261,4 @@ export class CalcPage implements OnInit { return this.tag; } - ngOnInit() { - let cleanDate; - this.storage.ready().then(() => { - this.storage.get('cleanDate') - .then(value => { - if (value) { - cleanDate = new Date(value).toISOString(); - } else { - cleanDate = new Date().toISOString(); - } - - this.todayDate = new Date(); - this.todayDate.setHours(0, 0, 0, 0); - - this.todayInMilliseconds = Date.parse(this.todayDate); - this.todayDay = this.todayDate.getDate(); - this.todayMonth = this.todayDate.getMonth(); - this.todayYear = this.todayDate.getFullYear(); - - this.myDate = cleanDate.substring(0, 10); - - this.tag = 'none'; - this.wait = false; - this.getCleanTime(); - }); - }); - - this.translate.get('JANUARY').subscribe(value1 => { - this.monthNames.push(value1); - this.translate.get('FEBRUARY').subscribe(value2 => { - this.monthNames.push(value2); - this.translate.get('MARCH').subscribe(value3 => { - this.monthNames.push(value3); - this.translate.get('APRIL').subscribe(value4 => { - this.monthNames.push(value4); - this.translate.get('MAYL').subscribe(value5 => { - this.monthNames.push(value5); - this.translate.get('JUNE').subscribe(value6 => { - this.monthNames.push(value6); - this.translate.get('JULY').subscribe(value7 => { - this.monthNames.push(value7); - this.translate.get('AUGUST').subscribe(value8 => { - this.monthNames.push(value8); - this.translate.get('SPETEMBER').subscribe(value9 => { - this.monthNames.push(value9); - this.translate.get('OCTOBER').subscribe(value10 => { - this.monthNames.push(value10); - this.translate.get('NOVEMBER').subscribe(value11 => { - this.monthNames.push(value11); - this.translate.get('DECEMBER').subscribe(value12 => { - this.monthNames.push(value12); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - - this.translate.get('JAN').subscribe(value1 => { - this.monthShortNames.push(value1); - this.translate.get('FEB').subscribe(value2 => { - this.monthShortNames.push(value2); - this.translate.get('MAR').subscribe(value3 => { - this.monthShortNames.push(value3); - this.translate.get('APR').subscribe(value4 => { - this.monthShortNames.push(value4); - this.translate.get('MAYS').subscribe(value5 => { - this.monthShortNames.push(value5); - this.translate.get('JUN').subscribe(value6 => { - this.monthShortNames.push(value6); - this.translate.get('JUL').subscribe(value7 => { - this.monthShortNames.push(value7); - this.translate.get('AUG').subscribe(value8 => { - this.monthShortNames.push(value8); - this.translate.get('SEP').subscribe(value9 => { - this.monthShortNames.push(value9); - this.translate.get('OCT').subscribe(value10 => { - this.monthShortNames.push(value10); - this.translate.get('NOV').subscribe(value11 => { - this.monthShortNames.push(value11); - this.translate.get('DEC').subscribe(value12 => { - this.monthShortNames.push(value12); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - console.log(this.monthShortNames); - - this.translate.get('CANCEL').subscribe(value => { - this.cancelText = value; - }); - - this.translate.get('DONE').subscribe(value => { - this.doneText = value; - }); - } - } diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts index 60511d8..38371a4 100644 --- a/src/app/pages/events/events.page.ts +++ b/src/app/pages/events/events.page.ts @@ -40,8 +40,8 @@ export class EventsPage implements OnInit { const eventsObj = jsonParsed.events; this.eventsData = Object.values(eventsObj); this.eventsData = this.eventsData.filter(event => event.end > this.now); - this.eventsData = this.eventsData.filter(event => event.name = this.tidyName(event.name)); - this.eventsData.reverse(); + this.eventsData = this.eventsData.filter(event => event.name = this.tidyName(event.name)); + this.eventsData.sort((a, b) => (a.start > b.start) ? 1 : -1); this.loadingCtrl.dismiss(); }) diff --git a/src/app/pages/jft/jft.page.html b/src/app/pages/jft/jft.page.html index cd0044b..f655932 100644 --- a/src/app/pages/jft/jft.page.html +++ b/src/app/pages/jft/jft.page.html @@ -10,7 +10,13 @@ -
+
+ + +
+
+
+
diff --git a/src/app/pages/list/list.page.html b/src/app/pages/list/list.page.html index bd5201f..c8b631e 100644 --- a/src/app/pages/list/list.page.html +++ b/src/app/pages/list/list.page.html @@ -60,10 +60,9 @@

{{ group1[0].service_body_bigint }}

- - - {{'TEMP_CLOSED' | translate}} - + + {{'TEMP_CLOSED' | translate}} +
@@ -94,7 +93,7 @@

{{ group1[0].service_body_bigint }}

- +  {{'VIRTUAL_LINK' | translate }} @@ -154,10 +153,9 @@

{{ group1[0].location_sub_province }}

- - - {{'TEMP_CLOSED' | translate}} - + + {{'TEMP_CLOSED' | translate}} +
diff --git a/src/app/pages/map/map.page.html b/src/app/pages/map/map.page.html index ec3efff..267ba68 100644 --- a/src/app/pages/map/map.page.html +++ b/src/app/pages/map/map.page.html @@ -7,7 +7,7 @@ {{'GOOGLE_MAPS' | translate}} - + diff --git a/src/app/pages/map/map.page.ts b/src/app/pages/map/map.page.ts index 7aa8227..ad6cd9c 100644 --- a/src/app/pages/map/map.page.ts +++ b/src/app/pages/map/map.page.ts @@ -265,6 +265,7 @@ export class MapPage implements OnInit { }); this.map.on('trigger_initial_search_changed').subscribe((params: any[]) => { + console.log('trigger initial search changed'); this.translate.get('FINDING_MTGS').subscribe(value => { this.presentLoader(value); }); @@ -287,6 +288,7 @@ export class MapPage implements OnInit { }); if (this.platform.is('ios')) { + console.log('triggering initial search cos ios'); this.map.set('trigger_initial_search', 'go'); } @@ -294,6 +296,7 @@ export class MapPage implements OnInit { addCluster() { + console.log('In addclsuter'); const markerLabelOptions: MarkerLabel = { bold: true, fontSize: 15, @@ -350,6 +353,7 @@ export class MapPage implements OnInit { getMeetings(params: any[] | { farLeft: ILatLng; }[]) { + console.log('in getMeetings'); this.mapLatitude = params[0].target.lat; this.eagerMapLat = this.mapLatitude; @@ -366,36 +370,18 @@ export class MapPage implements OnInit { if (JSON.stringify(data) === '{}') { // empty result set! this.meetingList = JSON.parse('[]'); } else { + console.log('got the raduis meeting info'); this.meetingList = data; this.meetingList = this.meetingList.filter((meeting: { latitude }) => meeting.latitude = parseFloat(meeting.latitude)); this.meetingList = this.meetingList.filter((meeting: { longitude }) => meeting.longitude = parseFloat(meeting.longitude)); - this.meetingList = this.meetingList.filter(meeting => meeting.isTempClosed = this.isTempClosed(meeting)); - this.meetingList = this.meetingList.filter(meeting => meeting.isHybrid = this.isHybrid(meeting)); - } this.populateMarkers(); this.addCluster(); }); } - isHybrid(meeting) { - if (meeting.formats.match(/IB/i)) { - return 'HYBRID'; - } else { - return 'NOT-HYBRID'; - } - } - - isTempClosed(meeting) { - if (meeting.formats.match(/TC/i)) { - return 'TEMPCLOSED'; - } else { - return 'NOT-TEMPCLOSED'; - } - } - populateMarkers() { - + console.log('In populateMarkers'); this.markers = []; let i: number; let areColocated = false; diff --git a/src/app/pages/mapmodal/mapmodal.page.html b/src/app/pages/mapmodal/mapmodal.page.html index 4d9455b..e69f71a 100644 --- a/src/app/pages/mapmodal/mapmodal.page.html +++ b/src/app/pages/mapmodal/mapmodal.page.html @@ -44,10 +44,9 @@
- - - {{'TEMP_CLOSED' | translate}} - + + {{'TEMP_CLOSED' | translate}} +
@@ -70,6 +69,8 @@
{{'BUS' | translate}} : {{meeting.bus_lines }}
{{'FORMATS' | translate}} : {{meeting.formats }}
+ +
diff --git a/src/app/pages/mapmodal/mapmodal.page.ts b/src/app/pages/mapmodal/mapmodal.page.ts index 449cbf9..3f392b2 100644 --- a/src/app/pages/mapmodal/mapmodal.page.ts +++ b/src/app/pages/mapmodal/mapmodal.page.ts @@ -49,4 +49,21 @@ export class MapmodalPage implements OnInit { const browser = this.iab.create(telUrl, '_system'); } + isHybrid(meeting) { + console.log('isHybrid'); + if (meeting.formats.match(/IB/i)) { + return 'HYBRID'; + } else { + return 'NOT-HYBRID'; + } + } + + isTempClosed(meeting) { + console.log('isTempCLosed'); + if (meeting.formats.match(/TC/i)) { + return 'TEMPCLOSED'; + } else { + return 'NOT-TEMPCLOSED'; + } + } } diff --git a/src/app/pages/virtual/virtual.page.ts b/src/app/pages/virtual/virtual.page.ts index 595dd3d..78927fe 100644 --- a/src/app/pages/virtual/virtual.page.ts +++ b/src/app/pages/virtual/virtual.page.ts @@ -80,8 +80,6 @@ export class VirtualPage implements OnInit { this.loadingCtrl.dismiss(); }); - - } groupMeetingList(meetingList, groupingOption) { @@ -119,11 +117,11 @@ export class VirtualPage implements OnInit { public convertTo12Hr(timeString) { - let H = +timeString.substr(0, 2); - const offset = new Date().getTimezoneOffset() / 60; - H = H + offset; + const H = +timeString.substr(0, 2); + const offset = new Date().getTimezoneOffset() / 60 * -1; + const offsetH = offset + H; - timeString = H + timeString.substr(2, 3) ; + timeString = offsetH + timeString.substr(2, 3) ; return timeString; } diff --git a/src/app/pipes/tidy-delimiter.pipe.ts b/src/app/pipes/tidy-delimiter.pipe.ts index e6d61ff..b501deb 100644 --- a/src/app/pipes/tidy-delimiter.pipe.ts +++ b/src/app/pipes/tidy-delimiter.pipe.ts @@ -6,7 +6,7 @@ import { Pipe, PipeTransform } from '@angular/core'; export class TidyDelimiterPipe implements PipeTransform { transform(value: any, args?: any): any { - const regex = /(Bus|Train) Lines#@-@#/gi; + const regex = /#@-@#/gi; return value.replace(regex, ' '); } diff --git a/src/assets/translations/en.json b/src/assets/translations/en.json index 71830ad..b2a0896 100644 --- a/src/assets/translations/en.json +++ b/src/assets/translations/en.json @@ -45,6 +45,7 @@ "YEARSCLEAN": " Years Clean", "DAYS": " days", "WEEKS": " weeks", + "MONTHS": "months", "YEARS": " years", "BIRTHDAY": "Clean Time Birthday!", "ENTERCLEANDATE": "Enter clean date ", @@ -91,12 +92,13 @@ "EVENTS.MOREDETAILS": "More details...", - "GROUP.COUNTY": "County", + "GROUP.COUNTY": "Province", "GROUP.AREA": "Area", "GROUP.GROUPBY": "Group by", "VIRTUAL_LINK": "Click to join online meeting", "PHONE_MEETING": "Click to phone into meeting", - "TEMP_CLOSED": "This meeting is temporarily closed" + "TEMP_CLOSED": "This meeting is temporarily closed", + "SEARCH": "Search..." } diff --git a/src/assets/translations/it.json b/src/assets/translations/it.json index 75720a5..7e4e6b6 100644 --- a/src/assets/translations/it.json +++ b/src/assets/translations/it.json @@ -45,6 +45,7 @@ "YEARSCLEAN": " anni di pulizia", "DAYS": " giorni", "WEEKS": " settimane", + "MONTHS": "mesi", "YEARS": " anni", "BIRTHDAY": "Compleanno di Pulizia!", "ENTERCLEANDATE": "Inserisci la tua data di pulizia ", @@ -98,5 +99,6 @@ "VIRTUAL_LINK": "Clicca per partecipare alla riunione online", "PHONE_MEETING": "Click per partecipare alla riunione telefonica", - "TEMP_CLOSED": "La struttura è temporanemente chiusa" + "TEMP_CLOSED": "La struttura è temporanemente chiusa", + "SEARCH": "Cerca..." }