Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/hotwax/picking into picking…
Browse files Browse the repository at this point in the history
…/177-centralizedoms
  • Loading branch information
amansinghbais committed Oct 9, 2023
2 parents 37d1cee + 80f7aa6 commit 2dcc6e8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"App": "App",
"Authenticating": "Authenticating",
"Are you sure you want to change the time zone to?": "Are you sure you want to change the time zone to {timeZoneId}?",
"product barcode": "product barcode",
"Camera permission denied.": "Camera permission denied.",
"Cancel": "Cancel",
"Change": "Change",
"Click the backdrop to dismiss.": "Click the backdrop to dismiss.",
Expand Down Expand Up @@ -35,6 +35,7 @@
"Picklist Completed": "Picklist Completed",
"Picklists": "Picklists",
"Please allow camera access in your settings": "Please allow camera access in your settings",
"product barcode": "product barcode",
"Product not found": "Product not found",
"Product not found in remaining items": "Product not found in remaining items",
"Scan": "Scan",
Expand Down
12 changes: 9 additions & 3 deletions src/views/Picklist-Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,22 @@ export default defineComponent({
})
},
async scanCode() {
const modal = await modalController
try {
// checking camera permission before opening the scanner
await navigator.mediaDevices.getUserMedia({ video: true });
const modal = await modalController
.create({
component: Scanner,
});
modal.onDidDismiss()
modal.onDidDismiss()
.then((result) => {
//result : value of the scanned barcode/QRcode
this.selectProduct(result.data.value)
});
return modal.present();
return modal.present();
} catch (err) {
showToast(translate("Camera permission denied."));
}
},
sortPickists() {
// Sort picklist products based on the sorting parameter selected
Expand Down

0 comments on commit 2dcc6e8

Please sign in to comment.