+
+ }
+ onClick={() => handleEdit(params.row)}
+ disabled={!params.row.can_update}
+ />
+
+
+ )
}
]
}, [getProductUrl, router])
diff --git a/frontend/components/newProduct/Step2.js b/frontend/components/newProduct/Step2.js
index 038e44a..ff9020e 100644
--- a/frontend/components/newProduct/Step2.js
+++ b/frontend/components/newProduct/Step2.js
@@ -1,29 +1,30 @@
-import React, { useState, useEffect } from 'react'
+import CloseIcon from '@mui/icons-material/Close'
+import UploadIcon from '@mui/icons-material/Upload'
import {
+ Alert,
+ Box,
+ Button,
+ FormGroup,
Grid,
- Typography,
+ Stack,
TextField,
- FormGroup,
- Button,
- Box,
- Alert,
- Stack
+ Typography
} from '@mui/material'
-import FileUploader from '../FileUploader'
-import Loading from '../Loading'
-import LinearProgressWithLabel from '../LinearProgressWithLabel'
+import IconButton from '@mui/material/IconButton'
+import InputAdornment from '@mui/material/InputAdornment'
+import prettyBytes from 'pretty-bytes'
+import PropTypes from 'prop-types'
+import React, { useEffect, useState } from 'react'
import {
- getProductFiles,
- deleteProductFile,
+ MAX_UPLOAD_SIZE,
createProductFile,
+ deleteProductFile,
+ getProductFiles,
registryProduct
} from '../../services/product'
-import InputAdornment from '@mui/material/InputAdornment'
-import CloseIcon from '@mui/icons-material/Close'
-import UploadIcon from '@mui/icons-material/Upload'
-import IconButton from '@mui/material/IconButton'
-import prettyBytes from 'pretty-bytes'
-import PropTypes from 'prop-types'
+import FileUploader from '../FileUploader'
+import LinearProgressWithLabel from '../LinearProgressWithLabel'
+import Loading from '../Loading'
export default function NewProductStep2({ productId, onNext, onPrev }) {
const [mainFile, setMainFile] = useState(false)
const [mainFileError, setMainFileError] = useState('')
@@ -34,7 +35,6 @@ export default function NewProductStep2({ productId, onNext, onPrev }) {
const [isLoading, setLoading] = useState(false)
const [progress, setProgress] = useState(null)
const [formError, setFormError] = React.useState('')
- const maxUploadSize = 200
const loadFiles = React.useCallback(async () => {
setFormError('')
@@ -241,8 +241,8 @@ export default function NewProductStep2({ productId, onNext, onPrev }) {
the upload button as many times as necessary).