From 317183449f69eb0b1f6486e8e4b14c0a713f6ddd Mon Sep 17 00:00:00 2001 From: layacat Date: Wed, 6 Nov 2024 10:31:09 +0700 Subject: [PATCH 01/10] fix: 50485 mWeb/Chrome - IOU- Continue and green button not working in scan page --- .../new-expensify/expenses-&-payments/Create-an-expense.md | 5 +++++ src/languages/en.ts | 2 +- src/languages/es.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/articles/new-expensify/expenses-&-payments/Create-an-expense.md b/docs/articles/new-expensify/expenses-&-payments/Create-an-expense.md index cf6a13f9d5ac..5b43223ae3c3 100644 --- a/docs/articles/new-expensify/expenses-&-payments/Create-an-expense.md +++ b/docs/articles/new-expensify/expenses-&-payments/Create-an-expense.md @@ -40,6 +40,11 @@ You can create an expense to request payment from an employer’s workspace or f You can also forward receipts to receipts@expensify.com using an email address that is your primary or secondary email address. SmartScan will automatically pull all of the details from the receipt and add it to your expenses. {% include end-info.html %} +{% include info.html %} +If the Continue button doesn't open the camera on your mobile web browser, +it might be because you denied camera permission. Learn how to enable camera permission in your browser [here](https://support.google.com/chrome/answer/2693767). +{% include end-info.html %} + # Manually add an expense {% include selector.html values="desktop, mobile" %} diff --git a/src/languages/en.ts b/src/languages/en.ts index 21f220b747f2..5a56363ad3da 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -779,7 +779,7 @@ const translations = { dragReceiptAfterEmail: ' or choose a file to upload below.', chooseReceipt: 'Choose a receipt to upload or forward a receipt to ', takePhoto: 'Take a photo', - cameraAccess: 'Camera access is required to take pictures of receipts.', + cameraAccess: "Camera access still hasn't been granted, please follow these instructions", cameraErrorTitle: 'Camera error', cameraErrorMessage: 'An error occurred while taking a photo. Please try again.', locationAccessTitle: 'Allow location access', diff --git a/src/languages/es.ts b/src/languages/es.ts index ac06741f467e..a1ef94209c88 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -773,7 +773,7 @@ const translations = { dragReceiptAfterEmail: ' o elije un archivo para subir a continuación.', chooseReceipt: 'Elige un recibo para subir o reenvía un recibo a ', takePhoto: 'Haz una foto', - cameraAccess: 'Se requiere acceso a la cámara para hacer fotos de los recibos.', + cameraAccess: 'Si aún no se ha concedido el acceso a la cámara, siga estas instrucciones', cameraErrorTitle: 'Error en la cámara', locationAccessTitle: 'Permitir acceso a la ubicación', locationAccessMessage: 'El acceso a la ubicación nos ayuda a mantener tu zona horaria y moneda precisas dondequiera que vayas.', From 2d8e017514c80c23f255d32a5511379b6bcd2491 Mon Sep 17 00:00:00 2001 From: layacat Date: Wed, 6 Nov 2024 18:39:05 +0700 Subject: [PATCH 02/10] Fix show only when denied --- src/languages/en.ts | 4 ++- src/languages/es.ts | 4 ++- .../request/step/IOURequestStepScan/index.tsx | 28 +++++++++++++------ 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 5a56363ad3da..065470c1eba8 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -779,7 +779,9 @@ const translations = { dragReceiptAfterEmail: ' or choose a file to upload below.', chooseReceipt: 'Choose a receipt to upload or forward a receipt to ', takePhoto: 'Take a photo', - cameraAccess: "Camera access still hasn't been granted, please follow these instructions", + cameraAccess: 'Camera access is required to take pictures of receipts.', + deniedCameraAccess: "Camera access still hasn't been granted, please follow ", + deniedCameraAccessInstructions: 'these instructions', cameraErrorTitle: 'Camera error', cameraErrorMessage: 'An error occurred while taking a photo. Please try again.', locationAccessTitle: 'Allow location access', diff --git a/src/languages/es.ts b/src/languages/es.ts index a1ef94209c88..d8e2ccf206e4 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -773,7 +773,9 @@ const translations = { dragReceiptAfterEmail: ' o elije un archivo para subir a continuación.', chooseReceipt: 'Elige un recibo para subir o reenvía un recibo a ', takePhoto: 'Haz una foto', - cameraAccess: 'Si aún no se ha concedido el acceso a la cámara, siga estas instrucciones', + cameraAccess: 'Se requiere acceso a la cámara para hacer fotos de los recibos.', + deniedCameraAccess: 'Si aún no se ha concedido el acceso a la cámara, siga ', + deniedCameraAccessInstructions: 'estas instrucciones', cameraErrorTitle: 'Error en la cámara', locationAccessTitle: 'Permitir acceso a la ubicación', locationAccessMessage: 'El acceso a la ubicación nos ayuda a mantener tu zona horaria y moneda precisas dondequiera que vayas.', diff --git a/src/pages/iou/request/step/IOURequestStepScan/index.tsx b/src/pages/iou/request/step/IOURequestStepScan/index.tsx index 4ed956e5ce7e..e3a6fc1f8cb5 100644 --- a/src/pages/iou/request/step/IOURequestStepScan/index.tsx +++ b/src/pages/iou/request/step/IOURequestStepScan/index.tsx @@ -20,6 +20,7 @@ import LocationPermissionModal from '@components/LocationPermissionModal'; import PDFThumbnail from '@components/PDFThumbnail'; import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; import Text from '@components/Text'; +import TextLink from '@components/TextLink'; import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails'; import useLocalize from '@hooks/useLocalize'; import usePolicy from '@hooks/usePolicy'; @@ -629,14 +630,25 @@ function IOURequestStepScan({ additionalStyles={[styles.pb5]} /> {translate('receipt.takePhoto')} - {translate('receipt.cameraAccess')} -