Feature/wms 63 - Image upload component (#54)
* Updated: Image component functionality * Updated: Added accept type support * Updated: Restrict based on multiple key Co-authored-by: Llewellyn D'souza <lledsouza2209@gmail.com>
This commit is contained in:
@@ -22,8 +22,6 @@ const useStyles = makeStyles({
|
||||
}
|
||||
});
|
||||
|
||||
const previewImg = [1, 2, 3];
|
||||
|
||||
const inventoryTypes = ['Perishable', 'Material', 'Product', 'Inventory', 'Fleet'];
|
||||
|
||||
function EditWarehouseDetails() {
|
||||
@@ -46,7 +44,8 @@ function EditWarehouseDetails() {
|
||||
warehousename: location.state.name,
|
||||
address: location.state.address,
|
||||
inventorytype: [],
|
||||
attributes: ''
|
||||
attributes: '',
|
||||
images: []
|
||||
},
|
||||
validationSchema: schema.warehouseForm,
|
||||
onSubmit: (values, onSubmitProps) => {
|
||||
@@ -185,7 +184,15 @@ function EditWarehouseDetails() {
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6} md={6}>
|
||||
<Box sx={{ marginTop: '30px' }}>
|
||||
<ImageUpload heading="Upload Warehouse Image" previewImg={previewImg} />
|
||||
<ImageUpload
|
||||
multiple
|
||||
heading="Upload Warehouse Image"
|
||||
accept="image/*"
|
||||
images={formik.values.images}
|
||||
setImages={(images) => {
|
||||
formik.setFieldValue('images', images);
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user