Commit Graph
100 Commits
Author SHA1 Message Date
Kasper Fabricius Kristensen 8ab5baf78a fix(admin-ui): Bulk editor default fields (#5829)
* fix(ui): Bump cva and minor type fixes

* fix version of cva

* fix default fields
2023-12-10 19:36:08 +01:00
Kasper Fabricius Kristensen 591ba2388d fix(ui): Bump cva and minor type fixes (#5818)
**What**
- Bumps `class-variance-authority` to new beta version - `cva@beta`.
- Updates all usages of `cva` to new API.
- Clear up the naming of types in `usePrompt`

**Why**
- A bug in how `class-variance-authority` exported its types mean that we were relying on patching the package to ensure that the correct types made it into the build of our UI package. This was important to ensure intellisense for component variants, such as `<Button size="large" />`. Previously in the UI monorepo, having the patch was enough to ensure that the correct types made it into the build, but that was not the case after we moved the design system to the core repo. The issue with types is fixed in the `@1` version of `cva` which is currently in beta. I have pinpointed the version to the current beta version to ensure stability despite the package currently being in beta.
2023-12-07 20:13:44 +00:00
Kasper Fabricius Kristensen 4e9d954549 fix(medusa-react): Allow setting maxRetries on MedusaProvider (#5765)
* allow settign maxRetries on MedusaProvider

* add changeset

* set default maxRetries to 3
2023-11-29 15:42:46 +00:00
Kasper Fabricius Kristensen d5526736ec fix(admin-ui): fix height of Bulk Editor cells to always be 40px (#5737) 2023-11-27 16:34:53 +00:00
Kasper Fabricius Kristensen 5f6751a61f fix(admin-ui): Fix Y-axis scroll in bulk editor (#5726) 2023-11-27 11:13:11 +00:00
Kasper Fabricius Kristensen 07934cdaac fix(admin-ui): Edit prices requires at least one product (#5710) 2023-11-24 13:54:07 +00:00
Kasper Fabricius Kristensen f4c489fb85 fix(admin-ui): Fix issue with null product categories (#5707)
* fix(admin-ui): If categories is null on a product the details page should not crash

* cleanup variant warning to reflect pricing changes
2023-11-24 12:51:32 +00:00
Kasper Fabricius Kristensen 22bea2724d fix(medusa): Normalize subscriber paths (#5703) 2023-11-23 17:33:51 +00:00
Kasper Fabricius Kristensen b25b29fe7b fix(ui): code block styles (#5692)
**What**
- Improves the styling of CodeBlock prism theme
2023-11-23 11:59:17 +00:00
Kasper Fabricius KristensenandOli Juhl 57573ed4d7 feat(medusa): Alternative Subscriber API and new ScheduledJobs API (#5624)
* workking subscribers API

* progress

* update registrar args

* cleanup

* progress

* progress

* tests

* rename to loaders

* rm build artifacts

* improve validation and change jobs args to object

* spread context on subscribe

* add changeset

* address comments

* fix spelling of warning and add warning on Redis not enabled for Scheduled Jobs

* fix tests

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-11-16 20:36:02 +01:00
Kasper Fabricius Kristensen a67a8e7e90 fix(ui): Fixed CodeBlock line number width (#5640)
**What**
- Fixes the width of lineNumbers in the CodeBlock component according to the widest number.
- Introduces a new prop on snippets that allows users to hide the copy button. Also updated docs to reflect this.

Before:
![image](https://github.com/medusajs/medusa/assets/45367945/07852c2e-434c-44df-93b7-4078148cb74f)

After:
<img width="742" alt="image" src="https://github.com/medusajs/medusa/assets/45367945/5ce845f7-b8c7-411c-abfb-fa03448aeb1a">

Closes #5639
2023-11-16 10:50:04 +00:00
Kasper Fabricius KristensenandOli Juhl 2947f57db1 fix(medusa): Update wrapHandler so it also passes errors in non-async route handlers to the errorHandler middleware (#5597)
* fix: Align @types/react versions across UI packages

* update codeowners

* fix: Update wrapHandler so it also catches errors for non-async route handlers

* rm chaining

* align wrapHandler in utils and add deprecation note

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-11-15 19:41:10 +01:00
Kasper Fabricius Kristensen c08240df3f fix(admin-ui): Preserve decimal numbers when locale uses commas (#5641)
**What**
- Ensure that we format numbers with `.` as the decimal separator, even when the users locale uses `,`. This changes still allows users to use comma as the decimal separator, but the transformation we use before writing to state converts the number to use a dot instead.
2023-11-15 17:18:26 +00:00
Kasper Fabricius Kristensen a2a45b6fef fix: minor fixes to IconButton and Button documentation (#5636)
**What**
- Updates example on IconButton page so it no longer uses IconBadge
- Removes the "small" size from Button props as it no longer exists.
2023-11-15 15:53:05 +00:00
Kasper Fabricius Kristensen 52800710a2 fix(medusa): Error handling middleware should be applied when no config is exported (#5634)
**What**
- Fixes an issue where the default errorHandler middleware was not applied if the user did not have a `middlewares.ts` file.
- Updates the type of `MiddlewaresConfig` so `middlewares` is now optional, as people might want to only set a bodyParser config for a matcher and not provide any additional middleware.
2023-11-14 20:48:10 +00:00
Kasper Fabricius Kristensen e3f1da92db fix(admin-ui, ui): Align @types/react versions across UI packages (#5596)
* fix: Align @types/react versions across UI packages

* update codeowners
2023-11-10 08:31:30 +01:00
Kasper Fabricius Kristensen c68da6d685 feat(medusa): API routes body parser config (#5537) 2023-11-09 09:10:45 +01:00
Kasper Fabricius Kristensen e4ce2f4e07 chore(ui,icons,ui-preset,toolbox): Move design system packages to monorepo (#5470) 2023-11-07 22:17:44 +01:00
Kasper Fabricius Kristensen d7e1887221 fix(admin-ui): Prevent comma decimal separator from converting inputs to NaN (#5566)
**What**
- Using the Price List bulk editor with a locale that uses comma as the decimal separator would convert decimal numbers to NaN. This PR fixes that by replacing commas with dots, before passing the values on to the state manager.

Closes #5565
2023-11-06 13:26:35 +00:00
Kasper Fabricius Kristensen f7e9829881 fix(admin-ui): Prevent oversized product request in Price List domain (#5535)
* fix(admin-ui): Prevent oversized product request in Price List domain

* add changeset
2023-11-02 17:05:08 +01:00
Kasper Fabricius Kristensen 8e48be58ef fix(admin-ui): Make regions in tax setting scrollable (#5530)
* fix overflow

* intersection observer and changeset
2023-11-02 13:03:45 +01:00
Kasper Fabricius Kristensen 2548ea8e5e fix(medusa): Make file based routing compatible with Windows pathing (#5497) 2023-10-31 14:46:24 +01:00
Kasper Fabricius Kristensen b69f182571 fix(admin-ui): modify webpack config to prevent throwing sourcemap errors (#5484) 2023-10-30 12:06:58 +01:00
Kasper Fabricius Kristensen ea2ee343f0 fix(admin-ui): PriceList bulk editor fixes (#5456)
* fix: rounding on decimal numbers, wrap in form

* add changeset

* fix: decimal numbers in product details

* fix: resolve an issue where double clicking an already selected cell would freeze it
2023-10-26 09:56:36 +02:00
ddff919655 feat(medusa): support file based routing (#5365)
* feat(medusa): Implement file base routing mechanism

* cleanup

* cleanup and improvements

* improve tests

* update tests

* Create tame-trains-grin.md

* fix tests, move fixtures

* fix tests

* lint

* init work

* work on supported methods

* add config generator

* progress

* progress

* rework middleware registartion

* progress

* progress

* export MiddlewareConfig  type

* add type extensions

* work on improving logs

* work on loggers

* apply cors, json parsing, and admin authentication per default

* address feedback

* rm changeset

---------

Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-10-18 16:26:27 +02:00
Kasper Fabricius Kristensen 3376f4ccc1 fix(admin-ui): alias design system packages (#5358)
* alias design system packages

* add changeset
2023-10-13 14:49:17 -07:00
Kasper Fabricius Kristensen e04927a3cb fix(admin-ui): Price list domain fixes (#5339)
**Fixes**
- Fixes an issue where click the Delete button on a table item in the Price List overview would also navigate to the Price Lists page
- Fixes an issue where Region prices were not showing which region they belong to in the Bulk Editor
- Fixes an issue where the wrong widgets were being injected into the Price List domain

**Improvements**
- Align label for Expiry date field
- Add form validation to require setting the prices of at least one product variant when creating or adding prices to a Price List.
- Show a prompt warning if prices have not been set for all selected products in the create and add product flows.
2023-10-12 08:34:46 +00:00
0f34e0f381 feat(admin-ui, medusa, medusa-react, medusa-js): Price List UI revamp (#5233)
* progress on cleanup

* rm forceMount

* close modal on succesful submit

* fix: invalidate price list query on useAdminCreatePriceListPrices

* sync translation keys

* add last translations

* sync translation keys

* improve tabbing between cells

* add comment

* fix: remove double variant, set collision boundary on column dropdown

* add widgets

* update lock file

* decrease details info size, and add missing status update function

* sync translation keys

* add snapshots and remove min/max

* add missing filter menu for customer groups table

* add translation keys for filter menu

* rm unused code

* Create tall-apricots-run.md

* Update tall-apricots-run.md

* fix: discard invalid paste values

* add translation keys

* bump snapshots + minor fixes

* rm console.log

* bump snapshots

* bump ui packages, and add missing tax inclusive display in New form

* update lock file

* fix filter menu

* update snapshot

* update ui package and fix sub menu position

---------

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-10-06 08:22:25 -07:00
Kasper Fabricius KristensenandShahed Nasser 4e3f3b54cb docs(ui,docs): Add documentation for Medusa UI 2.0.0 (#5227)
* add docs for medusa ui 2.0.0

* fix: copy as child example

* fix: dropdown menu example

* add accordion examples

* fix lint issues

* fix apos in progress tabs demo

* resolve comments

* add icon

* bump z-index on modals to prevent clashing with navbar

* add sidebar item and card

* undo modal z index changes

* add links to updated and new components

* update version

* rm inline code formatting on links

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-09-27 18:56:25 +03:00
Kasper Fabricius Kristensen cb67760f71 fix(admin,admin-ui): copy public folder as part of admin build (#5057)
**What**
- Copies `/public` folder into Admin build
- Updates the version of `dotenv` to match the version used in other Medusa dependencies. This will prevent errors when trying to link the `admin` package into a local repository for testing.
2023-09-15 09:47:11 +00:00
Kasper Fabricius Kristensen 545022145b fix(admin): Export RouteProps and SettingProps (#4950)
* fix: export SettingProps and RouteProps from admin package

* add changeset
2023-09-05 19:22:52 +02:00
Kasper Fabricius KristensenandShahed Nasser 3ad2136888 feat(api-reference): Add rewrite to UI docs (#4791)
* add rewrite to UI docs

* add base rewrite

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-08-17 19:31:22 +03:00
Kasper Fabricius Kristensen 1e8d044b16 add versions (#4795) 2023-08-17 17:10:40 +02:00
f1a05f4725 feat(admin, admin-ui, medusa-js, medusa-react, medusa): Support Admin Extensions (#4761)
Co-authored-by: Rares Stefan <948623+StephixOne@users.noreply.github.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-17 12:14:45 +00:00
Kasper Fabricius Kristensen 063d9b6d55 fix(admin-ui): Ensure order of variant options matches order of product options (#4178) 2023-05-25 20:36:27 +02:00
Kasper Fabricius Kristensen 9a46c11f2a fix(admin-ui): Ensure that default invite link uses __BASE__ if set (#4173)
* ensure default invite link uses __BASE__ if it exists

* add changeset
2023-05-25 20:27:18 +02:00
Kasper Fabricius Kristensen 2829537592 fix(admin-ui): Template download path (#4050)
* pin react-router-dom

* fix template download path

* add changeset
2023-05-09 12:13:54 +02:00
Kasper Fabricius Kristensen a7adb8fbf4 fix(admin-ui): Pin react-router-dom (#3999)
**What**
- Pins the version of `react-router-dom` to `6.8.0` as the upgrade to `6.11.0` broke usage of `useNavigate` in nested routes.
2023-05-03 14:31:18 +00:00
Kasper Fabricius Kristensen 596566a510 fix(admin-ui): Navigating to tax settings should not break URL (#3989)
* fix navigation to taxes page, and switch out react-helmet with react-helemt-async

* add changeset

* pinpoint react-hot-toast
2023-05-03 13:40:04 +02:00
Kasper Fabricius Kristensen 788ddc0f43 fix(medusa, admin-ui, medusa-react): Gift Card update fixes and admin UI cleanup (#3676)
* fix gc domain issues

* add changeset

* update changeset

* more minor fixes, remove breadcrumb

* more cleanup

* address feedback
2023-04-02 19:04:32 +02:00
Kasper Fabricius Kristensen 4342ac884b feat(admin-ui, medusa): admin UI metadata (#3644) 2023-03-31 12:07:24 +02:00
Kasper Fabricius Kristensen cd54c7dca9 fix(medusa-cli): add semver dependency (#3603)
* add direct dependency on semver to CLI

* add changeset
2023-03-29 08:48:39 +02:00
Kasper Fabricius Kristensen d7ac88a3a5 fix(admin-ui): Explicitly add add moment dependency (#3560) 2023-03-23 15:58:47 +01:00
Kasper Fabricius Kristensen bfef22b33e fix(admin-ui): Gift Card manage page (#3532)
**What**
- Updates GC manage page to use product page sections
- Revamps Denomination section
- Updates the location of several components to reflect that they are now shared between the GC and products domain

![image](https://user-images.githubusercontent.com/45367945/226584238-bb0786b1-d21c-4b90-b00b-29530af320f4.png)
![image](https://user-images.githubusercontent.com/45367945/226584362-80c0c9f8-4ec5-4e64-9075-110caa3b5137.png)

Resolves CORE-1089
2023-03-23 08:29:29 +00:00
Kasper Fabricius KristensenandOliver Windall Juhl 8a7421db5b feat(admin): Improve DX for deploying admin externally (#3418)
* init deploy command

* add include flag

* add 'shortcut' flag

* add dev command, fix var replacement, change default behaviour

* cleanup params of build command

* fix defaults when using the plugin to serve admin

* add changeset

* fix globals

* update README

* throw error on no build found

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-03-17 13:18:51 +01:00
Kasper Fabricius Kristensen 9ad15d3a88 feat(admin-ui): Implements redesign of public pages (#3504)
* redesign public pages

* rm build files

* fix size of button
2023-03-17 10:17:47 +01:00
Kasper Fabricius Kristensen ad7d7fcd51 fix(admin-ui): Lint all UI files (#3459) 2023-03-13 14:02:20 +01:00
d0d11307d2 fix(admin-ui): Fix use of expand parameter on order page (#3383)
* Create cuddly-seahorses-thank.md

* add integration tests

* revert back from master to develop

* fix expand

* add new integration test

* add missing default relations

* add missing refunds relation

* re work

* fix tests

* init

* fix order page according to fixes to expand

* expand shipping on returns

* Create .changeset/cuddly-beers-tease.md

---------

Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-03-07 19:43:44 +01:00
Kasper Fabricius Kristensen cf51ad0d46 fix(admin-ui): move dependencies from devDependencies (#3405) 2023-03-07 14:43:08 +01:00
Kasper Fabricius KristensenandOliver Windall Juhl b4eba69911 fix(admin-ui): Resolve tailwindcss/nesting correctly (#3404)
* attempt resolving tailwind nesting

* fix import of tailwindcss/nesting plugin

* trigger pipeline

* trigger pipeline

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-03-07 13:12:13 +01:00
Kasper Fabricius Kristensen 67ba8be02b fix(admin): Add skus to claim menus (#3368)
**What**
- Adds SKU to all tables in claim flow, allowing admins to easily copy them to their clipboard.
2023-03-05 17:17:45 +00:00
Kasper Fabricius Kristensen 40de54b010 feat(admin,admin-ui,medusa): Add Medusa Admin plugin (#3334) 2023-03-03 10:09:16 +01:00
Kasper Fabricius Kristensen 3a911091f1 hotfix(medusa-js): Export resources classes and make client public (#3271)
* export all ressource classes and make client public

* add changeset
2023-02-16 09:03:49 +01:00
Kasper Fabricius Kristensen b9bda3bf4e fix(medusa): Allow method.data to be passed when creating/updating ShippingMethods in ClaimService (#3205)
**What**
- Allows passing data on shipping methods during claim creation and updates. Defaults to an empty object.

**Testing** 
- Updates a test so it also passes along shipping method data.
2023-02-08 12:37:35 +00:00
Kasper Fabricius Kristensen 86c87c7b10 fix(medusa): Deleting product prices (#3152) 2023-02-08 13:13:34 +01:00
Kasper Fabricius Kristensen d0adaf57ed fix(medusa): Shipping profile CRUD (#3154)
**What**
- Fixes wrong payload class for `POST /admin/shipping-profiles`
- Fixes wrong payload class for `POST /admin/shipping-profiles/:id`
- Fixes an issue where updating a shipping profile with products and/or shipping options would fail.
- Fixes an issue where passing `profile_id` to `ShippingOptionService.update()` would not update the shipping profile of the option.

**Testing** 
- Adds new `simpleshippingProfileFactory`
- Adds new integration test suite for shipping profiles operations.

Resolves CORE-1065
2023-02-06 16:57:12 +00:00
Kasper Fabricius Kristensen 4fbf6b7ad3 fix(medusa-react): Fix production.min.js causing invalid hook usage error in CJS environments (#3144) 2023-02-01 14:07:02 +01:00
Kasper Fabricius Kristensen 6293fccc65 hotfix(medusa-react): Invalidate query keys on successful mutations (#3099)
**What**
- Fixes an issue where query keys weren't invalidated on successful mutations.

**How**
- Update `buildOptions` function to be called per `QueryKey` instead of passing them all as a single query key, resulting in no matches found.
- Fixes imports that aren't compatible with ESM modules.
2023-01-24 12:55:24 +00:00
Kasper Fabricius Kristensen fcba705701 fix(medusa): Allow deleting metadata fields (#3055) 2023-01-19 11:34:13 +01:00
Kasper Fabricius Kristensen 150696de99 feat(medusa, medusa-js, medusa-react): Add endpoint to retrieve product tags from the storefront (#3051) 2023-01-18 10:47:15 +01:00
Kasper Fabricius Kristensen cb25244007 hotfix(medusa-js, medusa-react): Fix issue with JS client bundle (#3038) 2023-01-16 17:44:24 +01:00
Kasper Fabricius Kristensen 8d1275c942 feat(medusa-react): Upgrade react-query and clean up dependencies (#2969) 2023-01-11 19:19:34 +01:00
Kasper Fabricius Kristensen f6c81dab9e feat(medusa-js): Bundle package using Rollup (#2964) 2023-01-10 14:44:25 +01:00
Kasper Fabricius Kristensen 9e05fef4b9 fix(medusa): Fix q param on /admin/price-lists/:id/products (#2813) 2022-12-18 20:11:38 +01:00
Kasper Fabricius Kristensen c2c38dd091 fix(medusa, medusa-react): Typing of optional fields on multiple product endpoints (#2771) 2022-12-12 19:10:06 +01:00
Kasper Fabricius Kristensen 33aa3edb80 fix(medusa): keep country_code when partially updating cart addresses (#2683)
**What**
- Fixes a bug where `country_code` was dropped when partially updating a shipping or billing address on a cart.
2022-12-12 14:03:54 +00:00
Kasper Fabricius Kristensen 72f70bc789 fix(medusa): Decorate order with totals in store domain (#2747) 2022-12-09 09:42:53 +01:00
Kasper Fabricius Kristensen 4de4f20b46 feat(medusa): add analytics config (#2442)
**What**
- Adds new entity AnalyticsConfig
- Adds new service AnalyticsConfigService
- Adds new repository AnalyticsConfigRepository
- Adds new endpoints to get, create, update, and delete analytics configs

**Why**
As we begin gathering usage insights to help us improve Medusa, we want to give each individual users the ability to control what data they share with us, or not share any data with us at all. The AnalyticsConfig holds information that is used to check if the user wishes for their data to be anonymized or if they have opted out of sharing usage data.

The entire feature can be disabled on a store level by setting the feature flag `MEDUSA_FF_ANALYTICS=false` in their environment variables, the feature is enabled by default. 

**Testing**
Adds integration test for each of the new endpoints

Resolves CORE-656, CORE-655, CORE-654

Also resolves CORE-574
2022-10-21 13:04:46 +00:00
Kasper Fabricius Kristensen fcfb7d167b fix(medusa): Allow AddressPayload or string on DraftOrder creation (#1902) 2022-10-19 18:01:08 +02:00
Kasper Fabricius Kristensen 69e579758f fix(medusa, medusa-js): Use price selection strategy for GET /admin/variants (#2270)
**What**
- Adds the use of price selection strategy to the endpoint `GET /admin/variants`
- Updates medusa-js to reflect this change (expanding the parameters).

**Testing**
- Adds a new integration test validating that returned variants are now of type PricedVariant, with the expected fields: original_price, calculated_price, etc.

**Why**
- Our current RMA flows (in our admin dashboard) relied heavily on simply using `order.tax_rate` to calculate variant prices in the different RMA menus. As taxes in Medusa, have become feature complete this approach had become very naive and has several potential issues. Moving the responsibility for calculating the correct prices guarantees that we always show the correct prices to admins.
2022-10-13 08:54:03 +00:00
Kasper Fabricius Kristensen 211720f24c fix(medusa): List products by type_id (#2427)
**What**
- Fixes `GET /products` in both admin and store API so they no longer accept the param `type?: string`, but instead accept `type_id?: string[]`

**Why**
- Filtering by type would never return any products as `ptyp_:id` !== `ProductType`.

**Testing**
- Added an integration test for each endpoint.

Closes CORE-695
2022-10-12 18:56:56 +00:00
Kasper Fabricius Kristensen 64949dc721 feat(medusa-js,medusa-react,medusa): Add missing Currency endpoints (#2185) 2022-09-12 19:28:43 +02:00
Kasper Fabricius KristensenandSebastian Rindom cbdc5b7774 fix(gatsby-source-medusa): Unsupported exports warning and schema (#1463)
**What**

- Moves `sourceUpdatedNodes` and `sourceAllNodes` to a separate file, to prevent warning of unsupported exports. See #1455.
- Adds warnings if `GET /store/products`, `GET /store/regions`, and `GET /store/collections` return empty arrays. This should help new users more easily figure out why their storefronts does not work as expected.
- Adds schema to plugin, so that node types for products, regions and collections are always created. This will prevent errors such as `allMedusaRegions query failed` from happening in the storefront, as the query will be valid as the type exists, even if it returns nothing. This should make the gatsby plugin/starter easier to use. This error is an reoccurring issue in our discord, when new users try to run the Gatsby starter without seeding the storefront beforehand. 

Resolves #1455 

Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
2022-07-13 12:42:06 +00:00
Kasper Fabricius Kristensen fb4cfc3c3c fix(medusa-react): Use correct type for hook useAdminCreateDraftOrder (#1832) 2022-07-11 16:14:10 +02:00
Kasper Fabricius Kristensen 083ab09361 fix(medusa): Prevent discount type updates (#1584) 2022-05-30 09:44:53 +02:00
Kasper Fabricius Kristensen 5414148254 fix(medusa): Post /admin/discounts/:id not updating condition operator (#1573) 2022-05-24 12:28:40 +02:00
Kasper Fabricius Kristensen 2f08167480 fix(medusa): discount types across model, service and api (#1545) 2022-05-22 12:18:37 +02:00
Kasper Fabricius Kristensen a10ac19d8e fix(medusa): applicableness of discounts with conditions not related to customer groups (#1534)
Discounts with conditions not related to customer groups prevent the discount from being applicable to customers (#1534)
2022-05-19 09:00:35 +02:00
Kasper Fabricius Kristensen 46d9e6c44c fix(medusa): add q param to listAndCount product types and product tags (#1531) 2022-05-18 11:31:02 +02:00
Kasper Fabricius Kristensen 5ae5f15e98 fix(medusa): RMA on items from swaps and claims (#1182) 2022-05-17 11:19:46 +02:00
Kasper Fabricius Kristensen b02f2652be fix(medusa-react): useUpdatePaymentSession mutation (#1522) 2022-05-16 14:02:32 +02:00
Kasper Fabricius Kristensen 8dd27ecb7e fix(medusa): AddressPayload typing and removes Joi validation from CustomerService (#1520) 2022-05-16 13:43:59 +02:00
Kasper Fabricius Kristensen 7605963ded fix(medusa): Use boolean on list shipping options params (#1493) 2022-05-16 10:05:48 +02:00
Kasper Fabricius Kristensen e7cb76ab6e fix: Cascade remove prices + option values on variant and product delete (#1465) 2022-05-08 16:12:31 +02:00
Kasper Fabricius Kristensen 7a1e394b9d Feat/expand on list discounts (#1304) 2022-04-21 15:22:07 +02:00
Kasper Fabricius Kristensen 2a1b34c20f fixed typing of AdminPostPriceListsPriceListPriceListReq (#1332) 2022-04-13 10:50:05 +02:00
Kasper Fabricius Kristensen 8c420f4285 feat: Add BatchJob entity (#1324)
* added entity

* better typing

* make requested changes

* add migration
2022-04-13 08:16:38 +02:00
5300926db8 feat: Implement PriceList and extend MoneyAmount (#1152)
* init

* added buld id validation to repo

* admin done

* updated price reqs

* intial implementation of PriceList

* integration tests for price lists

* updated admin/product integration tests

* update updateVariantPrices method

* remove comment from error handler

* add integration test for batch deleting prices associated with price list

* make update to prices through variant service limited to default prices

* update store/products.js snapshot

* add api unit tests and update product integration tests to validate that prices from Price List are ignored

* fix product test

* requested changes

* cascade

* ensure delete variant cascades to MoneyAmount

* addresses PR feedback

* removed unused endpoint

* update mock

* fix failing store integration tests

* remove medusajs ressource

* re add env.template

* Update integration-tests/api/__tests__/admin/price-list.js

Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>

* Update integration-tests/api/__tests__/admin/price-list.js

Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>

* fix: update snapshots

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
2022-03-18 15:18:50 +01:00
Kasper Fabricius Kristensen 4be991c156 fix: source-shopify tests (#1192) 2022-03-15 20:12:52 +01:00
Kasper Fabricius KristensenandSebastian Rindom eb8e247e7d fix: source shopify handle duplicate unique values and more efficient updates (#1154)
* fix: added functionality to handle duplicate sku, ean, upc, and barcodes on product variants

* handle unique variant values

* save

* clear ignored keys in redis

* fixed plugin to handle duplicates and use last build time to make queries more effective

* v1.1.1-canary.0

* removed console log

* v1.1.1-canary.1

* reduce amounts of calls to shopify api

* v1.1.1-canary.2

* added README and support for SmartCollections

* v1.1.1-canary.4

* v1.1.1-canary.5

* v1.1.1-canary.5

* fix dropped products in smart collections

* cleanup

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2022-03-10 13:10:57 +01:00
Kasper Fabricius Kristensen 4e7435e4d7 fix: default POST request payloads to an empty object (#1141)
* defaulted carts.create payload to an empty object

* fix linting

* requested changes
2022-03-09 17:19:38 +01:00
Kasper Fabricius Kristensen a6f352d9f1 fixed type of value and valid_for in AdminPostDiscountsDiscountReq (#1128)
* fixed type of value in update/rule

* update type of valid_for
2022-03-06 20:44:11 +01:00
Kasper Fabricius Kristensen 508dc33dd3 updated invite.created event with user_email so it can be used to send an email invitation (#1069) 2022-02-25 18:53:49 +01:00
Kasper Fabricius Kristensen 91263fbc8e fix: reset user password subscription in sendgrid plugin (#1072)
* fixed reset password subscription

* cleanup
2022-02-25 18:53:49 +01:00
Kasper Fabricius Kristensen 1f2ee04abe fix: export request types from add and remove product endpoints (#1078) 2022-02-25 18:53:49 +01:00
Kasper Fabricius Kristensen 1e4cc2fc80 feat: add and remove products to/from collection in bulk endpoints (#1032)
* adds bulk add/remove products to/from collection. Adds endpoint updateProducts on collections that uses these bulk operations

* fix integration tests and test description

* undo change to swap

* made requested changes

* added removeProducts endpoint

* made requested changes

* fix: set collection_id null

* updated collection_id to type string | undefined
2022-02-25 18:53:49 +01:00
Kasper Fabricius Kristensen 82ecc7ad24 adds ability to update balance to 0 and adds integration test (#1036) 2022-02-25 18:53:49 +01:00
Kasper Fabricius Kristensen ed612df2b5 updated invite.created event with user_email so it can be used to send an email invitation (#1069) 2022-02-21 19:53:03 +01:00
Kasper Fabricius Kristensen 90121dd19d fix: reset user password subscription in sendgrid plugin (#1072)
* fixed reset password subscription

* cleanup
2022-02-21 19:52:03 +01:00
Kasper Fabricius Kristensen 449e666428 fix: export request types from add and remove product endpoints (#1078) 2022-02-17 14:47:15 +01:00