From 266327c12641c4cf58dca0ab7471a9caa74a369f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Magalh=C3=A3es?= Date: Tue, 14 Feb 2023 20:18:31 -0300 Subject: [PATCH] fix: Bug fixed on UI adding to cart flow --- CHANGELOG.md | 5 +++++ messages/id.json | 2 ++ node/package.json | 2 +- node/yarn.lock | 10 +++++----- react/UploadBlock.tsx | 6 ++---- react/components/ReviewBlock.tsx | 3 +-- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2ce3027..ba4dde4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed + +- Bug fixed on UI adding to cart flow + + ### Added - [ENGINEERS-989] - Added verify the excel file testcase in cypress diff --git a/messages/id.json b/messages/id.json index ab9cffb3..1cec2668 100644 --- a/messages/id.json +++ b/messages/id.json @@ -57,6 +57,8 @@ "store/quickorder.validate": "Validasi", "store/quickorder.withoutPriceFulfillment": "Produk tanpa harga", "store/quickorder.withoutStock": "Tanpa stok", + "store/quickorder.limited": "Restricted Item", + "store/quickorder.partiallyAvailable": "Max quantity is {quantity}. Only {totalQuantity} total units available.", "store/toaster.cart.duplicated": "Item diduplikat", "store/toaster.cart.error": "Terjadi kesalahan saat menambahkan produk ke troli", "store/toaster.cart.seeCart": "Lihat troli", diff --git a/node/package.json b/node/package.json index 200c7fe1..8afc63a9 100644 --- a/node/package.json +++ b/node/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@gocommerce/utils": "^0.7.3", - "@vtex/api": "6.45.12", + "@vtex/api": "6.45.15", "atob": "^2.1.2", "axios": "^0.19.0", "camelcase": "^5.0.0", diff --git a/node/yarn.lock b/node/yarn.lock index a280772a..409a86b2 100644 --- a/node/yarn.lock +++ b/node/yarn.lock @@ -1863,10 +1863,10 @@ resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d" integrity sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg== -"@vtex/api@6.45.12": - version "6.45.12" - resolved "https://registry.yarnpkg.com/@vtex/api/-/api-6.45.12.tgz#b13c04398b12f576263ea823369f09c970d57479" - integrity sha512-SVLKo+Q/TxQy+1UKzH8GswTI3F2OCRCLfgaNQOrVAVdbM6Ci4wzTeX8j/S4Q1aEEnqBFlH/wVpHf8I6NBa+g9A== +"@vtex/api@6.45.15": + version "6.45.15" + resolved "https://registry.yarnpkg.com/@vtex/api/-/api-6.45.15.tgz#aa987d22f7df16ce2861130deda6ffd63156817b" + integrity sha512-Rg1VGDzJ4hHUNp1vSidMdGGPojr1PikMTptlZsJ3oNZVdEo4cPx2l8ZcAEwHWORL7QjPjXaEgmeA5ZOSf+boCQ== dependencies: "@types/koa" "^2.11.0" "@types/koa-compose" "^3.2.3" @@ -6055,7 +6055,7 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -stats-lite@vtex/node-stats-lite#dist: +"stats-lite@github:vtex/node-stats-lite#dist": version "2.2.0" resolved "https://codeload.github.com/vtex/node-stats-lite/tar.gz/1b0d39cc41ef7aaecfd541191f877887a2044797" dependencies: diff --git a/react/UploadBlock.tsx b/react/UploadBlock.tsx index 5d5843a4..183f5b2f 100644 --- a/react/UploadBlock.tsx +++ b/react/UploadBlock.tsx @@ -4,7 +4,7 @@ import type { FunctionComponent } from 'react' import React, { useState, useContext } from 'react' import type { WrappedComponentProps } from 'react-intl' import { FormattedMessage, injectIntl } from 'react-intl' -import { Button, Dropzone, ToastContext, Spinner } from 'vtex.styleguide' +import { Button, Dropzone, ToastContext } from 'vtex.styleguide' import { OrderForm } from 'vtex.order-manager' import type { OrderForm as OrderFormType } from 'vtex.checkout-graphql' import { addToCart as ADD_TO_CART } from 'vtex.checkout-resources/Mutations' @@ -227,7 +227,6 @@ const UploadBlock: FunctionComponent< const loopCount = Math.floor(items.length / splitBy) + 1 const promises: any = [] - // let orderFormData = [] for (let i = 0; i < loopCount; i++) { const chunk = tempItems.splice(0, splitBy) @@ -442,12 +441,11 @@ const UploadBlock: FunctionComponent< > - {refidLoading && } {showAddToCart && (