**What**
- Uses derived state in DataTable, to prevent the state in the URL and component from going out of sync.
- Introduces a way for RouteModals to restore URL params on close.
Resolves CMRC-936
**What**
Currently, the dashboard is fetching way more data than needed to display the products. This can lead to issues for complex catalog. this pr aim to reduce the data to be fetched to exactly what is needed.
<img width="2553" alt="Screenshot 2025-02-19 at 15 08 16" src="https://github.com/user-attachments/assets/b00e856c-e040-4f05-9f15-41fb8d299387" />
**What**
- add `insufficient_inventory` flag when listing shipping options for a cart
- add `enabled_in_store` flag when creating/editing pickup options
**What**
- Fixes an issue where we would parse a string like `"52 tests"` into `52` in the Metadata form
- If a row is deleted we now send off key with an empty string as its value to signify that it should be deleted. This is needed to introduce the API we had for updating metadata in V1. Adrien is implementing the BE support for this.
RESOLVES SUP-895
**What**
- Fixes the wrong `size` being used for the allocate items button.
- Updates the buttons that link to somewhere to use a Link and asChild instead of an onClick.
**What**
- update the create and edit shipping option flows to support pickup (shipping) option
- modify "mark as delivered" for pickup case
---
CLOSES CMRC-906 CMRC-907
**What**
- Add support for defining outlet routes using `@`, e.g. `/src/admin/routes/brands/@create/page.tsx`
- Add support for exporting a `loader` from a route file.
- Add support for exporting a `handle` from a route file.
Example usage of a loader and handle:
```tsx
// src/admin/routes/articles/[id]/page.tsx
import { Button, Container, Heading } from "@medusajs/ui";
import {
Link,
LoaderFunctionArgs,
Outlet,
UIMatch,
useLoaderData,
} from "react-router-dom";
export async function loader({ params }: LoaderFunctionArgs) {
const { id } = params;
return {
id,
};
}
export const handle = {
breadcrumb: (match: UIMatch<{ id: string }>) => {
const { id } = match.params;
return `#${id}`;
},
};
const ProfilePage = () => {
const { id } = useLoaderData() as Awaited<ReturnType<typeof loader>>;
return (
<div>
<Container className="flex justify-between items-center">
<Heading>Article {id}</Heading>
<Button size="small" variant="secondary" asChild>
<Link to="edit">Edit</Link>
</Button>
</Container>
{/* This will be used for the next example of an Outlet route */}
<Outlet />
</div>
);
};
export default ProfilePage;
```
In the above example we are passing data to the route from a loader, and defining a breadcrumb using the handle.
Example of a outlet route:
```tsx
// src/admin/routes/articles/[id]/@edit/page.tsx
import { Button, Container, Heading } from "@medusajs/ui";
const ProfileEditPage = () => {
return (
<div>
{/* Form goes here */}
</div>
);
};
export default ProfileEditPage;
```
This outlet route will be rendered in the <Outlet /> in the above example when the URL is /articles/1/edit
Resolves CMRC-913, CMRC-914, CMRC-915
**What**
In order to prevent multiple version to exists and that might not be compatible with one another, we fix the zod package version in the admin-sdk in complement to the starter
**What**
- Bumps the versions of Vite across the entire stack, to prevent an issue similar to what is described here: https://github.com/vitejs/vite/discussions/18271
Not entirely sure what was happening as I couldn't reproduce the issue, but Adrien faced the issue yesterday when working with local versions of our packages. It does appear as if the range we had before could lead to a version of Vite to be installed with said bug.
**Why**
- if pending difference is lass then the rounding threshold for currency the page would show for example "Refund -0.00$"
**What**
- example: hide the refund button if the pending difference in USD is -0.004
- example: show refund button if pending difference on USD is -0.007
---
CLOSES SUP-811
CLOSES https://github.com/medusajs/medusa/issues/11331
**What**
- Adds missing Metadata form for collections
- Fixes type of metadata in update payload
- Fixes an issue where deleting the last row of a metadata form would prevent adding new ones.
Resolves SUP-784
**Note** The huge diff is because the i18n schema wasn't formatted properly again. Not sure how that happened with the update to the script but perhaps someone didn't update their branch to include the change to format the schema on creation.