diff --git a/client/src/components/production-board-kanban/production-board-kanban.settings.component.jsx b/client/src/components/production-board-kanban/production-board-kanban.settings.component.jsx index 73192590b..0f7d66fba 100644 --- a/client/src/components/production-board-kanban/production-board-kanban.settings.component.jsx +++ b/client/src/components/production-board-kanban/production-board-kanban.settings.component.jsx @@ -1,5 +1,5 @@ import { useMutation } from "@apollo/client"; -import { Button, Card, Col, Form, notification, Popover, Row, Checkbox, Radio, Input, Switch } from "antd"; +import { Button, Card, Checkbox, Col, Form, notification, Popover, Radio, Row } from "antd"; import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { UPDATE_KANBAN_SETTINGS } from "../../graphql/user.queries"; @@ -9,19 +9,13 @@ export default function ProductionBoardKanbanSettings({ associationSettings, par const [open, setOpen] = useState(false); const [loading, setLoading] = useState(false); const [hasChanges, setHasChanges] = useState(false); - const [orientation, setOrientation] = useState(true); - const [compact, setCompact] = useState(false); - const [colored, setColored] = useState(false); + const [updateKbSettings] = useMutation(UPDATE_KANBAN_SETTINGS); const { t } = useTranslation(); useEffect(() => { if (associationSettings?.kanban_settings) { - const { orientation = true, compact = true, cardcolor = true } = associationSettings.kanban_settings; form.setFieldsValue(associationSettings.kanban_settings); - setOrientation(orientation); - setCompact(compact); - setColored(cardcolor); } }, [form, associationSettings]); @@ -32,7 +26,7 @@ export default function ProductionBoardKanbanSettings({ associationSettings, par const result = await updateKbSettings({ variables: { id: associationSettings?.id, - ks: { ...values, orientation, compact, cardcolor: colored } + ks: { ...values } } }); @@ -53,26 +47,8 @@ export default function ProductionBoardKanbanSettings({ associationSettings, par const handleValuesChange = () => setHasChanges(true); - const handleCheckedChanges = (checked, callback) => { - callback(checked); - setHasChanges(true); - }; - const cardStyle = { minWidth: "50vw", marginTop: 10 }; - const renderSwitchItem = (name, checked, callback, labelKey, checkedChildrenKey, unCheckedChildrenKey) => ( -