muffin-admin 3.13.1 → 3.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MuffinDashboard.js +1 -1
- package/dist/buttons/LinkButton.d.ts +2 -1
- package/dist/buttons/LinkButton.js +3 -1
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/MuffinDashboard.tsx +1 -0
- package/src/buttons/LinkButton.tsx +4 -1
- package/src/common/index.ts +1 -0
package/dist/MuffinDashboard.js
CHANGED
|
@@ -15,7 +15,7 @@ import { buildAdmin, setupAdmin } from "./utils";
|
|
|
15
15
|
export function MuffinDashboard() {
|
|
16
16
|
const { dashboard, help } = useMuffinAdminOpts();
|
|
17
17
|
const translate = useTranslate();
|
|
18
|
-
return (_jsxs(Stack, { gap: 2, pt: 1, children: [_jsxs(Stack, { direction: "row", children: [help && _jsx(HelpLink, { href: help, label: translate("muffin.how_to_use_admin") }), buildAdmin(["dashboard-actions"])] }),
|
|
18
|
+
return (_jsxs(Stack, { gap: 2, pt: 1, children: [_jsxs(Stack, { direction: "row", children: [help && _jsx(HelpLink, { href: help, label: translate("muffin.how_to_use_admin") }), buildAdmin(["dashboard-actions"])] }), _jsxs(Grid, { container: true, spacing: 1, children: [buildAdmin(["dashboard-content"]), _jsx(AdminCards, { src: dashboard })] })] }));
|
|
19
19
|
}
|
|
20
20
|
setupAdmin(["dashboard"], MuffinDashboard);
|
|
21
21
|
function AdminCards({ src }) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AdminShowLink } from "../types";
|
|
2
|
-
declare const LinkButton: ({ filters, icon, label, resource, title, }: AdminShowLink & {
|
|
2
|
+
declare const LinkButton: ({ filters, icon, label, resource, id, title, }: AdminShowLink & {
|
|
3
3
|
resource: string;
|
|
4
4
|
filters: any;
|
|
5
|
+
id?: string;
|
|
5
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export default LinkButton;
|
|
@@ -2,11 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Button } from "react-admin";
|
|
3
3
|
import { Link } from "react-router-dom";
|
|
4
4
|
import { buildIcon } from "../utils";
|
|
5
|
-
const LinkButton = ({ filters, icon, label, resource, title, }) => {
|
|
5
|
+
const LinkButton = ({ filters, icon, label, resource, id, title, }) => {
|
|
6
6
|
const linkParams = {
|
|
7
7
|
pathname: `/${resource}`,
|
|
8
8
|
search: filters ? `filter=${JSON.stringify(filters)}` : undefined,
|
|
9
9
|
};
|
|
10
|
+
if (id)
|
|
11
|
+
linkParams.pathname += `/${id}/show`;
|
|
10
12
|
return (_jsx(Button, { label: label, title: title, component: Link, to: linkParams, children: buildIcon(icon) }));
|
|
11
13
|
};
|
|
12
14
|
export default LinkButton;
|
package/dist/common/index.d.ts
CHANGED
package/dist/common/index.js
CHANGED