diff --git a/web/client/assets/files/common/1687657483581_2.jpg b/web/client/assets/files/common/1687657483581_2.jpg new file mode 100644 index 0000000..3f96826 Binary files /dev/null and b/web/client/assets/files/common/1687657483581_2.jpg differ diff --git a/web/client/src/sections/safetySpecification/components/fileModal.js b/web/client/src/sections/safetySpecification/components/fileModal.js index e59e700..77bfda6 100644 --- a/web/client/src/sections/safetySpecification/components/fileModal.js +++ b/web/client/src/sections/safetySpecification/components/fileModal.js @@ -10,7 +10,7 @@ import { Tabs, Form, Input, DatePicker, Button, Modal, Select, Tag } from 'antd' function FileModal ({ loading, parent, user, actions, editData = {}, dispatch, close, success, remove }) { - const { resourceRetrieval } = actions + const { safetySpecification } = actions const [tabsKey, setTabsKey] = useState("stay") const [query, setQuery] = useState({ page: 0, limit: 10 }); const [proTableList, setProTableList] = useState({ rows: [], count: 0 }); @@ -46,7 +46,7 @@ function FileModal ({ loading, parent, user, actions, editData = {}, dispatch, c onOk={e => { form.validateFields().then(v => { - dispatch(resourceRetrieval.postSpecifications({ + dispatch(safetySpecification.postSpecifications({ ...v, fileName: v?.files[0]?.name,path:v?.files[0]?.url, })).then(res => { diff --git a/web/client/src/sections/safetySpecification/containers/specificationLibrary.js b/web/client/src/sections/safetySpecification/containers/specificationLibrary.js index a6ad5f0..73f79c2 100644 --- a/web/client/src/sections/safetySpecification/containers/specificationLibrary.js +++ b/web/client/src/sections/safetySpecification/containers/specificationLibrary.js @@ -14,7 +14,7 @@ const CheckboxGroup = Checkbox.Group; function SpecificationLibrary ({ loading, clientHeight, actions, dispatch, }) { - const { resourceRetrieval } = actions + const { safetySpecification } = actions const [checkAll, setCheckAll] = useState(false) const [query, setQuery] = useState({ page: 0, limit: 20 }); const [fileData, setFileData] = useState({ data: [], count: 0 }) @@ -32,7 +32,7 @@ function SpecificationLibrary ({ loading, clientHeight, actions, dispatch, }) { let resourceData = (data) => { let params = data || query - dispatch(resourceRetrieval.getSpecifications({ keyword: keyword, ...params, })).then(res => { + dispatch(safetySpecification.getSpecifications({ keyword: keyword, ...params, })).then(res => { if (res.success) { setFileData({ data: res.payload.data?.rows, count: res.payload.data?.count }) @@ -61,7 +61,7 @@ function SpecificationLibrary ({ loading, clientHeight, actions, dispatch, }) {