diff --git a/package.json b/package.json index 2f446bc..53a5526 100644 --- a/package.json +++ b/package.json @@ -14,9 +14,10 @@ "@babel/traverse": "7.22.5", "@hookform/error-message": "^2.0.1", "@hookform/resolvers": "^3.3.1", - "@medusajs/icons": "^1.1.0", - "@medusajs/ui": "^2.4.0", + "@medusajs/icons": "^1.2.2", + "@medusajs/medusa": "^1.7.7", "@medusajs/ui-preset": "^1.1.1", + "@medusajs/ui": "^3.0.1", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", "@radix-ui/react-accordion": "^1.0.1", "@radix-ui/react-avatar": "^1.0.1", @@ -32,43 +33,51 @@ "@segment/analytics-next": "^1.51.1", "@svgr/webpack": "^8.0.1", "@swc/core": "^1.3.61", - "@tailwindcss/forms": "^0.5.3", + "@tailwindcss/forms": "^0.5.7", + "@tailwindcss/line-clamp": "^0.3.1", "@tanstack/react-query": "4.22.0", "@tanstack/react-table": "^8.7.9", - "autoprefixer": "^10.4.13", + "autoprefixer": "^10.4.19", + "axios": "^1.1.3", "chokidar": "^3.5.3", "clsx": "^1.2.1", + "confetti-js": "^0.0.18", "copy-to-clipboard": "^3.3.1", "copy-webpack-plugin": "^11.0.0", + "crypto-browserify": "^3.12.0", "css-loader": "^6.8.1", "emoji-picker-react": "^4.4.3", "framer-motion": "^9.1.6", "html-webpack-plugin": "^5.5.1", - "i18next": "^22.5.0", "i18next-browser-languagedetector": "^7.0.1", "i18next-http-backend": "^2.2.1", + "i18next": "^22.5.0", + "immutability-helper": "^3.1.1", + "iso8601-duration": "^1.3.0", + "lodash": "^4.17.21", "md5": "^2.3.0", - "medusa-react": "^9.0.13", + "medusa-react": "^9.0.18", "mini-css-extract-plugin": "^2.7.6", "moment": "^2.29.4", "path-browserify": "^1.0.1", "pluralize": "^8.0.0", - "postcss": "^8.4.21", "postcss-loader": "^7.3.2", "postcss-preset-env": "^8.4.1", + "postcss": "^8.4.38", "prism-react-renderer": "^2.0.4", "process": "^0.11.10", "query-string": "^8.1.0", - "react": "^18.2.0", + "randomatic": "^3.1.1", "react-collapsible": "^2.8.3", "react-country-flag": "^3.0.2", "react-currency-input-field": "^3.6.8", "react-datepicker": "^4.8.0", "react-dev-utils": "^12.0.1", - "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", + "react-dnd": "^16.0.1", "react-dom": "^18.2.0", "react-helmet-async": "^1.3.0", + "react-helmet": "^6.0.0", "react-highlight-words": "^0.18.0", "react-hook-form": "7.38.0", "react-hot-toast": "2.4.0", @@ -81,29 +90,20 @@ "react-router-dom": "6.8.0", "react-select": "^5.5.4", "react-table": "^7.7.0", + "react": "^18.2.0", + "stream-browserify": "^3.0.0", "style-loader": "^3.3.3", "swc-loader": "^0.2.3", "swc-minify-webpack-plugin": "^2.1.1", - "tailwindcss": "3.2.2", "tailwindcss-radix": "^2.7.0", + "tailwindcss": "^3.4.3", "ts-dedent": "^2.2.0", "type-fest": "^3.6.0", - "webpack": "^5.84.1", + "uuid": "^8.3.2", "webpack-dev-server": "4.15.0", + "webpack": "^5.84.1", "webpackbar": "^5.0.2", - "zod": "^3.22.2", - "@medusajs/medusa": "^1.7.7", - "@tailwindcss/line-clamp": "^0.3.1", - "axios": "^1.1.3", - "confetti-js": "^0.0.18", - "crypto-browserify": "^3.12.0", - "immutability-helper": "^3.1.1", - "iso8601-duration": "^1.3.0", - "lodash": "^4.17.21", - "randomatic": "^3.1.1", - "react-helmet": "^6.0.0", - "stream-browserify": "^3.0.0", - "uuid": "^8.3.2" + "zod": "^3.22.2" }, "devDependencies": { "@babel/types": "7.22.5", diff --git a/src/components/molecules/actionables.tsx b/src/components/molecules/actionables.tsx index b66c802..11b1490 100644 --- a/src/components/molecules/actionables.tsx +++ b/src/components/molecules/actionables.tsx @@ -41,32 +41,34 @@ const Actionables: React.FC = ({ )} - - {actions.map((action, i) => { - return ( - - { - - } - - ) - })} - + + + {actions.map((action, i) => { + return ( + + { + + } + + ) + })} + + ) diff --git a/src/domain/discounts/details/index.tsx b/src/domain/discounts/details/index.tsx index eb47c7a..5be70b4 100644 --- a/src/domain/discounts/details/index.tsx +++ b/src/domain/discounts/details/index.tsx @@ -23,7 +23,7 @@ const Edit = () => { const { discount, isLoading, error } = useAdminDiscount( id!, - { expand: "rule,rule.conditions" }, + { expand: "rule,rule.conditions,regions" }, { enabled: !!id, } diff --git a/src/domain/orders/details/returns/index.tsx b/src/domain/orders/details/returns/index.tsx index 56c168e..a880eb9 100644 --- a/src/domain/orders/details/returns/index.tsx +++ b/src/domain/orders/details/returns/index.tsx @@ -1,10 +1,9 @@ import { AdminGetVariantsVariantInventoryRes, AdminPostOrdersOrderReturnsReq, - InventoryLevelDTO, + LevelWithAvailability, Order, LineItem as RawLineItem, - StockLocationDTO, } from "@medusajs/medusa" import LayeredModal, { LayeredModalContext, @@ -100,7 +99,7 @@ const ReturnMenu: React.FC = ({ order, onDismiss }) => { }, [order.items]) const [inventoryMap, setInventoryMap] = useState< - Map + Map >(new Map()) React.useEffect(() => { @@ -122,7 +121,7 @@ const ReturnMenu: React.FC = ({ order, onDismiss }) => { .filter((it) => !!it) .map((item) => { const { variant } = item as AdminGetVariantsVariantInventoryRes - return [variant.id, variant.inventory[0].location_levels] + return [variant.id, variant.inventory[0]?.location_levels] }) ) } diff --git a/src/domain/product-categories/utils/index.tsx b/src/domain/product-categories/utils/index.tsx index 86a79cf..84d1b0e 100644 --- a/src/domain/product-categories/utils/index.tsx +++ b/src/domain/product-categories/utils/index.tsx @@ -48,13 +48,13 @@ export const getDefaultCategoryValues = (t: TFunction, category?: ProductCategor ), }, is_active: { - value: category?.is_active ? (category?.is_active ? CategoryStatus.Active : CategoryStatus.Inactive) : CategoryStatus.Active, + value: category?.is_active ? CategoryStatus.Active : CategoryStatus.Inactive, label: category?.is_active - ? t("modals-active", "Public") as string + ? t("modals-active", "Active") as string : t("modals-inactive", "Inactive") as string, }, is_public: { - value: category?.is_internal ? (category?.is_internal ? CategoryVisibility.Private : CategoryVisibility.Public) : CategoryVisibility.Public, + value: category?.is_internal ? CategoryVisibility.Private : CategoryVisibility.Public, label: category?.is_internal ? t("modals-private", "Private") as string : t("modals-public", "Public") as string,