From 639f7c6467b58ada39e042fcc06b31980c697245 Mon Sep 17 00:00:00 2001 From: deyvisonwanderley Date: Sun, 21 Dec 2025 20:40:40 -0300 Subject: [PATCH] feat: implement barcode search configuration in 'Almoxarifado', integrating multiple external APIs for enhanced product information retrieval and improving user experience with new modals for data handling --- .../almoxarifado/ImageUpload.svelte | 305 ++++++++- .../(dashboard)/almoxarifado/+page.svelte | 20 +- .../materiais/cadastro/+page.svelte | 523 ++++++++++++++- .../configuracoes-almoxarifado/+page.svelte | 286 +++++++- packages/backend/convex/_generated/api.d.ts | 2 + .../convex/actions/README_BUSCAR_PRODUTO.md | 196 ++++++ .../convex/actions/buscarInfoProduto.ts | 622 ++++++++++++++++-- .../convex/configuracaoBuscaCodigoBarras.ts | 166 +++++ packages/backend/convex/tables/system.ts | 26 +- 9 files changed, 2024 insertions(+), 122 deletions(-) create mode 100644 packages/backend/convex/actions/README_BUSCAR_PRODUTO.md create mode 100644 packages/backend/convex/configuracaoBuscaCodigoBarras.ts diff --git a/apps/web/src/lib/components/almoxarifado/ImageUpload.svelte b/apps/web/src/lib/components/almoxarifado/ImageUpload.svelte index cffbff0..d2b2d02 100644 --- a/apps/web/src/lib/components/almoxarifado/ImageUpload.svelte +++ b/apps/web/src/lib/components/almoxarifado/ImageUpload.svelte @@ -1,5 +1,5 @@ @@ -151,23 +317,34 @@ {:else} -
{ - if (e.key === 'Enter' || e.key === ' ') { - e.preventDefault(); - triggerFileInput(); - } - }} - > - -

Clique para fazer upload da imagem

-

- PNG, JPG ou GIF até {maxSizeMB}MB -

+
+
{ + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + triggerFileInput(); + } + }} + > + +

Clique para fazer upload da imagem

+

+ PNG, JPG ou GIF até {maxSizeMB}MB +

+
+
ou
+
{/if} @@ -178,17 +355,89 @@ {/if} {#if preview} - +
+ + +
{/if}
+ +{#if showCamera} +
+
e.stopPropagation()} + > +
+

Capturar Foto

+ +
+ +
+ {#if showCamera} + + {/if} + {#if !capturing} +
+
+ +

Iniciando câmera...

+
+
+ {/if} +
+ +
+ + +
+
+
+{/if} +