Commit Graph

73 Commits

Author SHA1 Message Date
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
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
Frane Polić
0e35e312e5 fix(dashboard): use svg component instead of static png for logo (#9281) 2024-10-01 08:34:50 +00:00
Frane Polić
7a08224b0c fix(dashboard): categories add products (#9380)
**What**
- fix listing/adding products in the add category products flow

---

FIXES CC-523
2024-10-01 07:09:51 +00:00
Frane Polić
cab629556f fix(dashboard): reservations quantity validations (#9393)
**What**
- validate quantity range when creating validation and handle form errors nicely

---

CLOSES CC-470
2024-10-01 07:01:44 +00:00
Frane Polić
570c1803f2 fix(dashboard): don't prefil invite email while onboarding (#9392) 2024-09-30 19:19:10 +02:00
Sebastian Rindom
852df3f764 fix(medusa,dashboard): don't send price updates for deleted regions/currencies (#9361)
**What**
- Fixes an issue where the admin dashboard would send region prices for deleted regions.
- Also, includes the implementation for `GET /admin/shipping-options/:id` and its corresponding SDK function.

**Why**
- When a region price for a deleted region was sent to the backend it would result in the insert hitting a not null constraint on the currency_code for prices. To avoid this the dashboard should not send region prices for deleted regions. 

**Additional context**
- Prices for deleted regions should ideally not be returned when fetching shipping option prices. However, we don't yet have a mechanism for cleaning up region prices after a region is deleted.

Fixes CC-540
2024-09-30 11:51:55 +00:00
Frane Polić
046e6e5533 fix(dashboard): product table colum widths (#9329)
**What**
- set product title and sales channels column widths to a reasonable value so the scroll is visible on mobile resolutions only

---

FIXES CC-527
2024-09-30 07:57:24 +00:00
J Kendal
6fbfbfab19 fix: invalid mutation (#9371) 2024-09-30 09:38:43 +02:00
Oli Juhl
1b4372ae71 fix: Tax region + rates clean up (#9279)
What
- Require `code` on Tax Rates
- Update dashboard to account for non-nullable code on Tax Rates

- Include `automatic_taxes` in API Route response

Closes CC-524 CC-525
2024-09-29 10:25:33 +00:00
Frane Polić
474ba92d48 fix(dashboard): variant update success toast (#9325)
FIXES CC-509
2024-09-26 12:59:59 +00:00
Frane Polić
f294c99c92 fix(dashboard): set/unset automatic taxes on a region (#9315)
* fix: region automatic taxes

* fix: query keys and cache issues
2024-09-26 09:55:45 +02:00
Frane Polić
6d16b3294e fix(dashboard): login alert background (#9305)
**What**
- fix login error alert bg in dark mode
2024-09-25 11:35:47 +00:00
Riqwan Thamir
69f6645716 feat(core-flows,dashboard,types,fulfillment,medusa): uses requires shipping throughout lifecycle (#9170)
what:

- uses requires shipping throughout lifecycle

https://github.com/user-attachments/assets/d5ba89d3-5ea0-49c4-b2d5-490c4764933e
2024-09-24 08:26:22 +00:00
Frane Polić
eb7899d05c fix(dashboard): pagination in invite table (#9259)
**What**
- fix pagination in user invites table wasn't working because prefix was passed in a wrong place

---

FIXES CC-512
2024-09-23 16:01:10 +00:00
Frane Polić
981745e98b fix(dashboard): customer groups fixes (#9258)
**What**
- fix add customer to customer group toast
- move modal actions to footer

---

FIXES CC-514
2024-09-23 15:59:37 +00:00
Frane Polić
d238dd0099 fix(dashboard): customer groups table fileds (#9262)
**What**
- a fix pushed this morning results in customer groups also having just id returned and other fields are omitted
2024-09-23 15:58:32 +00:00
Frane Polić
ab9051d3f5 fix(dashboard): minor collection bugs (#9255)
**What**
- toast on create
- fix delete prompt message
- fix 404 on delete

---

FIXES CC-508
2024-09-23 15:57:26 +00:00