diff --git a/src/utils/commons.js b/src/utils/commons.js index 51b7cc8..98a0ef6 100644 --- a/src/utils/commons.js +++ b/src/utils/commons.js @@ -82,25 +82,10 @@ export function isNotEmpty(val) { return val !== undefined && val !== null && val !== ""; } -// export function isEmpty(val) { -// return val === undefined || val === null || val === ""; -// } - export function prepareUrl(url) { return new UrlBuilder(url); } -// export function debounce(fn, delay = 500) { -// let timer; -// return e => { -// e.persist(); -// clearTimeout(timer); -// timer = setTimeout(() => { -// fn(e); -// }, delay); -// }; -// } - export function throttle(fn, delay, atleast) { let timeout = null, startTime = new Date(); diff --git a/src/views/products/Detail/ProductInfoQuotation.jsx b/src/views/products/Detail/ProductInfoQuotation.jsx index e0abc17..1233d7f 100644 --- a/src/views/products/Detail/ProductInfoQuotation.jsx +++ b/src/views/products/Detail/ProductInfoQuotation.jsx @@ -1,5 +1,5 @@ import { useState } from 'react' -import { Table, Form, Modal, Button, Radio, Input, Flex, Card, Select, InputNumber, Checkbox, DatePicker, Space } from 'antd' +import { Table, Form, Modal, Button, Radio, Input, Flex, Card, Select, InputNumber, Checkbox, DatePicker, Space, App } from 'antd' import { useTranslation } from 'react-i18next' import { CloseOutlined, StarTwoTone, PlusOutlined, ExclamationCircleFilled } from '@ant-design/icons' import { useDatePresets } from '@/hooks/useDatePresets' @@ -242,6 +242,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => { const [isQuotationModalOpen, setQuotationModalOpen] = useState(false) const [isBatchSetupModalOpen, setBatchSetupModalOpen] = useState(false) + const { modal } = App.useApp(); const [quotationForm] = Form.useForm() const [batchSetupForm] = Form.useForm() @@ -338,16 +339,13 @@ const ProductInfoQuotation = ({ editable, ...props }) => {