Commit Graph

250 Commits

Author SHA1 Message Date
Frane Polić
43eb38c8cb fix(dashboard): create variant remove inventory quantity (#8129) 2024-07-15 17:44:09 +02:00
Stevche Radevski
874d511e13 feat: Add tax inclusivity management to currenices (#8112) 2024-07-14 18:03:44 +02:00
Frane Polić
ee826390ea fix(dashboard): reservation and price list fixes (#8110)
* wip: reservation fixes, PL fixes

* fix: delete message and cache invalidation

* fix: invalidate inventory item details when reservation is created/updated/deleted

* fix: align design

* fix: location levels cache
2024-07-14 18:00:16 +02:00
Frane Polić
82b620c488 fix(dashboard): promotions disable conditions (#8104) 2024-07-12 16:10:05 +02:00
Frane Polić
4c2e9a3239 feat(dashboard): allocate items (#8021)
**What**
- add Allocate items flow

---


https://github.com/medusajs/medusa/assets/16856471/8485c8dc-b1f2-4239-bb22-996345d5d2ad
2024-07-12 07:57:00 +00:00
Frane Polić
ac416e99a1 fix(dashboard): product create input focus (#8095) 2024-07-11 18:09:49 +02:00
Kasper Fabricius Kristensen
b5a44ef6b1 feat(dashboard,medusa): Add updated Metadata Form (#8084)
**What**
- Adds new Metadata form component.
- Adds the Metadata section as an option to the Page layouts

<img width="576" alt="Skærmbillede 2024-07-11 kl  11 34 06" src="https://github.com/medusajs/medusa/assets/45367945/417810ee-26e2-4c8a-86e3-58ef327054af">
<img width="580" alt="Skærmbillede 2024-07-11 kl  11 34 33" src="https://github.com/medusajs/medusa/assets/45367945/437a5e01-01e2-4ff7-8c7e-42a86d1ce2b3">


**Note**
- When Metadata contains non-primitive data, we disable those rows, and show a placeholder value, a tooltip and an alert describing that the row can be edited through the API. I want to add a JSON editor to allow editing these things in admin, but awaiting approval on that.
- This PR only adds the new form to a couple of pages, to keep the PR light, especially since metadata is not implemented correctly in all validators so also needs some changes to the core. This still show some examples of how its used with the new Page layout components. Will follow up with more pages in future PRs. 
- We try to convert the inputs to the best fitting primitive, so if a user types "true" then we save the value as a boolean, "130" as number, "testing" as a string, etc.
2024-07-11 13:54:59 +00:00
Frane Polić
74c19308a0 fix(dashboard): stock location hook cache invalidation (#8049) 2024-07-10 20:06:36 +02:00
Frane Polić
b289510b46 fix(dashboard, medusa): mark shipped flow (#8065)
* fix: mark shipped routing

* fix: naming
2024-07-10 19:37:12 +02:00
Carlos R. L. Rodrigues
de36e2b36e chore: rename return flow (#8050) 2024-07-10 08:09:10 -03:00
Kasper Fabricius Kristensen
04ec8e758f fix(dashboard): Add safe zone around link Table rows (#8058)
**What**
- After adding Table rows as links there was an issue where clicking close to a Checkbox in a row would click the link. This PR adds a safe zone around the Checkboxes, so you don't end up navigating when trying to select a row.

![image](https://github.com/medusajs/medusa/assets/45367945/7091d6d5-665d-41c7-8b2b-63244fef73b2)

RESOLVES CORE-2566
2024-07-10 10:34:11 +00:00
Kasper Fabricius Kristensen
046a34bdfc feat(dashboard,types,js-sdk,ui): Tax Regions UI (#7935) 2024-07-10 09:26:43 +00:00
Kasper Fabricius Kristensen
6e613f4f50 feat: Update toast design (#8018)
**What**
- Updates the Toast component and `toast` util to match the latest design. 
- Updates every usage of `toast` as `dismissableLabel` is no longer a valid prop, as we now render a X mark instead of a text button.
2024-07-09 16:14:19 +00:00
Kasper Fabricius Kristensen
24fc6befd2 fix(dashboard): Allow cmd+click on table rows (#8045) 2024-07-09 17:57:09 +02:00
Kasper Fabricius Kristensen
d46f9fda21 fix(admin-vite-plugin): ensure forward slashes are used for paths (#8023) 2024-07-09 17:12:48 +02:00
Kasper Fabricius Kristensen
880a91d569 fix(dashboard): Shipping Type tooltip (#8042) 2024-07-09 17:08:38 +02:00
Kasper Fabricius Kristensen
4736d9e2dd fix(dashboard): JSON view (#8038)
* updated json view

* cleanup

* cleanup
2024-07-09 16:45:22 +02:00
Stevche Radevski
101ebbe0f0 fix: Have shipping options open by default (#8040)
CLOSES CORE-2455
2024-07-09 13:59:45 +00:00
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