Browse Source

add company _id in form checlisk k3

pull/1/head
farhantock 11 months ago
parent
commit
e6e59a234b
  1. 8
      src/views/SimproV2/ChecklistK3/DialogForm.js

8
src/views/SimproV2/ChecklistK3/DialogForm.js

@ -7,7 +7,7 @@ import 'antd/dist/antd.css';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdit }) => { const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdit, company_id }) => {
const [id, setId] = useState(0) const [id, setId] = useState(0)
const [name, setName] = useState('') const [name, setName] = useState('')
const [description, setDescription] = useState('') const [description, setDescription] = useState('')
@ -31,7 +31,8 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi
if (typeDialog === "Save") { if (typeDialog === "Save") {
data = { data = {
name: name, name: name,
description description,
company_id
} }
closeDialog('save', data); closeDialog('save', data);
@ -39,7 +40,8 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi
data = { data = {
id, id,
name: name, name: name,
description description,
company_id
} }
closeDialog('edit', data); closeDialog('edit', data);
} }

Loading…
Cancel
Save