diff --git a/api/app/lib/controllers/data/anspectionNotificationPhone.js b/api/app/lib/controllers/data/anspectionNotificationPhone.js index 2b965152..079f37bc 100644 --- a/api/app/lib/controllers/data/anspectionNotificationPhone.js +++ b/api/app/lib/controllers/data/anspectionNotificationPhone.js @@ -36,7 +36,7 @@ async function addAnspectionNotificationPhone(ctx) { }) }) await models.AnspectionNotificationPhone.bulkCreate(dataList); - await transaction.commit(); + // await transaction.commit(); ctx.status = 204 } catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js index 69cd3670..be4f401b 100644 --- a/web/client/src/sections/fillion/components/patrolTable.js +++ b/web/client/src/sections/fillion/components/patrolTable.js @@ -713,6 +713,7 @@ const PatrolTable = (props) => { const isPatrol = !isRoad && !isAnomaly const reportType = isRoad ? 'road' : isAnomaly ? 'anomaly' : 'patrol'; const [isModalOpen, setIsModalOpen] = useState(false); + const [phoneList, setPhoneList] = useState([]); const [form] = Form.useForm(); useEffect(() => { queryData(); @@ -823,6 +824,7 @@ const PatrolTable = (props) => { }) } console.log(phoneList, '789789789789'); + setPhoneList(phoneList) }, [anspectionNotificationPhoneList]) const showModal = () => { @@ -924,17 +926,9 @@ const PatrolTable = (props) => {
- { - // if (!names || names.length < 1) { - // return Promise.reject(new Error('At least 2 passengers')); - // } - // }, - // }, - // ]} + initialValue={phoneList} > {(fields, { add, remove }, { errors }) => ( <>