Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/static/js/
Upload File :
Current File : /home/infinitibizsol/.trash/static/js/824.182b2e35.chunk.js.map

{"version":3,"file":"static/js/824.182b2e35.chunk.js","mappings":"+MAIMA,EAAQC,aAAaC,QAAQ,cAENC,EAAAA,EAAAA,IAC3B,kBAAiB,yCACjB,WAAOC,EAAK,GAAD,8EAAIC,EAAe,EAAfA,gBAAe,SAEpBC,EAAS,CACbC,QAAS,CACP,eAAgB,mBAChBC,OAAQ,mBACRC,cAAc,UAAD,OAAYT,KAI7BU,EAAAA,EAAAA,KAAW,GAAD,OAAIC,EAAAA,EAAO,YAAYP,EAAME,GAAQM,MAAK,SAACC,GACnDC,QAAQC,IAAI,iBAAqB,OAAHF,QAAG,IAAHA,OAAG,EAAHA,EAAKT,KACrC,IAAG,oDAEC,KAAMY,WAAY,KAAMA,SAASZ,KAAKa,QAAO,0CACxCZ,EAAgB,KAAMW,SAASZ,KAAKa,UAAQ,yDAGxD,qDAnBgB,KAsBgBd,EAAAA,EAAAA,IACjC,eAAc,yCACd,oGASK,OATIe,EAAE,EAAFA,GAAQb,EAAe,EAAfA,gBACfS,QAAQC,IAAI,wBAAyBG,GAAI,SAEjCZ,EAAS,CACbC,QAAS,CACP,eAAgB,mBAChBC,OAAQ,mBACRC,cAAc,UAAD,OAAYT,KAE3B,EAAD,OAEsBU,EAAAA,EAAAA,IAAU,GAAD,OAAIC,EAAAA,EAAO,oBAAYO,GAAMZ,GAAQ,KAAD,EAAxD,GAAwD,WAA5DF,EAAI,EAAJA,MACC,CAAD,gBACqC,OAA3CU,QAAQC,IAAI,wBAAyBX,GAAM,kBACpCA,GAAI,8DAGT,KAAMY,WAAY,KAAMA,SAASZ,KAAKa,QAAO,0CACxCZ,EAAgB,KAAMW,SAASZ,KAAKa,UAAQ,0DAGxD,qDAtBa,KAyBcd,EAAAA,EAAAA,IAC5B,kBAAiB,yCACjB,kGASK,OATL,UAAaE,EAAe,EAAfA,gBAAe,SAG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,cAAe,MACfC,QAAS,QACX,UAEDtG,IACG,UAAC,IAAI,CACDwB,GAAI,CACAgF,MAAO,IACPC,OAAQ,IACRpF,eAAgB,SAChBqF,aAAc,SACdJ,QAAS,OACTK,YAAa,GACf,WAEF,SAAC,IAAO,CACJjB,KAAK,2BACLlE,GAAI,CACAgF,MAAO,GACPC,OAAQ,GACRG,SAAU,WACVC,MAAO,EACPC,IAAK,EACLC,OAAQ,MAEZtF,QAAS,kBACLxB,EAAkB,GAAG,KAG7B,SAAC,IAAW,WACR,gBACIiH,IAAKC,IAAIC,gBACLpH,WAMpB,SAAC,IAAI,CACDwB,GAAI,CACAgF,MAAO,IACPC,OAAQ,IACRpF,eAAgB,SAChBqF,aAAc,UAChB,UAEF,UAAC,IAAW,CACRpC,MAAO,CAAEjD,eAAgB,UAAW,WAEpC,kBACIiG,IAAKtG,EACLsD,MAAO,CAAEgC,QAAS,QAClBpB,KAAK,OACLqC,OAAO,UACPzC,SAAU,SAAC0C,GAAC,OACRvH,GACI,kBAAMuH,EAAEC,OAAOC,MAAM,EAAE,GAC1B,KAGT,SAAC,IAAU,CACPjG,QAAS,kBACLT,EAAmB4G,QAAQC,OAAO,EACrC,UAED,SAAC,IAAO,CACJnC,KAAK,8BACLlE,GAAI,CAAEgF,MAAO,GAAIC,OAAQ,oBAOjD,SAAC,KAAI,CACDhD,WAAS,EACTtC,UAAU,MACVE,eAAe,SACfD,WAAW,SACX0G,EAAG,EAAE,UAEL,SAAC,IAAM,CACHvG,QAAQ,YACRW,KAAK,QACLgD,KAAK,SAAQ,SAChB,aAIF,MAK3B,C","sources":["features/product/productActions.js","pages/Products/AddProducts.js"],"sourcesContent":["import axios from \"axios\";\r\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\r\nimport { baseURL } from \"src/constants/baseURL\";\r\n\r\nconst token = localStorage.getItem(\"userToken\");\r\n\r\nexport const createProduct = createAsyncThunk(\r\n  \"products/create\",\r\n  async (data, { rejectWithValue }) => {\r\n    try {\r\n      const config = {\r\n        headers: {\r\n          \"Content-Type\": \"application/json\",\r\n          Accept: \"application/json\",\r\n          Authorization: `Bearer ${token}`,\r\n        },\r\n      };\r\n\r\n      axios.post(`${baseURL}/product`, data, config).then((res) => {\r\n        console.log(\"Product Action\", res?.data);\r\n      });\r\n    } catch (error) {\r\n      if (error.response && error.response.data.message) {\r\n        return rejectWithValue(error.response.data.message);\r\n      }\r\n    }\r\n  }\r\n);\r\n\r\nexport const getProductsForBrand = createAsyncThunk(\r\n  \"products/get\",\r\n  async ({ id }, { rejectWithValue }) => {\r\n    console.log(\"[getProductsForBrand]\", id);\r\n    try {\r\n      const config = {\r\n        headers: {\r\n          \"Content-Type\": \"application/json\",\r\n          Accept: \"application/json\",\r\n          Authorization: `Bearer ${token}`,\r\n        },\r\n      };\r\n\r\n      const { data } = await axios.get(`${baseURL}/product/${id}`, config);\r\n      if (data) {\r\n        console.log(\"[getProductsForBrand]\", data);\r\n        return data;\r\n      }\r\n    } catch (error) {\r\n      if (error.response && error.response.data.message) {\r\n        return rejectWithValue(error.response.data.message);\r\n      }\r\n    }\r\n  }\r\n);\r\n\r\nexport const getAllProducts = createAsyncThunk(\r\n  \"products/getAll\",\r\n  async ({}, { rejectWithValue }) => {\r\n    // console.log(\"Product Action\", data, new Date());\r\n    try {\r\n      const config = {\r\n        headers: {\r\n          \"Content-Type\": \"application/json\",\r\n          Accept: \"application/json\",\r\n          Authorization: `Bearer ${token}`,\r\n        },\r\n      };\r\n\r\n      const { data } = await axios.get(`${baseURL}/products`, config);\r\n      if (data) {\r\n        // console.log(\"[getAllProducts admin]\", data.products);\r\n        return data.products;\r\n      }\r\n    } catch (error) {\r\n      if (error.response && error.response.data.message) {\r\n        return rejectWithValue(error.response.data.message);\r\n      }\r\n    }\r\n  }\r\n);\r\n\r\nexport const editProduct = createAsyncThunk(\r\n  \"product/edit\",\r\n  async ({ id, values }, { rejectWithValue }) => {\r\n    try {\r\n      const config = {\r\n        headers: {\r\n          \"Content-Type\": \"application/json\",\r\n          Accept: \"application/json\",\r\n          Authorization: `Bearer ${token}`,\r\n        },\r\n      };\r\n      console.log(\"Action\", id, values);\r\n      const res = await axios.put(`${baseURL}/product/${id}`, values, config);\r\n\r\n      if (res?.data) {\r\n        console.log(\"Product edit payload\", res?.data);\r\n      }\r\n      return res?.data;\r\n    } catch (error) {\r\n      if (error.response) {\r\n        return rejectWithValue(error?.response?.data?.error?.message);\r\n      } else {\r\n        return rejectWithValue(error.message);\r\n      }\r\n    }\r\n  }\r\n);\r\n\r\nexport const deleteProduct = createAsyncThunk(\r\n  \"product/delete\",\r\n  async (id, { rejectWithValue }) => {\r\n    try {\r\n      const config = {\r\n        headers: {\r\n          \"Content-Type\": \"application/json\",\r\n          Accept: \"application/json\",\r\n          Authorization: `Bearer ${token}`,\r\n        },\r\n      };\r\n      const { data } = await axios.delete(`${baseURL}/product/${id}`, config);\r\n\r\n      if (data) {\r\n        // console.log(\"Product delete payload\", data);\r\n        return data;\r\n      }\r\n    } catch (error) {\r\n      if (error.response) {\r\n        return rejectWithValue(error?.response?.data?.error?.message);\r\n      } else {\r\n        return rejectWithValue(error.message);\r\n      }\r\n    }\r\n  }\r\n);\r\n\r\nexport const sortProducts = createAsyncThunk(\r\n  \"product/sort\",\r\n  async ({ sortBy, sort }, { rejectWithValue }) => {\r\n    try {\r\n      let url = baseURL + \"/product/filter\";\r\n\r\n      if (sortBy) {\r\n        url = baseURL + `/product/filter?sortBy=${sortBy}&sort=${sort}`;\r\n      }\r\n      const config = {\r\n        headers: {\r\n          \"Content-Type\": \"application/json\",\r\n          Accept: \"application/json\",\r\n          Authorization: `Bearer ${token}`,\r\n        },\r\n      };\r\n      const { data } = await axios.get(`${url}`, config);\r\n\r\n      if (data) {\r\n        console.log(\"Product sort payload\", data);\r\n        return data;\r\n      }\r\n    } catch (error) {\r\n      if (error.response) {\r\n        return rejectWithValue(error?.response?.data?.error?.message);\r\n      } else {\r\n        return rejectWithValue(error.message);\r\n      }\r\n    }\r\n  }\r\n);\r\n","import { useRef, useState, useEffect } from \"react\";\r\nimport {\r\n    ButtonGroup,\r\n    Button,\r\n    Container,\r\n    Stack,\r\n    Grid,\r\n    InputLabel,\r\n    MenuItem,\r\n    Select,\r\n    Typography,\r\n    FormControl,\r\n    TextField,\r\n    Card,\r\n    CardContent,\r\n    IconButton,\r\n    Checkbox,\r\n    FormControlLabel,\r\n} from \"@mui/material\";\r\nimport { Form, Field } from \"react-final-form\";\r\nimport { toast } from \"react-toastify\";\r\nimport TextInput from \"../../components/TextInput/TextInput\";\r\nimport Iconify from \"../../components/iconify\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { createProduct } from \"src/features/product/productActions\";\r\n\r\nimport { baseURL } from \"src/constants/baseURL\";\r\nimport axios from \"axios\";\r\n\r\n// import awsS3 from \"react-s3\";\r\n\r\nwindow.Buffer = window.Buffer || require(\"buffer\").Buffer;\r\n\r\n// const ReactS3Client = new S3(S3_BUCKET_CONFIG);\r\n\r\nconst sizeTypes = {\r\n    upper: [\"XS\", \"S\", \"M\", \"L\", \"XL\"],\r\n    lower: [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40],\r\n    feet: [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47],\r\n};\r\n\r\nconst AddProducts = () => {\r\n    const navigate = useNavigate();\r\n    const dispatch = useDispatch();\r\n\r\n    const [brandData, setBrandData] = useState([]);\r\n    const [categoryData, setCategoryData] = useState([]);\r\n    const [sizeChartImage, setSizeChartImage] = useState(\"\");\r\n\r\n    const { brandInfo, userInfo } = useSelector((state) => state.auth);\r\n\r\n    const role = userInfo?.user_role;\r\n\r\n    const brandId = brandInfo?.brand_id;\r\n\r\n    const token = localStorage.getItem(\"userToken\");\r\n\r\n    useEffect(() => {\r\n        axios\r\n            .get(`${baseURL}/brands/`, {\r\n                headers: {\r\n                    \"Content-Type\": \"application/json\",\r\n                    Accept: \"application/json\",\r\n                    Authorization: `Bearer ${token}`,\r\n                },\r\n            })\r\n            .then((res) => {\r\n                setBrandData(res.data);\r\n            })\r\n            .catch((err) => {\r\n                console.log(\"[Error]\", err);\r\n            });\r\n    }, [token]);\r\n\r\n    useEffect(() => {\r\n        axios\r\n            .get(`${baseURL}/category/`, {\r\n                headers: {\r\n                    \"Content-Type\": \"application/json\",\r\n                    Accept: \"application/json\",\r\n                    Authorization: `Bearer ${token}`,\r\n                },\r\n            })\r\n            .then((res) => {\r\n                setCategoryData(res?.data);\r\n            })\r\n            .catch((err) => {\r\n                console.log(\"[Error]\", err);\r\n            });\r\n    }, [token]);\r\n\r\n    const fileInput = useRef();\r\n    const fileSizeChartInput = useRef();\r\n    const [selectedImages, setSelectedImages] = useState([]);\r\n\r\n    const onSubmit = () => {\r\n        console.log(\"Submit\");\r\n    };\r\n\r\n    // const onSubmit = async (data) => {\r\n    //     if (data) {\r\n    //         let images = [];\r\n    //         let sizeCharImg = \"\";\r\n    //         if (sizeChartImage) {\r\n    //             sizeCharImg = await fileToS3Upload(\r\n    //                 sizeChartImage,\r\n    //                 \"SizeCharts\"\r\n    //             );\r\n    //         }\r\n    //         await Promise.all(\r\n    //             selectedImages.map(async (file) => {\r\n    //                 try {\r\n    //                     await fileToS3Upload(file, \"products\").then(\r\n    //                         async ({ url, key }) => {\r\n    //                             images.push(url);\r\n    //                         }\r\n    //                     );\r\n    //                 } catch (error) {\r\n    //                     console.log(\"error\" + error);\r\n    //                 }\r\n    //             })\r\n    //         );\r\n\r\n    //         if (images.length > 0) {\r\n    //             await dispatch(\r\n    //                 createProduct({\r\n    //                     ...data,\r\n    //                     sizeChart: sizeCharImg.url,\r\n    //                     imgUrl: images,\r\n    //                 })\r\n    //             ).unwrap();\r\n    //         }\r\n    //         toast.success(\"Product created!\");\r\n    //         navigate(`/dashboard/${role}/products`, { replace: true });\r\n    //     } else {\r\n    //         toast.error(\"Product can't be created!!\");\r\n    //     }\r\n    // };\r\n\r\n    const handleRemove = (item) => {\r\n        const filter = selectedImages.filter((i) => i !== item);\r\n        setSelectedImages(filter);\r\n    };\r\n\r\n    return (\r\n        <Container>\r\n            <Stack\r\n                direction=\"row\"\r\n                alignItems=\"center\"\r\n                justifyContent=\"space-between\"\r\n                mb={5}\r\n            >\r\n                <Typography variant=\"h4\" sx={{ mb: 5 }}>\r\n                    Create Products\r\n                </Typography>\r\n\r\n                <Button\r\n                    variant=\"contained\"\r\n                    onClick={() =>\r\n                        navigate(`/dashboard/${role}/products`, {\r\n                            replace: true,\r\n                        })\r\n                    }\r\n                >\r\n                    Back To Product\r\n                </Button>\r\n            </Stack>\r\n\r\n            <Form\r\n                onSubmit={onSubmit}\r\n                initialValues={{\r\n                    name: \"\",\r\n                    category: \"\",\r\n                    brand: userInfo?.user_role === \"brand\" ? brandId : \"\",\r\n                    productCode: \"\",\r\n                    color: \"\",\r\n                    size: [],\r\n                    price: 0,\r\n                    quantity: 1,\r\n                    discount: 0,\r\n                    description: \"\",\r\n                    imgUrl: [],\r\n                }}\r\n                validate={(values) => {\r\n                    console.log(\"[validate]\", values.size);\r\n                    const errors = {};\r\n                    if (!values.name) {\r\n                        errors.name = \"Name is required!\";\r\n                    }\r\n                    if (!values.category) {\r\n                        errors.category = \"Category is required!\";\r\n                    }\r\n                    if (!values.brand && userInfo?.user_role !== \"brand\") {\r\n                        errors.brand = \"Brand name is required!\";\r\n                    }\r\n                    if (values.price === 0) {\r\n                        errors.price = \"Price is required!\";\r\n                    }\r\n                    if (!values.description) {\r\n                        errors.description = \"Description is required!\";\r\n                    }\r\n                    if (!values.quantity) {\r\n                        errors.quantity = \"Quantity is required!\";\r\n                    }\r\n                    if (!values.productCode) {\r\n                        errors.productCode = \"ProductCode is required!\";\r\n                    }\r\n                    if (!values.color) {\r\n                        errors.color = \"Color is required!\";\r\n                    }\r\n                    console.log(\"ere\", errors);\r\n\r\n                    return errors;\r\n                }}\r\n                mutators={{\r\n                    onChangeQuantity: (args, state, utils) => {\r\n                        const calculateQty = (prev) => {\r\n                            if (prev > 1 || (prev === 1 && args == 1)) {\r\n                                const qty = Number(prev ?? 1) + Number(args);\r\n\r\n                                return qty;\r\n                            }\r\n\r\n                            return 1;\r\n                        };\r\n                        utils.changeValue(state, \"quantity\", (prev) =>\r\n                            calculateQty(prev)\r\n                        );\r\n                    },\r\n                    onChangeCheckBox: (args, state, utils) => {\r\n                        const sizeHandler = (values) =>\r\n                            values.indexOf(args[0]) !== -1\r\n                                ? values.filter((value) => value !== args[0])\r\n                                : [...values, args[0]];\r\n                        utils.changeValue(state, \"size\", (prev) =>\r\n                            sizeHandler(prev)\r\n                        );\r\n                    },\r\n                }}\r\n                render={({ handleSubmit, errors, form }) => (\r\n                    <form onSubmit={handleSubmit}>\r\n                        <Grid container spacing={4}>\r\n                            <Grid item xs={6}>\r\n                                <Field fullWidth name=\"name\">\r\n                                    {(props) => (\r\n                                        <TextInput\r\n                                            label={\"Product Name\"}\r\n                                            {...props}\r\n                                        />\r\n                                    )}\r\n                                </Field>\r\n                            </Grid>\r\n\r\n                            {/* <Grid item xs={6}>\r\n                <Field fullWidth name=\"category\">\r\n                  {(props) => (\r\n                    <TextInput\r\n                      label={\"Product Category\"}\r\n                      type={\"text\"}\r\n                      {...props}\r\n                    />\r\n                  )}\r\n                </Field>\r\n              </Grid> */}\r\n\r\n                            <Grid item xs={6}>\r\n                                <Field\r\n                                    fullWidth\r\n                                    component=\"select\"\r\n                                    name=\"category\"\r\n                                >\r\n                                    {({ input, meta, options }) => (\r\n                                        <FormControl fullWidth>\r\n                                            <InputLabel id=\"brand-label\">\r\n                                                Product Category\r\n                                            </InputLabel>\r\n                                            <Select\r\n                                                labelId=\"brand-label\"\r\n                                                name=\"category\"\r\n                                                options={categoryData}\r\n                                                MenuProps={{\r\n                                                    style: {\r\n                                                        maxHeight: 300,\r\n                                                    },\r\n                                                }}\r\n                                                {...input}\r\n                                            >\r\n                                                {categoryData?.map(\r\n                                                    (x, index) => {\r\n                                                        return (\r\n                                                            <MenuItem\r\n                                                                key={index}\r\n                                                                value={x._id}\r\n                                                            >\r\n                                                                {x.categoryName}\r\n                                                            </MenuItem>\r\n                                                        );\r\n                                                    }\r\n                                                )}\r\n                                            </Select>\r\n                                        </FormControl>\r\n                                    )}\r\n                                </Field>\r\n                            </Grid>\r\n\r\n                            {userInfo?.user_role !== \"brand\" && (\r\n                                <Grid item xs={4} mt={3}>\r\n                                    <Field fullWidth name=\"brand\">\r\n                                        {({ input, meta, options }) => (\r\n                                            <FormControl fullWidth>\r\n                                                <InputLabel id=\"brand-label\">\r\n                                                    Brand Name\r\n                                                </InputLabel>\r\n                                                <Select\r\n                                                    labelId=\"brand-label\"\r\n                                                    name=\"brand\"\r\n                                                    options={brandData}\r\n                                                    onChange={(val) =>\r\n                                                        input.onChange(val)\r\n                                                    }\r\n                                                    MenuProps={{\r\n                                                        style: {\r\n                                                            maxHeight: 300,\r\n                                                        },\r\n                                                    }}\r\n                                                >\r\n                                                    {brandData?.brands?.map(\r\n                                                        (x, index) => {\r\n                                                            return (\r\n                                                                <MenuItem\r\n                                                                    key={index}\r\n                                                                    value={\r\n                                                                        x._id\r\n                                                                    }\r\n                                                                >\r\n                                                                    {\r\n                                                                        x.brandName\r\n                                                                    }\r\n                                                                </MenuItem>\r\n                                                            );\r\n                                                        }\r\n                                                    )}\r\n                                                </Select>\r\n                                            </FormControl>\r\n                                        )}\r\n                                    </Field>\r\n                                </Grid>\r\n                            )}\r\n\r\n                            <Grid item xs={4} mt={3}>\r\n                                <Field fullWidth name=\"productCode\">\r\n                                    {(props) => (\r\n                                        <TextInput\r\n                                            label={\"Product Code\"}\r\n                                            {...props}\r\n                                        />\r\n                                    )}\r\n                                </Field>\r\n                            </Grid>\r\n\r\n                            <Grid item xs={4} mt={3}>\r\n                                <Field fullWidth name=\"color\">\r\n                                    {(props) => (\r\n                                        <TextInput\r\n                                            label={\"Product Color\"}\r\n                                            {...props}\r\n                                        />\r\n                                    )}\r\n                                </Field>\r\n                            </Grid>\r\n\r\n                            <Grid\r\n                                item\r\n                                xs={userInfo?.user_role !== \"brand\" ? 4 : 6}\r\n                                mt={3}\r\n                            >\r\n                                <Field fullWidth name=\"price\">\r\n                                    {(props) => (\r\n                                        <TextInput\r\n                                            label={\"Price\"}\r\n                                            type={\"number\"}\r\n                                            style={{ paddingRight: 0 }}\r\n                                            InputProps={{\r\n                                                inputProps: {\r\n                                                    min: 0,\r\n                                                },\r\n                                            }}\r\n                                            {...props}\r\n                                        />\r\n                                    )}\r\n                                </Field>\r\n                            </Grid>\r\n\r\n                            <Grid\r\n                                item\r\n                                xs={userInfo?.user_role !== \"brand\" ? 4 : 6}\r\n                                mt={3}\r\n                            >\r\n                                <Field fullWidth name=\"quantity\">\r\n                                    {(props) => (\r\n                                        <TextInput\r\n                                            label={\"Available Quantity\"}\r\n                                            type={\"number\"}\r\n                                            style={{ paddingRight: 0 }}\r\n                                            InputProps={{\r\n                                                inputProps: {\r\n                                                    max: 100,\r\n                                                    min: 0,\r\n                                                },\r\n                                                endAdornment: (\r\n                                                    <ButtonGroup\r\n                                                        size=\"small\"\r\n                                                        aria-label=\"small button group\"\r\n                                                        orientation=\"vertical\"\r\n                                                    >\r\n                                                        <Button\r\n                                                            color=\"primary\"\r\n                                                            variant=\"text\"\r\n                                                            onClick={() =>\r\n                                                                form.mutators.onChangeQuantity(\r\n                                                                    1\r\n                                                                )\r\n                                                            }\r\n                                                        >\r\n                                                            <Iconify icon=\"eva:plus-fill\" />\r\n                                                        </Button>\r\n                                                        <Button\r\n                                                            color=\"error\"\r\n                                                            variant=\"text\"\r\n                                                            onClick={() =>\r\n                                                                form.mutators.onChangeQuantity(\r\n                                                                    -1\r\n                                                                )\r\n                                                            }\r\n                                                        >\r\n                                                            <Iconify icon=\"eva:minus-fill\" />\r\n                                                        </Button>\r\n                                                    </ButtonGroup>\r\n                                                ),\r\n                                            }}\r\n                                            {...props}\r\n                                        />\r\n                                    )}\r\n                                </Field>\r\n                            </Grid>\r\n                            {/* <Grid item xs={userInfo?.user_role !== \"brand\" ? 4 : 6} mt={0}>\r\n                <Field fullWidth name=\"size\" type=\"checkbox\" mt={3}>\r\n                  {(props) => {\r\n                    const sizeTypeVal = categoryData?.find(\r\n                      (item) => item._id === form.getState().values[\"category\"]\r\n                    );\r\n                    return (\r\n                      <FormControl fullWidth>\r\n                        Available Size:\r\n                        <div\r\n                          style={{\r\n                            display: \"flex\",\r\n                            flexDirection: \"row\",\r\n                            // justifyContent: \"space-evenly\",\r\n                            flexWrap: \"wrap\",\r\n                            padding: 10,\r\n                          }}\r\n                        >\r\n                          {categoryData.find(\r\n                            (item) =>\r\n                              item._id === form.getState().values[\"category\"]\r\n                          ) !== \"\" &&\r\n                            sizeTypes[sizeTypeVal?.sizeType]?.map(\r\n                              (size, index) => (\r\n                                <FormControlLabel\r\n                                  control={\r\n                                    <Checkbox\r\n                                      name={size}\r\n                                      onChange={(event) => {\r\n                                        form.mutators.onChangeCheckBox(size);\r\n                                      }}\r\n                                      {...props}\r\n                                    />\r\n                                  }\r\n                                  label={size}\r\n                                  key={index}\r\n                                />\r\n                              )\r\n                            )}\r\n                        </div>\r\n                      </FormControl>\r\n                    );\r\n                  }}\r\n                </Field>\r\n              </Grid> */}\r\n\r\n                            <Grid\r\n                                item\r\n                                xs={userInfo?.user_role !== \"brand\" ? 4 : 6}\r\n                                mt={3}\r\n                            >\r\n                                <Field fullWidth name=\"discount\">\r\n                                    {(props) => (\r\n                                        <TextInput\r\n                                            label={\"Discount\"}\r\n                                            type={\"number\"}\r\n                                            style={{ paddingRight: 0 }}\r\n                                            InputProps={{\r\n                                                inputProps: {\r\n                                                    min: 0,\r\n                                                },\r\n                                            }}\r\n                                            {...props}\r\n                                        />\r\n                                    )}\r\n                                </Field>\r\n                            </Grid>\r\n\r\n                            {categoryData.find(\r\n                                (item) =>\r\n                                    item._id ===\r\n                                    form.getState().values[\"category\"]\r\n                            ) && (\r\n                                <Grid\r\n                                    item\r\n                                    xs={\r\n                                        userInfo?.user_role !== \"brand\" ? 12 : 6\r\n                                    }\r\n                                >\r\n                                    <Field\r\n                                        fullWidth\r\n                                        name=\"size\"\r\n                                        type=\"checkbox\"\r\n                                    >\r\n                                        {(props) => (\r\n                                            <FormControl fullWidth>\r\n                                                Available Size:\r\n                                                <Grid\r\n                                                    item\r\n                                                    lg={12}\r\n                                                    // style={{\r\n                                                    //   display: \"flex\",\r\n                                                    //   flexDirection: \"row\",\r\n                                                    //   justifyContent: \"space-evenly\",\r\n                                                    //   padding: 10,\r\n                                                    //   marginRight: 0,\r\n                                                    // }}\r\n                                                >\r\n                                                    {categoryData.find(\r\n                                                        (item) =>\r\n                                                            item._id ===\r\n                                                            form.getState()\r\n                                                                .values[\r\n                                                                \"category\"\r\n                                                            ]\r\n                                                    ) !== \"\" &&\r\n                                                        sizeTypes[\r\n                                                            categoryData.find(\r\n                                                                (item) =>\r\n                                                                    item._id ===\r\n                                                                    form.getState()\r\n                                                                        .values[\r\n                                                                        \"category\"\r\n                                                                    ]\r\n                                                            )?.sizeType\r\n                                                        ]?.map(\r\n                                                            (size, index) => (\r\n                                                                <FormControlLabel\r\n                                                                    control={\r\n                                                                        <Checkbox\r\n                                                                            name={\r\n                                                                                size\r\n                                                                            }\r\n                                                                            onChange={(\r\n                                                                                event\r\n                                                                            ) => {\r\n                                                                                form.mutators.onChangeCheckBox(\r\n                                                                                    size\r\n                                                                                );\r\n                                                                            }}\r\n                                                                            {...props}\r\n                                                                        />\r\n                                                                    }\r\n                                                                    label={size}\r\n                                                                    key={index}\r\n                                                                />\r\n                                                            )\r\n                                                        )}\r\n                                                </Grid>\r\n                                            </FormControl>\r\n                                        )}\r\n                                    </Field>\r\n                                </Grid>\r\n                            )}\r\n\r\n                            <Grid item xs={12}>\r\n                                <Field\r\n                                    name=\"description\"\r\n                                    render={({ input }) => (\r\n                                        <TextField\r\n                                            fullWidth\r\n                                            {...input}\r\n                                            label=\"Product Description\"\r\n                                            multiline\r\n                                            rows={6}\r\n                                        />\r\n                                    )}\r\n                                />\r\n                            </Grid>\r\n\r\n                            <Typography\r\n                                variant=\"h4\"\r\n                                sx={{ marginTop: 5, marginLeft: 5 }}\r\n                            >\r\n                                Upload Images:\r\n                            </Typography>\r\n                            <Grid\r\n                                item\r\n                                xs={12}\r\n                                style={{\r\n                                    flexDirection: \"row\",\r\n                                    display: \"flex\",\r\n                                }}\r\n                            >\r\n                                {selectedImages?.length > 0 &&\r\n                                    selectedImages?.map((item) => (\r\n                                        <>\r\n                                            <Card\r\n                                                sx={{\r\n                                                    width: 150,\r\n                                                    height: 150,\r\n                                                    justifyContent: \"center\",\r\n                                                    alignContent: \"center\",\r\n                                                    display: \"grid\",\r\n                                                    marginRight: 5,\r\n                                                }}\r\n                                            >\r\n                                                <Iconify\r\n                                                    icon=\"mdi:close-circle-outline\"\r\n                                                    sx={{\r\n                                                        width: 25,\r\n                                                        height: 25,\r\n                                                        position: \"absolute\",\r\n                                                        right: 5,\r\n                                                        top: 5,\r\n                                                        zIndex: 9999,\r\n                                                    }}\r\n                                                    onClick={() =>\r\n                                                        handleRemove(item)\r\n                                                    }\r\n                                                />\r\n                                                <CardContent>\r\n                                                    <img\r\n                                                        src={URL.createObjectURL(\r\n                                                            item\r\n                                                        )}\r\n                                                        alt=\"\"\r\n                                                    />\r\n                                                </CardContent>\r\n                                            </Card>\r\n                                        </>\r\n                                    ))}\r\n                                <Card\r\n                                    sx={{\r\n                                        width: 150,\r\n                                        height: 150,\r\n                                        justifyContent: \"center\",\r\n                                        alignContent: \"center\",\r\n                                    }}\r\n                                >\r\n                                    <CardContent\r\n                                        style={{ justifyContent: \"center\" }}\r\n                                    >\r\n                                        <input\r\n                                            ref={fileInput}\r\n                                            style={{ display: \"none\" }}\r\n                                            type=\"file\"\r\n                                            accept=\"image/*\"\r\n                                            onChange={(e) =>\r\n                                                setSelectedImages((prev) => [\r\n                                                    ...prev,\r\n                                                    e.target.files[0],\r\n                                                ])\r\n                                            }\r\n                                            multiple={true}\r\n                                        />\r\n                                        <IconButton\r\n                                            onClick={() =>\r\n                                                fileInput.current.click()\r\n                                            }\r\n                                        >\r\n                                            <Iconify\r\n                                                icon=\"mdi:file-image-plus-outline\"\r\n                                                sx={{ width: 80, height: 80 }}\r\n                                            />\r\n                                        </IconButton>\r\n                                    </CardContent>\r\n                                </Card>\r\n                            </Grid>\r\n\r\n                            <Typography\r\n                                variant=\"h4\"\r\n                                sx={{ marginTop: 5, marginLeft: 5 }}\r\n                            >\r\n                                Upload Size Chart{\" \"}\r\n                                <span style={{ color: \"#b2b2b2\" }}>\r\n                                    (optional)\r\n                                </span>\r\n                                :\r\n                            </Typography>\r\n                            <Grid\r\n                                item\r\n                                xs={12}\r\n                                style={{\r\n                                    flexDirection: \"row\",\r\n                                    display: \"flex\",\r\n                                }}\r\n                            >\r\n                                {sizeChartImage && (\r\n                                    <Card\r\n                                        sx={{\r\n                                            width: 150,\r\n                                            height: 150,\r\n                                            justifyContent: \"center\",\r\n                                            alignContent: \"center\",\r\n                                            display: \"grid\",\r\n                                            marginRight: 5,\r\n                                        }}\r\n                                    >\r\n                                        <Iconify\r\n                                            icon=\"mdi:close-circle-outline\"\r\n                                            sx={{\r\n                                                width: 25,\r\n                                                height: 25,\r\n                                                position: \"absolute\",\r\n                                                right: 5,\r\n                                                top: 5,\r\n                                                zIndex: 9999,\r\n                                            }}\r\n                                            onClick={() =>\r\n                                                setSizeChartImage(\"\")\r\n                                            }\r\n                                        />\r\n                                        <CardContent>\r\n                                            <img\r\n                                                src={URL.createObjectURL(\r\n                                                    sizeChartImage\r\n                                                )}\r\n                                            />\r\n                                        </CardContent>\r\n                                    </Card>\r\n                                )}\r\n                                <Card\r\n                                    sx={{\r\n                                        width: 150,\r\n                                        height: 150,\r\n                                        justifyContent: \"center\",\r\n                                        alignContent: \"center\",\r\n                                    }}\r\n                                >\r\n                                    <CardContent\r\n                                        style={{ justifyContent: \"center\" }}\r\n                                    >\r\n                                        <input\r\n                                            ref={fileSizeChartInput}\r\n                                            style={{ display: \"none\" }}\r\n                                            type=\"file\"\r\n                                            accept=\"image/*\"\r\n                                            onChange={(e) =>\r\n                                                setSizeChartImage(\r\n                                                    () => e.target.files[0]\r\n                                                )\r\n                                            }\r\n                                        />\r\n                                        <IconButton\r\n                                            onClick={() =>\r\n                                                fileSizeChartInput.current.click()\r\n                                            }\r\n                                        >\r\n                                            <Iconify\r\n                                                icon=\"mdi:file-image-plus-outline\"\r\n                                                sx={{ width: 80, height: 80 }}\r\n                                            />\r\n                                        </IconButton>\r\n                                    </CardContent>\r\n                                </Card>\r\n                            </Grid>\r\n                        </Grid>\r\n                        <Grid\r\n                            container\r\n                            direction=\"row\"\r\n                            justifyContent=\"center\"\r\n                            alignItems=\"center\"\r\n                            m={4}\r\n                        >\r\n                            <Button\r\n                                variant=\"contained\"\r\n                                size=\"large\"\r\n                                type=\"submit\"\r\n                            >\r\n                                Save\r\n                            </Button>\r\n                        </Grid>\r\n                    </form>\r\n                )}\r\n            />\r\n        </Container>\r\n    );\r\n};\r\n\r\nexport default AddProducts;\r\n"],"names":["token","localStorage","getItem","createAsyncThunk","data","rejectWithValue","config","headers","Accept","Authorization","axios","baseURL","then","res","console","log","response","message","id","products","values","error","sortBy","sort","url","window","Buffer","require","sizeTypes","upper","lower","feet","navigate","useNavigate","useDispatch","useState","brandData","setBrandData","categoryData","setCategoryData","sizeChartImage","setSizeChartImage","useSelector","state","auth","brandInfo","userInfo","role","user_role","brandId","brand_id","useEffect","catch","err","fileInput","useRef","fileSizeChartInput","selectedImages","setSelectedImages","direction","alignItems","justifyContent","mb","variant","sx","onClick","replace","onSubmit","initialValues","name","category","brand","productCode","color","size","price","quantity","discount","description","imgUrl","validate","errors","mutators","onChangeQuantity","args","utils","changeValue","prev","Number","calculateQty","onChangeCheckBox","indexOf","filter","value","render","handleSubmit","form","container","spacing","item","xs","fullWidth","props","label","component","input","meta","options","labelId","MenuProps","style","maxHeight","map","x","index","_id","categoryName","mt","onChange","val","brands","brandName","type","paddingRight","InputProps","inputProps","min","max","endAdornment","orientation","icon","find","getState","lg","sizeType","control","event","multiline","rows","marginTop","marginLeft","flexDirection","display","length","width","height","alignContent","marginRight","position","right","top","zIndex","i","handleRemove","src","URL","createObjectURL","alt","ref","accept","e","target","files","multiple","current","click","m"],"sourceRoot":""}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists