Remainder of menu refactoring updates.

This commit is contained in:
Patrick Fic
2023-01-17 19:48:37 -08:00
parent ef290e79b1
commit 7bd83557c1
31 changed files with 360 additions and 405 deletions

View File

@@ -1,17 +1,11 @@
import { DeleteFilled, WarningFilled, DownOutlined } from "@ant-design/icons";
import { DeleteFilled, DownOutlined, WarningFilled } from "@ant-design/icons";
import { useTreatments } from "@splitsoftware/splitio-react";
import {
Divider,
Form,
Checkbox, Divider, Dropdown, Form,
Input,
InputNumber,
Radio,
Space,
Tag,
Select,
Menu,
Dropdown,
Checkbox,
Radio, Select, Space,
Tag
} from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
@@ -61,17 +55,14 @@ export function PartsOrderModalComponent({
form.setFieldsValue({ comments: item.props.value });
};
const menu = (
<div>
<Menu onClick={handleClick}>
{bodyshop.md_parts_order_comment.map((comment, idx) => (
<Menu.Item value={comment.comment} key={idx}>
{comment.label}
</Menu.Item>
))}
</Menu>
</div>
);
const menu = {
onClick: handleClick,
items: bodyshop.md_parts_order_comment.map((comment, idx) => ({
key: idx,
value: comment.comment,
label: comment.label,
})),
};
return (
<div>
@@ -308,7 +299,7 @@ export function PartsOrderModalComponent({
label={
<Space>
{t("parts_orders.fields.comments")}
<Dropdown overlay={menu}>
<Dropdown menu={menu}>
<a
className="ant-dropdown-link"
href=" #"