diff --git a/client/src/components/layout-form-row/inline-form-row-title.utils.js b/client/src/components/layout-form-row/inline-form-row-title.utils.js index 1647422c1..70c0e8dd2 100644 --- a/client/src/components/layout-form-row/inline-form-row-title.utils.js +++ b/client/src/components/layout-form-row/inline-form-row-title.utils.js @@ -1,3 +1,5 @@ +import { UnorderedListOutlined } from "@ant-design/icons"; + export const inlineFormRowTitleStyles = Object.freeze({ input: Object.freeze({ background: "transparent", @@ -68,6 +70,7 @@ export const inlineFormRowTitleStyles = Object.freeze({ export const INLINE_TITLE_INPUT_STYLE = inlineFormRowTitleStyles.input; export const INLINE_TITLE_ROW_STYLE = inlineFormRowTitleStyles.row; export const INLINE_TITLE_GROUP_STYLE = inlineFormRowTitleStyles.group; +export const InlineTitleListIcon = UnorderedListOutlined; export const INLINE_TITLE_SWITCH_GROUP_STYLE = Object.freeze({ ...inlineFormRowTitleStyles.group, flex: "0 0 auto" diff --git a/client/src/components/shop-employees/shop-employees-form.component.jsx b/client/src/components/shop-employees/shop-employees-form.component.jsx index a47e577b3..5aed82b8e 100644 --- a/client/src/components/shop-employees/shop-employees-form.component.jsx +++ b/client/src/components/shop-employees/shop-employees-form.component.jsx @@ -1,4 +1,4 @@ -import { DeleteFilled, HolderOutlined } from "@ant-design/icons"; +import { DeleteFilled } from "@ant-design/icons"; import { useApolloClient, useMutation, useQuery } from "@apollo/client/react"; import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Card, Col, Form, Input, InputNumber, Row, Select, Space, Switch } from "antd"; @@ -38,7 +38,8 @@ import { INLINE_TITLE_ROW_STYLE, INLINE_TITLE_SEPARATOR_STYLE, INLINE_TITLE_SWITCH_GROUP_STYLE, - INLINE_TITLE_TEXT_STYLE + INLINE_TITLE_TEXT_STYLE, + InlineTitleListIcon } from "../layout-form-row/inline-form-row-title.utils.js"; import ShopEmployeeAddVacation from "./shop-employees-add-vacation.component"; import FormItemEmail from "../form-items-formatted/email-form-item.component.jsx"; @@ -92,13 +93,10 @@ export function ShopEmployeesFormComponent({ bodyshop, form, onDirtyChange, isDi const updateDirtyState = useCallback( (nextDirtyState) => { - if (typeof isDirty !== "boolean") { - setInternalIsDirty(nextDirtyState); - } - + setInternalIsDirty(nextDirtyState); onDirtyChange?.(nextDirtyState); }, - [isDirty, onDirtyChange] + [onDirtyChange] ); const client = useApolloClient(); @@ -482,7 +480,7 @@ export function ShopEmployeesFormComponent({ bodyshop, form, onDirtyChange, isDi noDivider title={