Commit Graph

224 Commits

Author SHA1 Message Date
Stevche Radevski
00a6e512dc feat: Add support in BE for setting tax inclusivity on currency (#8037) 2024-07-09 15:22:24 +02:00
Stevche Radevski
cbf2fcd559 Feat: Add tax inclusivity to admin (#8003)
* feat: Add price preference to sdk

* feat: Plug tax inclusivity settings for region in UI

* feat: Add price inclusivity indicator to variant and shipping price table columns

* fix: Rename price title to correct variable name

* feat: Add support for tax inclusive crud on region

* fix: Use the region endpoint for updating tax inclusivity

* chore: Factor out price columns from hooks
2024-07-09 09:26:20 +02:00
Kasper Fabricius Kristensen
4d750c13d9 make whole card clickable (#7984) 2024-07-08 10:03:04 +02:00
Kasper Fabricius Kristensen
e11716fa1e fix(dashboard): Hide edit rank button when no categories exist (#7986)
RESOLVES CORE-2456
2024-07-05 17:42:02 +00:00
Kasper Fabricius Kristensen
50df3cea00 fix(vite-plugin-admin): Ensure UI Routes are HMR (#7982)
* fix(vite-plugin-admin): Ensure UI Routes are HMR

* cleanup
2024-07-05 19:30:06 +02:00
Shahed Nasser
eafa3560ae chore(dashboard): text changes and fixes (#7925)
- Improvements to existing texts
- Add subtitles to sections where useful.
- Added the ability to edit the message shown in a list when no records are found + change the message where necessary
- Change documentation link to `https://docs.medusajs.com/v2`.
2024-07-05 12:14:10 +00:00
Frane Polić
32982e708a fix(dashboard): order list statuses (#7948)
* fix: order list statuses

* refactor: remove todo
2024-07-04 16:17:53 +02:00
Frane Polić
f4225c051f fix(dashboard): order item details alignment (#7942)
* fix: order item details alignment

* fix: use TW

* fix: use TW 2

* fix: smaller font for quantity
2024-07-04 12:59:36 +02:00
Riqwan Thamir
78a4bcc700 fix(dashboard): breaking store page due to default currency (#7915)
* chore: fix breaking store page due to default currency

* fix: remote query checks all data when scoped by id

* chore: minor change
2024-07-04 09:37:36 +02:00
Frane Polić
b3e55bfa48 feat(dashboard): activity section events (#7929)
* feat: activity section events

* fix: hide tax section

* fix: display shipping methods

* fix: reorg summary totals according to design
2024-07-03 20:48:53 +02:00
Stevche Radevski
3f499c829e fix: Minor fixes to the inventory pages (#7921) 2024-07-03 15:45:53 +02:00
Riqwan Thamir
fdee0bd55a chore: use campaign http types from types package (#7922) 2024-07-03 14:13:44 +02:00
Riqwan Thamir
40dbaf890f fix: only showcase tooltip when currency is not set (#7920)
* fix: only showcase tooltip when currency is not set

* chore: scope tooltip only if of type spend
2024-07-03 13:34:39 +02:00
Frane Polić
da645e4073 fix(dashboard): reset table scroll on page change (#7916) 2024-07-03 12:43:27 +02:00
Frane Polić
837ed093e3 fix(dashboard): few fixes (#7910)
* fix: fixes

* fix: inventory section row formatting with preline whitespace

* fix: manage zone areas
2024-07-03 09:34:03 +02:00
Kasper Fabricius Kristensen
492213cf03 fix(dashboard): add delete action to table (#7904) 2024-07-02 17:34:01 +02:00
Frane Polić
87375db9ef feat(dashboard): create shipment flow (#7898)
**What**
- add "Mark shipped" to Fulfillment section

---

CLOSES CORE-2427
2024-07-02 14:50:15 +00:00
Stevche Radevski
8244fe03b7 fix: Several fixes based on preview testing (#7906)
* fix: Add searchable properties on currency

* fix: Format product type dates in table

* fix: Preserve line whitespace in section row

* fix: Continue through tabs on Enter in create product form

* fix: Pagination in variant prices section

* fix: Add missing inventory edit item translation

* fix: Use the correct options URL for editing

* fix: Correctly get the variant title in inventory item details

* fix: Completely remove variant titles section in inventory item
2024-07-02 14:56:34 +02:00
Kasper Fabricius Kristensen
a84e5a6ced fix(ui,dashboard): Revamp DatePicker component (#7891)
**What**
- Revamps the DatePicker component. 
- Addresses all issues with broken DatePickers across admin.

**Note**
- Part of this PR is adding a I18nProvider which is used to set the locale that is used for our DatePicker and Calendar components. Per default they use the browser locale. In the current implementation, we are grabbing the locale to use from the language that is picked in the "Profile" section. This means that currently the only possible locale is "en-US", meaning times uses AM/PM. This is likely not what we want, but we need to make a decision on how we want to handle this globally, will create a ticket for it and we can then clean it up later on.
- This PR does not include "presets" or a DateRange picker that were part of the old implementation. Will open tickets to re-add this later on, but since we aren't using it in admin any where it makes sense to address later.
- This PR also bumps and pin every `@radix-ui` dependency in `@medusajs/ui` and `@medusajs/dashboard`. Our different versions were pulling in multiple versions of internal radix dependencies which were breaking Popover and Dialog behaviour across admin. One thing to note is that Radix have started to print warnings for missing Descriptions and Titles in dialogs. We should add these as we go, for better accessibility. Its not an urgent task but something we can add as we clean up admin over the following weeks. 

CLOSES CORE-2382
2024-07-02 08:59:32 +00:00
Riqwan Thamir
b25c6ab54f chore(promotion): toast error messages on promotion errors (#7897) 2024-07-01 20:52:39 +02:00
Stevche Radevski
357621d5d6 fix: Correctly choose the existing price ID when editing variant prices (#7894) 2024-07-01 17:56:31 +02:00
Riqwan Thamir
d58a626d0a fix: fix tabs + required fields (#7892) 2024-07-01 17:23:45 +02:00
Stevche Radevski
7c3f5cc334 fix: Missed import breaks the variant price edit page (#7871) 2024-06-29 09:23:39 +02:00
Kasper Fabricius Kristensen
c1740218e9 feat(dashboard,types,js-sdk,ui): Add missing Price List features (#7856)
**What**
- Adds missing features to Price List domain
- Adds `StackedFocusModal` and `StackedDrawer` components that should replace SplitView across the project.
- Add Footer to FocusModal
- Adds missing js-sdk functions and types

**Note**
The DatePickers in the PriceLists forms do not work as intended atm. The component is broken, and needs to be fixed. I am working on a fix, but choose to move that work into a separate branch, to prevent this PR from getting bigger then it already is. Will update once the fixes have been merged.
2024-06-28 14:08:23 +00:00
Frane Polić
8703f453be feat(dashboard): manage inventory items for variants (#7800)
* feat: manage inventory items for variants

* fix: show action only when manage inventory

* fix: translation key

* fix: labels depending on number of items

* fix: address feedback

---------

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2024-06-26 11:53:16 +02:00
Frane Polić
62dacdda75 fix: refreshing inventory locations list (#7828) 2024-06-25 21:19:09 +02:00
Frane Polić
4a631e789d feat(dashboard): handle region pricing on create/edit (#7811)
**What**
- allow for region prices creation on product create flow
- editing of region prices in prices edit form
2024-06-25 15:15:08 +00:00
Riqwan Thamir
bea3e669e1 chore: promotion UI spacing fixes (#7826) 2024-06-25 16:50:07 +02:00
Frane Polić
11502ee2b5 fix(dashboard): create reservation prefill (#7820)
**What**
- when creating reservation from inventory details page, preselect that inventory item

FIXES CORE-2387
2024-06-25 06:48:52 +00:00
Stevche Radevski
e8d6025374 Add support for tax inclusivity to region and store (#7808)
This also includes rework of the currency model for the Store module.

This change is breaking as existing stores won't have any supported currencies set, so users would need to go to the store settings again and choose the supported currencies there.
2024-06-24 15:25:44 +00:00
Kasper Fabricius Kristensen
aee75f6ba0 feat(dashboard): Add global commands (#7782)
* add global commands

* update lock

* shorten keybinds

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-06-24 13:00:52 +02:00
Frane Polić
ed104d5aac fix(dashboard): manage locations for item location levels (#7794)
* fix: manage locations for item location levels

* fix: toast
2024-06-21 14:43:07 +02:00
Kasper Fabricius Kristensen
e47d8d80d6 fix(dashboard): Fix CSS in Safari (#7791) 2024-06-21 14:42:39 +02:00
Frane Polić
79a8f0ef2c feat(dashboard): move shipping profile to locations (#7777) 2024-06-20 06:47:40 +00:00
Adrien de Peretti
48963f55ef Chore/rm main entity concept (#7709)
**What**
Update the `MedusaService` class, factory and types to remove the concept of main modules. The idea being that all method will be explicitly named and suffixes to represent the object you are trying to manipulate.
This pr also includes various fixes in different modules

Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-06-19 13:02:16 +00:00
Frane Polić
ef5719a3d8 feat(dashboard): variant details page (#7767)
* wip: setup

* feat: finish inventory, prices section

* feat: finish prices section pagination

* fix: move edit variants to variants details, fix loader

* fix: suggestion

* feat: price editor flow
2024-06-19 13:56:35 +02:00
Riqwan Thamir
0d04c548f5 feat(dashboard,types,promotion,medusa): hide fields on promotions depending on templates (#7746)
**what:**

- hides different fields depending on the chosen template
- remove operator values API
- fixes to edit promotion rules
- make currency optional for promotion

RESOLVES CORE-2297
2024-06-18 16:47:42 +00:00
Kasper Fabricius Kristensen
d5c5628ffc feat(dashboard): Add Optimistic UI to category rank form + style updates (#7747)
**What**
- Makes rank updates optimistic, meaning that we override the local state (ranking) with what we expect the outcome of the request to be. If a request fails then we revert to the last known server state.
- Updates the style of dragged items.
- Fixes an issue where the tree would flicker when submitting the create form.
2024-06-18 14:46:32 +00:00
Kasper Fabricius Kristensen
2d8d2c4255 feat(dashboard,js-sdk,types,admin-shared): Add Product Types domain (#7732) 2024-06-17 16:50:55 +00:00
Kasper Fabricius Kristensen
2e8e7b27b6 fix(dashboard,types,js-sdk): Locations & Shipping fixes and cleanup (#7715) 2024-06-17 16:10:39 +02:00
Frane Polić
4e86caba30 feat(dashboard): display inventory levels in variants table (#7694)
* feat: display inventory levels in variants table

* fix: display conditions and translations

* fix: invalidate inventory lists when products are created

* fix: translation, fix link definition

* fix: revert link

* feat: navigation actions

* fix: action, refactor

* fix: refactor, add check for manage quantity flag

* fix: update label
2024-06-17 11:23:18 +02:00
Frane Polić
3ecbec9685 feat(dashboard): inventory details variants section (#7705) 2024-06-14 11:18:23 +02:00
Oli Juhl
f138339cbc fix: Sort orders by created_at desc (#7706) 2024-06-13 21:31:59 +02:00
Riqwan Thamir
41528ddecf fix: ability to update price list status on admin (#7699) 2024-06-13 21:29:02 +02:00
Oli Juhl
6ee0a2c1b5 feat: Variant inventory quantity in GET requests (#7701)
* feat: Variant inventory quantity in GET requests

* clean up

* fix link name
2024-06-13 13:41:54 +02:00
Riqwan Thamir
c57223a3a2 chore: price list prices of a product can be deleted (#7700) 2024-06-13 12:19:09 +02:00
Frane Polić
3693f61dc3 feat(dashboard): finalise inventory kit creation (#7692)
* feat: finalize inventory kit creation

* fix: placeholder
2024-06-12 16:35:54 +02:00
Kasper Fabricius Kristensen
2f76fbc6ed feat(dashboard,types,sdk,medusa,ui): ProductCategory domain (#7675)
**What**
- Add missing features to ProductCategory domain in admin
- Add types
- Add SDK

**UI**
- Moves the TooltipProvider from the component to an export. Users should now wrap their entire application in a TooltipProvider. This change was made to take advantage of the built-in features of Radix Tooltip, and allows us to skip the delayDuration when moving the cursor from one tooltip to another within 500ms.
- Fixes the layout of the Hint component, as the create form revealed that it was off.
- Fixes an issue where focus styles were missing from the dropdown menu.

**Note**
- ~~We currently don't have an endpoint for deleting categories, so I have disabled the button in the admin. See CORE--2286~~ PR has been opened to add delete endpoint, so I have re-enabled the delete button.
- The update category workflow seems to be broken, it's possible for the `mpath` of a category to reach an invalid state, that breaks `include_descendants_tree` from working. See CORE-2287.
- The ProductCategory model is incorrect. All fields are optional and it's not possible to set the description to null, which means the only way of unsetting it is to set it to `""`. See CORE-2276.
- The design for the Organize drag-n-drop form is not final. Ludvig will create a final design, and we can then update the form.
- Currently, all things related to Metadata is left out, as we need to update the flow for metadata according to the latest designs.

RESOLVES CORE-1960, CORE-2230
*except for the above mentioned issues.
2024-06-12 11:15:12 +00:00
Frane Polić
48d8b2c623 fix(core-flows): variant pricing batch update (#7677)
* fix: variant pricing batch update

* fix: batch endpoint throwing when `create` array isn't passed

* fix: batch variants workflow
2024-06-11 19:45:43 +02:00
Stevche Radevski
8e2a42b786 Clean up product typings (#7663)
There are a lot of issues in the admin after applying the correct typings, but fixing those should be done gradually, it's better to keep it out of this PR
2024-06-11 09:28:40 +00:00