Commit 7f716f7d by kevin

Overpage desgin

parent d7f531c7
...@@ -86,8 +86,6 @@ ...@@ -86,8 +86,6 @@
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription"> <edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
<string>Allow to access location</string> <string>Allow to access location</string>
</edit-config> </edit-config>
<engine name="android" spec="^6.1.2" />
<plugin name="com-sarriaroman-photoviewer" spec="^1.1.18" />
<plugin name="com.synconset.imagepicker" spec="^2.1.10"> <plugin name="com.synconset.imagepicker" spec="^2.1.10">
<variable name="PHOTO_LIBRARY_USAGE_DESCRIPTION" value="your usage message" /> <variable name="PHOTO_LIBRARY_USAGE_DESCRIPTION" value="your usage message" />
</plugin> </plugin>
...@@ -106,4 +104,8 @@ ...@@ -106,4 +104,8 @@
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" /> <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova.plugins.diagnostic" spec="^4.0.11" /> <plugin name="cordova.plugins.diagnostic" spec="^4.0.11" />
<plugin name="onesignal-cordova-plugin" spec="^2.3.3" /> <plugin name="onesignal-cordova-plugin" spec="^2.3.3" />
<plugin name="cordova-plugin-camera" spec="^4.0.3" />
<plugin name="com-sarriaroman-photoviewer" spec="^1.2.2" />
<engine name="ios" spec="4.5.5" />
<engine name="android" spec="6.3.0" />
</widget> </widget>
...@@ -121,6 +121,11 @@ ...@@ -121,6 +121,11 @@
"resolved": "https://registry.npmjs.org/@ionic-native/badge/-/badge-4.9.0.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/badge/-/badge-4.9.0.tgz",
"integrity": "sha512-scMvEJXxYonKPyNlRa5okxH/JgG+lcB9P+NcE/XdM34mASOLps0SkKc3KmHNod4hVGRTQXqIJfD8h7Aio+n1zQ==" "integrity": "sha512-scMvEJXxYonKPyNlRa5okxH/JgG+lcB9P+NcE/XdM34mASOLps0SkKc3KmHNod4hVGRTQXqIJfD8h7Aio+n1zQ=="
}, },
"@ionic-native/camera": {
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/@ionic-native/camera/-/camera-4.20.0.tgz",
"integrity": "sha512-WnfQq8RV+7ezOqpCyNx9Xgpy7Y8TZehGLSxZXnCqCbFZ72CpC70Q5AV/eTIRGiKkotx2U6nUopYF+gTj1cunFA=="
},
"@ionic-native/core": { "@ionic-native/core": {
"version": "4.5.3", "version": "4.5.3",
"resolved": "https://registry.npmjs.org/@ionic-native/core/-/core-4.5.3.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/core/-/core-4.5.3.tgz",
...@@ -167,9 +172,9 @@ ...@@ -167,9 +172,9 @@
"integrity": "sha512-HacmXDQLqh5Mfuzk6ntw+HReYjvqNBNDRIzzrA/keCAVZUuOdc1pbchjNtenxrv5L2WN1GeAVh3akbTReADkyA==" "integrity": "sha512-HacmXDQLqh5Mfuzk6ntw+HReYjvqNBNDRIzzrA/keCAVZUuOdc1pbchjNtenxrv5L2WN1GeAVh3akbTReADkyA=="
}, },
"@ionic-native/photo-viewer": { "@ionic-native/photo-viewer": {
"version": "4.18.0", "version": "4.20.0",
"resolved": "https://registry.npmjs.org/@ionic-native/photo-viewer/-/photo-viewer-4.18.0.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/photo-viewer/-/photo-viewer-4.20.0.tgz",
"integrity": "sha512-boj9XOE6kzyarXsOzrOa7+Leeaz4VMLUihmwbPLwpFh2D9xQ8zFA6vgnnV/PkzlAicQ12TM7I/4F/4bW/5LSfg==" "integrity": "sha512-XpBTxn80okTuFmBlUpA2b2qY0rIE7/jUMrjr7qpTTGcXNfsOZ8OwTnv7WAt6VV6ts8KZG+Hvs/puoH+JwmUX0g=="
}, },
"@ionic-native/splash-screen": { "@ionic-native/splash-screen": {
"version": "4.5.3", "version": "4.5.3",
...@@ -1209,6 +1214,14 @@ ...@@ -1209,6 +1214,14 @@
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
}, },
"android-versions": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.4.0.tgz",
"integrity": "sha512-GnomfYsBq+nZh3c3UH/4r9Jt6FuTxdhUJbeHIdYOH5xBhQ8I0ZzC2/RM5IFFIjrzuNWSHb8JWP1lPK0/a26jrg==",
"requires": {
"semver": "^5.4.1"
}
},
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
...@@ -1946,9 +1959,9 @@ ...@@ -1946,9 +1959,9 @@
"integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==" "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg=="
}, },
"com-sarriaroman-photoviewer": { "com-sarriaroman-photoviewer": {
"version": "1.1.18", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/com-sarriaroman-photoviewer/-/com-sarriaroman-photoviewer-1.1.18.tgz", "resolved": "https://registry.npmjs.org/com-sarriaroman-photoviewer/-/com-sarriaroman-photoviewer-1.2.2.tgz",
"integrity": "sha512-ExogN6XpvsX+uthA7ll3jpNNts/rb3qksT9yRrYFkFTvg9w7PzoLkRw0RGU+B+q19qBlN7Fs7crUT9lNtGrueA==" "integrity": "sha512-O+zAhzIBEBlpJfEebzP8RiO+PkZ3ZKKHTYlm2xNGBd8UcECWHOSD35tbAsr/gZXusTd6aS4sEKPrBYLyXN7y5Q=="
}, },
"com.synconset.imagepicker": { "com.synconset.imagepicker": {
"version": "2.1.10", "version": "2.1.10",
...@@ -2050,12 +2063,13 @@ ...@@ -2050,12 +2063,13 @@
"dev": true "dev": true
}, },
"cordova-android": { "cordova-android": {
"version": "6.1.2", "version": "6.3.0",
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-6.1.2.tgz", "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-6.3.0.tgz",
"integrity": "sha1-lgZzmhFPCjf0kFPjZMlthPtGK/g=", "integrity": "sha1-2lQYQz0lx1pZd7QoJEu+Q30BKNI=",
"requires": { "requires": {
"cordova-common": "^1.5.0", "android-versions": "^1.2.0",
"elementtree": "^0.1.6", "cordova-common": "^2.1.0",
"elementtree": "0.1.6",
"nopt": "^3.0.1", "nopt": "^3.0.1",
"properties-parser": "^0.2.3", "properties-parser": "^0.2.3",
"q": "^1.4.1", "q": "^1.4.1",
...@@ -2063,7 +2077,7 @@ ...@@ -2063,7 +2077,7 @@
}, },
"dependencies": { "dependencies": {
"abbrev": { "abbrev": {
"version": "1.0.9", "version": "1.1.0",
"bundled": true "bundled": true
}, },
"ansi": { "ansi": {
...@@ -2071,7 +2085,7 @@ ...@@ -2071,7 +2085,7 @@
"bundled": true "bundled": true
}, },
"balanced-match": { "balanced-match": {
"version": "0.4.2", "version": "1.0.0",
"bundled": true "bundled": true
}, },
"base64-js": { "base64-js": {
...@@ -2079,7 +2093,7 @@ ...@@ -2079,7 +2093,7 @@
"bundled": true "bundled": true
}, },
"big-integer": { "big-integer": {
"version": "1.6.16", "version": "1.6.25",
"bundled": true "bundled": true
}, },
"bplist-parser": { "bplist-parser": {
...@@ -2090,10 +2104,10 @@ ...@@ -2090,10 +2104,10 @@
} }
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.6", "version": "1.1.8",
"bundled": true, "bundled": true,
"requires": { "requires": {
"balanced-match": "^0.4.1", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
} }
}, },
...@@ -2102,13 +2116,13 @@ ...@@ -2102,13 +2116,13 @@
"bundled": true "bundled": true
}, },
"cordova-common": { "cordova-common": {
"version": "1.5.1", "version": "2.1.0",
"bundled": true, "bundled": true,
"requires": { "requires": {
"ansi": "^0.3.1", "ansi": "^0.3.1",
"bplist-parser": "^0.1.0", "bplist-parser": "^0.1.0",
"cordova-registry-mapper": "^1.1.8", "cordova-registry-mapper": "^1.1.8",
"elementtree": "^0.1.6", "elementtree": "0.1.6",
"glob": "^5.0.13", "glob": "^5.0.13",
"minimatch": "^3.0.0", "minimatch": "^3.0.0",
"osenv": "^0.1.3", "osenv": "^0.1.3",
...@@ -2159,10 +2173,10 @@ ...@@ -2159,10 +2173,10 @@
"bundled": true "bundled": true
}, },
"minimatch": { "minimatch": {
"version": "3.0.3", "version": "3.0.4",
"bundled": true, "bundled": true,
"requires": { "requires": {
"brace-expansion": "^1.0.0" "brace-expansion": "^1.1.7"
} }
}, },
"nopt": { "nopt": {
...@@ -2188,7 +2202,7 @@ ...@@ -2188,7 +2202,7 @@
"bundled": true "bundled": true
}, },
"osenv": { "osenv": {
"version": "0.1.3", "version": "0.1.4",
"bundled": true, "bundled": true,
"requires": { "requires": {
"os-homedir": "^1.0.0", "os-homedir": "^1.0.0",
...@@ -2214,7 +2228,7 @@ ...@@ -2214,7 +2228,7 @@
"bundled": true "bundled": true
}, },
"q": { "q": {
"version": "1.4.1", "version": "1.5.0",
"bundled": true "bundled": true
}, },
"sax": { "sax": {
...@@ -2222,7 +2236,7 @@ ...@@ -2222,7 +2236,7 @@
"bundled": true "bundled": true
}, },
"semver": { "semver": {
"version": "5.3.0", "version": "5.4.1",
"bundled": true "bundled": true
}, },
"shelljs": { "shelljs": {
...@@ -2253,15 +2267,314 @@ ...@@ -2253,15 +2267,314 @@
} }
}, },
"xmldom": { "xmldom": {
"version": "0.1.22", "version": "0.1.27",
"bundled": true
}
}
},
"cordova-ios": {
"version": "4.5.5",
"resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-4.5.5.tgz",
"integrity": "sha512-3+30m2dZ2yii7kg+H7cgpdpkXpMj54zoX5imjGGG4Z7dPXKmalTLc/9rLq+Iaa+Q1BqyOrUFaHopWOODRU6vCg==",
"requires": {
"abbrev": "*",
"ansi": "*",
"balanced-match": "*",
"base64-js": "1.2.0",
"big-integer": "*",
"bplist-creator": "*",
"bplist-parser": "*",
"brace-expansion": "*",
"concat-map": "*",
"cordova-common": "2.2.5",
"cordova-registry-mapper": "*",
"elementtree": "0.1.6",
"glob": "5.0.15",
"inflight": "*",
"inherits": "*",
"ios-sim": "6.1.3",
"minimatch": "*",
"nopt": "3.0.6",
"once": "*",
"path-is-absolute": "*",
"plist": "2.1.0",
"q": "1.5.1",
"sax": "0.3.5",
"shelljs": "0.5.3",
"simctl": "*",
"simple-plist": "0.2.1",
"stream-buffers": "2.2.0",
"tail": "0.4.0",
"underscore": "*",
"unorm": "*",
"uuid": "3.0.1",
"wrappy": "*",
"xcode": "0.9.3",
"xml-escape": "1.1.0",
"xmlbuilder": "8.2.2",
"xmldom": "*"
},
"dependencies": {
"abbrev": {
"version": "1.1.1",
"bundled": true
},
"ansi": {
"version": "0.3.1",
"bundled": true
},
"balanced-match": {
"version": "1.0.0",
"bundled": true
},
"base64-js": {
"version": "1.2.0",
"bundled": true
},
"big-integer": {
"version": "1.6.32",
"bundled": true
},
"bplist-creator": {
"version": "0.0.7",
"bundled": true,
"requires": {
"stream-buffers": "~2.2.0"
}
},
"bplist-parser": {
"version": "0.1.1",
"bundled": true,
"requires": {
"big-integer": "^1.6.7"
}
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"concat-map": {
"version": "0.0.1",
"bundled": true
},
"cordova-common": {
"version": "2.2.5",
"bundled": true,
"requires": {
"ansi": "^0.3.1",
"bplist-parser": "^0.1.0",
"cordova-registry-mapper": "^1.1.8",
"elementtree": "0.1.6",
"glob": "^5.0.13",
"minimatch": "^3.0.0",
"plist": "^2.1.0",
"q": "^1.4.1",
"shelljs": "^0.5.3",
"underscore": "^1.8.3",
"unorm": "^1.3.3"
}
},
"cordova-registry-mapper": {
"version": "1.1.15",
"bundled": true
},
"elementtree": {
"version": "0.1.6",
"bundled": true,
"requires": {
"sax": "0.3.5"
}
},
"glob": {
"version": "5.0.15",
"bundled": true,
"requires": {
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "2 || 3",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"inflight": {
"version": "1.0.6",
"bundled": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.3",
"bundled": true
},
"ios-sim": {
"version": "6.1.3",
"bundled": true,
"requires": {
"bplist-parser": "^0.0.6",
"nopt": "1.0.9",
"plist": "^2.1.0",
"simctl": "^1.1.1"
},
"dependencies": {
"bplist-parser": {
"version": "0.0.6",
"bundled": true
},
"nopt": {
"version": "1.0.9",
"bundled": true,
"requires": {
"abbrev": "1"
}
}
}
},
"minimatch": {
"version": "3.0.4",
"bundled": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"nopt": {
"version": "3.0.6",
"bundled": true,
"requires": {
"abbrev": "1"
}
},
"once": {
"version": "1.4.0",
"bundled": true,
"requires": {
"wrappy": "1"
}
},
"path-is-absolute": {
"version": "1.0.1",
"bundled": true
},
"plist": {
"version": "2.1.0",
"bundled": true,
"requires": {
"base64-js": "1.2.0",
"xmlbuilder": "8.2.2",
"xmldom": "0.1.x"
}
},
"q": {
"version": "1.5.1",
"bundled": true
},
"sax": {
"version": "0.3.5",
"bundled": true
},
"shelljs": {
"version": "0.5.3",
"bundled": true
},
"simctl": {
"version": "1.1.1",
"bundled": true,
"requires": {
"shelljs": "^0.2.6",
"tail": "^0.4.0"
},
"dependencies": {
"shelljs": {
"version": "0.2.6",
"bundled": true
}
}
},
"simple-plist": {
"version": "0.2.1",
"bundled": true,
"requires": {
"bplist-creator": "0.0.7",
"bplist-parser": "0.1.1",
"plist": "2.0.1"
},
"dependencies": {
"base64-js": {
"version": "1.1.2",
"bundled": true
},
"plist": {
"version": "2.0.1",
"bundled": true,
"requires": {
"base64-js": "1.1.2",
"xmlbuilder": "8.2.2",
"xmldom": "0.1.x"
}
}
}
},
"stream-buffers": {
"version": "2.2.0",
"bundled": true
},
"tail": {
"version": "0.4.0",
"bundled": true
},
"underscore": {
"version": "1.9.1",
"bundled": true
},
"unorm": {
"version": "1.4.1",
"bundled": true
},
"uuid": {
"version": "3.0.1",
"bundled": true
},
"wrappy": {
"version": "1.0.2",
"bundled": true
},
"xcode": {
"version": "0.9.3",
"bundled": true,
"requires": {
"pegjs": "^0.10.0",
"simple-plist": "^0.2.1",
"uuid": "3.0.1"
}
},
"xml-escape": {
"version": "1.1.0",
"bundled": true
},
"xmlbuilder": {
"version": "8.2.2",
"bundled": true
},
"xmldom": {
"version": "0.1.27",
"bundled": true "bundled": true
} }
} }
}, },
"cordova-plugin-badge": { "cordova-plugin-badge": {
"version": "0.8.7", "version": "0.8.8",
"resolved": "https://registry.npmjs.org/cordova-plugin-badge/-/cordova-plugin-badge-0.8.7.tgz", "resolved": "https://registry.npmjs.org/cordova-plugin-badge/-/cordova-plugin-badge-0.8.8.tgz",
"integrity": "sha512-s+s4yusKdeJ4sMPhQs4zR3lR2UuROzSy14GFAp00pTHPiBfCtxeINSUYAZYnpuO3RGx6PPlVCwSJpVG0IdM58g==" "integrity": "sha512-RhIBtd5xhD/iLnxjt35jvOae28oNW/wtMZBOmQR3Rf0y4wirvA1bpAZEhBoFqL+rZGhsd6ddOdQXdex1T0DRyQ=="
},
"cordova-plugin-camera": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/cordova-plugin-camera/-/cordova-plugin-camera-4.0.3.tgz",
"integrity": "sha1-c3Olk4MYyGzP2E43E+I4LRD+B2s="
}, },
"cordova-plugin-compat": { "cordova-plugin-compat": {
"version": "1.2.0", "version": "1.2.0",
...@@ -2304,9 +2617,9 @@ ...@@ -2304,9 +2617,9 @@
"integrity": "sha1-6QQh9DDGq3bUCSI/Jfzvu7zhdpA=" "integrity": "sha1-6QQh9DDGq3bUCSI/Jfzvu7zhdpA="
}, },
"cordova-plugin-request-location-accuracy": { "cordova-plugin-request-location-accuracy": {
"version": "2.2.3", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-request-location-accuracy/-/cordova-plugin-request-location-accuracy-2.2.3.tgz", "resolved": "https://registry.npmjs.org/cordova-plugin-request-location-accuracy/-/cordova-plugin-request-location-accuracy-2.3.0.tgz",
"integrity": "sha512-cwcG+4sHIU/Vfe1mvEtXh5hfo4k8OEdHo1Rdc9GU0YU/5J/umsBQdHfuBJ7hez59N7lRoUKpKhLhcY8MPBz9Fg==" "integrity": "sha512-Rgr3DnRC8PUQyxmsOs76KxvDJB28MoCoYFfceiGn9Nzwsg6nAJmAwEtrYzm283x1cDhBPvzkZ6lzuldTkmnWjA=="
}, },
"cordova-plugin-splashscreen": { "cordova-plugin-splashscreen": {
"version": "5.0.2", "version": "5.0.2",
...@@ -3185,7 +3498,8 @@ ...@@ -3185,7 +3498,8 @@
}, },
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true "bundled": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -3211,7 +3525,7 @@ ...@@ -3211,7 +3525,7 @@
"bundled": true, "bundled": true,
"optional": true, "optional": true,
"requires": { "requires": {
"balanced-match": "1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
} }
}, },
...@@ -3222,7 +3536,8 @@ ...@@ -3222,7 +3536,8 @@
}, },
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true "bundled": true,
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
...@@ -3231,7 +3546,8 @@ ...@@ -3231,7 +3546,8 @@
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true "bundled": true,
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -3312,7 +3628,7 @@ ...@@ -3312,7 +3628,7 @@
"bundled": true, "bundled": true,
"optional": true, "optional": true,
"requires": { "requires": {
"safer-buffer": "2.1.2" "safer-buffer": "^2.1.0"
} }
}, },
"ignore-walk": { "ignore-walk": {
...@@ -3320,7 +3636,7 @@ ...@@ -3320,7 +3636,7 @@
"bundled": true, "bundled": true,
"optional": true, "optional": true,
"requires": { "requires": {
"minimatch": "3.0.4" "minimatch": "^3.0.4"
} }
}, },
"inflight": { "inflight": {
...@@ -3334,7 +3650,8 @@ ...@@ -3334,7 +3650,8 @@
}, },
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true "bundled": true,
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -3344,8 +3661,9 @@ ...@@ -3344,8 +3661,9 @@
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "1.0.1" "number-is-nan": "^1.0.0"
} }
}, },
"isarray": { "isarray": {
...@@ -3358,7 +3676,7 @@ ...@@ -3358,7 +3676,7 @@
"bundled": true, "bundled": true,
"optional": true, "optional": true,
"requires": { "requires": {
"brace-expansion": "1.1.11" "brace-expansion": "^1.1.7"
} }
}, },
"minimist": { "minimist": {
...@@ -3369,6 +3687,7 @@ ...@@ -3369,6 +3687,7 @@
"minipass": { "minipass": {
"version": "2.2.4", "version": "2.2.4",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.1", "safe-buffer": "^5.1.1",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -3385,6 +3704,7 @@ ...@@ -3385,6 +3704,7 @@
"mkdirp": { "mkdirp": {
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -3399,9 +3719,9 @@ ...@@ -3399,9 +3719,9 @@
"bundled": true, "bundled": true,
"optional": true, "optional": true,
"requires": { "requires": {
"debug": "2.6.9", "debug": "^2.1.2",
"iconv-lite": "0.4.21", "iconv-lite": "^0.4.4",
"sax": "1.2.4" "sax": "^1.2.4"
} }
}, },
"node-pre-gyp": { "node-pre-gyp": {
...@@ -3426,8 +3746,8 @@ ...@@ -3426,8 +3746,8 @@
"bundled": true, "bundled": true,
"optional": true, "optional": true,
"requires": { "requires": {
"abbrev": "1.1.1", "abbrev": "1",
"osenv": "0.1.5" "osenv": "^0.1.4"
} }
}, },
"npm-bundled": { "npm-bundled": {
...@@ -3440,8 +3760,8 @@ ...@@ -3440,8 +3760,8 @@
"bundled": true, "bundled": true,
"optional": true, "optional": true,
"requires": { "requires": {
"ignore-walk": "3.0.1", "ignore-walk": "^3.0.1",
"npm-bundled": "1.0.3" "npm-bundled": "^1.0.1"
} }
}, },
"npmlog": { "npmlog": {
...@@ -3468,6 +3788,7 @@ ...@@ -3468,6 +3788,7 @@
"once": { "once": {
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -3487,8 +3808,8 @@ ...@@ -3487,8 +3808,8 @@
"bundled": true, "bundled": true,
"optional": true, "optional": true,
"requires": { "requires": {
"os-homedir": "1.0.2", "os-homedir": "^1.0.0",
"os-tmpdir": "1.0.2" "os-tmpdir": "^1.0.0"
} }
}, },
"path-is-absolute": { "path-is-absolute": {
...@@ -3543,7 +3864,8 @@ ...@@ -3543,7 +3864,8 @@
}, },
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true "bundled": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -3573,6 +3895,7 @@ ...@@ -3573,6 +3895,7 @@
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -3590,6 +3913,7 @@ ...@@ -3590,6 +3913,7 @@
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -3628,11 +3952,13 @@ ...@@ -3628,11 +3952,13 @@
}, },
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true "bundled": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true "bundled": true,
"optional": true
} }
} }
}, },
...@@ -5279,6 +5605,11 @@ ...@@ -5279,6 +5605,11 @@
"sha.js": "^2.4.8" "sha.js": "^2.4.8"
} }
}, },
"pegjs": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz",
"integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0="
},
"performance-now": { "performance-now": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
...@@ -6140,8 +6471,7 @@ ...@@ -6140,8 +6471,7 @@
"semver": { "semver": {
"version": "5.7.0", "version": "5.7.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA=="
"dev": true
}, },
"send": { "send": {
"version": "0.17.1", "version": "0.17.1",
...@@ -7522,12 +7852,14 @@ ...@@ -7522,12 +7852,14 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -7547,7 +7879,8 @@ ...@@ -7547,7 +7879,8 @@
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
"@angular/platform-browser": "5.2.9", "@angular/platform-browser": "5.2.9",
"@angular/platform-browser-dynamic": "5.2.9", "@angular/platform-browser-dynamic": "5.2.9",
"@ionic-native/badge": "^4.9.0", "@ionic-native/badge": "^4.9.0",
"@ionic-native/camera": "^4.20.0",
"@ionic-native/core": "4.5.3", "@ionic-native/core": "4.5.3",
"@ionic-native/diagnostic": "^4.6.0", "@ionic-native/diagnostic": "^4.6.0",
"@ionic-native/file": "^4.7.0", "@ionic-native/file": "^4.7.0",
...@@ -31,31 +32,33 @@ ...@@ -31,31 +32,33 @@
"@ionic-native/location-accuracy": "^4.14.0", "@ionic-native/location-accuracy": "^4.14.0",
"@ionic-native/network": "^4.7.0", "@ionic-native/network": "^4.7.0",
"@ionic-native/onesignal": "^4.7.0", "@ionic-native/onesignal": "^4.7.0",
"@ionic-native/photo-viewer": "^4.18.0", "@ionic-native/photo-viewer": "^4.20.0",
"@ionic-native/splash-screen": "4.5.3", "@ionic-native/splash-screen": "4.5.3",
"@ionic-native/status-bar": "4.5.3", "@ionic-native/status-bar": "4.5.3",
"@ionic/storage": "2.1.3", "@ionic/storage": "2.1.3",
"com-sarriaroman-photoviewer": "^1.1.18", "com-sarriaroman-photoviewer": "^1.2.2",
"com.synconset.imagepicker": "^2.1.10", "com.synconset.imagepicker": "^2.1.10",
"cordova-android": "^6.1.2", "cordova-android": "6.3.0",
"cordova-plugin-badge": "^0.8.7", "cordova-ios": "4.5.5",
"cordova-plugin-compat": "^1.0.0", "cordova-plugin-badge": "^0.8.8",
"cordova-plugin-device": "^2.0.1", "cordova-plugin-camera": "^4.0.3",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-file": "^6.0.1", "cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-transfer": "^1.7.1", "cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-geolocation": "^2.4.3", "cordova-plugin-geolocation": "^2.4.3",
"cordova-plugin-ionic-keyboard": "^2.0.5", "cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^1.1.16", "cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-network-information": "^2.0.1", "cordova-plugin-network-information": "^2.0.1",
"cordova-plugin-request-location-accuracy": "^2.2.3", "cordova-plugin-request-location-accuracy": "^2.3.0",
"cordova-plugin-splashscreen": "^5.0.2", "cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-whitelist": "^1.3.3", "cordova-plugin-whitelist": "^1.3.3",
"cordova.plugins.diagnostic": "^4.0.11", "cordova.plugins.diagnostic": "^4.0.12",
"ionic-angular": "3.9.2", "ionic-angular": "3.9.2",
"ionic-tooltips": "^2.0.1", "ionic-tooltips": "^2.0.1",
"ionic2-rating": "^1.2.2", "ionic2-rating": "^1.2.2",
"ionicons": "3.0.0", "ionicons": "3.0.0",
"onesignal-cordova-plugin": "^2.3.3", "onesignal-cordova-plugin": "^2.4.7",
"rxjs": "5.5.7", "rxjs": "5.5.7",
"sw-toolbox": "3.6.0", "sw-toolbox": "3.6.0",
"zone.js": "0.8.20" "zone.js": "0.8.20"
...@@ -67,6 +70,7 @@ ...@@ -67,6 +70,7 @@
"description": "An Ionic project", "description": "An Ionic project",
"cordova": { "cordova": {
"platforms": [ "platforms": [
"ios",
"android" "android"
], ],
"plugins": { "plugins": {
...@@ -75,7 +79,9 @@ ...@@ -75,7 +79,9 @@
"cordova-plugin-geolocation": { "cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": "To locate you" "GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
}, },
"cordova-plugin-request-location-accuracy": {}, "cordova-plugin-request-location-accuracy": {
"PLAY_SERVICES_LOCATION_VERSION": "16.+"
},
"com-sarriaroman-photoviewer": {}, "com-sarriaroman-photoviewer": {},
"com.synconset.imagepicker": { "com.synconset.imagepicker": {
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "your usage message" "PHOTO_LIBRARY_USAGE_DESCRIPTION": "your usage message"
...@@ -87,8 +93,11 @@ ...@@ -87,8 +93,11 @@
"cordova-plugin-ionic-webview": {}, "cordova-plugin-ionic-webview": {},
"cordova-plugin-splashscreen": {}, "cordova-plugin-splashscreen": {},
"cordova-plugin-whitelist": {}, "cordova-plugin-whitelist": {},
"cordova.plugins.diagnostic": {}, "cordova.plugins.diagnostic": {
"onesignal-cordova-plugin": {} "ANDROID_SUPPORT_VERSION": "28.+"
},
"onesignal-cordova-plugin": {},
"cordova-plugin-camera": {}
} }
} }
} }
\ No newline at end of file
...@@ -14,12 +14,14 @@ import { Badge } from '@ionic-native/badge'; ...@@ -14,12 +14,14 @@ import { Badge } from '@ionic-native/badge';
templateUrl: 'app.html' templateUrl: 'app.html'
}) })
export class MyApp { export class MyApp {
@ViewChild(Nav) nav: Nav; @ViewChild(Nav) nav: Nav;
rootPage:any = 'LandingPage'; rootPage:any = 'LandingPage';
user_data:any; user_data:any;
device_id:any; device_id:any;
toast:any; toast:any;
notify:any; notify:any;
getprofile_data:any;
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen,public events:Events,public storage:Storage, private permission: PermissionsService,private geolocation: Geolocation,private oneSignal: OneSignal,private network: Network, private toastCtrl: ToastController, private myservice: Myservice, private ionicApp: IonicApp, private alertCtrl: AlertController,private badge: Badge) { constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen,public events:Events,public storage:Storage, private permission: PermissionsService,private geolocation: Geolocation,private oneSignal: OneSignal,private network: Network, private toastCtrl: ToastController, private myservice: Myservice, private ionicApp: IonicApp, private alertCtrl: AlertController,private badge: Badge) {
...@@ -187,6 +189,7 @@ this.events.publish('user:notifications', ''); ...@@ -187,6 +189,7 @@ this.events.publish('user:notifications', '');
this.storage.get('user_data').then((user_data) => { this.storage.get('user_data').then((user_data) => {
if(user_data){ if(user_data){
this.user_data=user_data; this.user_data=user_data;
this.profile(user_data.id)
// this.myservice.get_notifications(this.user_data.id); // this.myservice.get_notifications(this.user_data.id);
} }
...@@ -235,6 +238,15 @@ this.events.publish('user:notifications', ''); ...@@ -235,6 +238,15 @@ this.events.publish('user:notifications', '');
}) })
} }
profile(id){
this.myservice.show_loader();
this.myservice.load_get("get_profile/id/"+id).subscribe(response => {
this.myservice.hide_loader();
if(response.status="success") {
this.getprofile_data = response.result;
}
});
}
confirmExitApp(){ confirmExitApp(){
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="fm_sidemenu_profile_pic"> <div class="fm_sidemenu_profile_pic">
<div *ngIf="user_data" (click)="edit_profile()" menuClose class="edit"></div> <div *ngIf="user_data" (click)="edit_profile()" menuClose class="edit"></div>
<div *ngIf="user_data" class="fm_sidemenu_profile_pic_inner"> <div *ngIf="user_data" class="fm_sidemenu_profile_pic_inner">
<img *ngIf="user_data.profile_pic" [src]="user_data.profile_pic" > <img *ngIf="getprofile_data" [src]="getprofile_data.profile_pic" >
</div> </div>
</div> </div>
<h5 *ngIf="user_data" >{{user_data.first_name}}</h5> <h5 *ngIf="user_data" >{{user_data.first_name}}</h5>
......
...@@ -20,7 +20,8 @@ import { TooltipsModule } from 'ionic-tooltips'; ...@@ -20,7 +20,8 @@ import { TooltipsModule } from 'ionic-tooltips';
import { Badge } from '@ionic-native/badge'; import { Badge } from '@ionic-native/badge';
import { LocationAccuracy } from '@ionic-native/location-accuracy'; import { LocationAccuracy } from '@ionic-native/location-accuracy';
import { PhotoViewer } from '@ionic-native/photo-viewer'; import { PhotoViewer } from '@ionic-native/photo-viewer';
import { Camera, CameraOptions } from '@ionic-native/camera';
import { HttpClientModule} from '@angular/common/http';
@NgModule({ @NgModule({
declarations: [ declarations: [
MyApp MyApp
...@@ -28,6 +29,7 @@ import { PhotoViewer } from '@ionic-native/photo-viewer'; ...@@ -28,6 +29,7 @@ import { PhotoViewer } from '@ionic-native/photo-viewer';
imports: [ imports: [
BrowserModule, BrowserModule,
HttpModule, HttpModule,
HttpClientModule,
IonicModule.forRoot(MyApp,{tabsPlacement:"bottom"}), IonicModule.forRoot(MyApp,{tabsPlacement:"bottom"}),
IonicStorageModule.forRoot(), IonicStorageModule.forRoot(),
Ionic2RatingModule // Put ionic2-rating module here Ionic2RatingModule // Put ionic2-rating module here
...@@ -52,6 +54,7 @@ import { PhotoViewer } from '@ionic-native/photo-viewer'; ...@@ -52,6 +54,7 @@ import { PhotoViewer } from '@ionic-native/photo-viewer';
PhotoViewer, PhotoViewer,
Badge, Badge,
LocationAccuracy, LocationAccuracy,
Camera,
{provide: ErrorHandler, useClass: IonicErrorHandler} {provide: ErrorHandler, useClass: IonicErrorHandler}
] ]
}) })
......
...@@ -6,21 +6,22 @@ ...@@ -6,21 +6,22 @@
Profile Profile
</div> </div>
</ion-header> </ion-header>
<ion-content> <ion-content *ngIf="getprofile_data">
<div class="fm_common_wrapper"> <div class="fm_common_wrapper">
<form [formGroup]="editProform" (ngSubmit)="edit_profile()"> <form [formGroup]="editProform" (ngSubmit)="edit_profile()">
<div class="fm_banner"> <div class="fm_banner">
<div class="fm_banner_circle" (click)="uploadPicture()"> <div class="fm_banner_circle" >
<img src="assets/imgs/fm_photo.png" *ngIf="!profile_pic"> <img src="assets/imgs/fm_photo.png" *ngIf="!profile_pic">
<img [src]="profile_pic" *ngIf="profile_pic" > <img [src]="getprofile_data.profile_pic" *ngIf="profile_pic" >
<input type="file" accept="image/*" (change)="uploadprofilePicture($event)">
</div> </div>
<div class="fm_border"> <div class="fm_border">
</div> </div>
</div> </div>
<h3>About You</h3> <h3>About You</h3>
<ion-list> <ion-list *ngIf="result">
<ion-item> <ion-item>
<ion-input type="text" formControlName="first_name" placeholder="First Name"></ion-input> <ion-input type="text" formControlName="first_name" placeholder="First Name"></ion-input>
</ion-item> </ion-item>
...@@ -86,19 +87,21 @@ ...@@ -86,19 +87,21 @@
<h5>Vehicle Paper</h5> <h5>Vehicle Paper</h5>
<div class="fm_add_picture" > <div class="fm_add_picture" >
<li> <li>
<div class="inside_image" *ngIf="vehicle_pic" > <div>
<img (click)="open_img(vehicle_pic['1'])" [src]="vehicle_pic['1']" *ngIf="vehicle_pic['1']" > <div class="inside_image" >
<div class="edit" (click)="uploadvehicleimg('1')"> <img [src]="getprofile_data.vehicle_picture1" >
<ion-icon ios="ios-create" md="md-create"></ion-icon>
</div> </div>
<input type="file" accept="image/*" (change)="fileChange1($event)">
</div> </div>
</li> </li>
<li> <li>
<div class="inside_image" *ngIf="vehicle_pic" > <div>
<img (click)="open_img(vehicle_pic['2'])" [src]="vehicle_pic['2']" *ngIf="vehicle_pic['2']" > <div class="inside_image" >
<div class="edit" (click)="uploadvehicleimg('2')"> <img [src]="getprofile_data.vehicle_picture2" >
<ion-icon ios="ios-create" md="md-create"></ion-icon> <br>
</div> </div>
<input type="file" accept="image/*" (change)="fileChange2($event)">
</div> </div>
</li> </li>
</div> </div>
......
...@@ -6,7 +6,8 @@ import {Myservice} from '../../providers/myservice'; ...@@ -6,7 +6,8 @@ import {Myservice} from '../../providers/myservice';
import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer'; import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer';
import { File } from '@ionic-native/file'; import { File } from '@ionic-native/file';
import { ImagePicker } from '@ionic-native/image-picker'; import { ImagePicker } from '@ionic-native/image-picker';
import { PhotoViewer } from '@ionic-native/photo-viewer';
import { Geolocation } from '@ionic-native/geolocation';
declare var require: any; declare var require: any;
declare var google: any; declare var google: any;
...@@ -16,6 +17,12 @@ declare var google: any; ...@@ -16,6 +17,12 @@ declare var google: any;
templateUrl: 'addcar.html', templateUrl: 'addcar.html',
}) })
export class AddcarPage { export class AddcarPage {
getprofile_data:any;
lat:any;
lng:any;
formdata = new FormData();
vehicle_picture1:any;
result:any;
services:any; services:any;
location={'lat':'','lng':''}; location={'lat':'','lng':''};
citie: any; citie: any;
...@@ -29,7 +36,7 @@ export class AddcarPage { ...@@ -29,7 +36,7 @@ export class AddcarPage {
base64vehicle =[]; base64vehicle =[];
vehicle_pic =[]; vehicle_pic =[];
constructor(public navCtrl: NavController, public navParams: NavParams,public storage:Storage, private myservice: Myservice, private formBuilder: FormBuilder,private transfer: FileTransfer, private file: File, private imagePicker: ImagePicker, public events: Events,public modalCtrl: ModalController,private photoViewer: PhotoViewer) { constructor(public geolocation: Geolocation ,public navCtrl: NavController, public navParams: NavParams,public storage:Storage, private myservice: Myservice, private formBuilder: FormBuilder,private transfer: FileTransfer, private file: File, private imagePicker: ImagePicker, public events: Events,public modalCtrl: ModalController) {
this.editProform = this.formBuilder.group({ this.editProform = this.formBuilder.group({
first_name:['', Validators.compose([Validators.maxLength(30), Validators.required])], first_name:['', Validators.compose([Validators.maxLength(30), Validators.required])],
last_name: ['', Validators.compose([Validators.maxLength(30), Validators.required])], last_name: ['', Validators.compose([Validators.maxLength(30), Validators.required])],
...@@ -38,14 +45,19 @@ export class AddcarPage { ...@@ -38,14 +45,19 @@ export class AddcarPage {
city: ['',], city: ['',],
postal_code: ['',Validators.compose([Validators.pattern("[0-9]*"), Validators.required,Validators.minLength(4),Validators.maxLength(4)])], postal_code: ['',Validators.compose([Validators.pattern("[0-9]*"), Validators.required,Validators.minLength(4),Validators.maxLength(4)])],
address: ['', Validators.required], address: ['', Validators.required],
profile_pic :[''],
vehicle_picture1:[''],
vehicle_picture2:[''],
mobile: ['',Validators.compose([Validators.pattern("[0-9]*"), Validators.required,Validators.minLength(10),Validators.maxLength(20)])], mobile: ['',Validators.compose([Validators.pattern("[0-9]*"), Validators.required,Validators.minLength(10),Validators.maxLength(20)])],
}); });
this.currentlocation();
console.log("addcar"); console.log("addcar");
this.storage.get('user_data').then((user_data) => { this.storage.get('user_data').then((user_data) => {
if(user_data){ if(user_data){
console.log(user_data); console.log(user_data);
this.user_data=user_data; this.user_data=user_data;
this.result = user_data;
this.get_profile(); this.get_profile();
}else{ }else{
let modal = this.modalCtrl.create('Loginbook'); let modal = this.modalCtrl.create('Loginbook');
...@@ -71,7 +83,22 @@ export class AddcarPage { ...@@ -71,7 +83,22 @@ export class AddcarPage {
}; };
} }
currentlocation()
{
this.geolocation.getCurrentPosition().then((resp) => {
console.log('Coordinstes',resp);
}).catch((error) => {
});
let watch = this.geolocation.watchPosition();
watch.subscribe((data) =>{
console.log('Error getting location', data)
// data can be a set of coordinates, or an error (if an error occurred).
this.lat= data.coords.latitude
this.lng=data.coords.longitude
});
}
ionViewDidLoad() { ionViewDidLoad() {
console.log('ionViewDidLoad AddcarPage'); console.log('ionViewDidLoad AddcarPage');
} }
...@@ -98,6 +125,7 @@ export class AddcarPage { ...@@ -98,6 +125,7 @@ export class AddcarPage {
this.myservice.show_loader(); this.myservice.show_loader();
this.editProform.controls['city'].setValue(this.citie); this.editProform.controls['city'].setValue(this.citie);
this.editProform.controls['address'].setValue(this.address); this.editProform.controls['address'].setValue(this.address);
this.location = { lat:this.lat , lng:this.lng};
var user_id ={'id':this.user_data.id} var user_id ={'id':this.user_data.id}
var obj = Object.assign(this.editProform.value, this.location,user_id); var obj = Object.assign(this.editProform.value, this.location,user_id);
if(this.base64Image) { if(this.base64Image) {
...@@ -107,7 +135,7 @@ export class AddcarPage { ...@@ -107,7 +135,7 @@ export class AddcarPage {
this.myservice.hide_loader(); this.myservice.hide_loader();
console.log(response); console.log(response);
if(response.status == "success") { if(response.status == "success") {
this.myservice.show_alert("Changes are saved!", response.message); this.myservice.show_alert("Changes are saved!", 'Your profile has been updated');
this.user_data.first_name = response.result.first_name; this.user_data.first_name = response.result.first_name;
...@@ -116,6 +144,7 @@ export class AddcarPage { ...@@ -116,6 +144,7 @@ export class AddcarPage {
console.log(this.user_data); console.log(this.user_data);
this.events.publish('user:update_profile', this.user_data); this.events.publish('user:update_profile', this.user_data);
this.get_profile(); this.get_profile();
} }
else { else {
...@@ -214,7 +243,7 @@ export class AddcarPage { ...@@ -214,7 +243,7 @@ export class AddcarPage {
var latLong = autocomplete.getPlace().geometry.location; var latLong = autocomplete.getPlace().geometry.location;
var js=JSON.stringify(latLong); var js=JSON.stringify(latLong);
var par=JSON.parse(js); var par=JSON.parse(js);
thiss.location = {lat : par.lat, lng : par.lng}; // thiss.location = {lat : par.lat, lng : par.lng};
/* /*
thiss.address = place.formatted_address; thiss.address = place.formatted_address;
console.log(placeA.formatted_address); console.log(placeA.formatted_address);
...@@ -246,7 +275,9 @@ export class AddcarPage { ...@@ -246,7 +275,9 @@ export class AddcarPage {
this.myservice.load_get("get_profile/id/"+this.user_data.id).subscribe(response => { this.myservice.load_get("get_profile/id/"+this.user_data.id).subscribe(response => {
this.myservice.hide_loader(); this.myservice.hide_loader();
if(response.status="success") { if(response.status="success") {
this.getprofile_data = response.result;
// this.result = response.result;
// console.log('Response result in get profile', this.result);
this.editProform.patchValue(response.result); this.editProform.patchValue(response.result);
this.location.lat = response.result.lat; this.location.lat = response.result.lat;
...@@ -264,43 +295,82 @@ export class AddcarPage { ...@@ -264,43 +295,82 @@ export class AddcarPage {
} }
}) })
} }
uploadprofilePicture(event)
{
let fileList: FileList = event.target.files;
if (fileList.length > 0) {
var reader = new FileReader();
reader.onload = (event: any) => {
this.editProform.controls['profile_pic'].setValue(event.target.result)
}
reader.readAsDataURL(event.target.files[0]);
let file = fileList[0];
var ext = (file.name).split(".").pop();
if (ext == 'jpg' || ext == 'jpeg' || ext == 'png') {
this.formdata.append('profile_pic', file, file.name);
}
else {
this.myservice.show_alert('', 'profile.Please choose an image file')
}
}
}
fileChange1(event)
{
let fileList: FileList = event.target.files;
if (fileList.length > 0) {
uploadPicture(){ var reader = new FileReader();
var options ={ maximumImagesCount:1,
width:400, reader.onload = (event: any) => {
height: 400, this.editProform.controls['vehicle_picture1'].setValue(event.target.result)
quality: 100
} }
this.imagePicker.getPictures(options).then((results) => {
for (var i = 0; i < results.length; i++) { reader.readAsDataURL(event.target.files[0]);
console.log('Image URI: ' + results[i]);
if(results[i]){ let file = fileList[0];
this.base64Image = results[i]; var ext = (file.name).split(".").pop();
this.profile_pic = results[i]; if (ext == 'jpg' || ext == 'jpeg' || ext == 'png') {
this.formdata.append('vehicle_picture1', file, file.name);
} }
else {
this.myservice.show_alert('', 'profile.Please choose an image file')
} }
}, (err) => { });
} }
}
fileChange2(event)
{
let fileList: FileList = event.target.files;
if (fileList.length > 0) {
var reader = new FileReader();
uploadvehicleimg(pic){ reader.onload = (event: any) => {
console.log(pic); this.editProform.controls['vehicle_picture2'].setValue(event.target.result)
var options ={ maximumImagesCount:1,
width:400,
height: 400,
quality: 100
} }
this.imagePicker.getPictures(options).then((results) => {
console.log(results.length);
console.log(results[0]);
if(results){ reader.readAsDataURL(event.target.files[0]);
this.base64vehicle[pic]= results[0];
this.vehicle_pic[pic] = results[0]; let file = fileList[0];
var ext = (file.name).split(".").pop();
if (ext == 'jpg' || ext == 'jpeg' || ext == 'png') {
this.formdata.append('vehicle_picture2', file, file.name);
} }
else {
}, (err) => { }); this.myservice.show_alert('', 'profile.Please choose an image file')
console.log(this.base64vehicle);
} }
}
}
private markFormGroupTouched(formGroup: FormGroup) { private markFormGroupTouched(formGroup: FormGroup) {
(<any>Object).values(formGroup.controls).forEach(control => { (<any>Object).values(formGroup.controls).forEach(control => {
...@@ -310,9 +380,5 @@ export class AddcarPage { ...@@ -310,9 +380,5 @@ export class AddcarPage {
} }
}); });
} }
open_img(img)
{
this.photoViewer.show(img);
}
} }
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
<div class="fm_body_part hood_pos" (click)="body_part('Hood',$event)" >Hood <div class="fm_body_part hood_pos" (click)="body_part('Hood',$event)" >Hood
<div class="fm_arw_down"></div> <div class="fm_arw_down"></div>
</div> </div>
<div class="fm_body_part panel_posright" (click)="body_part('Right Panel',$event)" >Right Panel <div class="fm_body_part panel_posright" (click)="body_part('Right Front Panel',$event)" >Right Front Panel
<div class="fm_arw_left"></div> <div class="fm_arw_left"></div>
</div> </div>
<div class="fm_body_part panel_posleft" (click)="body_part('Left Panel',$event)" >Left Panel <div class="fm_body_part panel_posleft" (click)="body_part('Left Front Panel',$event)" >Left Front Panel
<div class="fm_arw_right"></div> <div class="fm_arw_right"></div>
</div> </div>
</div> </div>
...@@ -38,30 +38,34 @@ ...@@ -38,30 +38,34 @@
<div class="fm_body_part wind_pos" (click)="body_part('Windsheild',$event)" >Windsheild <div class="fm_body_part wind_pos" (click)="body_part('Windsheild',$event)" >Windsheild
<div class="fm_arw_down"></div> <div class="fm_arw_down"></div>
</div> </div>
<div class="fm_body_part mirror_pos" (click)="body_part('Side Mirrors',$event)" >Side Mirrors <div class="fm_body_part leftmirror_pos" (click)="body_part('Right Mirror',$event)" >Right Mirror
<div class="fm_arw_left"></div> <div class="fm_arw_left"></div>
</div> </div>
<div class="fm_body_part window_pos" (click)="body_part('Windows',$event)" >Windows <div class="fm_body_part rightmirror_pos" (click)="body_part('Left Mirror',$event)" >Left Mirror
<div class="fm_arw_right"></div>
</div>
<div class="fm_body_part window_pos" (click)="body_part('Right Front Door',$event)" >Right Front Door
<div class="fm_arw_left"></div>
</div>
<div class="fm_body_part leftwindow_pos" (click)="body_part('Left Front Door',$event)" >Left Front Door
<div class="fm_arw_left"></div> <div class="fm_arw_left"></div>
</div> </div>
<div class="fm_body_part door_posright" (click)="body_part('Right Doors',$event)" >Right Doors <div class="fm_body_part door_posright" (click)="body_part('Right Back Door',$event)" >Right Back Door
<div class="fm_arw_left"></div> <div class="fm_arw_left"></div>
</div> </div>
<div class="fm_body_part door_posleft" (click)="body_part('Left Doors',$event)" >Left Doors <div class="fm_body_part door_posleft" (click)="body_part('Left Back Door',$event)" >Left Back Door
<div class="fm_arw_right"></div> <div class="fm_arw_right"></div>
</div> </div>
</div> </div>
<div class="fm_body_back"> <div class="fm_body_back">
<div class="fm_body_part panel_posright" (click)="body_part('Right Panel',$event)" >Right Panel <div class="fm_body_part panel_posright" (click)="body_part('Right Back Panel',$event)" >Right Back Panel
<div class="fm_arw_left"></div> <div class="fm_arw_left"></div>
</div> </div>
<div class="fm_body_part panel_posleft" (click)="body_part('Left Panel',$event)" >Left Panel <div class="fm_body_part panel_posleft" (click)="body_part('Left Back Panel',$event)" >Left Back Panel
<div class="fm_arw_right"></div> <div class="fm_arw_right"></div>
</div> </div>
<div class="fm_body_part wind_pos" (click)="body_part('Windsheild',$event)" >Windsheild
<div class="fm_arw_up"></div>
</div>
<div class="fm_body_part bumber_pos bumber" (click)="body_part('Rear Bumber',$event)" >Rear Bumber <div class="fm_body_part bumber_pos bumber" (click)="body_part('Rear Bumber',$event)" >Rear Bumber
<div class="fm_arw_up"></div> <div class="fm_arw_up"></div>
</div> </div>
......
...@@ -34,17 +34,20 @@ page-bodysection { ...@@ -34,17 +34,20 @@ page-bodysection {
/*HOOD-PART-LABEL*/ /*HOOD-PART-LABEL*/
.fm_hood .bumber_pos{left:53px;top:-40px;} .fm_hood .bumber_pos{left:53px;top:-40px;}
.fm_hood .hood_pos{left:73px;top:22px;} .fm_hood .hood_pos{left:73px;top:40px;}
.fm_hood .panel_posright{right:-50px;top:30px;} .fm_hood .panel_posright{right:-50px;top:30px;}
.fm_hood .panel_posleft{left:-40px;top:30px;} .fm_hood .panel_posleft{left:-40px;top:30px;}
/*BODY-PART-LABEL*/ /*BODY-PART-LABEL*/
.fm_body .wind_pos{left:60px;top:-50px;} .fm_body .wind_pos{left:60px;top:-50px;}
.fm_body .mirror_pos{right:-55px;top:-35px;} .fm_body .rightmirror_pos{right: 161px; top: -31px; width: 86px;}
.fm_body .window_pos{right:-40px;top:0px;} .fm_body .leftmirror_pos{right:-48px;top:-35px;}
.fm_body .door_posright{right:-51px;top:40px;}
.fm_body .door_posleft{left:-40px;top:40px;} .fm_body .window_pos{right:-51px;top:-14px;}
.fm_body .leftwindow_pos{right: 145px; top: -10px;width: 97px;}
.fm_body .door_posright{right:-51px;top:23px;}
.fm_body .door_posleft{left: -40px;top: 25px;}
/*BACK-PART-LABEL*/ /*BACK-PART-LABEL*/
......
...@@ -91,6 +91,7 @@ export class DamagephotoPage { ...@@ -91,6 +91,7 @@ export class DamagephotoPage {
} }
save_body_shop(vals){ save_body_shop(vals){
console.log(this.base64Image)
console.log(this.base64Image.length); console.log(this.base64Image.length);
if(this.base64Image.length > 0){ if(this.base64Image.length > 0){
this.myservice.show_loader(); this.myservice.show_loader();
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
<span>€{{garages.price}}</span> <span>€{{garages.price}}</span>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div>
<div class="fm_listing_bottom">
<div class="fm_line" > <div class="fm_line" >
<div class="child1"><strong>Open From</strong></div> <div class="child1"><strong>Open From</strong></div>
<div class="child2" ><p *ngIf="garages.open_time" >: &nbsp;{{garages.open_time.start}} to {{garages.open_time.end}} </p> <p *ngIf="!garages.open_time" >Closed Today</p></div> <div class="child2" ><p *ngIf="garages.open_time" >: &nbsp;{{garages.open_time.start}} to {{garages.open_time.end}} </p> <p *ngIf="!garages.open_time" >Closed Today</p></div>
...@@ -51,6 +49,11 @@ ...@@ -51,6 +49,11 @@
<div class="child2"><p>:&nbsp;<span class="service">{{garages.services}}</span> </p></div> <div class="child2"><p>:&nbsp;<span class="service">{{garages.services}}</span> </p></div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
</div>
<div class="fm_listing_bottom">
</div> </div>
</li> </li>
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
<div class="fm_home_wrapper"> <div class="fm_home_wrapper">
<div class="fm_home_banner"> <div class="fm_home_banner">
<div class="fm_home_photo"> <div class="fm_home_photo">
<span *ngIf="user_data" > <span *ngIf="getprofile_data" >
<img *ngIf="user_data.profile_pic!=''" [src]="user_data.profile_pic" > <img *ngIf="getprofile_data.profile_pic!=''" [src]="getprofile_data.profile_pic" >
</span></div> </span></div>
<div class="fm_home_banner_detail"> <div class="fm_home_banner_detail">
<div class="fm_home_detail_inner"> <div class="fm_home_detail_inner">
......
...@@ -16,15 +16,18 @@ import {Myservice} from '../../providers/myservice'; ...@@ -16,15 +16,18 @@ import {Myservice} from '../../providers/myservice';
templateUrl: 'home.html', templateUrl: 'home.html',
}) })
export class HomePage { export class HomePage {
getprofile_data
user_data:any; user_data:any;
offers:any; offers:any;
constructor(public navCtrl: NavController, public navParams: NavParams, public storage: Storage, private myservice: Myservice) { constructor(public navCtrl: NavController, public navParams: NavParams, public storage: Storage, private myservice: Myservice) {
this.storage.get('user_data').then((user_data) => { this.storage.get('user_data').then((user_data) => {
console.log(user_data); console.log(user_data);
if(user_data!=null){ if(user_data!=null){
this.user_data= user_data; this.user_data= user_data;
console.log(user_data.id) console.log(user_data.id)
this.get_offers(user_data.id); this.get_offers(user_data.id);
this.profile(user_data.id)
} }
else{ else{
...@@ -73,4 +76,13 @@ export class HomePage { ...@@ -73,4 +76,13 @@ export class HomePage {
} }
} }
profile(id){
this.myservice.show_loader();
this.myservice.load_get("get_profile/id/"+id).subscribe(response => {
this.myservice.hide_loader();
if(response.status="success") {
this.getprofile_data = response.result;
}
});
}
} }
...@@ -68,9 +68,13 @@ ...@@ -68,9 +68,13 @@
<div class="fm_list_price"> <div class="fm_list_price">
<span>{{garage_list.distance}}km</span> <span>{{garage_list.distance}}km</span>
</div> </div>
<div ><strong>Services</strong></div>
<div ><p>:&nbsp;<span class="service">{{garage_list.services}}</span> </p></div>
<div class="clear"></div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div class="fm_listing_bottom"> <div>
<!-- <div class="fm_line" > <!-- <div class="fm_line" >
<div class="child1"><strong>Open From</strong></div> <div class="child1"><strong>Open From</strong></div>
<div class="child2" ><p *ngIf="garage_list.open_time" >: &nbsp;{{garage_list.open_time.start}} to {{garage_list.open_time.end}} </p> <p *ngIf="!garage_list.open_time" >Closed Today</p></div> <div class="child2" ><p *ngIf="garage_list.open_time" >: &nbsp;{{garage_list.open_time.start}} to {{garage_list.open_time.end}} </p> <p *ngIf="!garage_list.open_time" >Closed Today</p></div>
...@@ -81,11 +85,8 @@ ...@@ -81,11 +85,8 @@
<div class="child2"><p>:&nbsp;<span *ngFor="let days of garage_list.available_days" >{{days}}</span></p></div> <div class="child2"><p>:&nbsp;<span *ngFor="let days of garage_list.available_days" >{{days}}</span></p></div>
<div class="clear"></div> <div class="clear"></div>
</div>--> </div>-->
<div class="fm_line">
<div class="child1"><strong>Services</strong></div>
<div class="child2"><p>:&nbsp;<span class="service">{{garage_list.services}}</span> </p></div>
<div class="clear"></div>
</div>
</div> </div>
</li> </li>
......
...@@ -9,10 +9,17 @@ ...@@ -9,10 +9,17 @@
<ion-item> <ion-item>
<ion-input formControlName="email" type="text" placeholder="Email" #emailVal (keyup)="trim_white(emailVal.value)" autocomplete="off" ></ion-input> <ion-input formControlName="email" type="text" placeholder="Email" #emailVal (keyup)="trim_white(emailVal.value)" autocomplete="off" ></ion-input>
</ion-item> </ion-item>
<div class="bmd-field error">
<p class="valid-p" *ngIf="LoginForm.controls.email.hasError('required') && LoginForm.controls.email.touched">Enter Email</p>
</div>
<ion-item> <ion-item>
<ion-input formControlName="password" type="password" placeholder="Password" autocomplete="off" ></ion-input> <ion-input formControlName="password" type="password" placeholder="Password" autocomplete="off" ></ion-input>
</ion-item> </ion-item>
<div class="bmd-field error">
<p class="valid-p" *ngIf="LoginForm.controls.password.hasError('required') && LoginForm.controls.password.touched">Enter Passsword</p>
</div>
</ion-list> </ion-list>
<button class="login_btn theme_lblue" ion-button [disabled]="!LoginForm.valid" >LOGIN</button> <button class="login_btn theme_lblue" ion-button [disabled]="!LoginForm.valid" >LOGIN</button>
</form> </form>
......
...@@ -77,18 +77,19 @@ export class LoginPage { ...@@ -77,18 +77,19 @@ export class LoginPage {
} }
OnLogin(){ OnLogin(){
console.log(this.LoginForm.value) console.log(this.LoginForm.value);
console.log(this.device_id) console.log(this.device_id);
console.log(this.lat_lng) console.log(this.lat_lng);
this.myservice.show_loader(); this.myservice.show_loader();
var val = Object.assign({}, this.LoginForm.value , {'device_id' :this.device_id,'lat' : this.lat_lng.lat, 'lng' : this.lat_lng.lng }) var val = Object.assign({}, this.LoginForm.value , {'device_id' :this.device_id,'lat' : this.lat_lng.lat, 'lng' : this.lat_lng.lng })
this.myservice.load_post(val,'login').subscribe(data =>{ this.myservice.load_post(val,'login').subscribe(data =>{
console.log(data); console.log('Login response',data);
this.myservice.hide_loader(); this.myservice.hide_loader();
if(data.status=='success'){
if(data.status=='success') {
this.myservice.show_alert('Success','Welcome Back');
this.storage.set('user_data',data.data).then(()=>{ this.storage.set('user_data',data.data).then(()=>{
this.myservice.hide_loader();
this.storage.get('user_data').then((user_data) => { this.storage.get('user_data').then((user_data) => {
this.events.publish('user:update_profile', user_data); this.events.publish('user:update_profile', user_data);
//this.nav.setRoot('LoginPage'); //this.nav.setRoot('LoginPage');
...@@ -96,8 +97,9 @@ export class LoginPage { ...@@ -96,8 +97,9 @@ export class LoginPage {
}) })
}); });
}else } else
this.myservice.show_alert("Error!", data.message); this.myservice.show_alert("Note!", data.message);
}); });
} }
......
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
<ion-item> <ion-item>
<ion-input type="text" formControlName="email" placeholder="Email Id"></ion-input> <ion-input type="text" formControlName="email" placeholder="Email Id"></ion-input>
</ion-item> </ion-item>
<div class="bmd-field error">
<p class="valid-p" *ngIf="forgot.controls.email.hasError('required') && forgot.controls.email.touched">Enter Email</p>
</div>
</ion-list> </ion-list>
<button class="login_btn theme_lblue widthFull" ion-button [disabled]="!forgot.valid" >Get new password</button> <button class="login_btn theme_lblue widthFull" ion-button [disabled]="!forgot.valid" >Get new password</button>
</form> </form>
......
...@@ -17,7 +17,7 @@ export class OtpPage { ...@@ -17,7 +17,7 @@ export class OtpPage {
constructor(public navCtrl: NavController, public navParams: NavParams,private myservice: Myservice, public formBuilder : FormBuilder,public storage:Storage) { constructor(public navCtrl: NavController, public navParams: NavParams,private myservice: Myservice, public formBuilder : FormBuilder,public storage:Storage) {
this.forgot = this.formBuilder.group({ this.forgot = this.formBuilder.group({
email: ['', [Validators.required, this.emailValidator.bind(this)]], email: ['', Validators.compose([Validators.pattern("^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"), Validators.required])],
}); });
} }
...@@ -39,7 +39,7 @@ export class OtpPage { ...@@ -39,7 +39,7 @@ export class OtpPage {
this.myservice.show_alert("Success" , data.message); this.myservice.show_alert("Success" , data.message);
} }
else { else {
this.myservice.show_alert("Error" , data.message); this.myservice.show_alert("Get new Passsword!" , data.message);
} }
}) })
} }
......
...@@ -19,14 +19,21 @@ import {Myservice} from '../../providers/myservice'; ...@@ -19,14 +19,21 @@ import {Myservice} from '../../providers/myservice';
export class RequestPage { export class RequestPage {
private requestsForm : FormGroup; private requestsForm : FormGroup;
user_data:any;
id:any;
service:any; service:any;
filtr:any; filtr:any;
arr:any=[]; arr:any=[];
checkbox_val = [{'value': 'fuelfilter','name' : 'Fuel Filter'},{'value': 'cabinfilter','name' : 'Cabin Filter'},{'value': 'airfilter','name' : 'Air Filter'}] checkbox_val = [{'value': 'fuelfilter','name' : 'Fuel Filter'},{'value': 'cabinfilter','name' : 'Cabin Filter'},{'value': 'airfilter','name' : 'Air Filter'}]
constructor(public navCtrl: NavController, public navParams: NavParams, private formBuilder: FormBuilder,public storage:Storage, private myservice: Myservice,) { constructor(public navCtrl: NavController, public navParams: NavParams, private formBuilder: FormBuilder,public storage:Storage, private myservice: Myservice,) {
this.service = this.navParams.get('service')
this.service = this.navParams.get('service')
this.storage.get('user_data').then((user_data) => {
console.log('User dtaa' , user_data)
this.id = user_data.id;
this.user_data = user_data;
});
this.requestsForm = this.formBuilder.group({ this.requestsForm = this.formBuilder.group({
...@@ -54,8 +61,59 @@ export class RequestPage { ...@@ -54,8 +61,59 @@ export class RequestPage {
onSubmit(){ onSubmit(){
console.log('Id', this.id)
if(!this.user_data){
this.navCtrl.push('LoginPage');
this.myservice.show_alert('Note!','Please Login to send request. If you are a new user, please click on signup button')
}
if(this.requestsForm.valid){ if(this.requestsForm.valid){
console.log('in',this.requestsForm.value)
this.myservice.load_get('get_quotes?id='+81).subscribe(data => {
console.log('Data',data);
console.log('test',data.data[10].detail)
});
console.log('in',this.requestsForm.value);
var obj1 ={'user_id':this.id,'service_id':1,'subservice_id':1,'detail':this.requestsForm.value}
if(this.service == 'Annual Service')
{
this.myservice.load_post(obj1,'request_service').subscribe(data => {
if(data.status == 'success')
{
this.navCtrl.push('SuccessPage');
}
console.log(data)
});
}
var obj2= {'user_id':this.id,'service_id':1,'subservice_id':2,'detail':this.requestsForm.value}
if(this.service == 'Oil Service')
{
this.myservice.load_post(obj2,'request_service').subscribe(data => {
if(data.status == 'success')
{
this.navCtrl.push('SuccessPage');
}
});
}
var obj3={'user_id':this.id,'service_id':1,'subservice_id':5,'detail':this.requestsForm.value}
if(this.service == 'Others')
{
console.log(obj3)
this.myservice.load_post(obj3,'request_service').subscribe(data => {
if(data.status == 'success')
{
this.navCtrl.push('SuccessPage');
}
console.log(data)
});
}
//var obj4={'user_id':this.id,'service_id':1,'subservice_id':5,'detail':this.requestsForm.value}
}else{ // Form is not valid }else{ // Form is not valid
this.markFormGroupTouched(this.requestsForm); this.markFormGroupTouched(this.requestsForm);
} }
......
...@@ -19,6 +19,7 @@ import {Myservice} from '../../providers/myservice'; ...@@ -19,6 +19,7 @@ import {Myservice} from '../../providers/myservice';
export class RequestBreak { export class RequestBreak {
private requestsForm : FormGroup; private requestsForm : FormGroup;
id:any;
service:any; service:any;
filtr:any; filtr:any;
arr:any=[]; arr:any=[];
...@@ -29,7 +30,11 @@ export class RequestBreak { ...@@ -29,7 +30,11 @@ export class RequestBreak {
this.service = this.navParams.get('service') this.service = this.navParams.get('service')
this.service = this.navParams.get('service')
this.storage.get('user_data').then((user_data) => {
console.log('User dtaa' , user_data)
this.id = user_data.id;
});
this.requestsForm = this.formBuilder.group({ this.requestsForm = this.formBuilder.group({
//filters: [{'value': 'fuelfilter','name' : 'Fuel Filter'}, ], //filters: [{'value': 'fuelfilter','name' : 'Fuel Filter'}, ],
...@@ -44,6 +49,7 @@ export class RequestBreak { ...@@ -44,6 +49,7 @@ export class RequestBreak {
// this.requestsForm.setControl('filters',new FormControl('',Validators.required)); // this.requestsForm.setControl('filters',new FormControl('',Validators.required));
// else // else
// this.requestsForm.setControl('filters',new FormControl('',)); // this.requestsForm.setControl('filters',new FormControl('',));
} }
ionViewDidLoad() { ionViewDidLoad() {
...@@ -57,6 +63,10 @@ export class RequestBreak { ...@@ -57,6 +63,10 @@ export class RequestBreak {
if(this.requestsForm.valid){ if(this.requestsForm.valid){
console.log('in',this.requestsForm.value) console.log('in',this.requestsForm.value)
var obj = { "user_id":this.id , 'service_id':1 ,'subservice_id':3,'detail':this.requestsForm.value};
this.myservice.load_post(obj,'request_service').subscribe(data => {
console.log(data)
});
}else{ // Form is not valid }else{ // Form is not valid
this.markFormGroupTouched(this.requestsForm); this.markFormGroupTouched(this.requestsForm);
} }
......
...@@ -81,14 +81,20 @@ ...@@ -81,14 +81,20 @@
<div class="bmd-field error"> <div class="bmd-field error">
<p class="valid-p" *ngIf="signup.controls.car_model.hasError('required') && signup.controls.car_model.touched">Sorry, field is required!</p> <p class="valid-p" *ngIf="signup.controls.car_model.hasError('required') && signup.controls.car_model.touched">Sorry, field is required!</p>
</div> </div>
<div class="login_wizard_head"> Add Picture Of Vehicle Paper </div> <div class="login_wizard_head"> Add Two Picture Of Vehicle Paper </div>
<div class="fm_add_picture" > <div class="fm_add_picture" >
<li class="fm_add_photo" (click)="uploadPicture('1')" ><div class="inside_image" *ngIf="profile_pic" ><img [src]="profile_pic['1']" *ngIf="profile_pic['1']" ></div></li> <!-- <li class="fm_add_photo" (click)="uploadPicture('1')" ><div class="inside_image" *ngIf="profile_pic" ><img [src]="base64Image" *ngIf="profile_pic['1']" ></div></li>
<li (click)="uploadPicture('2')" ><div class="inside_image" *ngIf="profile_pic" ><img [src]="profile_pic['2']" *ngIf="profile_pic['2']" ></div></li> <li (click)="uploadPicture('2')" ><div class="inside_image" *ngIf="profile_pic" ><img [src]="profile_pic['2']" *ngIf="profile_pic['2']" ></div></li> -->
<input type="file" accept="image/*" (change)="fileChange1($event)" />
</div> </div>
<div class="bmd-field error"> <div class="fm_add_picture" >
<p class="valid-p" *ngIf="">Sorry, Please upload Two Vehicle Paper Images to Continue!</p> <!-- <li class="fm_add_photo" (click)="uploadPicture('1')" ><div class="inside_image" *ngIf="profile_pic" ><img [src]="base64Image" *ngIf="profile_pic['1']" ></div></li>
<li (click)="uploadPicture('2')" ><div class="inside_image" *ngIf="profile_pic" ><img [src]="profile_pic['2']" *ngIf="profile_pic['2']" ></div></li> -->
<input type="file" accept="image/*" (change)="fileChange2($event)" />
</div> </div>
<!-- <div class="bmd-field error">
<p class="valid-p" *ngIf="image_needed">Sorry, Please upload Two Vehicle Paper Images to Continue!</p>
</div> -->
</ion-list> </ion-list>
<div class="login_wizard_head">Create a password</div> <div class="login_wizard_head">Create a password</div>
<ion-list> <ion-list>
......
...@@ -5,8 +5,8 @@ import { Storage } from '@ionic/storage'; ...@@ -5,8 +5,8 @@ import { Storage } from '@ionic/storage';
import {Myservice} from '../../providers/myservice'; import {Myservice} from '../../providers/myservice';
import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer'; import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer';
import { File } from '@ionic-native/file'; import { File } from '@ionic-native/file';
import { ImagePicker } from '@ionic-native/image-picker';
import {HttpClient } from '@angular/common/http'
declare var require: any; declare var require: any;
declare var google: any; declare var google: any;
...@@ -16,7 +16,9 @@ declare var google: any; ...@@ -16,7 +16,9 @@ declare var google: any;
templateUrl: 'signup.html', templateUrl: 'signup.html',
}) })
export class SignupPage { export class SignupPage {
passingdata:any;
image: boolean = false;
formdata = new FormData()
services:any; services:any;
location:any; location:any;
citie: any; citie: any;
...@@ -27,11 +29,30 @@ export class SignupPage { ...@@ -27,11 +29,30 @@ export class SignupPage {
address: any; address: any;
componentForm: any; componentForm: any;
device_id:any; device_id:any;
image_needed:boolean=false; image_needed:boolean=true;
base64Image= []; base64Image= [];
profile_pic= []; profile_pic= [];
lat_lng:any;
constructor(public navCtrl: NavController,
public navParams: NavParams,
public storage:Storage,
private myservice: Myservice,
private formBuilder: FormBuilder,
public events: Events,
public modalCtrl: ModalController,
private transfer: FileTransfer,
private file: File,
constructor(public navCtrl: NavController, public navParams: NavParams,public storage:Storage, private myservice: Myservice, private formBuilder: FormBuilder, public events: Events,public modalCtrl: ModalController,private transfer: FileTransfer, private file: File,private imagePicker: ImagePicker) { public http : HttpClient
) {
this.storage.get('lat_lng').then((lat_lng) => {
if(lat_lng){
this.lat_lng = lat_lng;
}
})
this.get_terms() this.get_terms()
this.storage.get('get_deviceId').then((deviceId) => { this.storage.get('get_deviceId').then((deviceId) => {
console.log(deviceId); console.log(deviceId);
...@@ -54,6 +75,8 @@ export class SignupPage { ...@@ -54,6 +75,8 @@ export class SignupPage {
car_model: ['', Validators.required], car_model: ['', Validators.required],
car_make: ['', Validators.required], car_make: ['', Validators.required],
terms: [ 'false',Validators.requiredTrue], terms: [ 'false',Validators.requiredTrue],
vehicle_picture1: ['', Validators.compose([Validators.required])],
vehicle_picture2:['',Validators.compose([Validators.required])]
}, { }, {
validator: this.Match('password', 'cpassword') validator: this.Match('password', 'cpassword')
}); });
...@@ -78,119 +101,15 @@ export class SignupPage { ...@@ -78,119 +101,15 @@ export class SignupPage {
this.navCtrl.push('OtpPag'); this.navCtrl.push('OtpPag');
} }
signupForm(){
if(this.signup.valid)
{
console.log(this.base64Image.length);
if(this.base64Image.length <1){
this.image_needed =false;
this.myservice.show_loader();
this.signup.controls['city'].setValue(this.citie);
this.signup.controls['address'].setValue(this.address);
var val = Object.assign({}, this.signup.value , {'device_id' :this.device_id})
var obj = Object.assign(val, this.location);
this.load_post_multifile(this.base64Image, this.signup.value, "signup");
/*this.myservice.load_post(this.signup.value, "signup").subscribe(response => {
this.myservice.hide_loader();
console.log(response);
if(response.status == "success") {
//this.myservice.show_alert("success!", response.message);
//this.navCtrl.push('LoginPage');
this.storage.set('user_data',response.data).then(()=>{
this.myservice.hide_loader();
this.storage.get('user_data').then((user_data) => {
this.events.publish('user:update_profile', user_data);
this.navCtrl.setRoot('TabsPage');
})
});
}
else {
this.image_needed =true;
}
}) */
}else
this.image_needed =true;
}else{ // Form is not valid
this.markFormGroupTouched(this.signup); // function to mark fields as touched
}
}
load_post_multifile(imageURI, post_data, fn_name) {
this.myservice.show_loader();
var i;
for (i = 1; i < imageURI.length; i++) {
if(imageURI[i]!=undefined){
console.log("imageURI" ,imageURI[i]);
let ft = this.transfer.create();
let filename = imageURI[i].substr(imageURI[i].lastIndexOf('/')+1);
let options = {
fileKey: 'file',
fileName: filename,
mimeType: 'image/jpeg',
chunkedMode: false,
headers: {
'Content-Type' : undefined
},
params: post_data
};
ft.upload(imageURI[i], this.myservice.webservice_url+fn_name, options, false)
.then((result: any) => {
this.myservice.hide_loader();
console.log('result ' + i, result);
this.successs=true;
console.log('imageURIlength ',imageURI.length);
console.log('i ',i);
this.storage.set('user_data',result.data).then(()=>{
this.storage.get('user_data').then((user_data) => {
this.events.publish('user:update_profile', user_data);
this.navCtrl.setRoot('TabsPage');
})
});
}).catch((error: any) => {
this.myservice.hide_loader();
this.successs=false;
this.myservice.show_alert("Error!", 'No garages found');
});
}
}
console.log(this.successs);
//if(i == imageURI.length)
//this.navCtrl.push('SuccessPage',{'page':'car_details'});
}
emailValidator(control: FormControl): {[s: string]: boolean} { emailValidator(control: FormControl): {[s: string]: boolean} {
if (!(control.value.toLowerCase().match('^[a-z0-9.]+( \ [_a-z0-9]+)*@[a-z0-9-]+(\.[a-z0-9-]+)\\.(\.[a-z0-9-]{1,15})$'))) { if (!(control.value.toLowerCase().match('^[a-z0-9.]+( \ [_a-z0-9]+)*@[a-z0-9-]+(\.[a-z0-9-]+)\\.(\.[a-z0-9-]{1,15})$'))) {
return {invalidEmail: true}; return {invalidEmail: true};
} }
} }
Match(firstControlName, secondControlName) {
return (AC: AbstractControl) => {
let firstControlValue = AC.get(firstControlName).value; // to get value in input tag
let secondControlValue = AC.get(secondControlName).value; // to get value in input tag
if (firstControlValue != secondControlValue) {
AC.get(secondControlName).setErrors({mismatch: true});
console.log(false);
} else {
console.log(true);
return null
}
};
}
initialize() { initialize() {
console.log("initialize") console.log("initialize")
var addressType='address_signup'; var addressType='address_signup';
var input = document.getElementById('address_signup'); var input = document.getElementById('address_signup');
/* var options = {
types: ['(cities)']
}; */
var autocomplete = new google.maps.places.Autocomplete(input); var autocomplete = new google.maps.places.Autocomplete(input);
let thiss = this; let thiss = this;
google.maps.event.addListener(autocomplete, 'place_changed', function () { google.maps.event.addListener(autocomplete, 'place_changed', function () {
...@@ -202,35 +121,41 @@ export class SignupPage { ...@@ -202,35 +121,41 @@ export class SignupPage {
if (thiss.componentForm[addressType]) { if (thiss.componentForm[addressType]) {
console.log(thiss.componentForm[addressType]); console.log(thiss.componentForm[addressType]);
var val = place.address_components[i][thiss.componentForm[addressType]]; var val = place.address_components[i][thiss.componentForm[addressType]];
// document.getElementById(addressType).value = val;
console.log(val); console.log(val);
(document.getElementById(addressType) as HTMLInputElement).value= val; (document.getElementById(addressType) as HTMLInputElement).value= val;
if(addressType=='locality'){ thiss.citie = place.address_components[i][thiss.componentForm['locality']]; } if(addressType=='locality'){
thiss.citie = place.address_components[i][thiss.componentForm['locality']]; }
} }
} }
thiss.address = place.formatted_address; thiss.address = place.formatted_address;
// thiss.signup.controls['address_signup'].setValue(place.formatted_address);
var latLong = autocomplete.getPlace().geometry.location;
var js=JSON.stringify(latLong);
var par=JSON.parse(js);
thiss.location = {lat : par.lat, lng : par.lng};
/*
thiss.address = place.formatted_address;
console.log(placeA.formatted_address);
var latLong = autocomplete.getPlace().geometry.location; var latLong = autocomplete.getPlace().geometry.location;
var js=JSON.stringify(latLong); var js=JSON.stringify(latLong);
var par=JSON.parse(js); var par=JSON.parse(js);
thiss.location = {lat : par.lat, lng : par.lng}; thiss.location = {lat : par.lat, lng : par.lng};
*/ console.log('Latitiude and longtitude values', thiss.location)
//document.getElementById('driver_lat').value=par.lat;
//document.getElementById('driver_lng').value=par.lng;
// document.getElementById('pickup_lat').value=par.lat;
// document.getElementById('pickup_lng').value=par.lng;
}); });
} }
Match(firstControlName, secondControlName) {
return (AC: AbstractControl) => {
let firstControlValue = AC.get(firstControlName).value; // to get value in input tag
let secondControlValue = AC.get(secondControlName).value; // to get value in input tag
if (firstControlValue != secondControlValue) {
AC.get(secondControlName).setErrors({mismatch: true});
console.log(false);
} else {
console.log(true);
return null
}
};
}
private markFormGroupTouched(formGroup: FormGroup) { private markFormGroupTouched(formGroup: FormGroup) {
...@@ -241,42 +166,103 @@ export class SignupPage { ...@@ -241,42 +166,103 @@ export class SignupPage {
} }
}); });
} }
get_terms(){
this.myservice.show_loader();
var obj = '/id/1'
this.myservice.load_get('get_terms'+obj).subscribe(data => {
this.myservice.hide_loader();
if(data.status == 'success'){
console.log(data.result);
this.terms_service = data.result
}
});
}
agree_terms(pg){ agree_terms(pg){
let termsModal = this.modalCtrl.create('TermsPage',{'data' :this.terms_service,'page' : pg} ); let termsModal = this.modalCtrl.create('TermsPage',{'data' :this.terms_service,'page' : pg} );
termsModal.present(); termsModal.present();
} }
uploadPicture(pic){ signupForm()
console.log(pic); {
var options ={ maximumImagesCount:1, if(this.signup.valid)
width:400, {
height: 400, this.myservice.show_loader();
quality: 100 this.myservice.fileUpload(this.signup.value, 'signup').subscribe(response => {
console.log('response', response);
this.myservice.hide_loader();
if(response.status=="success") {
this.myservice.show_alert("success!", response.message);
this.storage.set('user_data',response.user_id).then(()=>{
this.storage.get('user_data').then((user_data) => {
this.events.publish('user:update_profile', user_data);
this.navCtrl.setRoot('TabsPage');
});
});
} }
this.imagePicker.getPictures(options).then((results) => { else {
console.log(results.length);
console.log(results[0]);
if(results){ this.myservice.show_alert('Error!',response.message);
this.base64Image[pic]= results[0];
this.profile_pic[pic] = results[0];
} }
});
}, (err) => { });
console.log(this.base64Image);
} }
get_terms(){ else {
//this.myservice.show_loader(); this.myservice.presentToast('Please fill all the fields in the Register form');
this.myservice.load_get('get_terms').subscribe(data => { }
//this.myservice.hide_loader(); }
if(data.status == 'success'){
console.log(data.result);
this.terms_service = data.result fileChange1(event) {
let fileList: FileList = event.target.files;
if (fileList.length > 0) {
var reader = new FileReader();
reader.onload = (event: any) => {
this.signup.controls['vehicle_picture1'].setValue(event.target.result)
} }
});
reader.readAsDataURL(event.target.files[0]);
let file = fileList[0];
var ext = (file.name).split(".").pop();
if (ext == 'jpg' || ext == 'jpeg' || ext == 'png') {
this.formdata.append('vehicle_picture1', file, file.name);
this.image = true;
}
else {
this.myservice.show_alert('', 'profile.Please choose an image file')
}
}
}
fileChange2(event) {
let fileList: FileList = event.target.files;
if (fileList.length > 0) {
var reader = new FileReader();
reader.onload = (event: any) => {
this.signup.controls['vehicle_picture2'].setValue(event.target.result)
}
reader.readAsDataURL(event.target.files[0]);
let file = fileList[0];
var ext = (file.name).split(".").pop();
if (ext == 'jpg' || ext == 'jpeg' || ext == 'png') {
this.formdata.append('vehicle_picture1', file, file.name);
this.image = true;
} }
else {
this.myservice.show_alert('', 'profile.Please choose an image file')
}
}
}
} }
...@@ -6,6 +6,7 @@ import 'rxjs/add/operator/map'; ...@@ -6,6 +6,7 @@ import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/toPromise'; import 'rxjs/add/operator/toPromise';
import { Storage } from '@ionic/storage'; import { Storage } from '@ionic/storage';
import { ToastController } from 'ionic-angular';
import { LoadingController, AlertController, Events } from 'ionic-angular'; import { LoadingController, AlertController, Events } from 'ionic-angular';
...@@ -35,7 +36,12 @@ export class Myservice { ...@@ -35,7 +36,12 @@ export class Myservice {
user_data:any; user_data:any;
notify:any; notify:any;
constructor(public http: Http, public loadingCtrl: LoadingController, public alertCtrl: AlertController, public events: Events,public storage:Storage ) { constructor(public http: Http,
public loadingCtrl: LoadingController,
public alertCtrl: AlertController,
public events: Events,
public storage:Storage,
public toastCtrl: ToastController ) {
//const fileTransfer: TransferObject = this.transfer.create(); //const fileTransfer: TransferObject = this.transfer.create();
this.storage.get('user_data').then((user_data) => { this.storage.get('user_data').then((user_data) => {
if(user_data){ if(user_data){
...@@ -87,6 +93,13 @@ export class Myservice { ...@@ -87,6 +93,13 @@ export class Myservice {
hide_loader() { hide_loader() {
this.loader.dismissAll(); this.loader.dismissAll();
} }
presentToast(message) {
const toast = this.toastCtrl.create({
message: message,
duration: 3000
});
toast.present();
}
/* load_posts(post_data, fn_name) { /* load_posts(post_data, fn_name) {
...@@ -100,6 +113,7 @@ export class Myservice { ...@@ -100,6 +113,7 @@ export class Myservice {
} }
*/ */
load_post(post_data, fn_name) { load_post(post_data, fn_name) {
var post_url = this.webservice_url + fn_name; var post_url = this.webservice_url + fn_name;
......
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