hotwax / receiving

HotWax Commerce Receiving App
https://receiving.hotwax.io/
Apache License 2.0
8 stars 40 forks source link

[Fixed]: Scanning modal remains open and blank when camera access is denied (#329) #406

Open coolnj4 opened 1 week ago

coolnj4 commented 1 week ago

Related Issues

Modal remains blank and open when camera access is denied during product scanning #329 https://github.com/hotwax/dxp-components/issues/329

#

Short Description and Why It's Useful

Introduced an alert pop-up for the case of camera access permission denied. Added hasCameraAccess to track camera permission status.

Implemented a method to request camera access and show an alert if access is denied. The barcode scanner now only loads when camera access is granted.

Screenshots of Visual Changes before/after (If There Are Any)

Before if camera permission is denied image

After image

Contribution and Currently Important Rules Acceptance

ymaheshwari1 commented 1 week ago

Thanks for the contribution @coolnj4

PR looks good, but I will suggest some improvements here:

coolnj4 commented 1 week ago

I can't seem to find the parent component from which the Scanner component is being triggered. Can you please guide me through it?

ymaheshwari1 commented 1 week ago

I can't seem to find the parent component from which the Scanner component is being triggered. Can you please guide me through it?

Its on the ShipmentDetails, ReturnDetails and PurchaseOrderDetails page. So you need to handle this change in all the three views.

coolnj4 commented 1 week ago

I’ve implemented the suggested changes let me know if there’s anything else you'd like me to adjust!