Commit Graph

145 Commits

Author SHA1 Message Date
olivermrbl
2fbebb60e3 chore: Release 2024-10-22 20:43:47 +02:00
Oli Juhl
c3418a2b93 chore: Prepare versions + changeset (#9707)
* chore: Prepare version + changeset

* chore: Bump dependencies

* chore: Update lock-file
2024-10-22 20:31:33 +02:00
Kasper Fabricius Kristensen
1c1ba88220 fix(dasbhoard): Revert keybound form for public pages (#9710)
**What**
- We recently changed all forms to require Cmd/Ctrl + Enter to submit, this makes sense for our forms within modals, but not so much for our public pages such as the login page.
- This PR removes the need to hold Cmd or Ctrl when trying to submit the forms on the login page, reset password page, and register page.
- Also fixes some incorrect styling on the reset password and register pages.
2024-10-22 15:00:35 +00:00
Frane Polić
94ca1134c7 fix(dashboard): broken CustomerGroup create form (#9711) 2024-10-22 14:59:45 +00:00
Frane Polić
6e0a1e3a86 fix(dashboard): temp hide order column on reservations (#9692)
**What**
- hide the order column on the reservations list until a link is introduced + impl. of `listOrderItems`
2024-10-22 12:27:05 +00:00
Kasper Fabricius Kristensen
68cb7d0b27 fix(admin-vite-plugin): Generate correct UI Route tree (#9699) 2024-10-22 10:55:16 +02:00
Kasper Fabricius Kristensen
9f53683508 feat(dashboard,types): Translate all OrderBy filters (#9691)
Resolves CC-616

**Note**
- I have added some missing fields to a couple of types, to resolve TS errors in the dashboard.
- For the ApiKey types I have left the created_at, updated_at, etc. as type Date, as changing them to string, caused @medusajs/medusa to fail building. We need to clean up the types at a later time.
2024-10-21 18:09:55 +00:00
Shahed Nasser
a0668adefa fix(dashboard,js-sdk): remove methods / hooks to non existing exchange routes (#9697)
Remove the following exchange methods (and hooks from dashboard) which point to routes that don't exist:

- `delete`
- `addItems`
- `updateItem`
- `removeItem`
2024-10-21 14:00:30 +00:00
Kasper Fabricius Kristensen
7cc599a68c fix(dasboard): Grammer issues on invite page (#9683) 2024-10-21 10:01:22 +02:00
Frane Polić
05cea00146 fix: wrong qk (#9685) 2024-10-21 10:01:10 +02:00
Frane Polić
24a1b81fb2 fix(dashboard, js-sdk): undefined RMA activity items (#9649)
**What**
- fix for showing removed items in rma flows

---

DEPENDS ON https://github.com/medusajs/medusa/pull/9646
FIXES CC-597
2024-10-20 12:56:08 +00:00
Shahed Nasser
2ea766daf5 fix(dashboard,js-sdk): remove method and hook for deleting claim (#9668) 2024-10-18 19:43:53 +03:00
Frane Polić
5b91d71318 feat(dashboard) taxes + discount breakdown (#9586)
**What**
- add tax breakdown to order details
- display discount total and codes

---

CLOSES CC-553
2024-10-18 09:40:08 +00:00
Kasper Fabricius Kristensen
82e32f9da4 test(admin-vite-plugin): React Invalid hook call on Windows (#9647) 2024-10-18 09:38:28 +00:00
Kasper Fabricius Kristensen
7a47f5211d fix(dashboard): Hide usage insights (#9651)
**What**
- Hides everything related to usage insights from the profile page.

**Why**
- We haven't set up usage insights tracking in V2, so hiding the UI for disabling/enabling it. We can re-add it again later if we decide we want to continue tracking how the dashboard is used.
2024-10-18 08:20:05 +00:00
Kasper Fabricius Kristensen
902087e569 fix(dashboard): Ensure all progress tabs are 200px wide (#9644)
**What**
- Fixes onE FocusModal where the ProgressTabs weren't 200px wide. All others already have the correct width.

Resolves CC-110
2024-10-17 15:17:10 +00:00
Kasper Fabricius Kristensen
b50ac9730e fix(dashboard): Fix styling of nested NavLinks (#9637)
**What**
Adds the `end` prop to NavLinks, so they only use their active style when the current path is a perfect match.
This was added to prevent MenuItems from extensions both showing the parent and child items as active, when the child route was active.

Also added a check to prevent users from adding nested settings NavLinks.


<img width="218" alt="Skærmbillede 2024-10-17 kl  14 25 12" src="https://github.com/user-attachments/assets/9e4d530a-c7b4-410e-aaaf-5a21ac86eb03">
<img width="221" alt="Skærmbillede 2024-10-17 kl  14 24 03" src="https://github.com/user-attachments/assets/6769b951-8e48-4725-a373-dc64ed6936ce">
2024-10-17 14:16:31 +00:00
Frane Polić
2cba362537 fix(dashboard): cleanup Payments section (#9520)
**What**
- fix content breaking
- use a shorter payment ID in the UI

---

FIXES CC-572
2024-10-17 11:36:02 +00:00
Kasper Fabricius Kristensen
1d540af783 feat(dashboard): Submit forms on Cmd + Enter (#9623)
**What**
- Changes all forms to only submit on Cmd/Ctrl + Enter instead of just Enter.
- Cleans up the position of submit/cancel buttons in many FocusModals that still had them in the header.
- Fixes responsiveness of multiple forms
- Removes the SplitView component, and replaces its usages with StackedDrawer/Modal to align the UX across the project.

Resolves CC-103, CC-535
2024-10-17 09:38:12 +00:00
Kasper Fabricius Kristensen
6a6fd6ee4c fix(dashboard,ui): Fix outline flash on FocusModal (#9624)
**What**
- Fixes an issue where the `outline` would flash on FocusModals when the focus was transferred to the modal.
- Fixes an issue where the selected value of the combobox component was misaligned for single value comboboxes.

Resolves CC-604
2024-10-17 06:56:08 +00:00
Frane Polić
c2a39c78f5 fix(dashboard): FF return reason table (#9614)
**What**
- fix an issue with text display in the table
- fix label

---

FIXES CC-603
2024-10-16 14:24:35 +00:00
Riqwan Thamir
449168578d fix(dashboard): Set correct method value on promotion (#9610)
<img width="1441" alt="Screenshot 2024-10-16 at 14 17 05" src="https://github.com/user-attachments/assets/7a2e2196-5ca6-4532-9bf0-a4b693c6babc">

RESOLVES CC-601
2024-10-16 12:31:39 +00:00
Kasper Fabricius Kristensen
3388764af4 fix(admin-vite-plugin): Replace slashes for Windows (#9602) 2024-10-16 08:39:07 +00:00
Kasper Fabricius Kristensen
813efeae51 fix(admin-vite-plugin): Normalize file paths and add tests (#9595)
**What**
- #9338 had a regression which caused the import path in some virtual modules to be invalid on Windows.
- This PR fixes the issue so we now again create the correct import paths, and adds tests to prevent this from slipping in again.
2024-10-15 16:48:56 +00:00
Adrien de Peretti
84fa6ccde5 chore: Update admin build/serve configuration (#9584)
**Breaking changes**

The `outDir` has been deprecated and wont be used anymore, instead all the path are computed internally following these rules
- if admin is not `disabled` and the `build` command is run without the `--admin-only` flag, then the admin output dir will be `.medusa/server/public/admin` and it will be served from that same location from the medusa instance.
- if admin is not `disabled` and the `build` command is run with the `--admin-only` flag, then the admin output dir will be `.medusa/admin` with the purpose of deploying the admin separately. ⚠️ (expect to receive a warning log)
- if the admin is `disabled` and the `build` command is run with the `--admin-only` flag, then fallback to rule number 2

| admin enabled  | medusa build --admin-only  | output dir |
|---|---|---|
| true  | true  | `.medusa/admin` ⚠️ (expect to receive a warning log) |
| true  | false  | `.medusa/server/public/admin`  |
| false  | true  | `.medusa/admin`  |
| false  | false  | none |

```diff
// medusa-config.ts

{
  // ...
  admin: {
-    outDir: 'some/path'
  }
}
```


cc @kasperkristensen @sradevski @olivermrbl
2024-10-15 15:59:47 +00:00
Frane Polić
48cc00e991 feat(core-flows, product): options checks on product create/update (#9171)
**What**
- validate that variants are unique with respect to options on product update/create and variant update/create
- validate that the product has options upon creation
- ensure variants have the same number of option values as the product has options
- admin error handling
- update tests

---

FIXES FRMW-2707 CC-556
2024-10-15 09:06:51 +00:00
Frane Polić
75475f7b28 fix(dashboard): reservation inventory details (#9535)
**What**
- display data in inventory details section of the reservation details page

---

FIXES CC-595
2024-10-14 17:59:52 +00:00
Kasper Fabricius Kristensen
ebb16d6020 fix(dashboard): Translate breadcrumbs (#9561)
**What**
- Adds translated keys for all static breadcrumbs.
2024-10-14 14:42:59 +00:00
Kasper Fabricius Kristensen
170b3a08b7 fix(dashboard): Prevent category names from overflowing in organize section (#9562)
**What**
- Prevents the name of parent and children categories from overflowing in the Organize section.

Resolves CC-586
2024-10-14 14:24:22 +00:00
Kasper Fabricius Kristensen
56135b9750 fix(dashboard): Change icon of Shipping Profiles card (#9563)
Resolves CC-156
2024-10-14 14:23:07 +00:00
Kasper Fabricius Kristensen
2a9fc0e514 fix(dashboard): Show progress on tabs in create form (#9553)
**What**
- Shows progress on tabs in create promotion form. This is a bit of a band-aid fix, the promotion form and domain needs some proper cleanup, but this will work for now.
- Adds missing translation of "Method" field.

Resolves CC-113
2024-10-14 10:36:31 +00:00
Kasper Fabricius Kristensen
089d4af301 fix(dashboard): Hide note input on orders (#9555)
**What**
- Hides the input for notes on the order details page.
- Should be re-added once we have support, so I have just commented out the component.
2024-10-14 10:10:33 +00:00
Kasper Fabricius Kristensen
3edb5d3470 fix(dashboard): Show SO name in DataGrid (#9554)
**What**
- Adds a Readonly cell with the SO name in the pricing DataGrid.

Resolves CC-555
2024-10-14 10:05:21 +00:00
Kasper Fabricius Kristensen
1b82f7a814 fix(dashboard): Adds routes for handling tax overrides for provinces (#9549) 2024-10-14 11:34:15 +02:00
Kasper Fabricius Kristensen
1f682daf5c fix(dashboard,ui): Fixes to Combobox and CategoryCombobox (#9537)
**What**
- Fixes the Combobox to keep the width of the content constant.
- Brings CategoryCombobox inline with the other Combobox component
- Adds keyboard navigation to the CategoryCombobox: You can now navigate options using ArrowUp and ArrowDown, and if an option has children you can use ArrowRight to see the children options.
- Add "outline-none" to the Drawer component to stop it from flashing whenever focus is dropped.
- Removes a dependency that was added to the UI package by mistake

Resolves CC-155
2024-10-12 14:46:32 +00:00
Kasper Fabricius Kristensen
ccd40e6548 feat(dashboard): Add global search (#9504)
**What**
- Adds the ability to do global searches from cmd + k in the admin.
- The solution is temporary, until we have a proper search API.

**Note**
I have deviated a bit from the design, due to the constraints of this temporary solution:
- We don't have nested items, such as showing variants under a product (don't think having a proper search API will make this any easier, and not entirely sure how we would handle this for cases where a query returns multiple products, which is the only case that is designed)
- I have added a "Load {{count}} more" button instead of doing infinite scrolling, I am assuming the later is the intended behaviour based on the design file, but with 20+ sources of data changing so often it was resulting in some weird behaviours, so settled for the simpler approach for this temporary solution.
- Removed the "Details" label on search results as it seemed a bit repetitive
- I haven't added icons for the different types of search results, as there are only a couple of examples in the design doc, and I wasn't sure what to pick for all the different types of results. If we want to add icons, then I think it's something we can add when we revisit this later, but think its fine to omit, as each group of results is labeled, so they are easy to tell apart.

Resolves CC-574
2024-10-11 07:38:05 +00:00
Frane Polić
1b9379be62 fix(core-flows, dashboard): inventory kit reservations (#9502)
**What**
- fix `prepareConfirmInventory` to account for inventory kit items
  - _note: this step is reused in the complete cart and all RMA flows_ 
- properly remove reservations for items that are removed from the order edit
- invalidate inventory/reservations cache when order edit is confirmed

---

https://github.com/user-attachments/assets/f12e9198-0718-4c08-bd81-efc536eca146

---

FIXES CC-565
2024-10-09 17:54:35 +00:00
Frane Polić
5c9457bb4f fix(dashboard): undeclared var (#9512) 2024-10-09 17:53:19 +02:00
Sebastian Rindom
0e11e89233 fix: hover states on filters and chip groups (#9511)
* fix: hover states on filters and chip groups

* fix: create FilterChip component
2024-10-09 16:50:47 +02:00
Kasper Fabricius Kristensen
d71343d6ab feat(dashboard,admin-vite-plugin,admin-bundler,admin-sdk): Rework admin extensions and introduce custom fields API (#9338) 2024-10-09 11:44:40 +00:00
Kasper Fabricius Kristensen
35e69d32f2 fix(dashboard): Remove token copy from badge (#9508)
**What**
- Removes the <Copy /> wrapper from the Token badge in API key tables.
- The usage of copy spawned to issues: the click was being propagated despite stopping propagation causing navigation to the API keys detail page, the Copy acts as a <a /> tag when it's a child of a <Link />, escaping react-router-dom and doing a "hard" navigate to the next page.

Fixes CC-576
2024-10-09 11:16:47 +00:00
Frane Polić
57177133e2 fix(dashboard): manage inventory flags (#9487)
**What**
- allow to create a variant without managed inventory (we need to explicitly pass `false` now since the default on the model is `true` for `manage_inventory`)

---

FIXES CC-575
2024-10-07 17:50:32 +00:00
Riqwan Thamir
2d1f4bcabc feat(dashboard,core-flows,types,order): change order accepts price updates (#9476)
* chore: change order can accept price updates

* chore: add changes to transformed order

* chore: fix transform

* chore: transform raw unit price
2024-10-07 10:54:21 +02:00
Frane Polić
d6b452b734 feat(dashboard, medusa) add metadata to pages (#9433)
**WIP**
- add metadata component and edit route to missing pages
- fix API issues around metadata in certain domains

---

FIXES CC-554
2024-10-06 11:57:56 +00:00
Frane Polić
0a2ecdc889 feat(dashboard, js-sdk): reset password UI (#9451)
**What**
- add password reset flow on Admin

---

https://github.com/user-attachments/assets/3438ace2-c661-4121-a580-794a69ad4518

---

CLOSES CC-568


Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-10-04 09:10:26 +00:00
Frane Polić
b2a8c897f7 fix(dashboard): allow to unset PL rule (#9276)
**What**
- unset customer groups rule if no groups are selected
- preserve other rules when updating a PL

---

CLOSES https://github.com/medusajs/medusa/issues/9376
2024-10-04 09:09:27 +00:00
Frane Polić
e73e95f5e9 fix(dashboard): location details loader (#9412)
**What**
- fix location loader returning stale data if SL details are fetched with another field params

**Why**
- if we visit the order details page and visit location details afterwards, delivery and pickup will appear disabled because a new query with `fulfillment_sets` is not fetched
2024-10-02 14:50:19 +00:00
Frane Polić
ab7e71a055 fix(dashboard, fulfilment): fulfilment providers enabled check (#9415)
**What**
- hide disabled fulfilment providers on the admin
- check if the fulfilment provider has an identifier when loading providers

---

FIXES CC-549
2024-10-02 14:48:40 +00:00
Frane Polić
b39ba45b81 fix(dashboard): allocation label condition (#9398)
**What**
- show "not allocated" label only if there are unfulfilled items
- small refactor and general improvement of reservations in order summary

---

FIXES CC-539
2024-10-02 14:47:40 +00:00
Frane Polić
4587a69f3f fix(dashboard): allow to unset currency cell value (#9312)
**What**
- unset datagrid currency cell on delete press instead of setting it to 0
- consolidate pricing editors validations
- fix PL edit pricing schema

---

FIXES CC-529
2024-10-01 09:03:51 +00:00