add barcode scanner

MOHEMM-Q3-DEV-LATEST
mohamed.mekawy 6 years ago
parent ce88e72248
commit 7034aef571

@ -102,8 +102,10 @@
<plugin name="cordova-plugin-badge" spec="^0.8.8" /> <plugin name="cordova-plugin-badge" spec="^0.8.8" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.3" /> <plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.3" />
<plugin name="cordova-plugin-geolocation" spec="~4.0.1" /> <plugin name="cordova-plugin-geolocation" spec="~4.0.1" />
<plugin name="cordova-plugin-cszbar" spec="~1.3.2" />
<plugin name="cordova-plugin-datepicker" spec="~0.9.3" /> <plugin name="cordova-plugin-datepicker" spec="~0.9.3" />
<plugin name="phonegap-plugin-barcodescanner" spec="^8.1.0">
<variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
</plugin>
<engine name="browser" spec="5.0.4" /> <engine name="browser" spec="5.0.4" />
<engine name="android" spec="7.1.4" /> <engine name="android" spec="7.1.4" />
</widget> </widget>

@ -790,11 +790,18 @@
} }
}, },
"@ionic-native/barcode-scanner": { "@ionic-native/barcode-scanner": {
"version": "5.8.0", "version": "5.14.0",
"resolved": "https://registry.npmjs.org/@ionic-native/barcode-scanner/-/barcode-scanner-5.8.0.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/barcode-scanner/-/barcode-scanner-5.14.0.tgz",
"integrity": "sha512-fypCb/8MikdTPaUl+oAtK+abrdgWnsYk3FtN3HPcNU4VB53QtBrx4LFC0l9xXD9rW8S7S0Xr2uHogtzhbh1bdg==", "integrity": "sha512-FwTHQD5TUaR441V76IoXQmrSdz7AZ/qBfrfh/rDaXWgYHg7iJA3prOlBPCW+YGfLV3qvlRJeq/ASub/JkTBDrg==",
"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/ble": { "@ionic-native/ble": {
@ -1454,9 +1461,7 @@
"abbrev": { "abbrev": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
"dev": true,
"optional": true
}, },
"accepts": { "accepts": {
"version": "1.3.7", "version": "1.3.7",
@ -4359,11 +4364,6 @@
"resolved": "https://registry.npmjs.org/cordova-plugin-badge/-/cordova-plugin-badge-0.8.8.tgz", "resolved": "https://registry.npmjs.org/cordova-plugin-badge/-/cordova-plugin-badge-0.8.8.tgz",
"integrity": "sha512-RhIBtd5xhD/iLnxjt35jvOae28oNW/wtMZBOmQR3Rf0y4wirvA1bpAZEhBoFqL+rZGhsd6ddOdQXdex1T0DRyQ==" "integrity": "sha512-RhIBtd5xhD/iLnxjt35jvOae28oNW/wtMZBOmQR3Rf0y4wirvA1bpAZEhBoFqL+rZGhsd6ddOdQXdex1T0DRyQ=="
}, },
"cordova-plugin-cszbar": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/cordova-plugin-cszbar/-/cordova-plugin-cszbar-1.3.4.tgz",
"integrity": "sha1-+0mTGSPjVjwNTJaVaawGAsXz62o="
},
"cordova-plugin-datepicker": { "cordova-plugin-datepicker": {
"version": "0.9.3", "version": "0.9.3",
"resolved": "https://registry.npmjs.org/cordova-plugin-datepicker/-/cordova-plugin-datepicker-0.9.3.tgz", "resolved": "https://registry.npmjs.org/cordova-plugin-datepicker/-/cordova-plugin-datepicker-0.9.3.tgz",
@ -6115,8 +6115,7 @@
"version": "2.1.1", "version": "2.1.1",
"resolved": false, "resolved": false,
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@ -6140,15 +6139,13 @@
"version": "1.0.0", "version": "1.0.0",
"resolved": false, "resolved": false,
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"resolved": false, "resolved": false,
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"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"
@ -6165,22 +6162,19 @@
"version": "1.1.0", "version": "1.1.0",
"resolved": false, "resolved": false,
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"resolved": false, "resolved": false,
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"resolved": false, "resolved": false,
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -6311,8 +6305,7 @@
"version": "2.0.3", "version": "2.0.3",
"resolved": false, "resolved": false,
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -6326,7 +6319,6 @@
"resolved": false, "resolved": false,
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -6343,7 +6335,6 @@
"resolved": false, "resolved": false,
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@ -6352,15 +6343,13 @@
"version": "0.0.8", "version": "0.0.8",
"resolved": false, "resolved": false,
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"resolved": false, "resolved": false,
"integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -6381,7 +6370,6 @@
"resolved": false, "resolved": false,
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -6470,8 +6458,7 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": false, "resolved": false,
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@ -6485,7 +6472,6 @@
"resolved": false, "resolved": false,
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -6581,8 +6567,7 @@
"version": "5.1.2", "version": "5.1.2",
"resolved": false, "resolved": false,
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@ -6624,7 +6609,6 @@
"resolved": false, "resolved": false,
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true, "dev": 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",
@ -6646,7 +6630,6 @@
"resolved": false, "resolved": false,
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@ -6695,15 +6678,13 @@
"version": "1.0.2", "version": "1.0.2",
"resolved": false, "resolved": false,
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"resolved": false, "resolved": false,
"integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
"dev": true, "dev": true
"optional": true
} }
} }
}, },
@ -7469,8 +7450,7 @@
"interpret": { "interpret": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz",
"integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw=="
"dev": true
}, },
"invariant": { "invariant": {
"version": "2.2.4", "version": "2.2.4",
@ -9600,8 +9580,7 @@
"os-homedir": { "os-homedir": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
"dev": true
}, },
"os-locale": { "os-locale": {
"version": "1.4.0", "version": "1.4.0",
@ -9616,14 +9595,12 @@
"os-tmpdir": { "os-tmpdir": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
"dev": true
}, },
"osenv": { "osenv": {
"version": "0.1.5", "version": "0.1.5",
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
"dev": true,
"requires": { "requires": {
"os-homedir": "^1.0.0", "os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0" "os-tmpdir": "^1.0.0"
@ -9941,8 +9918,7 @@
"path-parse": { "path-parse": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
"dev": true
}, },
"path-to-regexp": { "path-to-regexp": {
"version": "0.1.7", "version": "0.1.7",
@ -9992,6 +9968,26 @@
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"dev": true "dev": true
}, },
"phonegap-plugin-barcodescanner": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/phonegap-plugin-barcodescanner/-/phonegap-plugin-barcodescanner-8.1.0.tgz",
"integrity": "sha512-WQCDCoH9EQ9WEn2bce+B95jbNJduilAn2Vtske8KfcYAeGu7bdFqRD7zGCLCQao62VwoEwlX0cUvbQ/am12Jwg==",
"requires": {
"nopt": "^4.0.1",
"shelljs": "^0.8.3"
},
"dependencies": {
"nopt": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
"requires": {
"abbrev": "1",
"osenv": "^0.1.4"
}
}
}
},
"phonegap-plugin-multidex": { "phonegap-plugin-multidex": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/phonegap-plugin-multidex/-/phonegap-plugin-multidex-1.0.0.tgz", "resolved": "https://registry.npmjs.org/phonegap-plugin-multidex/-/phonegap-plugin-multidex-1.0.0.tgz",
@ -10582,7 +10578,6 @@
"version": "0.6.2", "version": "0.6.2",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
"dev": true,
"requires": { "requires": {
"resolve": "^1.1.6" "resolve": "^1.1.6"
} }
@ -10767,7 +10762,6 @@
"version": "1.11.0", "version": "1.11.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz",
"integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==",
"dev": true,
"requires": { "requires": {
"path-parse": "^1.0.6" "path-parse": "^1.0.6"
} }
@ -11227,7 +11221,6 @@
"version": "0.8.3", "version": "0.8.3",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz",
"integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==",
"dev": true,
"requires": { "requires": {
"glob": "^7.0.0", "glob": "^7.0.0",
"interpret": "^1.0.0", "interpret": "^1.0.0",

@ -26,7 +26,7 @@
"@ionic-native/app-rate": "^5.8.0", "@ionic-native/app-rate": "^5.8.0",
"@ionic-native/background-geolocation": "^5.4.0", "@ionic-native/background-geolocation": "^5.4.0",
"@ionic-native/badge": "^5.8.0", "@ionic-native/badge": "^5.8.0",
"@ionic-native/barcode-scanner": "^5.8.0", "@ionic-native/barcode-scanner": "^5.14.0",
"@ionic-native/ble": "^5.8.0", "@ionic-native/ble": "^5.8.0",
"@ionic-native/call-number": "^5.8.0", "@ionic-native/call-number": "^5.8.0",
"@ionic-native/camera": "^5.8.0", "@ionic-native/camera": "^5.8.0",
@ -64,7 +64,6 @@
"cordova-plugin-add-swift-support": "^2.0.2", "cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-android-permissions": "^1.0.0", "cordova-plugin-android-permissions": "^1.0.0",
"cordova-plugin-badge": "^0.8.8", "cordova-plugin-badge": "^0.8.8",
"cordova-plugin-cszbar": "^1.3.4",
"cordova-plugin-datepicker": "^0.9.3", "cordova-plugin-datepicker": "^0.9.3",
"cordova-plugin-device": "^2.0.3", "cordova-plugin-device": "^2.0.3",
"cordova-plugin-geolocation": "^4.0.2", "cordova-plugin-geolocation": "^4.0.2",
@ -84,6 +83,7 @@
"mx.ferreyra.callnumber": "0.0.2", "mx.ferreyra.callnumber": "0.0.2",
"ng2-file-upload": "^1.3.0", "ng2-file-upload": "^1.3.0",
"ng2-pdf-viewer": "^5.3.2", "ng2-pdf-viewer": "^5.3.2",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0", "phonegap-plugin-multidex": "^1.0.0",
"phonegap-plugin-push": "^2.2.3", "phonegap-plugin-push": "^2.2.3",
"primeicons": "^1.0.0", "primeicons": "^1.0.0",
@ -148,8 +148,10 @@
}, },
"cordova-sms-plugin": {}, "cordova-sms-plugin": {},
"cordova-plugin-datepicker": {}, "cordova-plugin-datepicker": {},
"cordova-plugin-cszbar": {}, "cordova-plugin-geolocation": {},
"cordova-plugin-geolocation": {} "phonegap-plugin-barcodescanner": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
}
}, },
"platforms": [ "platforms": [
"browser", "browser",

@ -5,6 +5,7 @@ import { Routes, RouterModule } from '@angular/router';
import { HmgCommonModule } from '../hmg-common/hmg-common.module'; import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { IonicModule } from '@ionic/angular'; import { IonicModule } from '@ionic/angular';
import { HomePage } from './home.page'; import { HomePage } from './home.page';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
const routes: Routes = [ const routes: Routes = [
{ {
@ -23,6 +24,9 @@ const routes: Routes = [
], ],
declarations: [ declarations: [
HomePage HomePage
],
providers:[
BarcodeScanner
] ]
}) })
export class HomePageModule { } export class HomePageModule { }

@ -9,6 +9,7 @@ import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-respo
import { CommonService } from "src/app/hmg-common/services/common/common.service"; import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { Geolocation } from "@ionic-native/geolocation/ngx"; import { Geolocation } from "@ionic-native/geolocation/ngx";
import { ZBar, ZBarOptions } from "@ionic-native/zbar/ngx"; import { ZBar, ZBarOptions } from "@ionic-native/zbar/ngx";
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { Device } from "@ionic-native/device/ngx"; import { Device } from "@ionic-native/device/ngx";
import { attendanceSwipeScannerRequest } from "./models/attendanceSwipe.Request"; import { attendanceSwipeScannerRequest } from "./models/attendanceSwipe.Request";
import { Response } from "src/app/hmg-common/services/models/response"; import { Response } from "src/app/hmg-common/services/models/response";
@ -41,7 +42,8 @@ export class HomePage implements OnInit {
private zbar: ZBar, private zbar: ZBar,
private geolocation: Geolocation, private geolocation: Geolocation,
private attendance_service: AttendanceService, private attendance_service: AttendanceService,
private eitService: EitService private eitService: EitService,
private barcodeScanner: BarcodeScanner
) { } ) { }
ngOnInit() { ngOnInit() {
@ -225,10 +227,10 @@ export class HomePage implements OnInit {
this.common.openChangePassword(); this.common.openChangePassword();
} }
private attendance() { private attendance() {
this.zbarOptions = { // this.zbarOptions = {
flash: "off", // flash: "off",
drawSight: false // drawSight: false
}; // };
//console.log("your currnt location is"); //console.log("your currnt location is");
//console.log("Loc"); //console.log("Loc");
@ -236,26 +238,37 @@ export class HomePage implements OnInit {
} }
scanCode() { scanCode() {
this.zbar // this.zbar
.scan(this.zbarOptions) // .scan(this.zbarOptions)
.then(result => { // .then(result => {
console.log(result); // Scanned code // console.log(result); // Scanned code
let strResult = JSON.parse(result); // let strResult = JSON.parse(result);
console.log(strResult.QRValue); // console.log(strResult.QRValue);
this.scannedResult = result; // this.scannedResult = result;
// this.deviceID = this.device.uuid;
// this.swipeAttendance();
// })
// .catch(error => {
// alert(error); // Error message
// });
this.barcodeScanner.scan().then(barcodeData => {
console.log('Barcode data', barcodeData);
// let strResult = JSON.parse(barcodeData);
// console.log(strResult.QRValue);
this.scannedResult = barcodeData;
this.deviceID = this.device.uuid; this.deviceID = this.device.uuid;
this.swipeAttendance(); this.swipeAttendance();
}) }).catch(err => {
.catch(error => { console.log('Error', err);
alert(error); // Error message });
});
} }
swipeAttendance() { swipeAttendance() {
let request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest(); let request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest();
request.Latitude = this.lat; request.Latitude = this.lat;
request.Longitude = this.longt; request.Longitude = this.longt;
request.QRValue = this.scannedResult; request.QRValue = this.scannedResult.text;
request.UID = this.deviceID; request.UID = this.deviceID;
request.UserName = this.userData.EMPLOYEE_NUMBER; request.UserName = this.userData.EMPLOYEE_NUMBER;
console.log("request"); console.log("request");

Loading…
Cancel
Save