Commit 8594a2d4 by muhsin

added profile page

parent 49001fd8
...@@ -5,9 +5,12 @@ ...@@ -5,9 +5,12 @@
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@agm/core": { "@agm/core": {
"version": "1.0.0-beta.7", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/@agm/core/-/core-1.0.0-beta.7.tgz", "resolved": "https://registry.npmjs.org/@agm/core/-/core-1.1.0.tgz",
"integrity": "sha512-NXJqB2wCahWGSqvQazLHbVrg3Dhg5zTdhG9yP7EVVGfIft5lbY83KLVpbYFeVI/l+ggeJWAC9nVUr7CeDS96uQ==" "integrity": "sha512-cMvmm3+3/uuVFurLv1FKhE0/6ssIlDvYBjQFCi8ELg7h0OY2MkIU1MXWr7z+f/xZ08E936I4eeddni6k4yUTIA==",
"requires": {
"tslib": "^1.9.0"
}
}, },
"@angular-devkit/architect": { "@angular-devkit/architect": {
"version": "0.801.3", "version": "0.801.3",
...@@ -192,9 +195,9 @@ ...@@ -192,9 +195,9 @@
} }
}, },
"@angular/animations": { "@angular/animations": {
"version": "8.2.11", "version": "8.2.14",
"resolved": "https://registry.npmjs.org/@angular/animations/-/animations-8.2.11.tgz", "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-8.2.14.tgz",
"integrity": "sha512-u0PSR2uvSqn3ovgGlw2H8ZueyYN42SLir2Yn3+7sGE+LcYOSTjyJ/GIgjV8jWddvPbx7KYzFRCs6bEMpBsMXYg==", "integrity": "sha512-3Vc9TnNpKdtvKIXcWDFINSsnwgEMiDmLzjceWg1iYKwpeZGQahUXPoesLwQazBMmxJzQiA4HOMj0TTXKZ+Jzkg==",
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
...@@ -1048,9 +1051,9 @@ ...@@ -1048,9 +1051,9 @@
} }
}, },
"@angular/fire": { "@angular/fire": {
"version": "5.2.1", "version": "5.3.0",
"resolved": "https://registry.npmjs.org/@angular/fire/-/fire-5.2.1.tgz", "resolved": "https://registry.npmjs.org/@angular/fire/-/fire-5.3.0.tgz",
"integrity": "sha512-pS4zWhLLANzMbYVIKNtebDQKhm9+KANUDvDV6DwKP24XHzkZdvazKe1HC6uXWlf7QmDxSPFleCSBkn0tnQQzdQ==" "integrity": "sha512-Z/dywnrQiuz6Hfq0MncDvwB0obirWdCetrd//OkHsWKLKi1deFrb6ChuTBTGj+kN/cjHUEwI9pD4uoDvU7jyAg=="
}, },
"@angular/forms": { "@angular/forms": {
"version": "8.1.3", "version": "8.1.3",
...@@ -1251,13 +1254,13 @@ ...@@ -1251,13 +1254,13 @@
} }
}, },
"@firebase/app": { "@firebase/app": {
"version": "0.4.14", "version": "0.4.17",
"resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.4.14.tgz", "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.4.17.tgz",
"integrity": "sha512-2awiJkYz/SMOAEGg5Qvq/596RywoefRckhjUS42kZC7C1HZ06EcQHr26ejAMFk9qeXWYLs4eumSw/V4SDYR3Kw==", "integrity": "sha512-YkCe10/KHnfJ5Lx79SCQ4ZJRlpnwe8Yns6Ntf7kltXq1hCQCUrKEU3zaOTPY90SBx36hYm47IaqkKwT/kBOK3A==",
"requires": { "requires": {
"@firebase/app-types": "0.4.3", "@firebase/app-types": "0.4.3",
"@firebase/logger": "0.1.22", "@firebase/logger": "0.1.25",
"@firebase/util": "0.2.25", "@firebase/util": "0.2.28",
"dom-storage": "2.1.0", "dom-storage": "2.1.0",
"tslib": "1.10.0", "tslib": "1.10.0",
"xmlhttprequest": "1.8.0" "xmlhttprequest": "1.8.0"
...@@ -1269,26 +1272,26 @@ ...@@ -1269,26 +1272,26 @@
"integrity": "sha512-VU5c+ZjejvefLVH4cjiX3Hy1w9HYMv7TtZ1tF9ZmOqT4DSIU1a3VISWoo8///cGGffr5IirMO+Q/WZLI4p8VcA==" "integrity": "sha512-VU5c+ZjejvefLVH4cjiX3Hy1w9HYMv7TtZ1tF9ZmOqT4DSIU1a3VISWoo8///cGGffr5IirMO+Q/WZLI4p8VcA=="
}, },
"@firebase/auth": { "@firebase/auth": {
"version": "0.11.8", "version": "0.12.0",
"resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.11.8.tgz", "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.12.0.tgz",
"integrity": "sha512-aMSWaOCQmQtLKb1j96O7tErRx+kgq2OV3tMV/sKLkXp1J7SP03ejQfi+wOGDYnTWD6mNv+7b8ra1po+IHkydtg==", "integrity": "sha512-DGYvAmz2aUmrWYS3ADw/UmsuicxJi6G+X38XITqNPUrd1YxmM5SBzX19oEb9WCrJZXcr4JaESg6hQkT2yEPaCA==",
"requires": { "requires": {
"@firebase/auth-types": "0.7.2" "@firebase/auth-types": "0.8.0"
} }
}, },
"@firebase/auth-types": { "@firebase/auth-types": {
"version": "0.7.2", "version": "0.8.0",
"resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.7.2.tgz", "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.8.0.tgz",
"integrity": "sha512-xm3evp6671LoI+6M8Om3OhikabLf88Ivz1e7aR8uZjVBYptEYbF3seDIyHn/3wWdVYbp20WK4aWixKlRnHl+6Q==" "integrity": "sha512-foQHhvyB0RR+mb/+wmHXd/VOU+D8fruFEW1k79Q9wzyTPpovMBa1Mcns5fwEWBhUfi8bmoEtaGB8RSAHnTFzTg=="
}, },
"@firebase/database": { "@firebase/database": {
"version": "0.5.0", "version": "0.5.4",
"resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.5.0.tgz", "resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.5.4.tgz",
"integrity": "sha512-7XLy33bdVRpc+Z46SAk2XzbNuGD/jgOilYRuY+HlPt5qbhzhWHe4lnBLS6toMU299Vcvk6vLRup73qLui8FQpQ==", "integrity": "sha512-Hz1Bi3fzIcNNocE4EhvvwoEQGurG2BGssWD3/6a2bzty+K1e57SLea2Ied8QYNBUU1zt/4McHfa3Y71EQIyn/w==",
"requires": { "requires": {
"@firebase/database-types": "0.4.2", "@firebase/database-types": "0.4.3",
"@firebase/logger": "0.1.22", "@firebase/logger": "0.1.25",
"@firebase/util": "0.2.25", "@firebase/util": "0.2.28",
"faye-websocket": "0.11.3", "faye-websocket": "0.11.3",
"tslib": "1.10.0" "tslib": "1.10.0"
}, },
...@@ -1304,33 +1307,36 @@ ...@@ -1304,33 +1307,36 @@
} }
}, },
"@firebase/database-types": { "@firebase/database-types": {
"version": "0.4.2", "version": "0.4.3",
"resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.4.2.tgz", "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.4.3.tgz",
"integrity": "sha512-rBF/Sp4S4zzVg+a6h0iEiXR2GdNRrvx2BR6IcvGHnSPF7XVpj9UuUWtZMJyO+vWP3zlIGDvlNRJ4qF01Y6KxGg==" "integrity": "sha512-21yCiJA2Tyt6dJYwWeB69MwoawBu5UWNtP6MAY0ugyRBHVdjAMHMYalPxCjZ46LAmhfim0+i8NXRadOFVS3hUA==",
"requires": {
"@firebase/app-types": "0.x"
}
}, },
"@firebase/firestore": { "@firebase/firestore": {
"version": "1.4.10", "version": "1.5.3",
"resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-1.4.10.tgz", "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-1.5.3.tgz",
"integrity": "sha512-TyPwuWdY64G0cWm4H/7x6XJESHINIQIOK0gmjw1BYA+kPudzNaoyeJ6nxZRzZ7lcNol78FLCU7eb/ChDKVAo9g==", "integrity": "sha512-O/yAbXpitOA6g627cUl0/FHYlkTy1EiEKMKOlnlMOJF2fH+nLVZREXjsrCC7N2tIvTn7yYwfpZ4zpSNvrhwiTA==",
"requires": { "requires": {
"@firebase/firestore-types": "1.4.4", "@firebase/firestore-types": "1.5.0",
"@firebase/logger": "0.1.22", "@firebase/logger": "0.1.25",
"@firebase/util": "0.2.25", "@firebase/util": "0.2.28",
"@firebase/webchannel-wrapper": "0.2.24", "@firebase/webchannel-wrapper": "0.2.26",
"@grpc/proto-loader": "^0.5.0", "@grpc/proto-loader": "^0.5.0",
"grpc": "1.22.2", "grpc": "1.23.3",
"tslib": "1.10.0" "tslib": "1.10.0"
} }
}, },
"@firebase/firestore-types": { "@firebase/firestore-types": {
"version": "1.4.4", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-1.4.4.tgz", "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-1.5.0.tgz",
"integrity": "sha512-kFpmzkUKfzrXkcMad+TQlMs55dWNY0q1UxGICW82EneX3Yg6HN3Nx36kYfqH+SLBFUN1ZTikN07alMp0MA9p9g==" "integrity": "sha512-VhRHNbEbak+R2iK8e1ir2Lec7eaHMZpGTRy6LMtzATYthlkwNHF9tO8JU8l6d1/kYkI4+DWzX++i3HhTziHEWA=="
}, },
"@firebase/functions": { "@firebase/functions": {
"version": "0.4.15", "version": "0.4.18",
"resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.4.15.tgz", "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.4.18.tgz",
"integrity": "sha512-mAOOHKaHqGRP2+5jlKesGUPQFiiy/sgjW5iURvzv0OJUdhERGlfCj9JM5w/1zosXG0oAiiu9Q+K/84dXyeaw4A==", "integrity": "sha512-N/ijwpxJy26kOErYIi5QS8pQgMZEuEMF/zDaNmgqcoN3J8P52NhBnVQZnIl+U4W96nQfNiURhSwXEERHFyvSZQ==",
"requires": { "requires": {
"@firebase/functions-types": "0.3.8", "@firebase/functions-types": "0.3.8",
"@firebase/messaging-types": "0.3.2", "@firebase/messaging-types": "0.3.2",
...@@ -1344,12 +1350,12 @@ ...@@ -1344,12 +1350,12 @@
"integrity": "sha512-9hajHxA4UWVCGFmoL8PBYHpamE3JTNjObieMmnvZw3cMRTP2EwipMpzZi+GPbMlA/9swF9yHCY/XFAEkwbvdgQ==" "integrity": "sha512-9hajHxA4UWVCGFmoL8PBYHpamE3JTNjObieMmnvZw3cMRTP2EwipMpzZi+GPbMlA/9swF9yHCY/XFAEkwbvdgQ=="
}, },
"@firebase/installations": { "@firebase/installations": {
"version": "0.2.4", "version": "0.2.7",
"resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.2.4.tgz", "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.2.7.tgz",
"integrity": "sha512-lJlqVa7r/HuI9/d+oSr0CxyN/A1nMMgqDJJr0geDLqfDokrmFhkRxbtb28saGaGnfLzc1KhvIB/TdhzDJ/fDJA==", "integrity": "sha512-67tzowHVwRBtEuB1HLMD+fCdoRyinOQlMKBes7UwrtZIVd0CPDUqAKxNqup5EypWZb7O2tqFtRzK7POajfSNMA==",
"requires": { "requires": {
"@firebase/installations-types": "0.1.2", "@firebase/installations-types": "0.1.2",
"@firebase/util": "0.2.25", "@firebase/util": "0.2.28",
"idb": "3.0.2", "idb": "3.0.2",
"tslib": "1.10.0" "tslib": "1.10.0"
} }
...@@ -1360,17 +1366,17 @@ ...@@ -1360,17 +1366,17 @@
"integrity": "sha512-fQaWIW8hyX1XUN7+FCSPjvM1agFjGidVuF4Sxi7aFwfyh5t+4fD2VpM4wCQbWmodnx4fZLvsuQd9mkxxU+lGYQ==" "integrity": "sha512-fQaWIW8hyX1XUN7+FCSPjvM1agFjGidVuF4Sxi7aFwfyh5t+4fD2VpM4wCQbWmodnx4fZLvsuQd9mkxxU+lGYQ=="
}, },
"@firebase/logger": { "@firebase/logger": {
"version": "0.1.22", "version": "0.1.25",
"resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.1.22.tgz", "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.1.25.tgz",
"integrity": "sha512-os1vG5FohEF9gl27duZeTtEphOP7oHQ+YjnT+sT2dGprkTIAyaEkzH6G8AgLPUqmASSsoa6BqY5kFXHQi9+xGw==" "integrity": "sha512-/lRhuepVcCCnQ2jcO5Hr08SYdmZDTQU9fdPdzg+qXJ9k/QnIrD2RbswXQcL6mmae3uPpX7fFXQAoScJ9pzp50w=="
}, },
"@firebase/messaging": { "@firebase/messaging": {
"version": "0.4.8", "version": "0.4.11",
"resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.4.8.tgz", "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.4.11.tgz",
"integrity": "sha512-+NPRHQt4v2V07vmw98/ybOTwIspA3EaRc5Ni6D05d7N0U6RQaiqJae6T3VBMvQovXWzLRqA244KO1Z9OVTQdKg==", "integrity": "sha512-KYt479yio6ThkV7Pb9LRB1KPIBio+OR4RozwyoLC1ZSVQdTIrd/sVEuDSzYY88Wh/6Kg6ejdu2z6mfWG9l1ZaQ==",
"requires": { "requires": {
"@firebase/messaging-types": "0.3.2", "@firebase/messaging-types": "0.3.2",
"@firebase/util": "0.2.25", "@firebase/util": "0.2.28",
"tslib": "1.10.0" "tslib": "1.10.0"
} }
}, },
...@@ -1380,14 +1386,14 @@ ...@@ -1380,14 +1386,14 @@
"integrity": "sha512-2qa2qNKqpalmtwaUV3+wQqfCm5myP/dViIBv+pXF8HinemIfO1IPQtr9pCNfsSYyus78qEhtfldnPWXxUH5v0w==" "integrity": "sha512-2qa2qNKqpalmtwaUV3+wQqfCm5myP/dViIBv+pXF8HinemIfO1IPQtr9pCNfsSYyus78qEhtfldnPWXxUH5v0w=="
}, },
"@firebase/performance": { "@firebase/performance": {
"version": "0.2.15", "version": "0.2.19",
"resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.2.15.tgz", "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.2.19.tgz",
"integrity": "sha512-I0DYGx59n7r+U0xRi3ee3pidjQF/lp865pHdd+x+lxSLHE3u0XxS3tiSr2xePqm4C7v+syW+wEQRowd9z7UzoA==", "integrity": "sha512-dINWwR/XcSiSnFNNX7QWfec8bymiXk1Zp6mPyPN+R9ONMrpDbygQUy06oT/6r/xx9nHG4Za6KMUJag3sWNKqnQ==",
"requires": { "requires": {
"@firebase/installations": "0.2.4", "@firebase/installations": "0.2.7",
"@firebase/logger": "0.1.22", "@firebase/logger": "0.1.25",
"@firebase/performance-types": "0.0.3", "@firebase/performance-types": "0.0.3",
"@firebase/util": "0.2.25", "@firebase/util": "0.2.28",
"tslib": "1.10.0" "tslib": "1.10.0"
} }
}, },
...@@ -1397,19 +1403,19 @@ ...@@ -1397,19 +1403,19 @@
"integrity": "sha512-RuC63nYJPJU65AsrNMc3fTRcRgHiyNcQLh9ufeKUT1mEsFgpxr167gMb+tpzNU4jsbvM6+c6nQAFdHpqcGkRlQ==" "integrity": "sha512-RuC63nYJPJU65AsrNMc3fTRcRgHiyNcQLh9ufeKUT1mEsFgpxr167gMb+tpzNU4jsbvM6+c6nQAFdHpqcGkRlQ=="
}, },
"@firebase/polyfill": { "@firebase/polyfill": {
"version": "0.3.19", "version": "0.3.22",
"resolved": "https://registry.npmjs.org/@firebase/polyfill/-/polyfill-0.3.19.tgz", "resolved": "https://registry.npmjs.org/@firebase/polyfill/-/polyfill-0.3.22.tgz",
"integrity": "sha512-70gNPxxHCaSKcNw1g9XfBe15LWrvzvgzUGBVgAdv7zkpgtHMu/uEuklb+A0H1GJtNn6ijyHEAJGXR3KHJ92HEg==", "integrity": "sha512-PYbEqDHJhJJoF2Q5IB/oP0Tz6O2vSUPtODy9kUQibi+T0bK1gkTaySPwz8GAgHfIpFNENj1kK+7Xpf87R8bYbw==",
"requires": { "requires": {
"core-js": "3.1.4", "core-js": "3.2.1",
"promise-polyfill": "8.1.3", "promise-polyfill": "8.1.3",
"whatwg-fetch": "2.0.4" "whatwg-fetch": "2.0.4"
}, },
"dependencies": { "dependencies": {
"core-js": { "core-js": {
"version": "3.1.4", "version": "3.2.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.1.4.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz",
"integrity": "sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ==" "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw=="
}, },
"whatwg-fetch": { "whatwg-fetch": {
"version": "2.0.4", "version": "2.0.4",
...@@ -1419,12 +1425,12 @@ ...@@ -1419,12 +1425,12 @@
} }
}, },
"@firebase/storage": { "@firebase/storage": {
"version": "0.3.9", "version": "0.3.12",
"resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.3.9.tgz", "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.3.12.tgz",
"integrity": "sha512-Fxku8HVilac2zx1hnxshcnh4WhbY5DWT10dQwrFYNUFW1RuRfTB0zm3SNOVy4NAt7xpVIjqSjFs8mWDXGe7qaQ==", "integrity": "sha512-8hXt3qPZlVH+yPF4W9Dc15/gBiTPGUJUgYs3dH9WnO41QWl1o4aNlZpZK/pdnpCIO1GmN0+PxJW9TCNb0H0Hqw==",
"requires": { "requires": {
"@firebase/storage-types": "0.3.3", "@firebase/storage-types": "0.3.3",
"@firebase/util": "0.2.25", "@firebase/util": "0.2.28",
"tslib": "1.10.0" "tslib": "1.10.0"
} }
}, },
...@@ -1434,92 +1440,81 @@ ...@@ -1434,92 +1440,81 @@
"integrity": "sha512-fUp4kpbxwDiWs/aIBJqBvXgFHZvgoND2JA0gJYSEsXtWtVwfgzY/710plErgZDeQKopX5eOR1sHskZkQUy0U6w==" "integrity": "sha512-fUp4kpbxwDiWs/aIBJqBvXgFHZvgoND2JA0gJYSEsXtWtVwfgzY/710plErgZDeQKopX5eOR1sHskZkQUy0U6w=="
}, },
"@firebase/util": { "@firebase/util": {
"version": "0.2.25", "version": "0.2.28",
"resolved": "https://registry.npmjs.org/@firebase/util/-/util-0.2.25.tgz", "resolved": "https://registry.npmjs.org/@firebase/util/-/util-0.2.28.tgz",
"integrity": "sha512-J/JgYhvFLCpejzfzjzNDZGFZD3kNtTlMu+2EjiQ3tCII6w0N/uEza5GtFiYTKCjGBa51Lmi2j/OPLz+yhlQCWg==", "integrity": "sha512-ZQMAWtXj8y5kvB6izs0aTM/jG+WO8HpqhXA/EwD6LckJ+1P5LnAhaLZt1zR4HpuCE+jeP5I32Id5RJ/aifFs6A==",
"requires": { "requires": {
"tslib": "1.10.0" "tslib": "1.10.0"
} }
}, },
"@firebase/webchannel-wrapper": { "@firebase/webchannel-wrapper": {
"version": "0.2.24", "version": "0.2.26",
"resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.2.24.tgz", "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.2.26.tgz",
"integrity": "sha512-/wt/p0GrYp1cKTGMx1Ak8LpMH6PAJI7rMTYeROXi6+bZ30mhdIjpmLs11Bx26fzcZEH0jWlHXLfVdVDS5WXi2Q==" "integrity": "sha512-VlTurkvs4v7EVFWESBZGOPghFEokQhU5au5CP9WqA8B2/PcQRDsaaQlQCA6VATuEnW+vtSiSBvTiOc4004f8xg=="
}, },
"@grpc/proto-loader": { "@grpc/proto-loader": {
"version": "0.5.1", "version": "0.5.3",
"resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.1.tgz", "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.3.tgz",
"integrity": "sha512-3y0FhacYAwWvyXshH18eDkUI40wT/uGio7MAegzY8lO5+wVsc19+1A7T0pPptae4kl7bdITL+0cHpnAPmryBjQ==", "integrity": "sha512-8qvUtGg77G2ZT2HqdqYoM/OY97gQd/0crSG34xNmZ4ZOsv3aQT/FQV9QfZPazTGna6MIoyUd+u6AxsoZjJ/VMQ==",
"requires": { "requires": {
"lodash.camelcase": "^4.3.0", "lodash.camelcase": "^4.3.0",
"protobufjs": "^6.8.6" "protobufjs": "^6.8.6"
} }
}, },
"@ionic-native/core": { "@ionic-native/core": {
"version": "5.11.0", "version": "5.19.1",
"resolved": "https://registry.npmjs.org/@ionic-native/core/-/core-5.11.0.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/core/-/core-5.19.1.tgz",
"integrity": "sha512-2V1LOlJEvZljXywy05l0ksoc+ybxWBSAXtey3+9nS0uRVwaYAGnyc6xziemOU4dTUZ0CKW2bYp7JtgxeY54pRQ==", "integrity": "sha512-n55Yd6FXZhSPiAfaphh8jVuirgwvMJOUzcQeSVLG98SbfsDFPrg18/8GfvpbsuK3V/YkgGXn08ZliygGEElLLA==",
"requires": { "requires": {
"@types/cordova": "^0.0.34" "@types/cordova": "^0.0.34"
} }
}, },
"@ionic-native/geolocation": { "@ionic-native/geolocation": {
"version": "5.16.0", "version": "5.19.1",
"resolved": "https://registry.npmjs.org/@ionic-native/geolocation/-/geolocation-5.16.0.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/geolocation/-/geolocation-5.19.1.tgz",
"integrity": "sha512-SiXjwOQ1dCfP092Op8D0naMv1fDj595MdtQRxo3Qd1w8KH49O+VFmWwJzMZ6jLAxs7x9fEqnSVO3PImFZetihg==", "integrity": "sha512-NqvzxvsTT3Qjr5VONGZwpow8kNHWNzYrCZt9Dx8pABkVvB11+EWQAWYVW5DF7krNrfqxNtibSRM6e9BbLf6tvw==",
"requires": { "requires": {
"@types/cordova": "^0.0.34" "@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
} }
}, },
"@ionic-native/google-plus": { "@ionic-native/google-plus": {
"version": "5.0.0-beta.0", "version": "5.19.1",
"resolved": "https://registry.npmjs.org/@ionic-native/google-plus/-/google-plus-5.0.0-beta.0.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/google-plus/-/google-plus-5.19.1.tgz",
"integrity": "sha512-YEV8Br1vWN3jLFQ8qIYOEAGqvd13f63brRfSf1EhFG2uvR3iLH6rJ2LfGrr4BUmczgdi1NDzMSpwVSK80xPffg==" "integrity": "sha512-OcS16a4LLvtFDm89hdjH7gIUxHBOiZKcmwf/eJGlFOC+bYcIbhH4g7lt+CooE2PtqBd3PV5dXQDLXnuqA3gVrw==",
"requires": {
"@types/cordova": "^0.0.34"
}
}, },
"@ionic-native/native-geocoder": { "@ionic-native/native-geocoder": {
"version": "5.16.0", "version": "5.19.1",
"resolved": "https://registry.npmjs.org/@ionic-native/native-geocoder/-/native-geocoder-5.16.0.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/native-geocoder/-/native-geocoder-5.19.1.tgz",
"integrity": "sha512-PzKYiQU9D0gkhzk4PjGR+RhhH4thRO9oygU3Vi4JVuq2A2b6jiOhLg6pqI4W1SrStBqYX4jwArF+bNI1qWxVMQ==", "integrity": "sha512-cEkE7zrMBWbDLP8f2f68jZZpAP2sDYWWBlaOcdu1hUtVn8y+S8V62+bd1fmvN+bXVCTJ9eCQ5w7h5QuDQiIdzA==",
"requires": { "requires": {
"@types/cordova": "^0.0.34" "@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
} }
}, },
"@ionic-native/splash-screen": { "@ionic-native/splash-screen": {
"version": "5.11.0", "version": "5.19.1",
"resolved": "https://registry.npmjs.org/@ionic-native/splash-screen/-/splash-screen-5.11.0.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/splash-screen/-/splash-screen-5.19.1.tgz",
"integrity": "sha512-I0Hos6F1ZNsdf9FEYYSTgd1BbA8uT+DpYAbEV/mRMmdEuVHYt2LFJiexvMqfjL9jPYwVUH7r+32MMJptCEEO8Q==", "integrity": "sha512-xLCnhZU0xjfs2IiDRCLwWGVyFYrRjdbzRfVwv+Jlcnc89Pxl4dixoAhuJLNQEtuR9Dn37v49+gYyQgmNz863Tg==",
"requires": { "requires": {
"@types/cordova": "^0.0.34" "@types/cordova": "^0.0.34"
} }
}, },
"@ionic-native/status-bar": { "@ionic-native/status-bar": {
"version": "5.12.0", "version": "5.19.1",
"resolved": "https://registry.npmjs.org/@ionic-native/status-bar/-/status-bar-5.12.0.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/status-bar/-/status-bar-5.19.1.tgz",
"integrity": "sha512-5l9dvqWE0qHcQzGU7RLA1vItCoh/Xvxf9GqCkXGbTG44jEIXasDquWyIU8BY7nkKyji3r/SyzEj7Pne+JT6WNw==", "integrity": "sha512-LvoJi8KPl1avXJiIL7R6HH4rR2p1Sa1uxqbfsKselU+KBUO6iQVc/aOVGuBdpa2LmmWhniogJ/bWZFOCzrAphg==",
"requires": { "requires": {
"@types/cordova": "^0.0.34" "@types/cordova": "^0.0.34"
} }
}, },
"@ionic/angular": { "@ionic/angular": {
"version": "4.7.4", "version": "4.11.8",
"resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-4.7.4.tgz", "resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-4.11.8.tgz",
"integrity": "sha512-UCSxzYWLs9JkP07ggp/o6lLh/cQo4NHcr9LH7fcoMMGQA+i+p4X1m8qPkoiFhfK+ekMSpLiJnUkm+7wNS7+RGg==", "integrity": "sha512-LiILF2DkZFs+3q1+svwVQ9MDFIGLboHOcspkC+keEucDF7Cu9jtzBmObM0WCFvzTwpFOxbbSA+J3kNzPUVKHMQ==",
"requires": { "requires": {
"@ionic/core": "4.7.4", "@ionic/core": "4.11.8",
"tslib": "^1.9.3" "tslib": "^1.9.3"
} }
}, },
...@@ -1544,11 +1539,11 @@ ...@@ -1544,11 +1539,11 @@
} }
}, },
"@ionic/core": { "@ionic/core": {
"version": "4.7.4", "version": "4.11.8",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-4.7.4.tgz", "resolved": "https://registry.npmjs.org/@ionic/core/-/core-4.11.8.tgz",
"integrity": "sha512-zvRN5zGhecZnT1jxi0ZG9Lq1kQG89RBrRaizM+pvHH984o7ywcPLQfbRme8G8hBvzK/WU1g1BEt9Hq6qIvG0ug==", "integrity": "sha512-ygeoWAV1Y2Bi2lumiIHKbeYXMKx9I5sE8lyfvF0YReLwqQwK6xLCJFOo6c59AmGqmwiP6Ko+kqBUylfamtAHcg==",
"requires": { "requires": {
"ionicons": "^4.6.2", "ionicons": "^4.6.3",
"tslib": "^1.10.0" "tslib": "^1.10.0"
} }
}, },
...@@ -1677,6 +1672,15 @@ ...@@ -1677,6 +1672,15 @@
} }
} }
}, },
"@types/bytebuffer": {
"version": "5.0.40",
"resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.40.tgz",
"integrity": "sha512-h48dyzZrPMz25K6Q4+NCwWaxwXany2FhQg/ErOcdZS1ZpsaDnDMZg8JYLMTGz7uvXKrcKGJUZJlZObyfgdaN9g==",
"requires": {
"@types/long": "*",
"@types/node": "*"
}
},
"@types/cordova": { "@types/cordova": {
"version": "0.0.34", "version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
...@@ -1700,9 +1704,9 @@ ...@@ -1700,9 +1704,9 @@
} }
}, },
"@types/googlemaps": { "@types/googlemaps": {
"version": "3.38.0", "version": "3.39.2",
"resolved": "https://registry.npmjs.org/@types/googlemaps/-/googlemaps-3.38.0.tgz", "resolved": "https://registry.npmjs.org/@types/googlemaps/-/googlemaps-3.39.2.tgz",
"integrity": "sha512-Rp7FnrwyYGnjoxM+/q/4DRqUzvV9JKK1SBRXx8APxU6NNMtYMsWmOMsQOV2U6z8aMFzlUbRv3EDixLcDep8t9w==" "integrity": "sha512-eQNK23aCejjTF/HCzMObVPisnj6oBpWerhKpm849xW5JYocIHpnHnGYzWc9w076hIEpMt0bAxyPOaCoruYeGqg=="
}, },
"@types/jasmine": { "@types/jasmine": {
"version": "3.3.16", "version": "3.3.16",
...@@ -1711,18 +1715,18 @@ ...@@ -1711,18 +1715,18 @@
"dev": true "dev": true
}, },
"@types/jasminewd2": { "@types/jasminewd2": {
"version": "2.0.6", "version": "2.0.8",
"resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.6.tgz", "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.8.tgz",
"integrity": "sha512-2ZOKrxb8bKRmP/po5ObYnRDgFE4i+lQiEB27bAMmtMWLgJSqlIDqlLx6S0IRorpOmOPRQ6O80NujTmQAtBkeNw==", "integrity": "sha512-d9p31r7Nxk0ZH0U39PTH0hiDlJ+qNVGjlt1ucOoTUptxb2v+Y5VMnsxfwN+i3hK4yQnqBi3FMmoMFcd1JHDxdg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/jasmine": "*" "@types/jasmine": "*"
} }
}, },
"@types/long": { "@types/long": {
"version": "4.0.0", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz",
"integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w=="
}, },
"@types/minimatch": { "@types/minimatch": {
"version": "3.0.3", "version": "3.0.3",
...@@ -1733,8 +1737,7 @@ ...@@ -1733,8 +1737,7 @@
"@types/node": { "@types/node": {
"version": "8.9.5", "version": "8.9.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz",
"integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==", "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ=="
"dev": true
}, },
"@types/q": { "@types/q": {
"version": "0.0.32", "version": "0.0.32",
...@@ -2035,9 +2038,9 @@ ...@@ -2035,9 +2038,9 @@
} }
}, },
"agm-direction": { "agm-direction": {
"version": "0.7.8", "version": "0.7.9",
"resolved": "https://registry.npmjs.org/agm-direction/-/agm-direction-0.7.8.tgz", "resolved": "https://registry.npmjs.org/agm-direction/-/agm-direction-0.7.9.tgz",
"integrity": "sha512-ciEH6K1yxqMD0oD8mpLPUOjv2m+CZ7CMW+a2reJ2wDQwvKXyeanDjHEopg/1VhO2EwBhS4FPcfBOdpnHiVXYXw==" "integrity": "sha512-62W/no1HimT2rS3jjqjcduPZHhJwHLa9V7f0cAk2rcjvpC2f18+IEVsdMBJ+Kv/YsTDoyzP5d0HhknUubFfx1w=="
}, },
"ajv": { "ajv": {
"version": "6.10.0", "version": "6.10.0",
...@@ -3197,14 +3200,14 @@ ...@@ -3197,14 +3200,14 @@
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
}, },
"codelyzer": { "codelyzer": {
"version": "5.1.0", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-5.1.0.tgz", "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-5.2.1.tgz",
"integrity": "sha512-QiyY2/oDQnYx4mAVEDqr+z9MwrOto18tQFjExiuRChXCy0yvngS5fQpWIxvAGpbOmZFiR1PRTRLbEI71u10maA==", "integrity": "sha512-awBZXFcJUyC5HMYXiHzjr3D24tww2l1D1OqtfA9vUhEtYr32a65A+Gblm/OvsO+HuKLYzn8EDMw1inSM3VbxWA==",
"dev": true, "dev": true,
"requires": { "requires": {
"app-root-path": "^2.2.1", "app-root-path": "^2.2.1",
"aria-query": "^3.0.0", "aria-query": "^3.0.0",
"axobject-query": "^2.0.2", "axobject-query": "2.0.2",
"css-selector-tokenizer": "^0.7.1", "css-selector-tokenizer": "^0.7.1",
"cssauron": "^1.4.0", "cssauron": "^1.4.0",
"damerau-levenshtein": "^1.0.4", "damerau-levenshtein": "^1.0.4",
...@@ -3515,18 +3518,11 @@ ...@@ -3515,18 +3518,11 @@
"integrity": "sha512-QGThnPKzPxESHkruZlpE0+5aFBVOet8al0vIJ7laSUOQHIC1dd/JY6peVIbtLboKi5Dap1wCKRubOqPqH8xcQA==" "integrity": "sha512-QGThnPKzPxESHkruZlpE0+5aFBVOet8al0vIJ7laSUOQHIC1dd/JY6peVIbtLboKi5Dap1wCKRubOqPqH8xcQA=="
}, },
"cordova-plugin-googleplus": { "cordova-plugin-googleplus": {
"version": "8.2.0", "version": "8.2.1",
"resolved": "https://registry.npmjs.org/cordova-plugin-googleplus/-/cordova-plugin-googleplus-8.2.0.tgz", "resolved": "https://registry.npmjs.org/cordova-plugin-googleplus/-/cordova-plugin-googleplus-8.2.1.tgz",
"integrity": "sha512-H9SJ9sA81bJH14lqi0ZcyraWxz8ZQCgd50c4g90S9nM42eQH6zGOt0NVColxVDWO4CQ4VlLDQ5jVuHpev0ahzQ==", "integrity": "sha512-/SGTER2VJPCJ+sqGomYJbPr5/JM9EY74fqhfe1e47MurTfBs532uzbiLR47nDhhlRkCIzVy8GurZio9kcqcMJA==",
"requires": { "requires": {
"q": "^1.5.1" "q": "*"
},
"dependencies": {
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc="
}
} }
}, },
"cordova-plugin-ionic-keyboard": { "cordova-plugin-ionic-keyboard": {
...@@ -3560,22 +3556,22 @@ ...@@ -3560,22 +3556,22 @@
"integrity": "sha512-EYC5eQFVkoYXq39l7tYKE6lEjHJ04mvTmKXxGL7quHLdFPfJMNzru/UYpn92AOfpl3PQaZmou78C7EgmFOwFQQ==" "integrity": "sha512-EYC5eQFVkoYXq39l7tYKE6lEjHJ04mvTmKXxGL7quHLdFPfJMNzru/UYpn92AOfpl3PQaZmou78C7EgmFOwFQQ=="
}, },
"cordova-sqlite-storage": { "cordova-sqlite-storage": {
"version": "3.4.0", "version": "3.4.1",
"resolved": "https://registry.npmjs.org/cordova-sqlite-storage/-/cordova-sqlite-storage-3.4.0.tgz", "resolved": "https://registry.npmjs.org/cordova-sqlite-storage/-/cordova-sqlite-storage-3.4.1.tgz",
"integrity": "sha512-Uavq3HulVIYXxTFCp5aafiQhYrZF0/cGlyN76RYhIftcD5IRhza9+ghhV5abJYvuGlzY+p9dM5hPcjnYxfAH+g==", "integrity": "sha512-fbpd22CJ27jVuoUWFWdDDrSWBZQ56MbsxmFYPnerlZfE4p4Kv2UXlTQJjnKJC7HZuiU+2zs01F9w5UJmRxvwAw==",
"requires": { "requires": {
"cordova-sqlite-storage-dependencies": "2.1.0" "cordova-sqlite-storage-dependencies": "2.1.1"
} }
}, },
"cordova-sqlite-storage-dependencies": { "cordova-sqlite-storage-dependencies": {
"version": "2.1.0", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/cordova-sqlite-storage-dependencies/-/cordova-sqlite-storage-dependencies-2.1.0.tgz", "resolved": "https://registry.npmjs.org/cordova-sqlite-storage-dependencies/-/cordova-sqlite-storage-dependencies-2.1.1.tgz",
"integrity": "sha512-m0cPOWPzckAqS0/e7v+xtcM+FrHrw63qgh5T91JdkXMKCK8sN9bDoqVNJHZ5E9y7sRO7liMUIDm6Dz439RYqGA==" "integrity": "sha512-1lV5Pg1FttjBmGO8z4gxtuA4BbPKtgTfUEh1Vx4boa41inizyxaowRyTeaaqEhi5gmYAaX8sRTABm9U/XckRFg=="
}, },
"core-js": { "core-js": {
"version": "2.6.9", "version": "2.6.11",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
"integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==" "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -4732,22 +4728,22 @@ ...@@ -4732,22 +4728,22 @@
} }
}, },
"firebase": { "firebase": {
"version": "6.4.0", "version": "6.6.2",
"resolved": "https://registry.npmjs.org/firebase/-/firebase-6.4.0.tgz", "resolved": "https://registry.npmjs.org/firebase/-/firebase-6.6.2.tgz",
"integrity": "sha512-9ZzowmeBEGaHIiuJMVZL3oLkOvbNwRFAystAZi2ADqv0Kpo1cg3Anp5l1O+5ZILfG8a7/phr3nfsw/nGvf5gcQ==", "integrity": "sha512-uL9uNbutC0T8GAxrGgOCC35Ven3QKJqzJozNoVIpBuiWrB9ifm9aKOxn44h6o5ouviax3LVvoiG2jLkLkdQq4A==",
"requires": { "requires": {
"@firebase/app": "0.4.14", "@firebase/app": "0.4.17",
"@firebase/app-types": "0.4.3", "@firebase/app-types": "0.4.3",
"@firebase/auth": "0.11.8", "@firebase/auth": "0.12.0",
"@firebase/database": "0.5.0", "@firebase/database": "0.5.4",
"@firebase/firestore": "1.4.10", "@firebase/firestore": "1.5.3",
"@firebase/functions": "0.4.15", "@firebase/functions": "0.4.18",
"@firebase/installations": "0.2.4", "@firebase/installations": "0.2.7",
"@firebase/messaging": "0.4.8", "@firebase/messaging": "0.4.11",
"@firebase/performance": "0.2.15", "@firebase/performance": "0.2.19",
"@firebase/polyfill": "0.3.19", "@firebase/polyfill": "0.3.22",
"@firebase/storage": "0.3.9", "@firebase/storage": "0.3.12",
"@firebase/util": "0.2.25" "@firebase/util": "0.2.28"
} }
}, },
"flatted": { "flatted": {
...@@ -5025,10 +5021,11 @@ ...@@ -5025,10 +5021,11 @@
"integrity": "sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw==" "integrity": "sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw=="
}, },
"grpc": { "grpc": {
"version": "1.22.2", "version": "1.23.3",
"resolved": "https://registry.npmjs.org/grpc/-/grpc-1.22.2.tgz", "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.23.3.tgz",
"integrity": "sha512-gaK59oAA5/mlOIn+hQO5JROPoAzsaGRpEMcrAayW5WGETS8QScpBoQ+XBxEWAAF0kbeGIELuGRCVEObKS1SLmw==", "integrity": "sha512-7vdzxPw9s5UYch4aUn4hyM5tMaouaxUUkwkgJlwbR4AXMxiYZJOv19N2ps2eKiuUbJovo5fnGF9hg/X91gWYjw==",
"requires": { "requires": {
"@types/bytebuffer": "^5.0.40",
"lodash.camelcase": "^4.3.0", "lodash.camelcase": "^4.3.0",
"lodash.clone": "^4.5.0", "lodash.clone": "^4.5.0",
"nan": "^2.13.2", "nan": "^2.13.2",
...@@ -5074,7 +5071,7 @@ ...@@ -5074,7 +5071,7 @@
"integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8="
}, },
"chownr": { "chownr": {
"version": "1.1.1", "version": "1.1.2",
"bundled": true "bundled": true
}, },
"cliui": { "cliui": {
...@@ -5103,6 +5100,13 @@ ...@@ -5103,6 +5100,13 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true "bundled": true
}, },
"debug": {
"version": "3.2.6",
"bundled": true,
"requires": {
"ms": "^2.1.1"
}
},
"deep-extend": { "deep-extend": {
"version": "0.6.0", "version": "0.6.0",
"bundled": true "bundled": true
...@@ -5140,12 +5144,24 @@ ...@@ -5140,12 +5144,24 @@
"wide-align": "^1.1.0" "wide-align": "^1.1.0"
} }
}, },
"glob": {
"version": "7.1.4",
"bundled": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"has-unicode": { "has-unicode": {
"version": "2.0.1", "version": "2.0.1",
"bundled": true "bundled": true
}, },
"iconv-lite": { "iconv-lite": {
"version": "0.4.23", "version": "0.4.24",
"bundled": true, "bundled": true,
"requires": { "requires": {
"safer-buffer": ">= 2.1.2 < 3" "safer-buffer": ">= 2.1.2 < 3"
...@@ -5167,7 +5183,7 @@ ...@@ -5167,7 +5183,7 @@
} }
}, },
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.4",
"bundled": true "bundled": true
}, },
"ini": { "ini": {
...@@ -5237,6 +5253,10 @@ ...@@ -5237,6 +5253,10 @@
} }
} }
}, },
"ms": {
"version": "2.1.2",
"bundled": true
},
"needle": { "needle": {
"version": "2.4.0", "version": "2.4.0",
"bundled": true, "bundled": true,
...@@ -5244,19 +5264,6 @@ ...@@ -5244,19 +5264,6 @@
"debug": "^3.2.6", "debug": "^3.2.6",
"iconv-lite": "^0.4.4", "iconv-lite": "^0.4.4",
"sax": "^1.2.4" "sax": "^1.2.4"
},
"dependencies": {
"debug": {
"version": "3.2.6",
"bundled": true,
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.2",
"bundled": true
}
} }
}, },
"node-pre-gyp": { "node-pre-gyp": {
...@@ -5288,7 +5295,7 @@ ...@@ -5288,7 +5295,7 @@
"bundled": true "bundled": true
}, },
"npm-packlist": { "npm-packlist": {
"version": "1.4.1", "version": "1.4.4",
"bundled": true, "bundled": true,
"requires": { "requires": {
"ignore-walk": "^3.0.1", "ignore-walk": "^3.0.1",
...@@ -5387,24 +5394,10 @@ ...@@ -5387,24 +5394,10 @@
} }
}, },
"rimraf": { "rimraf": {
"version": "2.6.3", "version": "2.7.1",
"bundled": true, "bundled": true,
"requires": { "requires": {
"glob": "^7.1.3" "glob": "^7.1.3"
},
"dependencies": {
"glob": {
"version": "7.1.4",
"bundled": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
}
} }
}, },
"safe-buffer": { "safe-buffer": {
...@@ -5420,7 +5413,7 @@ ...@@ -5420,7 +5413,7 @@
"bundled": true "bundled": true
}, },
"semver": { "semver": {
"version": "5.7.0", "version": "5.7.1",
"bundled": true "bundled": true
}, },
"set-blocking": { "set-blocking": {
...@@ -5428,7 +5421,7 @@ ...@@ -5428,7 +5421,7 @@
"bundled": true "bundled": true
}, },
"signal-exit": { "signal-exit": {
"version": "3.0.1", "version": "3.0.2",
"bundled": true "bundled": true
}, },
"string-width": { "string-width": {
...@@ -6035,9 +6028,9 @@ ...@@ -6035,9 +6028,9 @@
"dev": true "dev": true
}, },
"ionicons": { "ionicons": {
"version": "4.6.2", "version": "4.6.3",
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-4.6.2.tgz", "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-4.6.3.tgz",
"integrity": "sha512-OGQO/GCKFwHh5lX9wYzgfLjuj2rnQavixVgK3iv8nm7tcgYQVHw7MNNwNHY4H97ZlKiVx3qj4X5Txv9fx95oBw==" "integrity": "sha512-cgP+VIr2cTJpMfFyVHTerq6n2jeoiGboVoe3GlaAo5zoSBDAEXORwUZhv6m+lCyxlsHCS3nqPUE+MKyZU71t8Q=="
}, },
"ip": { "ip": {
"version": "1.1.5", "version": "1.1.5",
...@@ -7434,9 +7427,9 @@ ...@@ -7434,9 +7427,9 @@
} }
}, },
"karma-jasmine-html-reporter": { "karma-jasmine-html-reporter": {
"version": "1.4.2", "version": "1.5.1",
"resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.4.2.tgz", "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.5.1.tgz",
"integrity": "sha512-7g0gPj8+9JepCNJR9WjDyQ2RkZ375jpdurYQyAYv8PorUCadepl8vrD6LmMqOGcM17cnrynBawQYZHaumgDjBw==", "integrity": "sha512-LlLqsoGyxT1981z46BRaC1SaY4pTo4EHCA/qZvJEMQXzTtGMyIlmwtxny6FiLO/N/OmZh69eaoNzvBkbHVVFQA==",
"dev": true "dev": true
}, },
"karma-source-map-support": { "karma-source-map-support": {
...@@ -9092,9 +9085,9 @@ ...@@ -9092,9 +9085,9 @@
}, },
"dependencies": { "dependencies": {
"@types/node": { "@types/node": {
"version": "10.14.16", "version": "10.17.13",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.16.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.13.tgz",
"integrity": "sha512-/opXIbfn0P+VLt+N8DE4l8Mn8rbhiJgabU96ZJ0p9mxOkIks5gh6RUnpHak7Yh0SFkyjO/ODbxsQQPV2bpMmyA==" "integrity": "sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg=="
} }
} }
}, },
...@@ -9753,17 +9746,17 @@ ...@@ -9753,17 +9746,17 @@
} }
}, },
"rxjs": { "rxjs": {
"version": "6.5.2", "version": "6.5.4",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz",
"integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==",
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
}, },
"rxjs-compat": { "rxjs-compat": {
"version": "6.5.3", "version": "6.5.4",
"resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.5.3.tgz", "resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.5.4.tgz",
"integrity": "sha512-BIJX2yovz3TBpjJoAZyls2QYuU6ZiCaZ+U96SmxQpuSP/qDUfiXPKOVLbThBB2WZijNHkdTTJXKRwvv5Y48H7g==" "integrity": "sha512-rkn+lbOHUQOurdd74J/hjmDsG9nFx0z66fvnbs8M95nrtKvNqCKdk7iZqdY51CGmDemTQk+kUPy4s8HVOHtkfA=="
}, },
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
...@@ -9901,9 +9894,9 @@ ...@@ -9901,9 +9894,9 @@
}, },
"dependencies": { "dependencies": {
"semver": { "semver": {
"version": "5.7.0", "version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true "dev": true
} }
} }
......
...@@ -13,41 +13,41 @@ ...@@ -13,41 +13,41 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@agm/core": "^1.0.0-beta.7", "@agm/core": "^1.1.0",
"@angular/animations": "^8.2.11", "@angular/animations": "^8.2.14",
"@angular/common": "~8.1.2", "@angular/common": "~8.1.2",
"@angular/compiler": "~8.1.2", "@angular/compiler": "~8.1.2",
"@angular/core": "~8.1.2", "@angular/core": "~8.1.2",
"@angular/fire": "^5.2.1", "@angular/fire": "^5.3.0",
"@angular/forms": "~8.1.2", "@angular/forms": "~8.1.2",
"@angular/platform-browser": "~8.1.2", "@angular/platform-browser": "~8.1.2",
"@angular/platform-browser-dynamic": "~8.1.2", "@angular/platform-browser-dynamic": "~8.1.2",
"@angular/router": "~8.1.2", "@angular/router": "~8.1.2",
"@ionic-native/core": "^5.0.0", "@ionic-native/core": "^5.19.1",
"@ionic-native/geolocation": "^5.15.1", "@ionic-native/geolocation": "^5.19.1",
"@ionic-native/google-plus": "^5.0.0-beta.0", "@ionic-native/google-plus": "^5.19.1",
"@ionic-native/native-geocoder": "^5.15.1", "@ionic-native/native-geocoder": "^5.19.1",
"@ionic-native/splash-screen": "^5.0.0", "@ionic-native/splash-screen": "^5.19.1",
"@ionic-native/status-bar": "^5.12.0", "@ionic-native/status-bar": "^5.19.1",
"@ionic/angular": "^4.7.1", "@ionic/angular": "^4.11.8",
"@ionic/storage": "^2.2.0", "@ionic/storage": "^2.2.0",
"@types/googlemaps": "^3.38.0", "@types/googlemaps": "^3.39.2",
"agm-direction": "^0.7.8", "agm-direction": "^0.7.9",
"cordova-android": "8.0.0", "cordova-android": "8.0.0",
"cordova-plugin-device": "^2.0.3", "cordova-plugin-device": "^2.0.3",
"cordova-plugin-geolocation": "^4.0.2", "cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-googleplus": "^8.2.0", "cordova-plugin-googleplus": "^8.2.1",
"cordova-plugin-ionic-keyboard": "^2.2.0", "cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.1.3", "cordova-plugin-ionic-webview": "^4.1.3",
"cordova-plugin-nativegeocoder": "^3.2.2", "cordova-plugin-nativegeocoder": "^3.2.2",
"cordova-plugin-splashscreen": "^5.0.3", "cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3", "cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-whitelist": "^1.3.4", "cordova-plugin-whitelist": "^1.3.4",
"cordova-sqlite-storage": "^3.4.0", "cordova-sqlite-storage": "^3.4.1",
"core-js": "^2.5.4", "core-js": "^2.6.11",
"firebase": "^6.4.0", "firebase": "^6.6.2",
"rxjs": "~6.5.1", "rxjs": "^6.5.4",
"rxjs-compat": "^6.5.3", "rxjs-compat": "^6.5.4",
"tslib": "^1.9.0", "tslib": "^1.9.0",
"zone.js": "~0.9.1" "zone.js": "~0.9.1"
}, },
...@@ -62,16 +62,16 @@ ...@@ -62,16 +62,16 @@
"@angular/language-service": "~8.1.2", "@angular/language-service": "~8.1.2",
"@ionic/angular-toolkit": "~2.0.0", "@ionic/angular-toolkit": "~2.0.0",
"@types/jasmine": "~3.3.8", "@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "^2.0.8",
"@types/node": "~8.9.4", "@types/node": "~8.9.4",
"codelyzer": "^5.0.0", "codelyzer": "^5.2.1",
"jasmine-core": "~3.4.0", "jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0", "karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0", "karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1", "karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1", "karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0", "karma-jasmine-html-reporter": "^1.5.1",
"protractor": "~5.4.0", "protractor": "~5.4.0",
"ts-node": "~7.0.0", "ts-node": "~7.0.0",
"tslint": "~5.15.0", "tslint": "~5.15.0",
...@@ -102,4 +102,4 @@ ...@@ -102,4 +102,4 @@
"android" "android"
] ]
} }
} }
\ No newline at end of file
<ion-app> <ion-app>
<ion-split-pane> <ion-split-pane>
<ion-menu> <ion-menu>
<ion-content> <ion-content>
<div class="side_menu_wrapper"> <div class="side_menu_wrapper">
<ion-menu-toggle> <ion-menu-toggle>
<div class="top_banner"> <div class="top_banner">
<div class="top_image"> <div class="top_image"></div>
<div class="top_detail">
<h4>John Doe</h4>
<p>[email protected]</p>
</div>
<div class="clear"></div>
</div>
</ion-menu-toggle>
<div class="sidemenu_list">
<ul>
<ion-menu-toggle>
<li (click)="vieworder('home')">Shop</li>
</ion-menu-toggle>
<li>About us</li>
<ion-menu-toggle>
<li (click)="vieworder('myorder')">View Order</li>
</ion-menu-toggle>
</div> <div class="sub_menu">
<div class="top_detail" > <ul *ngIf="categoryService.activecategories">
<h4>John Doe</h4> <ion-menu-toggle>
<p>[email protected]</p> <li
</div> *ngFor="let category of categoryService.activecategories"
<div class="clear"></div> (click)="goToPage('catstorelist', category)"
</div> >
</ion-menu-toggle> {{ category.catName }}
<div class="sidemenu_list"> </li>
<ul> </ion-menu-toggle>
<ion-menu-toggle> <!-- <li>Women's Fashion</li>
<li (click)="vieworder('home')">Shop</li>
</ion-menu-toggle>
<li>About us</li>
<ion-menu-toggle>
<li (click)="vieworder('myorder')">View Order</li>
</ion-menu-toggle>
<div class="sub_menu">
<ul *ngIf="categoryService.activecategories">
<ion-menu-toggle>
<li *ngFor="let category of categoryService.activecategories" (click)="goToPage('catstorelist', category)">{{category.catName}}</li>
</ion-menu-toggle>
<!-- <li>Women's Fashion</li>
<li>Features</li> <li>Features</li>
<li>Bags</li> <li>Bags</li>
<li>Shoes</li> <li>Shoes</li>
<li>Electronics</li> --> <li>Electronics</li> -->
</ul> </ul>
</div> </div>
<li>Complaints & Feedback</li> <li>Complaints & Feedback</li>
<li> <li>
<span class="floatLeft" (click)="authService.SignOut()">Logout</span> <span class="floatLeft" (click)="authService.SignOut()"
<span class="floatRight version">Version 0.1.0.2</span> >Logout</span
<div class="clear"></div> >
</li> <span class="floatRight version">Version 0.1.0.2</span>
</ul> <div class="clear"></div>
</div> </li>
</div> </ul>
</ion-content> </div>
</ion-menu> </div>
<ion-router-outlet main></ion-router-outlet> </ion-content>
</ion-split-pane> </ion-menu>
<ion-router-outlet main></ion-router-outlet>
</ion-split-pane>
</ion-app> </ion-app>
<div class="common_tab" [hidden]="getState()"> <div class="common_tab" [hidden]="getState()">
<ul> <ul>
<li (click)="goToPage('home')"> <li (click)="goToPage('home')">
<div class="icon_sec m1_icon" [class.m1_icon_act]="sec_active1" (click)="setActive1()"></div> <div
</li> class="icon_sec m1_icon"
<li (click)="goToPage('catagory')"> [class.m1_icon_act]="sec_active1"
<div class="icon_sec m2_icon" [class.m2_icon_act]="sec_active2" (click)="setActive2()"></div> (click)="setActive1()"
</li> ></div>
<li (click)="goToPage('catagory')"> </li>
<div class="icon_sec m3_icon" [class.m3_icon_act]="sec_active3" (click)="setActive3()"></div> <li (click)="goToPage('catagory')">
</li> <div
<!-- <li (click)="goToPage('cart')"> class="icon_sec m2_icon"
[class.m2_icon_act]="sec_active2"
(click)="setActive2()"
></div>
</li>
<li (click)="goToPage('catagory')">
<div
class="icon_sec m3_icon"
[class.m3_icon_act]="sec_active3"
(click)="setActive3()"
></div>
</li>
<!-- <li (click)="goToPage('cart')">
<div class="icon_sec m4_icon" [class.m4_icon_act]="sec_active4" (click)="setActive4()"></div> <div class="icon_sec m4_icon" [class.m4_icon_act]="sec_active4" (click)="setActive4()"></div>
</li> --> </li> -->
<li (click)="goToPage('myorder')"> <li (click)="goToPage('myorder')">
<div class="icon_sec m5_icon" [class.m5_icon_act]="sec_active5" (click)="setActive5()"></div> <div
</li> class="icon_sec m5_icon"
<li (click)="goToPage('profile')"> [class.m5_icon_act]="sec_active5"
<div class="icon_sec m6_icon" [class.m6_icon_act]="sec_active6" (click)="setActive6()"></div> (click)="setActive5()"
</li> ></div>
</ul> </li>
</div> <li (click)="goToPage('profile')">
\ No newline at end of file <div
class="icon_sec m6_icon"
[class.m6_icon_act]="sec_active6"
(click)="setActive6()"
></div>
</li>
</ul>
</div>
<div class="nav_header"> <div class="nav_header">
<button class="nav_btn nav_back floatLeft" (click)="goBack()"> <button class="nav_btn nav_back floatLeft" (click)="goBack()">
<img src="../assets/Group17_2.png"> <img src="../assets/Group17_2.png" />
</button> </button>
<div class="nav_title floatLeft"> <div class="nav_title floatLeft">
<h4>CHANGE DETAILS</h4> <h4>CHANGE DETAILS</h4>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<ion-content> <ion-content>
<div class="login_wrapper"> <div class="login_wrapper">
<div class="form_div"> <form class="form_div" #updateForm="ngForm" novalidate>
<div class="row"> <div class="row">
<h6>Personal Details</h6> <h6>Personal Details</h6>
</div> </div>
<div class="row"> <div class="row">
<input class="" type="text" placeholder="John Doe"> <input
</div> name="name"
<div class="row"> required
<input class="" type="mail" placeholder="[email protected]"> class=""
</div> type="text"
<div class="row"> [(ngModel)]="updateData.name"
<input class="" type="number" placeholder="+00 9851 5871 6985"> placeholder="John Doe"
</div> #name="ngModel"
<div class="row"> />
<h6>Change Password</h6> <div
</div> class="md-errors-spacer"
<div class="row"> [hidden]="name.valid || submitted == false"
<input class="" type="password" placeholder="Current Password"> class="ion-padding-start"
</div> >
<div class="row"> Name is required
<input class="" type="password" placeholder="New Password">
</div>
<div class="row">
<input class="" type="password" placeholder="Confirm Password">
</div>
<div class="row">
<button class="login_btn">UPDATE</button>
</div>
</div> </div>
</div> </div>
</ion-content> <div class="row">
\ No newline at end of file <input
required
class=""
name="emailId"
type="mail"
[(ngModel)]="updateData.emailId"
placeholder="[email protected]"
pattern="[a-zA-Z0-9.-_]{1,}@[a-zA-Z.-]{2,}[.]{1}[a-zA-Z]{2,}"
#emailId="ngModel"
/>
<div
class="md-errors-spacer"
[hidden]="emailId.valid || submitted == false"
>
<div *ngIf="emailId.errors && emailId.errors.required">
Email is required
</div>
<div *ngIf="emailId.errors && emailId.errors.pattern">
Email is invalid
</div>
</div>
</div>
<div class="row">
<input
required
class=""
name="phone"
type="number"
pattern="(\(+61\)|\+61|\(0[1-9]\)|0[1-9])?( ?-?[0-9]){6,9}"
maxlength="10"
[(ngModel)]="updateData.phone"
placeholder="+00 9851 5871 6985"
#phone="ngModel"
/>
<div
class="md-errors-spacer"
[hidden]="phone.valid || submitted == false"
>
<div *ngIf="phone.errors && phone.errors.required">
Phone number is required
</div>
<div *ngIf="phone.errors && phone.errors.pattern">
Phone is invalid
</div>
</div>
</div>
<div class="row">
<h6>Change Password</h6>
</div>
<div class="row">
<input class="" type="password" placeholder="Current Password" />
</div>
<div class="row">
<input class="" type="password" placeholder="New Password" />
</div>
<div class="row">
<input class="" type="password" placeholder="Confirm Password" />
</div>
<div class="row">
<button class="login_btn" (click)="onFormSubmit(updateForm)">
UPDATE
</button>
</div>
</form>
</div>
</ion-content>
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from "@angular/core";
import { Location } from '@angular/common'; import { Location } from "@angular/common";
import { Router, ActivatedRoute } from '@angular/router'; import { Router, ActivatedRoute } from "@angular/router";
import { UpdateUserDetails } from "../../config/services/user";
import { UpdateService } from "../../config/update.service";
import { ServiceService } from "../../config/service.service";
import { NgForm } from "@angular/forms";
@Component({ @Component({
selector: 'app-changedetails', selector: "app-changedetails",
templateUrl: './changedetails.page.html', templateUrl: "./changedetails.page.html",
styleUrls: ['./changedetails.page.scss'], styleUrls: ["./changedetails.page.scss"]
}) })
export class ChangedetailsPage implements OnInit { export class ChangedetailsPage implements OnInit {
userData: any;
updateData: UpdateUserDetails = {
emailId: "",
name: "",
phone: ""
};
submitted = false;
constructor( constructor(
private router: Router, private router: Router,
private route: ActivatedRoute, private route: ActivatedRoute,
private location: Location private location: Location,
) { } public register: UpdateService,
private service: ServiceService
ngOnInit() { ) {
this.service.get("params").then(val => {
this.userData = val;
});
} }
ngOnInit() {}
goToPage(path, data = null) { goToPage(path, data = null) {
this.router.navigateByUrl(path, { queryParams: data }); this.router.navigateByUrl(path, { queryParams: data });
...@@ -29,4 +43,11 @@ export class ChangedetailsPage implements OnInit { ...@@ -29,4 +43,11 @@ export class ChangedetailsPage implements OnInit {
this.location.back(); this.location.back();
} }
onFormSubmit(form: NgForm) {
this.submitted = true;
if (form.valid) {
console.log("valid form values", form.value);
this.register.updateData(form.value, this.userData.uid);
}
}
} }
<div class="nav_header"> <div class="nav_header">
<button class="nav_btn nav_back floatLeft" (click)="goBack()"> <button class="nav_btn nav_back floatLeft" (click)="goBack()">
<img src="../assets/Group17_2.png"> <img src="../assets/Group17_2.png" />
</button> </button>
<div class="nav_title floatLeft"> <div class="nav_title floatLeft"></div>
<button class="nav_btn nav_cart floatRight" (click)="goToPage('cart')">
<div class="not" *ngIf="cartService.carts">
{{cartService.carts.length}}
</div> </div>
<button class="nav_btn nav_cart floatRight" (click)="goToPage('cart')"> </button>
<div class="not" *ngIf="cartService.carts">{{cartService.carts.length}}</div> <div class="clear"></div>
</button>
<div class="clear"></div>
</div> </div>
<ion-content> <ion-content>
<div class="product_detail_wrapper" *ngIf="product"> <div class="product_detail_wrapper" *ngIf="product">
<div class="product_banner"> <div class="product_banner">
<div [ngClass]="checkFavStatus(product.prodId)" (click)="changeFav(product.prodId)"></div> <div
<div class="featured_badge" *ngIf="product.featured">Featured</div> [ngClass]="checkFavStatus(product.prodId)"
<ion-slides pager="true" [options]="bannerOptions"> (click)="changeFav(product.prodId)"
<ion-slide> ></div>
<img [src]="product.image" onerror="this.src='../assets/[email protected]'"> <div class="featured_badge" *ngIf="product.featured">Featured</div>
</ion-slide> <ion-slides pager="true" [options]="bannerOptions">
<ion-slide> <ion-slide>
<img [src]="product.image" onerror="this.src='../assets/[email protected]'"> <img
</ion-slide> [src]="product.image"
<ion-slide> onerror="this.src='../assets/[email protected]'"
<img [src]="product.image" onerror="this.src='../assets/[email protected]'"> />
</ion-slide> </ion-slide>
</ion-slides> <ion-slide>
</div> <img
<div class="product_header"> [src]="product.image"
<ion-row> onerror="this.src='../assets/[email protected]'"
<ion-col size="8"> />
<h3>{{product.prodName}}</h3> </ion-slide>
<p><strong><span><img src="../assets/Path61_2.png"></span>0</strong>&nbsp; {{product.category}}, {{product.subCate}} <ion-slide>
<br /> <img
<span *ngFor="let tag of product.tag">#{{tag}}&nbsp;</span> [src]="product.image"
</p> onerror="this.src='../assets/[email protected]'"
</ion-col> />
<ion-col size="4"> </ion-slide>
<h5>A$ {{product.price}}</h5> </ion-slides>
<p><span class="offer" *ngIf="product.discount > 0">-{{product.discount}}%</span></p> </div>
</ion-col> <div class="product_header">
</ion-row> <ion-row>
</div> <ion-col size="8">
<h3>{{product.prodName}}</h3>
<p>
<strong
><span><img src="../assets/Path61_2.png"/></span>0</strong
>&nbsp; {{product.category}}, {{product.subCate}}
<br />
<span *ngFor="let tag of product.tag">#{{tag}}&nbsp;</span>
</p>
</ion-col>
<ion-col size="4">
<h5>A$ {{product.price}}</h5>
<p>
<span class="offer" *ngIf="product.discount > 0"
>-{{product.discount}}%</span
>
</p>
</ion-col>
</ion-row>
</div>
<div class="product_div_content"> <div class="product_div_content">
<h5>Color</h5> <h5>Color</h5>
<div class="size_div"> <div class="size_div">
<ul *ngIf="product.size"> <ul *ngIf="product.size">
<ion-slides pager="false" [options]="slideOpts"> <ion-slides pager="false" [options]="slideOpts">
<ion-slide *ngFor="let color of product.color; let i = index"> <ion-slide *ngFor="let color of product.color; let i = index">
<li> <li>
<button id="custom_check_button"> <button id="custom_check_button">
<label> <label>
<input id="{{color}}" type="radio" name="color" value="{{color}}" <input
(click)="cartService.choose_color(color)" [checked]="i==0"> id="{{color}}"
<p>{{color}}</p> type="radio"
</label> name="color"
</button> value="{{color}}"
</li> (click)="cartService.choose_color(color)"
</ion-slide> [checked]="i==0"
</ion-slides> />
</ul> <p>{{color}}</p>
</div> </label>
<h5>Size</h5> </button>
<div class="size_div"> </li>
<ul *ngIf="product.size"> </ion-slide>
<ion-slides pager="false" [options]="slideOpts"> </ion-slides>
<ion-slide *ngFor="let size of product.size; let i = index"> </ul>
<li> </div>
<button id="custom_check_button"> <h5>Size</h5>
<label> <div class="size_div">
<input id="{{size}}" type="radio" name="services" value="{{size}}" <ul *ngIf="product.size">
(click)="cartService.choose_size(size)" [checked]="i==0"> <ion-slides pager="false" [options]="slideOpts">
<p>{{size}}</p> <ion-slide *ngFor="let size of product.size; let i = index">
</label> <li>
</button> <button id="custom_check_button">
</li> <label>
</ion-slide> <input
</ion-slides> id="{{size}}"
</ul> type="radio"
</div> name="services"
<!-- <h5>Color</h5> value="{{size}}"
(click)="cartService.choose_size(size)"
[checked]="i==0"
/>
<p>{{size}}</p>
</label>
</button>
</li>
</ion-slide>
</ion-slides>
</ul>
</div>
<!-- <h5>Color</h5>
<div class="color_div"> <div class="color_div">
<ul> <ul>
<ion-slides pager="false" [options]="slideOpts"> <ion-slides pager="false" [options]="slideOpts">
...@@ -136,10 +168,9 @@ ...@@ -136,10 +168,9 @@
</ion-slides> </ion-slides>
</ul> </ul>
</div> --> </div> -->
<h5>Description</h5> <h5>Description</h5>
<p>{{product.prodDesc}} <p>{{product.prodDesc}}</p>
</p> <!--<h5>
<!--<h5>
<span class="floatLeft">Reviews</span><span class="floatRight" (click)="goToPage('reviewlist')">MORE</span> <span class="floatLeft">Reviews</span><span class="floatRight" (click)="goToPage('reviewlist')">MORE</span>
<div class="clear"></div> <div class="clear"></div>
</h5> </h5>
...@@ -203,38 +234,45 @@ ...@@ -203,38 +234,45 @@
</li> </li>
</ul> </ul>
</div> --> </div> -->
<h5 *ngIf="product.similar && product.similar.length > 0"> <h5 *ngIf="product.similar && product.similar.length > 0">
<span class="floatLeft">Related Products</span><span class="floatRight" (click)="goToPage('productlist', data)">MORE</span> <span class="floatLeft">Related Products</span
<div class="clear"></div> ><span class="floatRight" (click)="goToPage('productlist', data)"
</h5> >MORE</span
<div class="related_product_slider"> >
<ul *ngIf="product.similar && product.similar.length > 0"> <div class="clear"></div>
<ion-slides pager="false" [options]="relatedProd"> </h5>
<ion-slide *ngFor="let similar of product.similar"> <div class="related_product_slider">
<li (click)="viewProd(similar)"> <ul *ngIf="product.similar && product.similar.length > 0">
<div class="product_image"> <ion-slides pager="false" [options]="relatedProd">
<img [src]="similar.image" onerror="this.src='../assets/[email protected]'"> <ion-slide *ngFor="let similar of product.similar">
<div [ngClass]="checkFavStatus(similar.prodId)" (click)="changeFav(similar.prodId)"> <li (click)="viewProd(similar)">
</div> <div class="product_image">
</div> <img
<h5>{{similar.prodName}}</h5> [src]="similar.image"
<p>{{similar.price}}</p> onerror="this.src='../assets/[email protected]'"
</li> />
</ion-slide> <div
</ion-slides> [ngClass]="checkFavStatus(similar.prodId)"
</ul> (click)="changeFav(similar.prodId)"
</div> ></div>
</div> </div>
<h5>{{similar.prodName}}</h5>
<p>{{similar.price}}</p>
</li>
</ion-slide>
</ion-slides>
</ul>
</div>
</div> </div>
</div>
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<div class="footer_div"> <div class="footer_div">
<div class="footer_options"> <div class="footer_options">
<button class="share"></button> <button class="share"></button>
<button class="fav"></button> <button class="fav"></button>
<button class="cart" (click)="buyNow(product,0)"></button> <button class="cart" (click)="buyNow(product,0)"></button>
</div>
<div class="footer_btn" (click)="buyNow(product,1)">BUY NOW</div>
</div> </div>
</ion-footer> <div class="footer_btn" (click)="buyNow(product,1)">BUY NOW</div>
\ No newline at end of file </div>
</ion-footer>
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from "@angular/core";
import { Location } from '@angular/common'; import { Location } from "@angular/common";
import { Router, ActivatedRoute } from '@angular/router'; import { Router, ActivatedRoute } from "@angular/router";
import { Products } from './../../config/services/product'; import { Products } from "./../../config/services/product";
import { Order } from './../../config/services/order'; import { Slides } from "./../../config/services/slides";
import { CartsService } from './../../config/cart.service';
import { ProductsService } from './../../config/products.service'; import { Order } from "./../../config/services/order";
import { ServiceService } from './../../config/service.service'; import { CartsService } from "./../../config/cart.service";
import { map } from 'rxjs/operators'; import { ProductsService } from "./../../config/products.service";
import { ServiceService } from "./../../config/service.service";
import { map } from "rxjs/operators";
@Component({ @Component({
selector: 'app-productdetail', selector: "app-productdetail",
templateUrl: './productdetail.page.html', templateUrl: "./productdetail.page.html",
styleUrls: ['./productdetail.page.scss'] styleUrls: ["./productdetail.page.scss"]
}) })
export class ProductdetailPage implements OnInit { export class ProductdetailPage implements OnInit {
slide: Slides;
product: Products; product: Products;
order: Order; order: Order;
data: any; data: any;
slideData: any;
bannerOptions = { bannerOptions = {
slidesPerView: 1, slidesPerView: 1,
...@@ -47,15 +51,25 @@ export class ProductdetailPage implements OnInit { ...@@ -47,15 +51,25 @@ export class ProductdetailPage implements OnInit {
params.subCate, params.subCate,
params.prodId params.prodId
); );
this.service.get('params').then(val => { this.service.get("params").then(val => {
this.data = val; this.data = val;
}); });
//
this.prodService
.getProdSlide(this.prodService.selItem.skuCode)
.then(res => {
this.slideData = res;
// console.log("resData", res);
});
this.cartService.cartList(); this.cartService.cartList();
console.log(this.prodService.fav); // console.log(this.prodService.fav);
} }
ngOnInit() { ngOnInit() {
console.log(this.prodService.selItem); // console.log("[qwe]", this.prodService.selItem);
const params = this.prodService.selItem; const params = this.prodService.selItem;
this.getProd(params); this.getProd(params);
} }
...@@ -88,14 +102,14 @@ export class ProductdetailPage implements OnInit { ...@@ -88,14 +102,14 @@ export class ProductdetailPage implements OnInit {
} else { } else {
this.product = undefined; this.product = undefined;
} }
console.log(this.product); // console.log(this.product.image);
} }
stringObject(items: any) { stringObject(items: any) {
items.forEach(element => { items.forEach(element => {
console.log(element.sizeId); // console.log(element.sizeId);
element = JSON.parse(element); element = JSON.parse(element);
console.log(element); // console.log(element);
}); });
} }
...@@ -112,7 +126,7 @@ export class ProductdetailPage implements OnInit { ...@@ -112,7 +126,7 @@ export class ProductdetailPage implements OnInit {
buyNow(product: any, type: number) { buyNow(product: any, type: number) {
this.cartService.buyNow(product).then(() => { this.cartService.buyNow(product).then(() => {
if (type === 1) { if (type === 1) {
this.router.navigateByUrl('cart'); this.router.navigateByUrl("cart");
} else { } else {
// alert('Product added to cart'); // alert('Product added to cart');
} }
...@@ -126,21 +140,21 @@ export class ProductdetailPage implements OnInit { ...@@ -126,21 +140,21 @@ export class ProductdetailPage implements OnInit {
checkFavStatus(index) { checkFavStatus(index) {
const state = this.prodService.fav.findIndex(x => x === index); const state = this.prodService.fav.findIndex(x => x === index);
return state > -1 ? 'fav_fill' : 'fav_icon'; return state > -1 ? "fav_fill" : "fav_icon";
} }
changeFav(index) { changeFav(index) {
const state = this.prodService.fav.findIndex(x => x === index); const state = this.prodService.fav.findIndex(x => x === index);
console.log(state); // console.log(state);
console.log(this.prodService.fav); // console.log(this.prodService.fav);
if (state > -1) { if (state > -1) {
this.prodService.fav.splice(state, 1); this.prodService.fav.splice(state, 1);
this.prodService.changeFav(index, 'yes'); this.prodService.changeFav(index, "yes");
} else { } else {
this.prodService.fav.push(index); this.prodService.fav.push(index);
this.prodService.changeFav(index, 'no'); this.prodService.changeFav(index, "no");
} }
return; return;
console.log(this.prodService.fav); // console.log(this.prodService.fav);
} }
} }
<div class="nav_header"> <div class="nav_header">
<ion-menu-toggle> <ion-menu-toggle>
<button class="nav_btn nav_menu floatLeft"> <button class="nav_btn nav_menu floatLeft"></button>
</button> </ion-menu-toggle>
</ion-menu-toggle> <div class="nav_title floatLeft">
<div class="nav_title floatLeft"> <img src="../../assets/Group [email protected]" />
<img src="../../assets/Group [email protected]"> </div>
</div> <div class="clear"></div>
<div class="clear"></div>
</div> </div>
<ion-content> <ion-content>
<div class="profile_wrapper"> <div class="profile_wrapper">
<div class="profile_banner"> <div class="profile_banner">
<div class="profile_circle"> <div class="profile_circle">
<div class="edit"></div> <div class="edit"></div>
</div> </div>
<h5>JOHN DOE</h5> <h5>{{user && user.name}}</h5>
<p>LOGOUT</p> <p>LOGOUT</p>
</div> </div>
<div class="account_wrapper"> <div class="account_wrapper">
<div class="account_header"> <div class="account_header">
<h5 class="floatLeft">ACCOUNT INFORMATION</h5> <h5 class="floatLeft">ACCOUNT INFORMATION</h5>
<span class="floatRight"><img src="../../assets/edit.png"></span> <span
<div class="clear"></div> class="floatRight"
</div> (click)="goToPage('changedetails', user && user)"
<div class="row"> ><img src="../../assets/edit.png"
<ion-row> /></span>
<ion-col class="textLeft p0"> <div class="clear"></div>
<p>Name<span>Verfied</span></p> </div>
</ion-col> <div class="row">
<ion-col class="textRight p0"> <ion-row>
<h6>John Doe</h6> <ion-col class="textLeft p0">
</ion-col> <p>
</ion-row> Name<span
</div> >{{user && phoneVerified? "Verified": "Not Verified yet"}}</span
<div class="row"> >
<ion-row> </p>
<ion-col class="textLeft p0"> </ion-col>
<p>Email<span>Not Verfied yet</span></p> <ion-col class="textRight p0">
</ion-col> <h6>{{user && user.name}}</h6>
<ion-col class="textRight p0"> </ion-col>
<h6>[email protected]</h6> </ion-row>
</ion-col> </div>
</ion-row> <div class="row">
</div> <ion-row>
<hr> <ion-col class="textLeft p0">
<ion-row> <p>
<ion-col class="textLeft p0"> Email<span
<p>Wishlist</p> >{{user && emailVerified? "Verified": "Not Verified yet"}}</span
</ion-col> >
<ion-col class="textRight p0"> </p>
<h6>(3)</h6> </ion-col>
</ion-col> <ion-col class="textRight p0">
</ion-row> <h6>{{user && user.emailId}}</h6>
<hr> </ion-col>
<ion-row> </ion-row>
<ion-col class="textLeft p0"> </div>
<p>Address</p> <hr />
</ion-col> <ion-row>
<ion-col class="textRight p0"> <ion-col class="textLeft p0">
<h6>(1)</h6> <p>Wishlist</p>
</ion-col> </ion-col>
</ion-row> <ion-col class="textRight p0">
<hr> <h6>(3)</h6>
<ion-row> </ion-col>
<ion-col class="textLeft p0"> </ion-row>
<p>My Cards</p> <hr />
</ion-col> <ion-row>
<ion-col class="textRight p0"> <ion-col class="textLeft p0">
<h6> <p>Address</p>
<ion-icon name="arrow-forward"></ion-icon> </ion-col>
</h6> <ion-col class="textRight p0">
</ion-col> <h6>(1)</h6>
</ion-row> </ion-col>
<hr> </ion-row>
<ion-row> <hr />
<ion-col class="textLeft p0"> <ion-row>
<p>My Order</p> <ion-col class="textLeft p0">
</ion-col> <p>My Cards</p>
<ion-col class="textRight p0"> </ion-col>
<h6> <ion-col class="textRight p0">
<ion-icon name="arrow-forward"></ion-icon> <h6>
</h6> <ion-icon name="arrow-forward"></ion-icon>
</ion-col> </h6>
</ion-row> </ion-col>
<hr> </ion-row>
<ion-row> <hr />
<ion-col class="textLeft p0"> <ion-row>
<p>Currency</p> <ion-col class="textLeft p0">
</ion-col> <p>My Order</p>
<ion-col class="textRight p0"> </ion-col>
<h6> <ion-col class="textRight p0">
<span>AUD</span> <h6>
</h6> <ion-icon name="arrow-forward"></ion-icon>
</ion-col> </h6>
</ion-row> </ion-col>
</ion-row>
<hr />
<ion-row>
</div> <ion-col class="textLeft p0">
<p>Currency</p>
</ion-col>
<ion-col class="textRight p0">
<h6>
<span>AUD</span>
</h6>
</ion-col>
</ion-row>
</div> </div>
</ion-content> </div>
\ No newline at end of file </ion-content>
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from "@angular/core";
import { User } from "../../config/services/user";
import { UserService } from "../../config/user.service";
import { ServiceService } from "../../config/service.service";
import { Router, ActivatedRoute } from "@angular/router";
@Component({ @Component({
selector: 'app-profile', selector: "app-profile",
templateUrl: './profile.page.html', templateUrl: "./profile.page.html",
styleUrls: ['./profile.page.scss'], styleUrls: ["./profile.page.scss"]
}) })
export class ProfilePage implements OnInit { export class ProfilePage implements OnInit {
user: User;
userdata: any;
custId: String;
constructor() { } constructor(
private router: Router,
private useService: UserService,
private service: ServiceService
) {
const params = this.useService.users;
const userdata = this.service.get("user").then(data => {
if (data) {
data = JSON.parse(data);
this.service.set("params", data);
ngOnInit() { this.custId = data.uid;
}
});
this.useService.getUserData("9cYSZwGvVpgkUHVcz8Dm6oqGX152");
// .then(res => {
// console.log("asdasda", res);
// this.userdata = res;
// });
} }
goToPage(path, data = null) {
this.router.navigateByUrl(path, { queryParams: data });
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
ngOnInit() {
let This = this;
setTimeout(() => {
this.user = this.useService.users;
console.log("[users]", this.user);
this.service.set("params", this.user);
}, 500);
}
} }
<div class="nav_header"> <div class="nav_header">
<button class="nav_btn nav_back floatLeft" (click)="goBack()"> <button class="nav_btn nav_back floatLeft" (click)="goBack()">
<img src="../assets/Group17_2.png"> <img src="../assets/Group17_2.png" />
</button> </button>
<div class="nav_title floatLeft"> <div class="nav_title floatLeft">
<h4>SIGN UP</h4> <h4>SIGN UP</h4>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<ion-content> <ion-content>
<div class="login_wrapper"> <div class="login_wrapper">
<div class="logo_wrapper"> <div class="logo_wrapper">
<img src="../assets/logo.png"> <img src="../assets/logo.png" />
</div>
<div class="form_div">
<form #signupForm="ngForm" novalidate>
<div class="row">
<input
class=""
type="text"
placeholder="Your name"
[(ngModel)]="signup.name"
name="name"
#name="ngModel"
required
/>
<div
class="md-errors-spacer"
[hidden]="name.valid || submitted == false"
class="ion-padding-start"
>
Name is required
</div>
</div> </div>
<div class="form_div"> <div class="row">
<form #signupForm="ngForm" novalidate> <input
<div class="row"> class=""
<input class="" type="text" placeholder="Your name" [(ngModel)]="signup.name" name="name" #name="ngModel" required> type="email"
<div class="md-errors-spacer" [hidden]="name.valid || submitted == false" class="ion-padding-start"> placeholder="Email Address"
Name is required [(ngModel)]="signup.emailId"
</div> name="emailId"
</div> #emailId="ngModel"
<div class="row"> email
<input class="" type="email" placeholder="Email Address" [(ngModel)]="signup.emailId" name="emailId" #emailId="ngModel" email pattern="[a-zA-Z0-9.-_]{1,}@[a-zA-Z.-]{2,}[.]{1}[a-zA-Z]{2,}" required> pattern="[a-zA-Z0-9.-_]{1,}@[a-zA-Z.-]{2,}[.]{1}[a-zA-Z]{2,}"
<div class="md-errors-spacer" [hidden]="emailId.valid || submitted == false"> required
<div *ngIf="emailId.errors && emailId.errors.required"> />
Email is required <div
</div> class="md-errors-spacer"
<div *ngIf="emailId.errors && emailId.errors.pattern"> [hidden]="emailId.valid || submitted == false"
Email is invalid >
</div> <div *ngIf="emailId.errors && emailId.errors.required">
</div> Email is required
</div> </div>
<div class="row"> <div *ngIf="emailId.errors && emailId.errors.pattern">
<input class="" type="text" placeholder="Phone number" [(ngModel)]="signup.phone" name="phone" #phone="ngModel" pattern="(\(+61\)|\+61|\(0[1-9]\)|0[1-9])?( ?-?[0-9]){6,9}" maxlength="10" required> Email is invalid
<div class="md-errors-spacer" [hidden]="phone.valid || submitted == false">
<div *ngIf="phone.errors && phone.errors.required">
Phone number is required
</div>
<div *ngIf="phone.errors && phone.errors.pattern">
Phone is invalid
</div>
</div>
</div> </div>
<div class="row"> </div>
<input class="" type="password" placeholder="Create A Password" [(ngModel)]="signup.password" name="password" #password="ngModel" minlength="6" required> </div>
<div class="md-errors-spacer" [hidden]="password.valid || submitted == false"> <div class="row">
<div *ngIf="password.errors && password.errors.required">Password is required</div> <input
<div *ngIf="password.errors && password.errors.minlength">Password must be at least 6 characters</div> class=""
</div> type="text"
</div> placeholder="Phone number"
<div class="row"> [(ngModel)]="signup.phone"
<ion-datetime displayFormat="DD-MM-YYYY" [(ngModel)]="signup.dob" name="dob" #dob="ngModel" placeholder="Date of Birth" max="{{minDate}}" required></ion-datetime> name="phone"
<div class="md-errors-spacer" [hidden]="dob.valid || submitted == false"> #phone="ngModel"
<div *ngIf="dob.errors && dob.errors.required">DOB is required</div> pattern="(\(+61\)|\+61|\(0[1-9]\)|0[1-9])?( ?-?[0-9]){6,9}"
</div> maxlength="10"
required
/>
<div
class="md-errors-spacer"
[hidden]="phone.valid || submitted == false"
>
<div *ngIf="phone.errors && phone.errors.required">
Phone number is required
</div> </div>
<div class="row"> <div *ngIf="phone.errors && phone.errors.pattern">
<h6> Phone is invalid
<input class="styled-checkbox" id="styled-checkbox-1" type="checkbox" value="true" [(ngModel)]="signup.terms" required name="terms" #terms="ngModel">
<label for="styled-checkbox-1"><span>I agree with <a (click)="menuToggle()">Terms and
Conditions</a></span></label></h6>
<div class="md-errors-spacer" [hidden]="terms.valid || submitted == false">
<div *ngIf="terms.errors && terms.errors.required">Please accept Terms and Conditions</div>
</div>
</div> </div>
<div class="row"> </div>
<button class="login_btn" (click)="onSignup(signupForm)">SIGN UP</button> </div>
<div class="row">
<input
class=""
type="password"
placeholder="Create A Password"
[(ngModel)]="signup.password"
name="password"
#password="ngModel"
minlength="6"
required
/>
<div
class="md-errors-spacer"
[hidden]="password.valid || submitted == false"
>
<div *ngIf="password.errors && password.errors.required">
Password is required
</div> </div>
</form> <div *ngIf="password.errors && password.errors.minlength">
<div class="row"> Password must be at least 6 characters
<hr>
<p><span>OR</span></p>
</div> </div>
<div class="row"> </div>
<div class="social_div"> </div>
<div class="social_btn" style="border-right:1px solid rgba(215, 213, 228, 1);" (click)="register.facebook()"> <div class="row">
Facebook <ion-datetime
</div> displayFormat="DD-MM-YYYY"
<div class="social_btn" (click)="register.google(2)"> [(ngModel)]="signup.dob"
Google name="dob"
</div> #dob="ngModel"
</div> placeholder="Date of Birth"
max="{{minDate}}"
required
></ion-datetime>
<div
class="md-errors-spacer"
[hidden]="dob.valid || submitted == false"
>
<div *ngIf="dob.errors && dob.errors.required">DOB is required</div>
</div>
</div>
<div class="row">
<h6>
<input
class="styled-checkbox"
id="styled-checkbox-1"
type="checkbox"
value="true"
[(ngModel)]="signup.terms"
required
name="terms"
#terms="ngModel"
/>
<label for="styled-checkbox-1"
><span
>I agree with
<a (click)="menuToggle()">Terms and Conditions</a></span
></label
>
</h6>
<div
class="md-errors-spacer"
[hidden]="terms.valid || submitted == false"
>
<div *ngIf="terms.errors && terms.errors.required">
Please accept Terms and Conditions
</div> </div>
</div>
</div>
<div class="row">
<button class="login_btn" (click)="onSignup(signupForm)">
SIGN UP
</button>
</div> </div>
</form>
<div class="row">
<hr />
<p><span>OR</span></p>
</div>
<div class="row">
<div class="social_div">
<div
class="social_btn"
style="border-right:1px solid rgba(215, 213, 228, 1);"
(click)="register.facebook()"
>
Facebook
</div>
<div class="social_btn" (click)="register.google(2)">
Google
</div>
</div>
</div>
</div> </div>
</div>
</ion-content> </ion-content>
<div class="terms_wrapper" *ngIf="menuShow" [@slideInOut]> <div class="terms_wrapper" *ngIf="menuShow" [@slideInOut]>
<div class="terms_inner"> <div class="terms_inner">
<h5>Terms & Conditions</h5> <h5>Terms & Conditions</h5>
<p> <p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has Lorem Ipsum is simply dummy text of the printing and typesetting industry.
survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop Lorem Ipsum has been the industry's standard dummy text ever since the
publishing software like Aldus PageMaker including versions of Lorem Ipsum. 1500s, when an unknown printer took a galley of type and scrambled it to
</p> make a type specimen book. It has survived not only five centuries, but
<button class="accept" (click)="menuToggle()">I Accept</button> also the leap into electronic typesetting, remaining essentially
</div> unchanged. It was popularised in the 1960s with the release of Letraset
</div> sheets containing Lorem Ipsum passages, and more recently with desktop
\ No newline at end of file publishing software like Aldus PageMaker including versions of Lorem
Ipsum.
</p>
<button class="accept" (click)="menuToggle()">I Accept</button>
</div>
</div>
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore'; import {
import { AddressList, Address } from './services/address'; AngularFirestore,
import { database } from 'firebase'; AngularFirestoreCollection
import { take } from 'rxjs/operators'; } from "@angular/fire/firestore";
import { AddressList, Address } from "./services/address";
import { database } from "firebase";
import { take } from "rxjs/operators";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: "root"
}) })
export class AddressService { export class AddressService {
addressList: AddressList[] = []; addressList: AddressList[] = [];
constructor( constructor(public afs: AngularFirestore) {}
public afs: AngularFirestore
) {
}
public async addList(userId: string) { public async addList(userId: string) {
const This = this; const This = this;
const state = true; const state = true;
const orderRef: AngularFirestoreCollection<any> = this.afs.collection('address', ref => ref.where('status', '==', state) const orderRef: AngularFirestoreCollection<any> = this.afs.collection(
.where('uid', '==', userId)); "address",
orderRef.valueChanges().pipe( ref => ref.where("status", "==", state).where("uid", "==", userId)
);
orderRef
.valueChanges()
.pipe(
take(1) // Here you can limit to only emit once, using the take operator take(1) // Here you can limit to only emit once, using the take operator
).subscribe((value) => { )
this.addressList = []; .subscribe(value => {
const res = value; this.addressList = [];
if (res.length > 0) { const res = value;
res.forEach((item) => { if (res.length > 0) {
console.log(item); res.forEach(item => {
const address: AddressList = { // console.log(item);
address: item.address, const address: AddressList = {
addressType: item.addressType, address: item.address,
latLng: item.latLng, addressType: item.addressType,
defaultVal: item.defaultVal, latLng: item.latLng,
building: item. building, defaultVal: item.defaultVal,
landmark: item.landmark, building: item.building,
addressId: item.addressId landmark: item.landmark,
}; addressId: item.addressId
this.addressList.push(address); };
}); this.addressList.push(address);
console.log(this.addressList); });
} else { // console.log(this.addressList);
// alert('No Orders Found'); } else {
} // alert('No Orders Found');
}); }
});
} }
addressCreate(data: Address) { addressCreate(data: Address) {
this.afs.collection('address').add({}).then((docRef) => { this.afs
data.addressId = docRef.id; .collection("address")
this.afs.collection('address').doc(data.addressId).set(data).then(() => { .add({})
console.log('Address created Successfully'); .then(docRef => {
data.addressId = docRef.id;
this.afs
.collection("address")
.doc(data.addressId)
.set(data)
.then(() => {
// console.log('Address created Successfully');
});
}); });
});
} }
setDefaultAddress(addId: string, userId: string) { setDefaultAddress(addId: string, userId: string) {
this.afs.collection('address', ref => ref.where('uid', '==', userId)).get().forEach((item) => { this.afs
.collection("address", ref => ref.where("uid", "==", userId))
.get()
.forEach(item => {
return item.docs.map(m => { return item.docs.map(m => {
return this.afs.doc(`address/${m.id}`).update({defaultVal: 0}); return this.afs.doc(`address/${m.id}`).update({ defaultVal: 0 });
}); });
}); });
this.afs.collection('address').doc(addId).update({defaultVal: 1}).then(() => { this.afs
console.log('Address updated Successfully'); .collection("address")
}); .doc(addId)
.update({ defaultVal: 1 })
.then(() => {
// console.log('Address updated Successfully');
});
} }
} }
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { AngularFirestore, AngularFirestoreDocument, AngularFirestoreCollection } from '@angular/fire/firestore'; import {
import { Router, ActivatedRoute } from '@angular/router'; AngularFirestore,
import { Products } from './services/product'; AngularFirestoreDocument,
import { Cart, CartItem } from './services/cart'; AngularFirestoreCollection
import { ServiceService } from './service.service'; } from "@angular/fire/firestore";
import * as firebase from 'firebase'; import { Router, ActivatedRoute } from "@angular/router";
import { take } from 'rxjs/operators'; import { Products } from "./services/product";
import { User } from './services/user'; import { Cart, CartItem } from "./services/cart";
import { from } from 'rxjs'; import { ServiceService } from "./service.service";
import * as firebase from "firebase";
import { take } from "rxjs/operators";
import { User } from "./services/user";
import { from } from "rxjs";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: "root"
}) })
export class CartsService { export class CartsService {
size: string; size: string;
...@@ -27,13 +31,13 @@ export class CartsService { ...@@ -27,13 +31,13 @@ export class CartsService {
public router: Router, public router: Router,
public service: ServiceService public service: ServiceService
) { ) {
this.custId = ''; this.custId = "";
this.carts = []; this.carts = [];
const users = this.service.get('user').then(data => { const users = this.service.get("user").then(data => {
if (data) { if (data) {
data = JSON.parse(data); data = JSON.parse(data);
this.custId = data.uid; this.custId = data.uid;
console.log(this.custId); // console.log(this.custId);
} }
}); });
} }
...@@ -42,30 +46,30 @@ export class CartsService { ...@@ -42,30 +46,30 @@ export class CartsService {
this.prodId = product.prodId; this.prodId = product.prodId;
const prodRef = firebase const prodRef = firebase
.firestore() .firestore()
.collection('products') .collection("products")
.doc(this.prodId); .doc(this.prodId);
this.size = this.size === undefined ? product.size[0] : this.size; this.size = this.size === undefined ? product.size[0] : this.size;
this.color = this.color === undefined ? product.color[0] : this.color; this.color = this.color === undefined ? product.color[0] : this.color;
const cartRef: AngularFirestoreCollection<any> = this.afs.collection( const cartRef: AngularFirestoreCollection<any> = this.afs.collection(
'carts', "carts",
ref => ref =>
ref ref
.where('size', '==', this.size) .where("size", "==", this.size)
.where('color', '==', this.color) .where("color", "==", this.color)
.where('custId', '==', this.custId) .where("custId", "==", this.custId)
.where('product', '==', prodRef) .where("product", "==", prodRef)
); );
cartRef cartRef
.valueChanges() .valueChanges()
.pipe(take(1)) .pipe(take(1))
.subscribe(value => { .subscribe(value => {
console.log(value); // console.log(value);
if (value.length === 0) { if (value.length === 0) {
product.image = product.image =
product.image === undefined product.image === undefined
? '../assets/[email protected]' ? "../assets/[email protected]"
: product.image; : product.image;
const cart: Cart = { const cart: Cart = {
color: this.color, color: this.color,
...@@ -80,36 +84,36 @@ export class CartsService { ...@@ -80,36 +84,36 @@ export class CartsService {
qty: 1, qty: 1,
size: this.size size: this.size
}; };
console.log(cart); // console.log(cart);
this.afs this.afs
.collection('carts') .collection("carts")
.add(cart) .add(cart)
.then(docRef => { .then(docRef => {
const neworderId = docRef.id; const neworderId = docRef.id;
this.afs this.afs
.collection('carts') .collection("carts")
.doc(neworderId) .doc(neworderId)
.update({ cartId: docRef.id }) .update({ cartId: docRef.id })
.then(() => { .then(() => {
console.log('Booking Successfully'); // console.log('Booking Successfully');
document.body.scrollTop = document.documentElement.scrollTop = 0; document.body.scrollTop = document.documentElement.scrollTop = 0;
}); });
}) })
.catch(error => { .catch(error => {
console.error('Error adding document: ', error); console.error("Error adding document: ", error);
}); });
} else { } else {
console.log(value); // console.log(value);
// alert('Item already added in the cart'); // alert('Item already added in the cart');
const cartId = value[0].cartId; const cartId = value[0].cartId;
// tslint:disable-next-line:radix // tslint:disable-next-line:radix
const qty = parseInt(value[0].qty) + 1; const qty = parseInt(value[0].qty) + 1;
this.afs this.afs
.collection('carts') .collection("carts")
.doc(cartId) .doc(cartId)
.update({ qty: `${qty}` }) .update({ qty: `${qty}` })
.then(() => { .then(() => {
console.log('Booking Successfully'); // console.log('Booking Successfully');
document.body.scrollTop = document.documentElement.scrollTop = 0; document.body.scrollTop = document.documentElement.scrollTop = 0;
}); });
} }
...@@ -118,8 +122,8 @@ export class CartsService { ...@@ -118,8 +122,8 @@ export class CartsService {
public async cartList() { public async cartList() {
const cartRef: AngularFirestoreCollection<any> = this.afs.collection( const cartRef: AngularFirestoreCollection<any> = this.afs.collection(
'carts', "carts",
ref => ref.where('custId', '==', this.custId) ref => ref.where("custId", "==", this.custId)
); );
cartRef.valueChanges().subscribe(value => { cartRef.valueChanges().subscribe(value => {
this.carts = []; this.carts = [];
...@@ -139,7 +143,7 @@ export class CartsService { ...@@ -139,7 +143,7 @@ export class CartsService {
qty: item.qty, qty: item.qty,
size: item.size size: item.size
}; };
console.log(item.price, item.qty); // console.log(item.price, item.qty);
if (item.price) { if (item.price) {
this.cartTotal += item.price * item.qty; this.cartTotal += item.price * item.qty;
} }
...@@ -175,9 +179,9 @@ export class CartsService { ...@@ -175,9 +179,9 @@ export class CartsService {
? this.carts[index].qty - 1 ? this.carts[index].qty - 1
: this.carts[index].qty; : this.carts[index].qty;
this.carts[index].qty = qty; this.carts[index].qty = qty;
console.log(this.carts[index].qty); // console.log(this.carts[index].qty);
this.afs this.afs
.collection('carts') .collection("carts")
.doc(this.carts[index].cartId) .doc(this.carts[index].cartId)
.update({ .update({
qty: this.carts[index].qty qty: this.carts[index].qty
...@@ -189,7 +193,7 @@ export class CartsService { ...@@ -189,7 +193,7 @@ export class CartsService {
this.cartTotal = 0; this.cartTotal = 0;
this.carts[index].qty = qty; this.carts[index].qty = qty;
this.afs this.afs
.collection('carts') .collection("carts")
.doc(this.carts[index].cartId) .doc(this.carts[index].cartId)
.update({ .update({
qty: this.carts[index].qty qty: this.carts[index].qty
...@@ -198,21 +202,19 @@ export class CartsService { ...@@ -198,21 +202,19 @@ export class CartsService {
removeItem(index) { removeItem(index) {
this.afs this.afs
.collection('carts') .collection("carts")
.doc(this.carts[index].cartId) .doc(this.carts[index].cartId)
.delete(); .delete();
} }
checkPromo(promoCode: string) { checkPromo(promoCode: string) {
console.log(promoCode); // console.log(promoCode);
const state = true; const state = true;
const promoRef: AngularFirestoreCollection<any> = this.afs.collection('promocode', ref => ref.where('promoCode', '==', promoCode) const promoRef: AngularFirestoreCollection<any> = this.afs.collection(
.where('status', '==', state)); "promocode",
ref =>
ref.where("promoCode", "==", promoCode).where("status", "==", state)
);
return promoRef.valueChanges(); return promoRef.valueChanges();
} }
} }
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { AngularFirestore, AngularFirestoreDocument, AngularFirestoreCollection } from '@angular/fire/firestore'; import {
import { Category } from './services/category'; AngularFirestore,
import * as firebase from 'firebase'; AngularFirestoreDocument,
import { ServiceService } from './service.service'; AngularFirestoreCollection
} from "@angular/fire/firestore";
import { Category } from "./services/category";
import * as firebase from "firebase";
import { ServiceService } from "./service.service";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: "root"
}) })
export class CategoriesService { export class CategoriesService {
categories: Category[] = []; categories: Category[] = [];
activecategories: Category[] = []; activecategories: Category[] = [];
constructor( constructor(public afs: AngularFirestore, public service: ServiceService) {
public afs: AngularFirestore,
public service: ServiceService
) {
this.categoryList(); this.categoryList();
this.activeCategory(); this.activeCategory();
} }
public async categoryList() { public async categoryList() {
const This = this; const This = this;
const orderRef: AngularFirestoreCollection<any> = this.afs.collection('shopcategory'); const orderRef: AngularFirestoreCollection<any> = this.afs.collection(
orderRef.valueChanges().subscribe((value) => { "shopcategory"
);
orderRef.valueChanges().subscribe(value => {
this.categories = []; this.categories = [];
const res = value; const res = value;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach(item => {
console.log(item); // console.log(item);
const category: Category = { const category: Category = {
catId: item.catId, catId: item.catId,
catName: item.catName, catName: item.catName,
...@@ -36,7 +39,7 @@ export class CategoriesService { ...@@ -36,7 +39,7 @@ export class CategoriesService {
}; };
this.categories.push(category); this.categories.push(category);
}); });
console.log(this.categories); // console.log(this.categories);
} else { } else {
// alert('No Orders Found'); // alert('No Orders Found');
} }
...@@ -46,13 +49,16 @@ export class CategoriesService { ...@@ -46,13 +49,16 @@ export class CategoriesService {
public async activeCategory() { public async activeCategory() {
const This = this; const This = this;
const state = true; const state = true;
const orderRef: AngularFirestoreCollection<any> = this.afs.collection('shopcategory', ref => ref.where('status', '==', state)); const orderRef: AngularFirestoreCollection<any> = this.afs.collection(
orderRef.valueChanges().subscribe((value) => { "shopcategory",
ref => ref.where("status", "==", state)
);
orderRef.valueChanges().subscribe(value => {
this.activecategories = []; this.activecategories = [];
const res = value; const res = value;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach(item => {
console.log(item); // console.log(item);
const category: Category = { const category: Category = {
catId: item.catId, catId: item.catId,
catName: item.catName, catName: item.catName,
...@@ -62,7 +68,7 @@ export class CategoriesService { ...@@ -62,7 +68,7 @@ export class CategoriesService {
}; };
this.activecategories.push(category); this.activecategories.push(category);
}); });
console.log(this.activecategories); // console.log(this.activecategories);
} else { } else {
// alert('No Orders Found'); // alert('No Orders Found');
} }
......
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { AngularFirestore, AngularFirestoreDocument, AngularFirestoreCollection } from '@angular/fire/firestore'; import {
import { Centers, CenterData } from './services/center'; AngularFirestore,
import * as firebase from 'firebase'; AngularFirestoreDocument,
AngularFirestoreCollection
} from "@angular/fire/firestore";
import { Centers, CenterData } from "./services/center";
import * as firebase from "firebase";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: "root"
}) })
export class CenterService { export class CenterService {
centers: Centers[] = []; centers: Centers[] = [];
nearcenters: Centers[] = []; nearcenters: Centers[] = [];
constructor( constructor(public afs: AngularFirestore) {
public afs: AngularFirestore
) {
this.centerList(); this.centerList();
this.getNearBy(10.0159, 76.3419, 10); this.getNearBy(10.0159, 76.3419, 10);
} }
...@@ -19,14 +21,16 @@ export class CenterService { ...@@ -19,14 +21,16 @@ export class CenterService {
public async centerList() { public async centerList() {
const This = this; const This = this;
const state = true; const state = true;
const orderRef: AngularFirestoreCollection<any> = this.afs.collection('centers', ref => ref.where('featured', '==', state) const orderRef: AngularFirestoreCollection<any> = this.afs.collection(
.where('status', '==', state)); "centers",
orderRef.valueChanges().subscribe((value) => { ref => ref.where("featured", "==", state).where("status", "==", state)
);
orderRef.valueChanges().subscribe(value => {
this.centers = []; this.centers = [];
const res = value; const res = value;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach(item => {
console.log(item); // console.log(item);
if (item.centerName === undefined) { if (item.centerName === undefined) {
return; return;
} }
...@@ -42,7 +46,7 @@ export class CenterService { ...@@ -42,7 +46,7 @@ export class CenterService {
}; };
this.centers.push(center); this.centers.push(center);
}); });
console.log(this.centers); // console.log(this.centers);
} else { } else {
// alert('No Orders Found'); // alert('No Orders Found');
} }
...@@ -56,22 +60,31 @@ export class CenterService { ...@@ -56,22 +60,31 @@ export class CenterService {
const lat = 0.0144927536231884; const lat = 0.0144927536231884;
const lon = 0.0181818181818182; const lon = 0.0181818181818182;
const lowerLat = latitude - (lat * distance); const lowerLat = latitude - lat * distance;
const lowerLon = longitude - (lon * distance); const lowerLon = longitude - lon * distance;
const greaterLat = latitude + (lat * distance); const greaterLat = latitude + lat * distance;
const greaterLon = longitude + (lon * distance); const greaterLon = longitude + lon * distance;
const lesserGeopoint = new firebase.firestore.GeoPoint(lowerLat, lowerLon); const lesserGeopoint = new firebase.firestore.GeoPoint(lowerLat, lowerLon);
const greaterGeopoint = new firebase.firestore.GeoPoint(greaterLat, greaterLon); const greaterGeopoint = new firebase.firestore.GeoPoint(
const orderRef: AngularFirestoreCollection<any> = this.afs.collection('centers', ref => ref.where('latLng', '>', lesserGeopoint) greaterLat,
.where('latLng', '<', greaterGeopoint).where('status', '==', state)); greaterLon
orderRef.valueChanges().subscribe((value) => { );
const orderRef: AngularFirestoreCollection<any> = this.afs.collection(
"centers",
ref =>
ref
.where("latLng", ">", lesserGeopoint)
.where("latLng", "<", greaterGeopoint)
.where("status", "==", state)
);
orderRef.valueChanges().subscribe(value => {
this.nearcenters = []; this.nearcenters = [];
const res = value; const res = value;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach(item => {
console.log(item); // console.log(item);
if (item.centerName === undefined) { if (item.centerName === undefined) {
return; return;
} }
...@@ -87,11 +100,10 @@ export class CenterService { ...@@ -87,11 +100,10 @@ export class CenterService {
}; };
this.nearcenters.push(center); this.nearcenters.push(center);
}); });
console.log(this.nearcenters); // console.log(this.nearcenters);
} else { } else {
// alert('No Orders Found'); // alert('No Orders Found');
} }
}); });
} }
} }
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { AngularFirestore, AngularFirestoreDocument, AngularFirestoreCollection } from '@angular/fire/firestore'; import {
import { Myorder } from './services/myorder'; AngularFirestore,
import { ServiceService } from './../config/service.service'; AngularFirestoreDocument,
import * as firebase from 'firebase'; AngularFirestoreCollection
import { take } from 'rxjs/operators'; } from "@angular/fire/firestore";
import { Observable, of } from 'rxjs'; import { Myorder } from "./services/myorder";
import { ServiceService } from "./../config/service.service";
import * as firebase from "firebase";
import { take } from "rxjs/operators";
import { Observable, of } from "rxjs";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: "root"
}) })
export class MyordersService { export class MyordersService {
product: Myorder[] = []; product: Myorder[] = [];
...@@ -15,11 +19,8 @@ export class MyordersService { ...@@ -15,11 +19,8 @@ export class MyordersService {
orders: Myorder[]; orders: Myorder[];
selItem: Myorder; selItem: Myorder;
constructor( constructor(public afs: AngularFirestore, public service: ServiceService) {
public afs: AngularFirestore, const users = this.service.get("user").then(data => {
public service: ServiceService
) {
const users = this.service.get('user').then((data) => {
if (data) { if (data) {
data = JSON.parse(data); data = JSON.parse(data);
this.custId = data.uid; this.custId = data.uid;
...@@ -28,28 +29,28 @@ export class MyordersService { ...@@ -28,28 +29,28 @@ export class MyordersService {
// this.orderState(); // this.orderState();
} }
} else { } else {
this.custId = 'WwHnLICVY2dvZGUHuKqasiTB91a2'; this.custId = "WwHnLICVY2dvZGUHuKqasiTB91a2";
} }
}); });
} }
/*public async orgorderList(custId) { /*public async orgorderList(custId) {
console.log('called'); // console.log('called');
console.log(custId); // console.log(custId);
const This = this; const This = this;
const orderRef: AngularFirestoreCollection<any> = this.afs.collection('orders', ref => ref.where('custId', '==', custId) const orderRef: AngularFirestoreCollection<any> = this.afs.collection('orders', ref => ref.where('custId', '==', custId)
.orderBy('bookDate', 'desc')); .orderBy('bookDate', 'desc'));
orderRef.stateChanges().subscribe((value) => { orderRef.stateChanges().subscribe((value) => {
console.log(value[0].payload.doc.data()); // console.log(value[0].payload.doc.data());
}); });
orderRef.valueChanges().pipe(take(1)).subscribe((value) => { orderRef.valueChanges().pipe(take(1)).subscribe((value) => {
console.log(value); // console.log(value);
this.orders = []; this.orders = [];
const res = value; const res = value;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach((item) => {
console.log(item); // console.log(item);
const order: Myorder = { const order: Myorder = {
prodName: item.prodName, prodName: item.prodName,
color: item.color, color: item.color,
...@@ -70,7 +71,7 @@ export class MyordersService { ...@@ -70,7 +71,7 @@ export class MyordersService {
}; };
this.orders.push(order); this.orders.push(order);
}); });
console.log(this.orders); // console.log(this.orders);
} else { } else {
alert('No Orders Found'); alert('No Orders Found');
} }
...@@ -78,22 +79,23 @@ export class MyordersService { ...@@ -78,22 +79,23 @@ export class MyordersService {
}); });
}*/ }*/
public async orderList(custId) { public async orderList(custId) {
console.log('called'); // console.log('called');
console.log(custId); // console.log(custId);
const This = this; const This = this;
this.orders = []; this.orders = [];
const orderRef: AngularFirestoreCollection<any> = this.afs.collection('orders', ref => ref.where('custId', '==', custId) const orderRef: AngularFirestoreCollection<any> = this.afs.collection(
.orderBy('bookDate', 'desc')); "orders",
orderRef.stateChanges().subscribe((value) => { ref => ref.where("custId", "==", custId).orderBy("bookDate", "desc")
console.log(value); );
orderRef.stateChanges().subscribe(value => {
// console.log(value);
const res = value; const res = value;
console.log(res); // console.log(res);
if (res.length > 0) { if (res.length > 0) {
res.forEach((items) => { res.forEach(items => {
const item = items.payload.doc.data(); const item = items.payload.doc.data();
console.log(item); // console.log(item);
const orderId = item.orderId; const orderId = item.orderId;
const order: Myorder = { const order: Myorder = {
amount: item.amount, amount: item.amount,
...@@ -103,40 +105,39 @@ export class MyordersService { ...@@ -103,40 +105,39 @@ export class MyordersService {
deliveryLocation: item.deliveryLocation, deliveryLocation: item.deliveryLocation,
pickupLocation: item.pickupLocation, pickupLocation: item.pickupLocation,
deliveryAddress: item.deliveryAddress, deliveryAddress: item.deliveryAddress,
riderName: 'John', riderName: "John",
orderId: item.orderId, orderId: item.orderId,
orderCode: item.orderCode, orderCode: item.orderCode,
product: this.service.key2Array(item.product), product: this.service.key2Array(item.product),
time: '60' time: "60"
}; };
console.log(order); // console.log(order);
if (items.type === 'added') { if (items.type === "added") {
this.orders.push(order); this.orders.push(order);
} else { } else {
console.log(orderId); // console.log(orderId);
const index = this.orders.findIndex(obj => obj.orderId === orderId); const index = this.orders.findIndex(obj => obj.orderId === orderId);
if (index >= 0) { if (index >= 0) {
this.orders[index] = order; this.orders[index] = order;
} }
} }
}); });
console.log(this.orders); // console.log(this.orders);
} }
}); });
} }
/* public orderState(): Observable<Myorder[]> {
/* public orderState(): Observable<Myorder[]> { // console.log('called');
console.log('called');
const custId = 'WwHnLICVY2dvZGUHuKqasiTB91a2'; const custId = 'WwHnLICVY2dvZGUHuKqasiTB91a2';
this.orders = []; this.orders = [];
firebase.firestore().collection('orders').where('custId', '==', custId) firebase.firestore().collection('orders').where('custId', '==', custId)
.onSnapshot((snapData) => { .onSnapshot((snapData) => {
snapData.docChanges().forEach((change) => { snapData.docChanges().forEach((change) => {
console.log(change.type); // console.log(change.type);
if (change.type === 'modified') { if (change.type === 'modified') {
const item = change.doc.data(); const item = change.doc.data();
console.log(item); // console.log(item);
const orderId = item.orderId; const orderId = item.orderId;
const order: Myorder = { const order: Myorder = {
prodName: item.prodName, prodName: item.prodName,
...@@ -157,9 +158,9 @@ export class MyordersService { ...@@ -157,9 +158,9 @@ export class MyordersService {
const count = this.orders.length; const count = this.orders.length;
for (let index = 0; index < count; index++) { for (let index = 0; index < count; index++) {
if (this.orders[index].orderId === orderId) { if (this.orders[index].orderId === orderId) {
console.log(index); // console.log(index);
this.orders[index] = order; this.orders[index] = order;
console.log(this.orders); // console.log(this.orders);
break; break;
} }
} }
...@@ -195,13 +196,13 @@ export class MyordersService { ...@@ -195,13 +196,13 @@ export class MyordersService {
.onSnapshot(function(snapshot) { .onSnapshot(function(snapshot) {
snapshot.docChanges().forEach(function(change) { snapshot.docChanges().forEach(function(change) {
if (change.type === "added") { if (change.type === "added") {
console.log("New city: ", change.doc.data()); // console.log("New city: ", change.doc.data());
} }
if (change.type === "modified") { if (change.type === "modified") {
console.log("Modified city: ", change.doc.data()); // console.log("Modified city: ", change.doc.data());
} }
if (change.type === "removed") { if (change.type === "removed") {
console.log("Removed city: ", change.doc.data()); // console.log("Removed city: ", change.doc.data());
} }
}); });
}); });
...@@ -209,7 +210,6 @@ export class MyordersService { ...@@ -209,7 +210,6 @@ export class MyordersService {
} }
*/ */
public async trackOrder(order) { public async trackOrder(order) {
this.selItem = order; this.selItem = order;
} }
} }
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { AngularFirestore, AngularFirestoreDocument, AngularFirestoreCollection } from '@angular/fire/firestore'; import {
import { Router, ActivatedRoute } from '@angular/router'; AngularFirestore,
import { Order, CartProd } from './services/order'; AngularFirestoreDocument,
import { Products } from './services/product'; AngularFirestoreCollection
import { ServiceService } from './service.service'; } from "@angular/fire/firestore";
import * as firebase from 'firebase'; import { Router, ActivatedRoute } from "@angular/router";
import { CartItem } from './services/cart'; import { Order, CartProd } from "./services/order";
import { BehaviorSubject } from 'rxjs'; import { Products } from "./services/product";
import { ServiceService } from "./service.service";
import * as firebase from "firebase";
import { CartItem } from "./services/cart";
import { BehaviorSubject } from "rxjs";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: "root"
}) })
export class OrdersService { export class OrdersService {
order: Order; order: Order;
...@@ -26,24 +29,24 @@ export class OrdersService { ...@@ -26,24 +29,24 @@ export class OrdersService {
public router: Router, public router: Router,
public service: ServiceService public service: ServiceService
) { ) {
this.size = 'small'; this.size = "small";
this.color = 'Blue'; this.color = "Blue";
this.custId = ''; this.custId = "";
this.service.get('user').then((data) => { this.service.get("user").then(data => {
if (data) { if (data) {
data = JSON.parse(data); data = JSON.parse(data);
this.users = data; this.users = data;
this.custId = data.uid; this.custId = data.uid;
console.log(this.custId); // console.log(this.custId);
} else { } else {
this.custId = 'WwHnLICVY2dvZGUHuKqasiTB91a2'; this.custId = "WwHnLICVY2dvZGUHuKqasiTB91a2";
} }
}); });
} }
/*public async orgcheckOut(cart: CartItem[]) { /*public async orgcheckOut(cart: CartItem[]) {
console.log(cart); // console.log(cart);
console.log(this.users); // console.log(this.users);
return; return;
let currProcess = 0; let currProcess = 0;
const cartCount = cart.length; const cartCount = cart.length;
...@@ -86,10 +89,10 @@ export class OrdersService { ...@@ -86,10 +89,10 @@ export class OrdersService {
}; };
this.afs.collection('orders').doc(neworderId).set(orderItem).then(() => { this.afs.collection('orders').doc(neworderId).set(orderItem).then(() => {
currProcess += 1; currProcess += 1;
console.log('Booking Successfully'); // console.log('Booking Successfully');
this.afs.doc(`carts/${product.cartId}`).delete(); this.afs.doc(`carts/${product.cartId}`).delete();
// this.router.navigateByUrl('cart'); // this.router.navigateByUrl('cart');
console.log(currProcess, cartCount); // console.log(currProcess, cartCount);
document.body.scrollTop = document.documentElement.scrollTop = 0; document.body.scrollTop = document.documentElement.scrollTop = 0;
if (currProcess === cartCount) { if (currProcess === cartCount) {
// this.router.navigateByUrl('cart'); // this.router.navigateByUrl('cart');
...@@ -103,107 +106,119 @@ export class OrdersService { ...@@ -103,107 +106,119 @@ export class OrdersService {
}*/ }*/
public async checkOut(cart: CartItem[], otherCharge) { public async checkOut(cart: CartItem[], otherCharge) {
console.log(cart); // console.log(cart);
console.log(this.users); // console.log(this.users);
const cartGroup = []; const cartGroup = [];
// const distinctShops = [...new Set(cart.map(obj => obj.shopperId))]; // const distinctShops = [...new Set(cart.map(obj => obj.shopperId))];
const distinctShops = []; const distinctShops = [];
const map = new Map(); const map = new Map();
for (const item of cart) { for (const item of cart) {
if (!map.has(item.shopperId)) { if (!map.has(item.shopperId)) {
map.set(item.shopperId, true); // set any value to Map map.set(item.shopperId, true); // set any value to Map
distinctShops.push(item.shopperId); distinctShops.push(item.shopperId);
} }
} }
cart.forEach((items) => { cart.forEach(items => {
cartGroup[items.shopperId] = cartGroup[items.shopperId] === undefined ? [] : cartGroup[items.shopperId]; cartGroup[items.shopperId] =
cartGroup[items.shopperId] === undefined
? []
: cartGroup[items.shopperId];
cartGroup[items.shopperId].push(items); cartGroup[items.shopperId].push(items);
}); });
const cartCount = distinctShops.length; const cartCount = distinctShops.length;
// console.log(cartGroup);
// console.log(cartCount);
console.log(cartGroup);
console.log(cartCount);
const promise = new Promise(resolve => { const promise = new Promise(resolve => {
distinctShops.forEach((item) => { distinctShops.forEach(item => {
console.log(item); // console.log(item);
this.afs.collection('orders').add({ this.afs
bookDate: firebase.firestore.FieldValue.serverTimestamp() .collection("orders")
}).then((docRef) => { .add({
const neworderId = docRef.id; bookDate: firebase.firestore.FieldValue.serverTimestamp()
const delivery = new firebase.firestore.GeoPoint(10.0237, 76.3116); })
const pickup = new firebase.firestore.GeoPoint(10.7231, 76.1234); .then(docRef => {
const products = {}; const neworderId = docRef.id;
const cartItem = cartGroup[item]; const delivery = new firebase.firestore.GeoPoint(10.0237, 76.3116);
let prodPrice = 0; const pickup = new firebase.firestore.GeoPoint(10.7231, 76.1234);
cartItem.forEach((prodItem) => { const products = {};
prodPrice += prodItem.price; const cartItem = cartGroup[item];
products[prodItem.prodId] = { let prodPrice = 0;
prodId: prodItem.prodId, cartItem.forEach(prodItem => {
prodName: prodItem.prodName, prodPrice += prodItem.price;
image: prodItem.image, products[prodItem.prodId] = {
price: prodItem.price, prodId: prodItem.prodId,
color: prodItem.color, prodName: prodItem.prodName,
size: prodItem.size, image: prodItem.image,
qty: prodItem.qty, price: prodItem.price,
discount: '' color: prodItem.color,
}; size: prodItem.size,
this.afs.doc(`carts/${prodItem.cartId}`).delete(); qty: prodItem.qty,
}); discount: ""
console.log(cartItem); };
console.log(products); this.afs.doc(`carts/${prodItem.cartId}`).delete();
const product = cartItem[0]; });
const orderItem: Order = { // console.log(cartItem);
amount: 'A$ ' + otherCharge.totalAmt, // console.log(products);
customer: firebase.firestore().doc('/customer/' + this.custId), const product = cartItem[0];
shopper: product.shopper, const orderItem: Order = {
deliveryAddress: otherCharge.custAddress, amount: "A$ " + otherCharge.totalAmt,
deliveryCharge: 'A$ ' + otherCharge.deliveryCharge, customer: firebase.firestore().doc("/customer/" + this.custId),
deliveryLocation: delivery, shopper: product.shopper,
bookDate: firebase.firestore.FieldValue.serverTimestamp(), deliveryAddress: otherCharge.custAddress,
orderCode: this.orderCode(), deliveryCharge: "A$ " + otherCharge.deliveryCharge,
orderId: neworderId, deliveryLocation: delivery,
orderStatus: 1, bookDate: firebase.firestore.FieldValue.serverTimestamp(),
pickupAddress: 'GetMi, Canberra, AUS', orderCode: this.orderCode(),
pickupLocation: pickup, orderId: neworderId,
promoId: null, orderStatus: 1,
rider: firebase.firestore().doc('/riders/qbTKza18mWVzYG9NLIbmjMbrYjG2'), pickupAddress: "GetMi, Canberra, AUS",
status: 1, pickupLocation: pickup,
custId: this.custId, promoId: null,
riderId: 'qbTKza18mWVzYG9NLIbmjMbrYjG2', rider: firebase
shopperId: product.shopperId, .firestore()
custName: 'Jone Doe', .doc("/riders/qbTKza18mWVzYG9NLIbmjMbrYjG2"),
riderName: 'John', status: 1,
shopperState: 0, custId: this.custId,
shopperName: 'Witchery', riderId: "qbTKza18mWVzYG9NLIbmjMbrYjG2",
product: products, shopperId: product.shopperId,
discount: 'A$ ' + otherCharge.discount, custName: "Jone Doe",
promoApplied: otherCharge.discountApplied, riderName: "John",
tax: 'A$ ' + otherCharge.taxAmount shopperState: 0,
}; shopperName: "Witchery",
console.log(orderItem); product: products,
discount: "A$ " + otherCharge.discount,
this.afs.collection('orders').doc(neworderId).set(orderItem).then(() => { promoApplied: otherCharge.discountApplied,
console.log('Booking Successfully'); tax: "A$ " + otherCharge.taxAmount
// this.router.navigateByUrl('cart'); };
resolve('Cart to Order Successfully'); // console.log(orderItem);
document.body.scrollTop = document.documentElement.scrollTop = 0;
}); this.afs
}).catch((error) => { .collection("orders")
console.error('Error adding document: ', error); .doc(neworderId)
.set(orderItem)
.then(() => {
// console.log('Booking Successfully');
// this.router.navigateByUrl('cart');
resolve("Cart to Order Successfully");
document.body.scrollTop = document.documentElement.scrollTop = 0;
});
})
.catch(error => {
console.error("Error adding document: ", error);
});
}); });
}); });
}); // promise.then(value => console.log(value));
promise.then(value => console.log(value));
} }
public async changeOrder(orderId, status) { public async changeOrder(orderId, status) {
console.log(orderId, status); // console.log(orderId, status);
this.afs.collection('orders').doc(orderId).update({orderStatus: status}); this.afs
.collection("orders")
.doc(orderId)
.update({ orderStatus: status });
} }
public async buyNow(product: Products) { public async buyNow(product: Products) {
...@@ -211,19 +226,18 @@ export class OrdersService { ...@@ -211,19 +226,18 @@ export class OrdersService {
} }
orderCode() { orderCode() {
const newpin = Math.round(Math.random() * 1000000); const newpin = Math.round(Math.random() * 1000000);
const orderCode = 'GM' + this.pad(newpin, 6, null); const orderCode = "GM" + this.pad(newpin, 6, null);
return orderCode; return orderCode;
} }
pad(n, width, z) { pad(n, width, z) {
z = z || '0'; z = z || "0";
n = n + ''; n = n + "";
return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
} }
choose_size(size: string) { choose_size(size: string) {
this.size = size; this.size = size;
} }
} }
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { AngularFirestore, AngularFirestoreDocument, AngularFirestoreCollection } from '@angular/fire/firestore'; import {
import { Products } from './services/product'; AngularFirestore,
import { ServiceService } from './../config/service.service'; AngularFirestoreDocument,
import { take } from 'rxjs/operators'; AngularFirestoreCollection
} from "@angular/fire/firestore";
import { Products } from "./services/product";
import { Slides } from "./services/slides";
import { ServiceService } from "./../config/service.service";
import { take } from "rxjs/operators";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: "root"
}) })
export class ProductsService { export class ProductsService {
prodSlideImg: Slides[] = [];
product: Products[] = []; product: Products[] = [];
fav: any[]; fav: any[];
selItem: Products; selItem: Products;
similar: Products[] = []; similar: Products[] = [];
user: any; user: any;
constructor( constructor(public afs: AngularFirestore, public service: ServiceService) {
public afs: AngularFirestore,
public service: ServiceService
) {
this.product = []; this.product = [];
this.fav = []; this.fav = [];
this.service.get('user').then(data => { this.prodSlideImg = [];
this.service.get("user").then(data => {
this.user = JSON.parse(data); this.user = JSON.parse(data);
this.getFavlist(this.user.uid); this.getFavlist(this.user.uid);
}); });
} }
// Fetches images for slide
public async getProdSlide(skuID: string) {
const This = this;
const state = true;
// firebase query
const prodRef: AngularFirestoreCollection<any> = this.afs.collection(
`product_gallery`,
ref => ref.where("skuId", "==", skuID)
);
prodRef.valueChanges().subscribe(value => {
this.prodSlideImg = [];
const res = value;
if (res.length > 0) {
res.forEach(item => {
const slideImg: Slides = {
downloadURL: item.downloadURL,
imageId: item.imageId,
path: item.path,
skuId: item.skuId
};
this.prodSlideImg.push(slideImg);
});
console.log("[prodSlideImgArray]", this.prodSlideImg);
return this.prodSlideImg;
} else {
// alert("No Products Found");
}
});
}
public async prodList(shopperId: string) { public async prodList(shopperId: string) {
const This = this; const This = this;
const state = true; const state = true;
console.log(shopperId); // console.log(shopperId);
const prodRef: AngularFirestoreCollection<any> = this.afs.collection(`products`, ref => ref.where('shopperId', '==', shopperId) const prodRef: AngularFirestoreCollection<any> = this.afs.collection(
.where('status', '==', state)); `products`,
prodRef.valueChanges().subscribe((value) => { ref =>
ref.where("shopperId", "==", shopperId).where("status", "==", state)
);
prodRef.valueChanges().subscribe(value => {
this.product = []; this.product = [];
const res = value; const res = value;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach(item => {
console.log(item.size); // console.log(item.size);
const prod: Products = { const prod: Products = {
prodId: item.prodId, prodId: item.prodId,
prodName: item.prodName, prodName: item.prodName,
...@@ -61,7 +102,7 @@ export class ProductsService { ...@@ -61,7 +102,7 @@ export class ProductsService {
}; };
this.product.push(prod); this.product.push(prod);
}); });
console.log(this.product); // console.log(this.product);
} else { } else {
// alert('No Products Found'); // alert('No Products Found');
} }
...@@ -71,34 +112,35 @@ export class ProductsService { ...@@ -71,34 +112,35 @@ export class ProductsService {
public async filterSearch(sortValue: string) { public async filterSearch(sortValue: string) {
const This = this; const This = this;
const state = true; const state = true;
console.log(sortValue); // console.log(sortValue);
let field, order; let field, order;
if (sortValue === 'low') { if (sortValue === "low") {
field = 'price'; field = "price";
order = 'asc'; order = "asc";
} }
if (sortValue === 'high') { if (sortValue === "high") {
field = 'price'; field = "price";
order = 'desc'; order = "desc";
} }
if (sortValue === 'rate') { if (sortValue === "rate") {
// field = 'price'; // field = 'price';
// order = 'desc'; // order = 'desc';
} }
// tslint:disable-next-line:max-line-length // tslint:disable-next-line:max-line-length
const prodRef: AngularFirestoreCollection<any> = this.afs.collection(`products`, ref => ref.where('status', '==', state).orderBy(field, order)); const prodRef: AngularFirestoreCollection<any> = this.afs.collection(
prodRef.valueChanges().subscribe((value) => { `products`,
ref => ref.where("status", "==", state).orderBy(field, order)
);
prodRef.valueChanges().subscribe(value => {
this.product = []; this.product = [];
const res = value; const res = value;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach(item => {
console.log(item.size); // console.log(item.size);
const prod: Products = { const prod: Products = {
prodId: item.prodId, prodId: item.prodId,
prodName: item.prodName, prodName: item.prodName,
...@@ -123,29 +165,34 @@ export class ProductsService { ...@@ -123,29 +165,34 @@ export class ProductsService {
}; };
this.product.push(prod); this.product.push(prod);
}); });
console.log(this.product); // console.log(this.product);
} else { } else {
// alert('No Products Found'); // alert('No Products Found');
} }
}); });
} }
similarProd(shopperId, category, subCate, prodId) { similarProd(shopperId, category, subCate, prodId) {
const This = this; const This = this;
const state = true; const state = true;
console.log(shopperId); // console.log(shopperId);
const prodRef: AngularFirestoreCollection<any> = this.afs.collection(`products`, ref => ref.where('shopperId', '==', shopperId) const prodRef: AngularFirestoreCollection<any> = this.afs.collection(
.where('status', '==', state).where('category', '==', category).where('subCate', '==', subCate).where('prodId', '>', prodId) `products`,
.where('prodId', '<', prodId)); ref =>
prodRef.valueChanges().subscribe((value) => { ref
.where("shopperId", "==", shopperId)
.where("status", "==", state)
.where("category", "==", category)
.where("subCate", "==", subCate)
.where("prodId", ">", prodId)
.where("prodId", "<", prodId)
);
prodRef.valueChanges().subscribe(value => {
this.similar = []; this.similar = [];
const res = value; const res = value;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach(item => {
console.log(item.size); // console.log(item.size);
const prod: Products = { const prod: Products = {
prodId: item.prodId, prodId: item.prodId,
prodName: item.prodName, prodName: item.prodName,
...@@ -170,65 +217,89 @@ export class ProductsService { ...@@ -170,65 +217,89 @@ export class ProductsService {
}; };
this.similar.push(prod); this.similar.push(prod);
}); });
console.log(this.similar); // console.log(this.similar);
} else { } else {
// alert('No Products Found'); // alert('No Products Found');
} }
}); });
} }
public async setProd(item: Products) { public async setProd(item: Products) {
this.selItem = item; this.selItem = item;
} }
public async getFavlist(userId: string) { public async getFavlist(userId: string) {
const favRef: AngularFirestoreDocument<any> = this.afs.collection(`favourite`).doc(userId); const favRef: AngularFirestoreDocument<any> = this.afs
favRef.valueChanges().pipe( .collection(`favourite`)
take(1) // Here you can limit to only emit once, using the take operator .doc(userId);
).subscribe((value) => { favRef
if (value !== undefined) { .valueChanges()
if (Object.keys(value).length > 0) { .pipe(
this.fav = this.service.splitSep(value); take(1) // Here you can limit to only emit once, using the take operator
console.log(this.fav); )
.subscribe(value => {
if (value !== undefined) {
if (Object.keys(value).length > 0) {
this.fav = this.service.splitSep(value);
// console.log(this.fav);
}
// console.log(value);
} }
console.log(value); });
}
});
} }
public async changeFav(index, type) { public async changeFav(index, type) {
console.log(index, type, this.user.uid); // console.log(index, type, this.user.uid);
if (type === 'no') { if (type === "no") {
this.afs.collection('favourite').doc(this.user.uid).valueChanges().pipe( this.afs
take(1) // Here you can limit to only emit once, using the take operator .collection("favourite")
).subscribe((value) => { .doc(this.user.uid)
if (value === undefined) { .valueChanges()
this.afs.collection('favourite').doc(this.user.uid).set({ .pipe(
[index]: true take(1) // Here you can limit to only emit once, using the take operator
}); )
} else { .subscribe(value => {
console.log(value); if (value === undefined) {
value[index] = true; this.afs
console.log(value); .collection("favourite")
this.afs.collection('favourite').doc(this.user.uid).set(value); .doc(this.user.uid)
} .set({
}); [index]: true
});
} else {
// console.log(value);
value[index] = true;
// console.log(value);
this.afs
.collection("favourite")
.doc(this.user.uid)
.set(value);
}
});
} else { } else {
this.afs.collection('favourite').doc(this.user.uid).valueChanges().pipe( this.afs
take(1) // Here you can limit to only emit once, using the take operator .collection("favourite")
).subscribe((value) => { .doc(this.user.uid)
console.log(value); .valueChanges()
if (value !== undefined) { .pipe(
value[index] = undefined; take(1) // Here you can limit to only emit once, using the take operator
Object.keys(value).forEach(key => value[key] === undefined ? delete value[key] : ''); )
console.log(value); .subscribe(value => {
this.afs.collection('favourite').doc(this.user.uid).set(value); // console.log(value);
} else { if (value !== undefined) {
console.log(value); value[index] = undefined;
} Object.keys(value).forEach(key =>
}); value[key] === undefined ? delete value[key] : ""
);
// console.log(value);
this.afs
.collection("favourite")
.doc(this.user.uid)
.set(value);
} else {
// console.log(value);
}
});
} }
} }
} }
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore'; import {
import { Search } from './services/search'; AngularFirestore,
import { database } from 'firebase'; AngularFirestoreCollection
import { take } from 'rxjs/operators'; } from "@angular/fire/firestore";
import { Search } from "./services/search";
import { database } from "firebase";
import { take } from "rxjs/operators";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: "root"
}) })
export class SearchService { export class SearchService {
searchList: Search[] = []; searchList: Search[] = [];
constructor( constructor(public afs: AngularFirestore) {}
public afs: AngularFirestore
) {
}
public async search(inputText: string) { public async search(inputText: string) {
if (inputText === '') { if (inputText === "") {
this.searchList = []; this.searchList = [];
return; return;
} }
const This = this; const This = this;
const state = true; const state = true;
this.searchList = []; this.searchList = [];
// tslint:disable-next-line:max-line-length // tslint:disable-next-line:max-line-length
const orderRef: AngularFirestoreCollection<any> = this.afs.collection('shoppers', ref => ref.where('status', '==', state).orderBy('name').startAt(inputText).endAt(inputText + '\uf8ff').limit(5)); const orderRef: AngularFirestoreCollection<any> = this.afs.collection(
orderRef.valueChanges().subscribe((value) => { "shoppers",
ref =>
ref
.where("status", "==", state)
.orderBy("name")
.startAt(inputText)
.endAt(inputText + "\uf8ff")
.limit(5)
);
orderRef.valueChanges().subscribe(value => {
const res = value; const res = value;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach(item => {
console.log(item); // console.log(item);
const shopper: Search = { const shopper: Search = {
text: item.name, text: item.name,
data: item, data: item,
type: 'shopper' type: "shopper"
}; };
this.searchList.push(shopper); this.searchList.push(shopper);
}); });
...@@ -40,44 +49,57 @@ export class SearchService { ...@@ -40,44 +49,57 @@ export class SearchService {
}); });
// tslint:disable-next-line:max-line-length // tslint:disable-next-line:max-line-length
const prodRef: AngularFirestoreCollection<any> = this.afs.collection('products', ref => ref.where('status', '==', state).orderBy('prodName').startAt(inputText).endAt(inputText + '\uf8ff').limit(5)); const prodRef: AngularFirestoreCollection<any> = this.afs.collection(
prodRef.valueChanges().subscribe((values) => { "products",
const result = values; ref =>
if (result.length > 0) { ref
result.forEach((item) => { .where("status", "==", state)
console.log(item); .orderBy("prodName")
const prod: Search = { .startAt(inputText)
text: item.prodName, .endAt(inputText + "\uf8ff")
data: item, .limit(5)
type: 'product' );
}; prodRef.valueChanges().subscribe(values => {
this.searchList.push(prod); const result = values;
}); if (result.length > 0) {
console.log(this.searchList); result.forEach(item => {
} // console.log(item);
const prod: Search = {
text: item.prodName,
data: item,
type: "product"
};
this.searchList.push(prod);
});
// console.log(this.searchList);
}
}); });
// tslint:disable-next-line:max-line-length // tslint:disable-next-line:max-line-length
const feaRef: AngularFirestoreCollection<any> = this.afs.collection('category', ref => ref.where('status', '==', state).orderBy('catName').startAt(inputText).endAt(inputText + '\uf8ff').limit(5)); const feaRef: AngularFirestoreCollection<any> = this.afs.collection(
feaRef.valueChanges().subscribe((values) => { "category",
const result = values; ref =>
if (result.length > 0) { ref
result.forEach((item) => { .where("status", "==", state)
console.log(item); .orderBy("catName")
const prod: Search = { .startAt(inputText)
text: item.catName, .endAt(inputText + "\uf8ff")
data: item, .limit(5)
type: 'category' );
}; feaRef.valueChanges().subscribe(values => {
this.searchList.push(prod); const result = values;
}); if (result.length > 0) {
console.log(this.searchList); result.forEach(item => {
} // console.log(item);
const prod: Search = {
text: item.catName,
data: item,
type: "category"
};
this.searchList.push(prod);
});
// console.log(this.searchList);
}
}); });
} }
} }
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { Storage } from '@ionic/storage'; import { Storage } from "@ionic/storage";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: "root"
}) })
export class ServiceService { export class ServiceService {
state: boolean; state: boolean;
constructor(public storage: Storage) { constructor(public storage: Storage) {
...@@ -13,20 +12,20 @@ export class ServiceService { ...@@ -13,20 +12,20 @@ export class ServiceService {
} }
public set(settingName: string, value: any) { public set(settingName: string, value: any) {
return this.storage.set(`setting:${ settingName }`, value); return this.storage.set(`setting:${settingName}`, value);
} }
public async get(settingName: string) { public async get(settingName: string) {
return await this.storage.get(`setting:${ settingName }`); return await this.storage.get(`setting:${settingName}`);
} }
public async remove(settingName: string) { public async remove(settingName: string) {
return await this.storage.remove(`setting:${ settingName }`); return await this.storage.remove(`setting:${settingName}`);
} }
public clear() { public clear() {
this.storage.clear().then(() => { this.storage.clear().then(() => {
console.log('all keys cleared'); console.log("all keys cleared");
}); });
} }
...@@ -34,7 +33,7 @@ export class ServiceService { ...@@ -34,7 +33,7 @@ export class ServiceService {
const response = []; const response = [];
for (const key in item) { for (const key in item) {
if (item.hasOwnProperty(key)) { if (item.hasOwnProperty(key)) {
response.push(item[key]); response.push(item[key]);
} }
} }
return response; return response;
...@@ -44,12 +43,9 @@ export class ServiceService { ...@@ -44,12 +43,9 @@ export class ServiceService {
const response = []; const response = [];
for (const key in item) { for (const key in item) {
if (item.hasOwnProperty(key)) { if (item.hasOwnProperty(key)) {
response.push(key); response.push(key);
} }
} }
return response; return response;
} }
} }
export interface Slides {
downloadURL: string;
imageId: string;
path: string;
skuId: string;
}
export interface User { export interface User {
uid: string; uid: string;
emailId: string; emailId: string;
name: string; name: string;
phone: string; phone: string;
phoneVerified: boolean; phoneVerified: boolean;
profilePhoto: string; profilePhoto: string;
emailVerified: boolean; emailVerified: boolean;
status: boolean; status: boolean;
loginType: number; loginType: number;
otp: string; otp: string;
currency: { currency: {
currId: string; currId: string;
currName: string; currName: string;
symbol: string symbol: string;
}; };
} }
export interface Signup { export interface Signup {
name: string; name: string;
emailId: string; emailId: string;
phone: string; phone: string;
password: string; password: string;
dob: any; dob: any;
terms: boolean; terms: boolean;
} }
// Model for Change Details page
export interface UpdateUserDetails {
name: string;
emailId: string;
phone: string;
}
// Model to Update Password
export interface UpdateUserDetails {}
export interface Otp { export interface Otp {
uid: string; uid: string;
otp: number; otp: number;
} }
export interface Address { export interface Address {
addressType: string; addressType: string;
firstAddress: string; firstAddress: string;
secondAddress: string; secondAddress: string;
city: string; city: string;
state: string; state: string;
district: string; district: string;
landmark: string; landmark: string;
area: string; area: string;
zip: string; zip: string;
country: string; country: string;
default: number; default: number;
} }
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { AngularFireAuth } from '@angular/fire/auth'; import { AngularFireAuth } from "@angular/fire/auth";
import { AngularFirestore, AngularFirestoreDocument, AngularFirestoreCollection } from '@angular/fire/firestore'; import {
import { Shopper } from './services/shopper'; AngularFirestore,
import * as firebase from 'firebase'; AngularFirestoreDocument,
AngularFirestoreCollection
} from "@angular/fire/firestore";
import { Shopper } from "./services/shopper";
import * as firebase from "firebase";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: "root"
}) })
export class ShoppersService { export class ShoppersService {
shoppers: Shopper[] = []; shoppers: Shopper[] = [];
activeshoppers: Shopper[] = []; activeshoppers: Shopper[] = [];
nearshoppers: Shopper[] = []; nearshoppers: Shopper[] = [];
constructor( constructor(public afs: AngularFirestore, public afAuth: AngularFireAuth) {
public afs: AngularFirestore,
public afAuth: AngularFireAuth,
) {
this.featuredshopperList(); this.featuredshopperList();
this.getNearBy(10.0159, 76.3419, 10); this.getNearBy(10.0159, 76.3419, 10);
} }
...@@ -22,14 +23,16 @@ export class ShoppersService { ...@@ -22,14 +23,16 @@ export class ShoppersService {
public async shopperList(centerId: string, type: string) { public async shopperList(centerId: string, type: string) {
const This = this; const This = this;
const state = true; const state = true;
const orderRef: AngularFirestoreCollection<any> = this.afs.collection('shoppers', ref => ref.where(type, '==', centerId) const orderRef: AngularFirestoreCollection<any> = this.afs.collection(
.where('status', '==', state)); "shoppers",
orderRef.valueChanges().subscribe((value) => { ref => ref.where(type, "==", centerId).where("status", "==", state)
);
orderRef.valueChanges().subscribe(value => {
this.shoppers = []; this.shoppers = [];
const res = value; const res = value;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach(item => {
console.log(item); // console.log(item);
const shopper: Shopper = { const shopper: Shopper = {
name: item.name, name: item.name,
emailId: item.emailId, emailId: item.emailId,
...@@ -39,7 +42,7 @@ export class ShoppersService { ...@@ -39,7 +42,7 @@ export class ShoppersService {
status: item.status, status: item.status,
address: item.address, address: item.address,
featured: item.featured, featured: item.featured,
featuredImage: item.featuredImage, featuredImage: item.featuredImage,
shopName: item.shopName, shopName: item.shopName,
shopStatus: item.shopStatus, shopStatus: item.shopStatus,
workingHours: item.workingHours, workingHours: item.workingHours,
...@@ -49,7 +52,7 @@ export class ShoppersService { ...@@ -49,7 +52,7 @@ export class ShoppersService {
}; };
this.shoppers.push(shopper); this.shoppers.push(shopper);
}); });
console.log(this.shoppers); // console.log(this.shoppers);
} else { } else {
// alert('No Orders Found'); // alert('No Orders Found');
} }
...@@ -59,14 +62,16 @@ export class ShoppersService { ...@@ -59,14 +62,16 @@ export class ShoppersService {
public async featuredshopperList() { public async featuredshopperList() {
const This = this; const This = this;
const state = true; const state = true;
const orderRef: AngularFirestoreCollection<any> = this.afs.collection('shoppers', ref => ref.where('featured', '==', state) const orderRef: AngularFirestoreCollection<any> = this.afs.collection(
.where('status', '==', state)); "shoppers",
orderRef.valueChanges().subscribe((value) => { ref => ref.where("featured", "==", state).where("status", "==", state)
);
orderRef.valueChanges().subscribe(value => {
this.activeshoppers = []; this.activeshoppers = [];
const res = value; const res = value;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach(item => {
console.log(item); // console.log(item);
const shopper: Shopper = { const shopper: Shopper = {
name: item.name, name: item.name,
emailId: item.emailId, emailId: item.emailId,
...@@ -76,7 +81,7 @@ export class ShoppersService { ...@@ -76,7 +81,7 @@ export class ShoppersService {
status: item.status, status: item.status,
address: item.address, address: item.address,
featured: item.featured, featured: item.featured,
featuredImage: item.featuredImage, featuredImage: item.featuredImage,
shopName: item.shopName, shopName: item.shopName,
shopStatus: item.shopStatus, shopStatus: item.shopStatus,
workingHours: item.workingHours, workingHours: item.workingHours,
...@@ -86,7 +91,7 @@ export class ShoppersService { ...@@ -86,7 +91,7 @@ export class ShoppersService {
}; };
this.activeshoppers.push(shopper); this.activeshoppers.push(shopper);
}); });
console.log(this.activeshoppers); // console.log(this.activeshoppers);
} else { } else {
// alert('No Orders Found'); // alert('No Orders Found');
} }
...@@ -100,22 +105,31 @@ export class ShoppersService { ...@@ -100,22 +105,31 @@ export class ShoppersService {
const lat = 0.0144927536231884; const lat = 0.0144927536231884;
const lon = 0.0181818181818182; const lon = 0.0181818181818182;
const lowerLat = latitude - (lat * distance); const lowerLat = latitude - lat * distance;
const lowerLon = longitude - (lon * distance); const lowerLon = longitude - lon * distance;
const greaterLat = latitude + (lat * distance); const greaterLat = latitude + lat * distance;
const greaterLon = longitude + (lon * distance); const greaterLon = longitude + lon * distance;
const lesserGeopoint = new firebase.firestore.GeoPoint(lowerLat, lowerLon); const lesserGeopoint = new firebase.firestore.GeoPoint(lowerLat, lowerLon);
const greaterGeopoint = new firebase.firestore.GeoPoint(greaterLat, greaterLon); const greaterGeopoint = new firebase.firestore.GeoPoint(
const orderRef: AngularFirestoreCollection<any> = this.afs.collection('shoppers', ref => ref.where('centre.latLng', '>', lesserGeopoint) greaterLat,
.where('centre.latLng', '<', greaterGeopoint).where('status', '==', state)); greaterLon
orderRef.valueChanges().subscribe((value) => { );
const orderRef: AngularFirestoreCollection<any> = this.afs.collection(
"shoppers",
ref =>
ref
.where("centre.latLng", ">", lesserGeopoint)
.where("centre.latLng", "<", greaterGeopoint)
.where("status", "==", state)
);
orderRef.valueChanges().subscribe(value => {
this.nearshoppers = []; this.nearshoppers = [];
const res = value; const res = value;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach(item => {
console.log(item); // console.log(item);
const shopper: Shopper = { const shopper: Shopper = {
name: item.name, name: item.name,
emailId: item.emailId, emailId: item.emailId,
...@@ -125,7 +139,7 @@ export class ShoppersService { ...@@ -125,7 +139,7 @@ export class ShoppersService {
status: item.status, status: item.status,
address: item.address, address: item.address,
featured: item.featured, featured: item.featured,
featuredImage: item.featuredImage, featuredImage: item.featuredImage,
shopName: item.shopName, shopName: item.shopName,
shopStatus: item.shopStatus, shopStatus: item.shopStatus,
workingHours: item.workingHours, workingHours: item.workingHours,
...@@ -135,12 +149,10 @@ export class ShoppersService { ...@@ -135,12 +149,10 @@ export class ShoppersService {
}; };
this.nearshoppers.push(shopper); this.nearshoppers.push(shopper);
}); });
console.log(this.nearshoppers); // console.log(this.nearshoppers);
} else { } else {
// alert('No Orders Found'); // alert('No Orders Found');
} }
}); });
} }
} }
import { Injectable } from "@angular/core";
import { User, UpdateUserDetails, Address } from "./services/user";
import { auth } from "firebase/app";
import { Router, ActivatedRoute } from "@angular/router";
import { AngularFireAuth } from "@angular/fire/auth";
import {
AngularFirestore,
AngularFirestoreDocument,
AngularFirestoreCollection
} from "@angular/fire/firestore";
import { ServiceService } from "./../config/service.service";
import { GooglePlus } from "@ionic-native/google-plus/ngx";
import { take } from "rxjs/operators";
import { from } from "rxjs";
@Injectable({
providedIn: "root"
})
export class UpdateService {
userData: any;
type: number;
userPostData: any;
updateStatus: number;
constructor(
public afs: AngularFirestore,
public afAuth: AngularFireAuth,
private router: Router,
private service: ServiceService
) {
// this.type = 1;
// this.afAuth.authState.subscribe(user => {
// if (user) {
// this.userData = user;
// console.log(this.userData);
// this.service.set("user", JSON.stringify(this.userData));
// if (this.type === 1) {
// this.router.navigateByUrl("home");
// } else {
// this.router.navigateByUrl("verification");
// }
// } else {
// this.service.set("user", null);
// JSON.parse(localStorage.getItem("user"));
// this.router.navigateByUrl("login");
// }
// });
}
updateData(userData: UpdateUserDetails, uid: string) {
this.type = 2;
const postData: UpdateUserDetails = {
phone: userData.phone,
name: userData.name,
emailId: userData.emailId
};
this.userPostData = postData;
this.afs
.collection("customers")
.doc(uid)
.update(postData)
.then(() => {
console.log("success");
this.router.navigateByUrl("profile");
})
.catch(error => {
console.log(error);
});
}
}
import { Injectable } from "@angular/core";
import { AngularFireAuth } from "@angular/fire/auth";
import {
AngularFirestore,
AngularFirestoreDocument,
AngularFirestoreCollection
} from "@angular/fire/firestore";
import * as firebase from "firebase";
import { User } from "./services/user";
@Injectable({
providedIn: "root"
})
// Gets User Details
export class UserService {
users: User;
constructor(public afs: AngularFirestore, public afAuth: AngularFireAuth) {}
public async getUserData(userId: string) {
const This = this;
const state = true;
// Get User Query
const userRef: AngularFirestoreCollection<any> = this.afs.collection(
"customers",
ref => ref.where("uid", "==", userId).where("status", "==", state)
);
userRef.valueChanges().subscribe(value => {
const res = value;
if (res.length > 0) {
const item = res[0];
this.users = {
name: item.name,
emailId: item.emailId,
phone: item.phone,
uid: item.uid,
profilePhoto: item.profilePic,
status: item.status,
phoneVerified: item.phoneVerified,
emailVerified: item.emailVerified,
loginType: 0,
otp: "",
currency: {
currId: "",
currName: "",
symbol: ""
}
};
}
// return this.users;
});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment