Commit Graph

168 Commits

Author SHA1 Message Date
olivermrbl
d5605656ae chore: Version packages 2024-11-12 10:10:07 +01:00
Kasper Fabricius Kristensen
904f0926f1 fix(dashboard): Load product variant edit page and fix product detail query key (#10029)
**What**
- Fixes Edit Variant form so it properly loads the product variant
- Fixes the query key for product details to prevent the cache from being shared between queries for the same ID but with different params.

Resolves CMRC-685

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>
2024-11-12 08:40:08 +00:00
Frane Polić
81208b6e1d fix(dashboard): handle deleted products/variants in the order domain (#9841)
* fix: optional variants and products

* fix: more cases with inventory

* fix: fulfillment creation modal

* fix: move create fulfillment actions to footer

* refactor: use properties of the LineItem

* fix: remove N/A

* fix: remove ||

* fix: show confirmed status properly

* fix: pick needed product props

* fix: typo
2024-11-12 09:05:11 +01:00
Paweł Romanowski
5c22c57cb8 feat: add Polish language support (#9770)
Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
2024-11-11 10:07:28 +00:00
olivermrbl
ecece05b72 chore: Version packages 2024-11-11 10:58:20 +01:00
Kasper Fabricius Kristensen
49f3f0cd54 fix(dashboard): Reduce data loaded by product details page (#9991) 2024-11-10 08:33:36 +01:00
Frane Polić
576da17da3 fix(dashboard): user invite search (#9973)
**What**
- fix prefix for table search which caused the other table rendered on the page to fire query
- additionally, fix a typo in js SDK and only format the file

---

FIXES SUP-112
CLOSES https://github.com/medusajs/medusa/issues/9968
2024-11-07 19:13:28 +00:00
olivermrbl
8feb589659 chore: Release 2024-11-06 21:47:01 +01:00
Stevche Radevski
b3cbc160eb fix: Default to a relative path for the admin backend URL (#9947) 2024-11-06 15:08:38 +01:00
Kasper Fabricius Kristensen
d19d7a66ff fix(dashboard): Allow using enter key to create newline in Textarea (#9913)
* fix(dashboard):Allow using enter key to create newline in Textarea

* update scheam file
2024-11-05 08:54:28 +01:00
Frane Polić
61cb97da26 fix(dashboard): truncate price cell titles (#9715)
Before:
![Screenshot 2024-10-22 at 17 14 56](https://github.com/user-attachments/assets/7ec74e70-c69f-4346-b15a-665fed27e688)

After
![Screenshot 2024-10-22 at 17 26 15](https://github.com/user-attachments/assets/b353c40b-7451-4bdf-9459-1494c18c7531)


Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
2024-11-04 11:01:00 +00:00
Kasper Fabricius Kristensen
e2058683f4 chore(dashboard): Setup test and script for validating i18n (#9799)
**What**
- Adds a test that validates that en.json and $schema.json matches, this will help us catch missing translations, and prevent us from forgetting to update the schema when we delete/add new keys.
- Adds a script for validating translations against the translation schema. This can be used to validate that community PRs for i18n contain all the required keys. To use the script you can run `yarn i18n:validate <file name>` e.g. `yarn i18n:validate da.json` which will look for a da.json file in the translation folder, and validate it against the schema. We handle this with a script as we don't want to do so through a test. Doing it with a test would mean that if we update the schema, we would also have to update all translations files that we don't maintain ourselves. The purpose of the script is just to allow us to easily review community PRs and also as a tool for people opening PR's to check their translations agains the schema, as it will print missing/additional keys.
- Also adds a script to generate a schema from the en.json file. After adding/deleting keys to en.json you should run `yarn i18n:generate`.
2024-11-04 09:45:07 +00:00
Frane Polić
dd93d8de6e fix(dashboard): tax override reference (#9796)
* fix: tax override reference

* fix: create rest

* fix: comment out unsupported references for now

* fix: edit form
2024-11-04 09:05:46 +01:00
Frane Polić
1889180319 fix(core-flows, dashboard): adjust stock levels when doing partial fulfilments (#9736)
* fix: correctly update stock location when partial fulfillemnt is created

* fix: update test

* fix: count reserved quantity of the item as available quantity for fulfillment

* fix: refresh reservations when order fulfillment is created

* feat: add check for reservation quantity

* feat: add a test case
2024-11-04 09:04:58 +01:00
Kasper Fabricius Kristensen
a0034a0fef fix(dashboard): Allow float values for product prices (#9859) 2024-11-04 09:04:29 +01:00
olivermrbl
4ccab16336 chore: Version packages 2024-10-25 17:19:36 +02:00
Frane Polić
ddf3306af1 feat(dashboard, medusa, types): orders list on customer details page (#9790)
**What**
- display orders list on customer details

---

CLOSES CC-625
2024-10-25 11:31:30 +00:00
Frane Polić
259d050e53 feat: customer bulk endpoint form managing customer groups (#9761)
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-10-25 11:55:57 +02:00
Frane Polić
853dd38044 fix(core-flows, dashboard): products category batch issue (#9766)
FIXES CC-624
2024-10-25 08:52:05 +00:00
Kasper Fabricius Kristensen
59e6747800 feat(dashboard,ui): DateFilter should open correctly (#9775) 2024-10-24 17:28:03 +02:00
Shahed Nasser
92bbd7953b chore: update links to v2 docs in source code and comments (#9732) 2024-10-24 15:18:38 +03:00
Adrien de Peretti
e087073121 fix(dashboard): Workflow executions (#9757)
**What**
- Fix wrong http request fields
- fix workflow executions UI

<img width="1609" alt="Screenshot 2024-10-24 at 12 22 06" src="https://github.com/user-attachments/assets/5f8ced3c-920e-424a-bdd0-ca5793fa8dad">
<img width="1623" alt="Screenshot 2024-10-24 at 12 22 19" src="https://github.com/user-attachments/assets/1df44280-3616-44af-a1a5-591e6c9a7986">
2024-10-24 11:18:05 +00:00
Kasper Fabricius Kristensen
7b6793f846 fix(dashboard): Prevent reusing same Component for nested UI routes (#9725)
**What**
- Fixes a bug that caused nested UI routes to reuse their parents Component.
2024-10-24 11:06:49 +00:00
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