Skip to content

Commit 6fae878

Browse files
committed
edit option from product page
1 parent 019525c commit 6fae878

File tree

10 files changed

+3
-321
lines changed

10 files changed

+3
-321
lines changed

packages/admin/dashboard/src/dashboard-app/routes/get-route.map.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,6 @@ export function getRouteMap({
129129
lazy: () =>
130130
import("../../routes/products/product-prices"),
131131
},
132-
{
133-
path: "options/create",
134-
lazy: () =>
135-
import(
136-
"../../routes/products/product-create-option"
137-
),
138-
},
139-
{
140-
path: "options/:option_id/edit",
141-
lazy: () =>
142-
import("../../routes/products/product-edit-option"),
143-
},
144132
{
145133
path: "variants/create",
146134
lazy: () =>

packages/admin/dashboard/src/routes/products/product-create-option/components/create-product-option-form/create-product-option-form.tsx

Lines changed: 0 additions & 124 deletions
This file was deleted.

packages/admin/dashboard/src/routes/products/product-create-option/components/create-product-option-form/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/admin/dashboard/src/routes/products/product-create-option/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/admin/dashboard/src/routes/products/product-create-option/product-create-option.tsx

Lines changed: 0 additions & 26 deletions
This file was deleted.

packages/admin/dashboard/src/routes/products/product-detail/components/product-option-section/product-option-section.tsx

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
import { PencilSquare, Plus } from "@medusajs/icons"
2-
import { Badge, Container, Heading, usePrompt } from "@medusajs/ui"
2+
import { Badge, Container, Heading } from "@medusajs/ui"
33
import { useTranslation } from "react-i18next"
44
import { ActionMenu } from "../../../../../components/common/action-menu"
55
import { SectionRow } from "../../../../../components/common/section"
66
import { HttpTypes } from "@medusajs/types"
77

88
const OptionActions = ({
9-
product,
109
option,
1110
}: {
12-
product: HttpTypes.AdminProduct
1311
option: HttpTypes.AdminProductOption
1412
}) => {
1513
const { t } = useTranslation()
16-
const prompt = usePrompt()
1714

1815
return (
1916
<ActionMenu
@@ -22,20 +19,11 @@ const OptionActions = ({
2219
actions: [
2320
{
2421
label: t("actions.edit"),
25-
to: `options/${option.id}/edit`,
22+
to: `/product-options/${option.id}/edit`,
2623
icon: <PencilSquare />,
2724
},
2825
],
2926
},
30-
// {
31-
// actions: [
32-
// {
33-
// label: t("actions.delete"),
34-
// onClick: handleDelete,
35-
// icon: <Trash />,
36-
// },
37-
// ],
38-
// },
3927
]}
4028
/>
4129
)
@@ -85,7 +73,7 @@ export const ProductOptionSection = ({
8573
</Badge>
8674
)
8775
})}
88-
actions={<OptionActions product={product} option={option} />}
76+
actions={<OptionActions option={option} />}
8977
/>
9078
)
9179
})}

packages/admin/dashboard/src/routes/products/product-edit-option/components/edit-product-option-form/edit-product-option-form.tsx

Lines changed: 0 additions & 108 deletions
This file was deleted.

packages/admin/dashboard/src/routes/products/product-edit-option/components/edit-product-option-form/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/admin/dashboard/src/routes/products/product-edit-option/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/admin/dashboard/src/routes/products/product-edit-option/product-edit-option.tsx

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)