{"version":3,"sources":["variables.js","Views/Components/Loader.js","Views/Pages/Settings/LoginBG.js","Views/Pages/Settings/Settings.js","contexts.js","Views/Pages/Splash.js","Views/Pages/Dashboard/Orders.js","Views/Pages/Dashboard/Quotations.js","Views/Pages/Dashboard/Users.js","Views/Pages/Dashboard/Dashboard.js","Views/Components/dialoger.js","Views/Components/DataTable.js","Views/Components/SwitchIOS.js","Views/Pages/Users/ContentFormCustom.js","Views/Pages/Users/UsersCustom.js","Views/Pages/Series/ContentForm.js","Views/Pages/Series/Series.js","Views/Pages/Colors/ContentForm.js","Views/Pages/Colors/Colors.js","Views/Pages/Catalogs/ContentFormCustom.js","utils/generators.js","Views/Pages/Catalogs/CatalogsCustom.js","constants/files.js","Views/Pages/Documents/ContentFormCustom.js","Views/Pages/Documents/DocumentsCustom.js","Views/Pages/Products/ContentFormCustom.js","Views/Pages/Products/ProductsCustom.js","Views/Pages/Contacts/ContentFormCustom.js","Views/Pages/Contacts/ContactsCustom.js","Views/Pages/Orders/DataTable.js","Views/Components/Autocomplete.js","Views/Pages/Orders/ContentFormCustom.js","Views/Pages/Orders/Report.js","Views/Pages/Orders/ContentView.js","Views/Pages/Orders/OrdersCustom.js","Views/Pages/Quotations/DataTable.js","Views/Pages/Quotations/ContentFormCustom.js","Views/Pages/Quotations/Report.js","Views/Pages/Quotations/ContentView.js","Views/Pages/Quotations/QuotationsCustom.js","Views/Pages/Home.js","Views/Pages/Website/Builder/BodyBuilder.js","Views/Pages/Website/Header.js","Views/Pages/Website/Footer.js","Views/Pages/Website/Home.js","Views/Pages/Website/Company.js","Views/Pages/Website/Articles.js","Views/Pages/Website/Catalogs.js","Views/Pages/Website/Auth/PasswordReset.js","Views/Pages/Website/Auth/Login.js","Views/Pages/Website/ContactUs.js","Views/Pages/Website/PrivacyPolicy.js","App.js","service-worker.js","index.js","res/images/logo.png"],"names":["axiosSiteData","axios","create","defaults","baseURL","process","storageLink","langLink","GetCatalogLink","link","GetArticleLink","builder","init","langMessages","gvUserConnected","name","email","company","phone","accountID","token","type","theme","lang","axiosSiteDataConfig","headers","user","setGvUserConnected","userConnected","localStorage","setItem","JSON","stringify","getFileExtension","filename","slice","lastIndexOf","toLowerCase","appendToFileName","append","extension","Loader","CircularProgress","color","LoginManager","working","setWorking","useTheme","enqueueSnackbar","useSnackbar","onDrop","useCallback","acceptedFiles","forEach","theFile","reader","FileReader","onabort","variant","onerror","onload","post","result","then","_","caches","open","cache","delete","response","alert","window","location","reload","catch","errors","console","log","readAsArrayBuffer","useDropzone","maxFiles","maxSize","accept","getRootProps","getInputProps","Box","display","flexDirection","justifyContent","Typography","style","marginBottom","spacing","id","defaultMessage","src","alt","width","maxWidth","height","Button","marginTop","disabled","LanguageManager","useState","editor","setEditor","useEffect","container","document","getElementById","editr","JSONEditor","mode","language","modes","set","handleLangSubmit","langData","messages","afterUploading","onError","get","error","onClick","Settings","m","p","flexGrow","Card","CardContent","UserConnectedContext","createContext","PanelUserContext","LoggedInContext","UtilitiesContext","UsersContext","SeriesContext","ColorsContext","CatalogsContext","DocumentsContext","ProductsContext","ContactsContext","OrdersContext","QuotationsContext","useStyles","makeStyles","main","alignItems","Splash","classes","title","projectName","className","bgcolor","palette","background","default","Logo","borderRadius","Orders","record","inMobile","useMediaQuery","breakpoints","down","paper","boxShadow","pt","mt","Divider","options","labels","colors","responsive","breakpoint","values","md","legend","show","series","Rascunho","Submetida","Terminado","Quotations","Users","mx","my","UserDashboard","Grid","item","xs","AdminDashboard","Dashboard","panelUser","useContext","setRecord","data","Dialoger","content","onClose","onAction","React","waiter","setWaiter","setOpen","fullScreen","Dialog","aria-labelledby","DialogTitle","DialogContent","DialogActions","autoFocus","size","parentID","uuidv4","split","inifiniteLoaderKey","tableHeight","visuallyHidden","border","clip","margin","overflow","padding","position","top","tableHead","fontSize","fontWeight","DataTable","columns","order","orderBy","rows","editAction","deleteAction","loadMoreFunc","hasMore","onRowDoubleClick","row","sort","setSort","sortBy","setSortBy","ResizeObserver","entries","entry","contentRect","observe","TableContainer","component","Paper","maxHeight","pageStart","loadMore","loader","key","useWindow","threshold","initialLoad","Table","TableHeading","onRequestSort","event","property","TableBody","array","comparator","stabilizedThis","map","el","index","a","b","stableSort","descendingComparator","getComparator","TableRow","hover","_id","onDoubleClick","e","preventDefault","column","TableCell","Fragment","columnID","reduce","total","current","handleColumnID","_NotChangeable","IconButton","TableHead","sortDirection","TableSortLabel","active","direction","label","SwitchIOS","withStyles","root","switchBase","transform","common","white","backgroundColor","primary","secondary","opacity","thumb","track","grey","transition","transitions","checked","focusVisible","props","Switch","focusVisibleClassName","disableRipple","ContentForm","selectedRecord","setContent","handleSubmit","password","setPassword","setLoader","marginRight","_Name","FormControl","fullWidth","TextField","placeholder","required","value","onChange","target","_Email","_Company","_Phone","InputLabel","Select","_AccountID","MenuItem","_Role","FormControlLabel","control","_Active","FormGroup","theRecord","trim","_Password","searchTimeout","tableImage","boolTextYes","boolTextNo","setSelectedRecord","productsRendered","setProductsRendered","setUsers","Date","toJSON","aRecord","Listing","Adding","Editing","Deleting","users","search","setSearch","searchResults","setSearchResults","numeric","mb","toSearch","clearTimeout","setTimeout","InputProps","endAdornment","filter","put","DialogContentText","_Label","Series","setSeries","Colors","setColors","file","setFile","isDragActive","cursor","_Link","marginLeft","generateNumber","length","Math","floor","pow","random","Catalogs","rendered","setRendered","setCatalogs","href","rel","catalogs","toString","documentContentTypes","collection","CustomRowsRender","Documents","setDocuments","documents","_Picture","image","setImage","readAsDataURL","_HasColor","justifySelf","ml","_Serie","aSerie","multiline","_Description","_Unit","aUnit","_Price","parseFloat","_ColorI","_ColorM","_ColorE","ProductImage","picture","hei","Products","setHasMore","noMore","setNoMore","setProducts","aProduct","products","concat","_Motivation","_Message","_Converted","Contacts","setContacts","contacts","_Status","ItemRow","ListItem","button","handleSelectedItem","itemRender","items","opened","anchorEl","itemHeight","listHeight","itemKey","itemsWidth","selected","Popper","placement","zIndex","TransitionProps","Fade","timeout","itemCount","itemSize","itemData","Autocomplete","setSelecetdItemLabel","onSearch","setValue","setOpened","setSelected","anchorRef","useRef","ClickAwayListener","onClickAway","ref","searchedValue","InputAdornment","activeProducts","setActiveProducts","itemsAction","setItemsAction","selectedProduct","setSelectedProduct","_Quantity","currentItem","setCurrentItem","textAlign","whiteSpace","textOverflow","handleProduct","theValue","_Number","_User","_Reference","_CreatedAt","toLocaleDateString","fontStyle","elem","includes","getOptionLabel","option","newValue","renderInput","params","_Items","handleItem","anItem","handleItemUpdate","_Observations","Font","register","family","styles","StyleSheet","body","paddingTop","paddingBottom","paddingHorizontal","marginVertical","fontFamily","author","subtitle","text","textItems","flexBasis","textItemsTiny","marginHorizontal","header","pageNumber","bottom","left","right","Report","locale","defaultLocale","join","download","setDownload","_Exported","exported","setExported","sm","bExported","fileName","blob","url","loading","status","setFilter","setOrders","toLocaleString","Viewing","orders","filterAction","myFilter","myExported","FormLabel","RadioGroup","aria-label","Radio","setQuotations","quotations","quotation","QuotationBy","drawer","flexShrink","drawerPaper","appBar","toolbar","mixins","AppMenu","currentBody","onSelectedMenu","fullMenu","roles","element","Drawer","anchor","to","List","action","ListItemText","TransitionMobileMenu","forwardRef","Slide","AppMenuMobile","openMobileMenu","setOpenMobileMenu","handleClose","TransitionComponent","AppBar","AppBody","Home","Logout","page","setPage","setCurrentBody","setPanelUser","handleSelectedMenu","theUser","parse","getItem","checkToken","ticker","setInterval","clearInterval","Provider","CssBaseline","Toolbar","Tooltip","BodyBuilder","bodyEntry","model","headerRoot","shadows","up","navLlink","typography","h1","subtitle1","navLinkSelected","textDecorationLine","activeClassName","Header","footerRoot","footerSection","footerSection1","colorWhite","subtitle2","textDecoration","buttonTextTransform","textTransform","Footer","setUserConnected","locales","justify","align","Company","searchBar","articleImage","ArticleDialog","article","px","py","gap","gutterBottom","serie","setSerie","APIError","openArticleDialog","setOpenArticleDialog","currrentArticle","setCurrentArticle","list","keys","some","GetDistinctKeys","aProd","Articles","Container","Step1","setStep","onSubmit","Step2","setContentAction","code","_Context","_Code","Step3","confPassword","_ResetRequest","PasswordReset","step","Login","contentAction","_Token","pathname","backgroundImage","backgroundSize","onKeyPress","animSize","loop","autoplay","animationData","AnimSuccessfull","rendererSettings","preserveAspectRatio","PrivacyPolicy","AppConfig","loggedIn","setLoggedIn","toTranslate","exact","path","App","ready","setReady","createMuiTheme","black","ThemeProvider","autoHideDuration","maxSnack","anchorOrigin","vertical","horizontal","Boolean","hostname","match","ReactDOM","render","navigator","serviceWorker","registration","unregister","message","module","exports"],"mappings":"692FAOaA,EAAgBC,IAAMC,SAEnCF,EAAcG,SAASC,QADHC,+BAGb,IAEMC,EAAcD,qCAIdE,EAAQ,UATDF,+BASC,SAId,SAASG,EAAeC,GAC3B,OAAOH,eAA0CG,EAO9C,SAASC,EAAeD,GAC3B,OAAOH,eAA0CG,EAIrDE,IAAQC,KAAK,oCAGN,IA+BIC,EA/BAC,EAAkB,CACzBC,KAAM,GACNC,MAAO,GACPC,QAAS,GACTC,MAAO,GAAIC,UAAW,GACtBC,MAAO,GACPC,KAAM,WACNC,MAAO,QACPC,KAAM,MAGCC,EAAsB,CAAEC,QAAS,CAAE,aAAcX,EAAgBM,MAAOM,KAAMZ,EAAgBE,QAElG,SAASW,EAAmBC,GAC/Bd,EAAkBc,EAClBC,aAAaC,QAAQ,OAAQC,KAAKC,UAAUlB,IAC5CU,EAAoBC,QAAQ,cAAgBX,EAAgBM,MAC5DI,EAAoBC,QAApB,KAAsCX,EAAgBE,MAGnD,SAASiB,EAAiBC,GAC7B,OAAOA,EAASC,MAA8C,GAAvCD,EAASE,YAAY,KAAO,IAAM,IAAQC,cAG9D,SAASC,EAAiBJ,EAAUK,GACvC,IAAIC,EAAYP,EAAiBC,GAEjC,OADWA,EAASC,MAAM,EAAGD,EAASE,YAAY,MACpCG,EAAS,IAAMC,E,aC7DlB,SAASC,IACpB,OACI,kBAACC,EAAA,EAAD,CAAkBC,MAAM,Y,gDC+EjBC,MArEf,YAAgD,IAAxBC,EAAuB,EAAvBA,QAASC,EAAc,EAAdA,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C,EAAOC,QAAU,IAA0B,mC","file":"static/js/main.5a5f555b.chunk.js","sourcesContent":["import axios from 'axios'\r\nimport { builder } from '@builder.io/react'\r\n// import Lang from './lang.json'\r\n\r\n\r\n\r\n\r\nexport const axiosSiteData = axios.create()\r\nconst siteDataURL = process.env.REACT_APP_SITE_DATA_URL\r\naxiosSiteData.defaults.baseURL = siteDataURL\r\n\r\nexport const projectName = 'Alumace' \r\n\r\nexport const storageLink = process.env.REACT_APP_STORAGE_URL\r\nexport const catalogsStorageRoot = '/catalogs'\r\nexport const documentsStorageRoot = '/documents'\r\nexport const articlesStorageRoot = '/articles'\r\nexport const langLink = `${siteDataURL}/lang`\r\n// export const langLink = `${storageLink}/lang.json`\r\nexport const LoginBGLink = storageLink + '/LoginBG.png'\r\n\r\nexport function GetCatalogLink(link) {\r\n return storageLink + catalogsStorageRoot + \"/\" + link\r\n}\r\n\r\nexport function GetDocumentLink(link) {\r\n return storageLink + documentsStorageRoot + \"/\" + link\r\n}\r\n\r\nexport function GetArticleLink(link) {\r\n return storageLink + articlesStorageRoot + \"/\" + link\r\n}\r\n\r\n// Builder io\r\nbuilder.init('6b7164a9d11a466fb16d321660dd6308')\r\n\r\n\r\nexport let gvUserConnected = {\r\n name: '',\r\n email: '',\r\n company: '',\r\n phone: '', accountID: '',\r\n token: '',\r\n type: 'customer',\r\n theme: 'light',\r\n lang: 'pt'\r\n}\r\n\r\nexport let axiosSiteDataConfig = { headers: { 'user-token': gvUserConnected.token, user: gvUserConnected.email } }\r\n\r\nexport function setGvUserConnected(userConnected) {\r\n gvUserConnected = userConnected\r\n localStorage.setItem('user', JSON.stringify(gvUserConnected))\r\n axiosSiteDataConfig.headers['user-token'] = gvUserConnected.token\r\n axiosSiteDataConfig.headers['user'] = gvUserConnected.email\r\n}\r\n\r\nexport function getFileExtension(filename) {\r\n return filename.slice((filename.lastIndexOf(\".\") - 1 >>> 0) + 2).toLowerCase();\r\n}\r\n\r\nexport function appendToFileName(filename, append) {\r\n let extension = getFileExtension(filename)\r\n let name = filename.slice(0, filename.lastIndexOf(\".\"))\r\n return name + append + '.' + extension\r\n}\r\n\r\n// Language\r\nexport let langMessages\r\nexport function setLangData(data){\r\n langMessages = data\r\n}\r\n\r\n\r\nexport function SetLangMessages(messages, afterUploading, onError) {\r\n\r\n // We upload Lang data\r\n axiosSiteData.post(`/files/lang.json`, messages, axiosSiteDataConfig)\r\n .then((_) => {\r\n\r\n langMessages = messages\r\n afterUploading()\r\n })\r\n .catch(_ => onError())\r\n}\r\n\r\n\r\n// Utilties\r\n// Merge strings merges strings while making sure empty strings are replaced by N/A\r\nexport function MergeStrings(strings, sep) {\r\n return strings.map((elem) => elem ? elem : 'N/A').join(sep)\r\n}\r\n\r\nexport function GroupByKey(list, key) {\r\n return list.reduce((hash, obj) => ({...hash, [obj[key]]:( hash[obj[key]] || [] ).concat(obj)}), {})\r\n}\r\n\r\nexport function GroupByKeys(list, keys) {\r\n return list.reduce((hash, obj) => {\r\n let index = keys.map((elem) => obj[elem]).join(' | ')\r\n return {...hash, [index]:( hash[index] || [] ).concat(obj)}\r\n }, {})\r\n}\r\n\r\nexport function GroupByKeysIE(list, keys) {\r\n\r\n let result = []\r\n list.forEach((elem) => {\r\n\r\n let id = keys.map((key) => elem[key]).join(' | ')\r\n if (!result.some((_, index) => {\r\n\r\n if (result[index].id === id) {\r\n result[index].data = [...result[index].data, elem]\r\n return true\r\n }\r\n return false\r\n })) result = [...result, {id: id, data: [elem]}]\r\n })\r\n\r\n return result\r\n}\r\n\r\nexport function GetDistinctKeys(list, keys) {\r\n\r\n let result = []\r\n list.forEach((elem) => {\r\n\r\n let id = keys.map((key) => elem[key]).join(' | ')\r\n if (!result.some((_, index) => {\r\n\r\n if (result[index] === id) {\r\n return true\r\n }\r\n return false\r\n })) result = [...result, id]\r\n })\r\n\r\n return result\r\n}","import React from 'react'\r\nimport { CircularProgress } from \"@material-ui/core\"\r\n\r\nexport default function Loader() {\r\n return(\r\n \r\n )\r\n}\r\n","import React, { Fragment, useCallback } from 'react'\r\nimport { Box, Button, useTheme, Typography } from '@material-ui/core'\r\nimport { axiosSiteData, axiosSiteDataConfig, LoginBGLink } from 'variables'\r\n\r\n// Icons\r\n// import IconDelete from '@material-ui/icons/DeleteTwoTone'\r\n\r\n// Components\r\nimport Loader from 'Views/Components/Loader'\r\n\r\n// Libs\r\nimport { useDropzone } from 'react-dropzone'\r\nimport { FormattedMessage } from 'react-intl'\r\nimport { useSnackbar } from 'notistack'\r\n\r\nfunction LoginManager({ working, setWorking }) {\r\n\r\n const theme = useTheme()\r\n const { enqueueSnackbar } = useSnackbar\r\n\r\n\r\n const onDrop = useCallback(acceptedFiles => {\r\n\r\n acceptedFiles.forEach((theFile) => {\r\n const reader = new FileReader()\r\n\r\n reader.onabort = () => enqueueSnackbar(\"Image upload aborted\", { variant: \"error\" })\r\n reader.onerror = () => enqueueSnackbar(\"Error while uploading image\", { variant: \"error\" })\r\n reader.onload = () => {\r\n\r\n setWorking(true)\r\n // We upload file\r\n axiosSiteData.post(`/files/LoginBG.png`, reader.result, axiosSiteDataConfig)\r\n .then(_ => {\r\n\r\n // We now add the product with the pic link\r\n caches.open('v1').then(function (cache) {\r\n cache.delete(LoginBGLink).then(function (response) {\r\n alert('The page will refresh to apply new Login background image data')\r\n window.location.reload()\r\n })\r\n })\r\n })\r\n .catch(errors => {\r\n setWorking(false)\r\n console.log(errors)\r\n })\r\n }\r\n reader.readAsArrayBuffer(theFile)\r\n return\t// 1 file only\r\n })\r\n }, [setWorking, enqueueSnackbar])\r\n\r\n const { getRootProps, getInputProps } = useDropzone({\r\n onDrop, maxFiles: 1, maxSize: 15728640,\r\n accept: 'image/png'\r\n })\r\n\r\n return (\r\n \r\n \r\n \"Product\"\r\n { setImage('') }} style={{ marginTop: theme.spacing(1), maxWidth: 300 }}\r\n >\r\n {working ?\r\n \r\n :\r\n \r\n \r\n \r\n \r\n }\r\n\r\n \r\n \r\n )\r\n}\r\n\r\nexport default LoginManager","import React, { Fragment, useEffect, useState } from 'react'\r\n\r\nimport { Typography, Box, Card, CardContent, Button } from '@material-ui/core'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\n// import { UserConnectedContext } from '../../contexts'\r\nimport { langLink, langMessages, SetLangMessages } from 'variables'\r\nimport Loader from 'Views/Components/Loader'\r\n\r\n// Libs\r\nimport JSONEditor from 'jsoneditor'\r\nimport 'res/libs/jsoneditor/jsoneditor.min.css'\r\nimport { useSnackbar } from 'notistack'\r\n\r\n// Views\r\nimport LoginManager from './LoginBG'\r\n\r\n\r\n//Language\r\nfunction LanguageManager({ working, setWorking }) {\r\n\r\n const theme = useTheme()\r\n // const { userConnected } = useContext(UserConnectedContext)\r\n const { enqueueSnackbar } = useSnackbar()\r\n\r\n const [editor, setEditor] = useState()\r\n\r\n useEffect(() => {\r\n\r\n const container = document.getElementById(\"jsoneditor\")\r\n const options = {\r\n mode: 'code',\r\n language: 'pt-BR',\r\n modes: ['code', 'form', 'tree', 'view']\r\n }\r\n const editr = new JSONEditor(container, options)\r\n setEditor(editr)\r\n\r\n // load editor\r\n editr.set(langMessages)\r\n }, [])\r\n /* \r\n const handleLangChange = (content) => {\r\n if (!content.error) {\r\n langData = content.json\r\n }\r\n } */\r\n\r\n const handleLangSubmit = () => {\r\n\r\n let langData\r\n try {\r\n langData = JSON.stringify(editor.get())\r\n } catch (error) {\r\n enqueueSnackbar('There are some errors in the json lang data.\\n Please solve them first', { variant: 'error' })\r\n return\r\n }\r\n\r\n setWorking(true)\r\n SetLangMessages(\r\n langData,\r\n () => {\r\n \r\n caches.open('v1').then(function (cache) {\r\n cache.delete(langLink).then(function (response) {\r\n alert('The page will refresh to apply new language data')\r\n window.location.reload()\r\n });\r\n })\r\n },\r\n () => {\r\n setWorking(false)\r\n }\r\n )\r\n\r\n }\r\n\r\n return (\r\n\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Root\r\nfunction Settings() {\r\n // ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n // const classes = useStyles()\r\n const [working, setWorking] = useState(false)\r\n const theme = useTheme()\r\n\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default Settings\r\n","import { createContext } from 'react'\r\n\r\nexport const UserConnectedContext = createContext()\r\nexport const PanelUserContext = createContext()\r\nexport const LoggedInContext = createContext()\r\nexport const UtilitiesContext = createContext()\r\n\r\n// Default data\r\nexport const UsersContext = createContext()\r\nexport const SeriesContext = createContext()\r\nexport const ColorsContext = createContext()\r\nexport const CatalogsContext = createContext()\r\nexport const DocumentsContext = createContext()\r\nexport const ProductsContext = createContext()\r\nexport const ContactsContext = createContext()\r\nexport const OrdersContext = createContext()\r\nexport const QuotationsContext = createContext()\r\n","import React from 'react';\r\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\r\nimport { Box, CircularProgress } from '@material-ui/core'\r\n\r\nimport { projectName } from '../../variables'\r\n\r\n// import Lottie from 'react-lottie'\r\nimport Logo from '../../res/images/logo.png'\r\n// ====================================================\r\n\r\n// ====================================================\r\n\r\nconst useStyles = makeStyles({\r\n main: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n height: '100vh'\r\n }\r\n})\r\n\r\n\r\nfunction Splash() {\r\n const theme = useTheme()\r\n const classes = useStyles()\r\n\r\n document.title = projectName + \" - Loading ...\"\r\n return (\r\n \r\n \"Alumace\"\r\n \r\n \r\n )\r\n}\r\nexport default Splash;","import React from 'react'\r\nimport { Box, Divider, Typography, useMediaQuery } from '@material-ui/core'\r\nimport Chart from 'react-apexcharts'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\n// Libs\r\n\r\nfunction Orders({ record }) {\r\n\r\n const theme = useTheme()\r\n const inMobile = useMediaQuery(theme.breakpoints.down('md'))\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n )\r\n}\r\n\r\nexport default Orders","import React from 'react'\r\nimport { Box, Divider, Typography, useMediaQuery } from '@material-ui/core'\r\nimport Chart from 'react-apexcharts'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\n\r\nfunction Quotations({ record }) {\r\n\r\n const theme = useTheme()\r\n const inMobile = useMediaQuery(theme.breakpoints.down('md'))\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n )\r\n}\r\n\r\nexport default Quotations","import React from 'react'\r\nimport { Box, Divider, Typography, useMediaQuery } from '@material-ui/core'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\n// Libs\r\n\r\nfunction Users({ record }) {\r\n\r\n const theme = useTheme()\r\n const inMobile = useMediaQuery(theme.breakpoints.down('md'))\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {record}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default Users","import React, { Fragment, useContext, useEffect, useState } from 'react'\r\nimport { Box, CircularProgress, Grid } from '@material-ui/core'\r\n// import { useTheme } from '@material-ui/core/styles'\r\n// import { FormattedMessage } from 'react-intl'\r\n\r\nimport { PanelUserContext } from 'contexts'\r\n\r\nimport { axiosSiteData, axiosSiteDataConfig } from 'variables'\r\n\r\n//\r\n// ─── ICONS ──────────────────────────────────────────────────────────────────────\r\n/* import IconAdd from '@material-ui/icons/AddTwoTone'\r\nimport IconSearch from '@material-ui/icons/SearchTwoTone' */\r\n\r\n// Views\r\nimport Orders from './Orders'\r\nimport Quotations from './Quotations'\r\nimport Users from './Users'\r\n\r\n\r\nfunction UserDashboard({ record }) {\r\n\r\n return (\r\n \r\n \r\n {/** Orders */}\r\n \r\n \r\n \r\n {/** Quotations */}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nfunction AdminDashboard({ record }) {\r\n\r\n return (\r\n \r\n \r\n {/** Orders */}\r\n \r\n \r\n \r\n {/** Quotations */}\r\n \r\n \r\n \r\n \r\n \r\n {/** Users */}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\n\r\n// Dashboard module\r\nexport default function Dashboard() {\r\n // const [content, setContent] = useState('list') // list | add | edit | delete\r\n // const theme = useTheme()\r\n const { panelUser } = useContext(PanelUserContext)\r\n\r\n const [record, setRecord] = useState(null)\r\n\r\n useEffect(() => {\r\n axiosSiteData.get(`/stats/dashboard`, axiosSiteDataConfig)\r\n .then(response => {\r\n setRecord(response.data)\r\n })\r\n }, [])\r\n\r\n return (\r\n \r\n\r\n {/** User dashboard */}\r\n {(record && panelUser.type !== 'admin') &&\r\n \r\n }\r\n {/** Admin dashboard */}\r\n {(record && panelUser.type === 'admin') &&\r\n \r\n }\r\n {!record &&\r\n \r\n \r\n \r\n }\r\n \r\n )\r\n}\r\n","import React from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport {CircularProgress} from '@material-ui/core'\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport Typography from '@material-ui/core/Typography'\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\r\nimport { useTheme } from '@material-ui/core/styles';\r\n\r\n\r\nfunction Dialoger({ title, content, onClose, onAction }) {\r\n\r\n const theme = useTheme()\r\n const [waiter, setWaiter] = React.useState(true)\r\n const [open, setOpen] = React.useState(true);\r\n const fullScreen = useMediaQuery(theme.breakpoints.down('sm'))\r\n\r\n const handleOk = () => {\r\n setWaiter(false)\r\n onAction(setOpen)\r\n };\r\n\r\n const handleClose = () => {\r\n setOpen(false)\r\n onClose()\r\n };\r\n\r\n return (\r\n \r\n {title}\r\n \r\n {content}\r\n \r\n {waiter &&\r\n \r\n \r\n \r\n }\r\n {!waiter &&\r\n \r\n \r\n Working on it ...\r\n }\r\n \r\n );\r\n}\r\n\r\nexport default Dialoger;","import React, { useState, useEffect } from 'react'\r\nimport {\r\n Paper,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableContainer,\r\n TableHead,\r\n TableRow,\r\n TableSortLabel,\r\n IconButton\r\n} from '@material-ui/core'\r\nimport IconEdit from '@material-ui/icons/EditTwoTone'\r\nimport IconDelete from '@material-ui/icons/DeleteTwoTone'\r\nimport { makeStyles } from '@material-ui/core/styles'\r\nimport { Box } from '@material-ui/core'\r\n\r\n// Libs\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport InfiniteScroll from 'react-infinite-scroller'\r\nimport { CircularProgress } from '@material-ui/core'\r\n\r\nconst parentID = `datatable-${uuidv4().split('-')[0]}`\r\nconst inifiniteLoaderKey = `ifnl-${uuidv4().split('-')[0]}`\r\nconst headerHeight = 50\r\nlet tableHeight = headerHeight\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n visuallyHidden: {\r\n border: 0,\r\n clip: 'rect(0 0 0 0)',\r\n height: 1,\r\n margin: -1,\r\n overflow: 'hidden',\r\n padding: 0,\r\n position: 'absolute',\r\n top: 20,\r\n width: 1,\r\n },\r\n tableHead: {\r\n fontSize: '1.2em',\r\n fontWeight: 600\r\n }\r\n}))\r\n\r\n// DataTable Component\r\nexport default function DataTable({ columns, order, orderBy, rows, editAction, deleteAction,\r\n loadMoreFunc = null, hasMore = false,\r\n onRowDoubleClick = (row) => { },\r\n}) {\r\n\r\n const [sort, setSort] = useState(order)\r\n const [sortBy, setSortBy] = useState(orderBy)\r\n\r\n const handleRequestSort = (event, property) => {\r\n const isAsc = sortBy === property && sort === 'asc'\r\n setSort(isAsc ? 'desc' : 'asc')\r\n setSortBy(property)\r\n }\r\n\r\n const handleColumnID = (row, columnID) => {\r\n return columnID.split('|').reduce((total, current) => total === '' ? row[current] : total[current], '')\r\n }\r\n\r\n useEffect(() => {\r\n\r\n // We get parent height\r\n const resizeObserver = new ResizeObserver(entries => {\r\n for (let entry of entries) {\r\n tableHeight = entry.contentRect.height\r\n }\r\n })\r\n\r\n resizeObserver.observe(document.getElementById(parentID))\r\n }, [])\r\n\r\n return (\r\n \r\n \r\n }\r\n useWindow={false} threshold={300}\r\n initialLoad={false}\r\n >\r\n \r\n {/* Table Header Row */}\r\n \r\n {/* Table Body */}\r\n \r\n {stableSort(rows, getComparator(sort, sortBy))\r\n .map(row => (\r\n\r\n /* If on onRowDoubleClick is not undefined handle it */\r\n {\r\n e.preventDefault()\r\n onRowDoubleClick(row)\r\n }}\r\n >\r\n {columns.map(column => (\r\n column.id !== 'actions' ?\r\n \r\n {handleColumnID(row, column.id)}\r\n :\r\n \r\n {row._NotChangeable ? '' :\r\n editAction(row)}\r\n >\r\n \r\n \r\n }\r\n {deleteAction && deleteAction(row)}\r\n >\r\n \r\n }\r\n \r\n ))}\r\n \r\n ))\r\n }\r\n \r\n
\r\n \r\n
\r\n
\r\n )\r\n}\r\n\r\n// Descending Comparator\r\nfunction descendingComparator(a, b, orderBy) {\r\n if (b[orderBy] < a[orderBy]) {\r\n return -1\r\n }\r\n if (b[orderBy] > a[orderBy]) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\n// Get Comparator\r\nfunction getComparator(order, orderBy) {\r\n return order === 'desc'\r\n ? (a, b) => descendingComparator(a, b, orderBy)\r\n : (a, b) => -descendingComparator(a, b, orderBy)\r\n}\r\n\r\n// Sort Columns\r\nfunction stableSort(array, comparator) {\r\n const stabilizedThis = array.map((el, index) => [el, index])\r\n stabilizedThis.sort((a, b) => {\r\n const order = comparator(a[0], b[0])\r\n if (order !== 0) return order\r\n return a[1] - b[1]\r\n })\r\n return stabilizedThis.map((el) => el[0])\r\n}\r\n\r\n// DataTable Heading Row\r\nfunction TableHeading({ columns, order, orderBy, onRequestSort }) {\r\n const classes = useStyles()\r\n\r\n const sortHandler = (property) => (event) => {\r\n onRequestSort(event, property);\r\n }\r\n\r\n return (\r\n \r\n \r\n {columns.map(column => (\r\n \r\n {column.id !== 'actions' ?\r\n \r\n {column.label}\r\n {orderBy === column.id ? (\r\n \r\n {order === 'desc' ? 'sorted descending' : 'sorted ascending'}\r\n )\r\n : null\r\n }\r\n \r\n : column.label\r\n }\r\n \r\n ))}\r\n \r\n \r\n )\r\n}\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Switch from '@material-ui/core/Switch';\r\n\r\n\r\nconst SwitchIOS = withStyles((theme) => ({\r\n root: {\r\n width: 42,\r\n height: 26,\r\n padding: 0,\r\n margin: theme.spacing(1),\r\n },\r\n switchBase: {\r\n padding: 1,\r\n '&$checked': {\r\n transform: 'translateX(16px)',\r\n color: theme.palette.common.white,\r\n '& + $track': {\r\n backgroundColor: `linear-gradient(45deg, ${theme.palette.primary.main} 30%, ${theme.palette.secondary.main} 90%)`,\r\n opacity: 1,\r\n border: 'none',\r\n },\r\n },\r\n '&$focusVisible $thumb': {\r\n color: `linear-gradient(45deg, ${theme.palette.primary.main} 30%, ${theme.palette.secondary.main} 90%)`,\r\n border: '6px solid #fff',\r\n },\r\n },\r\n thumb: {\r\n width: 24,\r\n height: 24,\r\n },\r\n track: {\r\n borderRadius: 26 / 2,\r\n border: `1px solid ${theme.palette.grey[300]}`,\r\n backgroundColor: theme.palette.grey[300],\r\n opacity: 1,\r\n transition: theme.transitions.create(['background-color', 'border']),\r\n },\r\n checked: {},\r\n focusVisible: {},\r\n}))(({ classes, ...props }) => {\r\n return (\r\n \r\n );\r\n});\r\n\r\nexport default SwitchIOS","import React, { useState } from 'react'\r\nimport {\r\n IconButton, Button, TextField, CardContent, Card, FormControl, FormGroup, Typography, Box, Grid,\r\n InputLabel, Select, MenuItem, FormControlLabel\r\n} from '@material-ui/core'\r\nimport SwitchIOS from '../../Components/SwitchIOS'\r\n\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport Loader from '../../Components/Loader'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport IconArrowBackIos from '@material-ui/icons/ArrowBackIosTwoTone'\r\n\r\n\r\nexport default function ContentForm({ selectedRecord, content, setContent, handleSubmit }) {\r\n\r\n const [record, setRecord] = useState(selectedRecord)\r\n const [password, setPassword] = useState(\"\")\r\n const [loader, setLoader] = useState(false)\r\n const theme = useTheme()\r\n\r\n return (\r\n \r\n \r\n \r\n {/* Card Header, Title & Back Button */}\r\n \r\n setContent('list')} style={{ marginRight: theme.spacing(1) }}>\r\n \r\n \r\n \r\n {content === \"add\" ?\r\n :\r\n {record._Name} }} />\r\n }\r\n \r\n \r\n {/* Users Form */}\r\n
\r\n\r\n\r\n {/** Field Name */}\r\n \r\n }\r\n id=\"_Name\"\r\n placeholder=\"Name\"\r\n variant=\"outlined\"\r\n fullWidth\r\n required\r\n value={record._Name}\r\n onChange={event => setRecord({ ...record, _Name: event.target.value })}\r\n />\r\n \r\n\r\n\r\n {/** Field Email */}\r\n \r\n }\r\n id=\"_Email\"\r\n placeholder=\"Email\"\r\n variant=\"outlined\"\r\n type=\"email\"\r\n fullWidth\r\n required\r\n disabled={content !== 'add' ? true : false}\r\n value={record._Email}\r\n onChange={event => setRecord({ ...record, _Email: event.target.value.toLowerCase() })}\r\n />\r\n \r\n\r\n\r\n {/** Field Password */}\r\n \r\n }\r\n id=\"_Password\"\r\n placeholder=\"Password\"\r\n variant=\"outlined\"\r\n type=\"password\"\r\n fullWidth\r\n required={content === 'add' ? true : false}\r\n value={password}\r\n onChange={event => setPassword(event.target.value)}\r\n />\r\n \r\n\r\n\r\n {/** Field Company */}\r\n \r\n }\r\n id=\"_Company\"\r\n placeholder=\"Company\"\r\n variant=\"outlined\"\r\n fullWidth\r\n required\r\n value={record._Company}\r\n onChange={event => setRecord({ ...record, _Company: event.target.value })}\r\n />\r\n \r\n\r\n\r\n {/** Field Phone */}\r\n \r\n }\r\n id=\"_Phone\"\r\n placeholder=\"Phone\"\r\n variant=\"outlined\"\r\n fullWidth\r\n required\r\n value={record._Phone}\r\n onChange={event => setRecord({ ...record, _Phone: event.target.value })}\r\n />\r\n \r\n\r\n\r\n {/** Field AccountID */}\r\n \r\n \r\n {/** Account id pre default values */}\r\n \r\n {}\r\n }\r\n value={record._AccountID.split(\"-\")[0]}\r\n onChange={event => setRecord({ ...record, _AccountID: event.target.value + \"-\" + record._AccountID.split(\"-\")[1] })}\r\n >\r\n 2111\r\n 2112\r\n \r\n \r\n \r\n \r\n \r\n }\r\n id=\"_AccountID\"\r\n placeholder=\"AccountID\"\r\n variant=\"outlined\"\r\n type=\"number\"\r\n fullWidth\r\n required\r\n value={record._AccountID.split(\"-\")[1]}\r\n onChange={event => setRecord({\r\n ...record,\r\n _AccountID: record._AccountID.split(\"-\")[0] + \"-\" + event.target.value\r\n })}\r\n />\r\n \r\n \r\n \r\n\r\n\r\n {/** Field Role */}\r\n \r\n {}\r\n }\r\n value={record._Role}\r\n onChange={event => setRecord({ ...record, _Role: event.target.value })}\r\n >\r\n Customer\r\n Admin\r\n \r\n \r\n\r\n {/** Active */}\r\n setRecord({ ...record, _Active: event.target.checked })} name=\"Active\" />}\r\n label={}\r\n />\r\n\r\n\r\n\r\n {/** Button Submit */}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n )\r\n}","import React, {useEffect, useState, useContext, Fragment} from 'react'\r\nimport { Box, Button, DialogContentText, TextField, Typography } from '@material-ui/core'\r\nimport { makeStyles } from '@material-ui/core/styles'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport {UsersContext} from '../../../contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig } from '../../../variables'\r\nimport Dialoger from '../../Components/dialoger'\r\nimport DataTable from \"../../Components/DataTable\"\r\nimport ContentForm from './ContentFormCustom'\r\n\r\n//\r\n// ─── ICONS ──────────────────────────────────────────────────────────────────────\r\nimport IconAdd from '@material-ui/icons/AddTwoTone'\r\nimport IconSearch from '@material-ui/icons/SearchTwoTone'\r\n\r\n// API config\r\n\r\nlet searchTimeout = 0\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n tableImage: {\r\n width: \"100%\", maxWidth: 150, height: 'auto'\r\n },\r\n boolTextYes: {\r\n color: '#00A4FF'\r\n },\r\n boolTextNo: {\r\n color: '#ff3f34'\r\n }\r\n}))\r\n\r\n// Users module\r\nexport default function Users() {\r\n\r\n const classes = useStyles()\r\n\r\n const [content, setContent] = useState('list') // list | add | edit | delete\r\n const [selectedRecord, setSelectedRecord] = useState({})\r\n const [productsRendered, setProductsRendered] = useState([])\r\n\r\n const { setUsers } = useContext(UsersContext)\r\n\r\n useEffect(() => {\r\n axiosSiteData.get(`/users/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setUsers(response.data)\r\n setProductsRendered(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _Active: {aRecord._Active ? 'Yes' : 'No'}\r\n }\r\n )))\r\n })\r\n }, [setUsers, content, classes])\r\n\r\n return (\r\n \r\n {/** Conditional list of UI to render */}\r\n {(content === 'list' || content === 'delete') &&\r\n }\r\n {(content === 'add') && }\r\n {(content === 'edit') && }\r\n {content === 'delete' && }\r\n \r\n )\r\n}\r\n\r\n// List users\r\nfunction Listing({setSelectedRecord, setContent, productsRendered, setProductsRendered }) {\r\n\r\n // ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n const classes = useStyles()\r\n const { users, setUsers } = useContext(UsersContext)\r\n\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n const [search, setSearch] = useState('')\r\n const [searchResults, setSearchResults] = useState([])\r\n\r\n // ─── Table Columns ───────────────────────────────────────────────────────────────────\r\n let columns = []\r\n columns = [\r\n\t\t{id: '_Name', numeric: false, label: },\r\n\t\t{id: '_Email', numeric: false, label: },\r\n\t\t{id: '_Company', numeric: false, label: },\r\n\t\t{id: '_Phone', numeric: false, label: },\r\n\t\t{id: '_AccountID', numeric: false, label: },\r\n\t\t{id: '_Role', numeric: false, label: },\r\n\t\t{id: '_Active', numeric: false, label: },\r\n\t\t{id: 'actions', numeric: false, label: }\r\n\t]\r\n\r\n // ─── SEARCH ACTION ──────────────────────────────────────────────────────────────\r\n const searchAction = (toSearch) => {\r\n\r\n clearTimeout(searchTimeout)\r\n toSearch = toSearch.toLowerCase()\r\n setSearch(toSearch)\r\n searchTimeout = setTimeout(() => {\r\n if (toSearch.trim() === \"\") {\r\n axiosSiteData.get(`/users/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setUsers(response.data)\r\n setProductsRendered(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _Active: {aRecord._Active ? 'Yes' : 'No'}\r\n }\r\n )))\r\n setSearchResults([])\r\n })\r\n \r\n return\r\n }\r\n \r\n axiosSiteData.get(`/users/search/${toSearch}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setUsers(response.data)\r\n setSearchResults(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _Active: {aRecord._Active ? 'Yes' : 'No'}\r\n }\r\n )))\r\n })\r\n }, 200)\r\n }\r\n\r\n // ─── Edit Action ───────────────────────────────────────────────────────────────────\r\n const editAction = (row) => {\r\n setSelectedRecord(users.filter(aRecord => {\r\n return aRecord._id === row._id\r\n })[0])\r\n setContent('edit')\r\n }\r\n\r\n // ─── Delete Action ───────────────────────────────────────────────────────────────────\r\n const deleteAction = (row) => {\r\n setSelectedRecord(row)\r\n setContent('delete')\r\n }\r\n\r\n return (\r\n \r\n \r\n {/** Search bar */}\r\n searchAction(event.target.value)}\r\n style={{ width: \"40%\" }}\r\n variant=\"outlined\"\r\n label={}\r\n InputProps={{\r\n endAdornment: (\r\n \r\n ),\r\n }}\r\n />\r\n\r\n {/** Button Add */}\r\n setContent('add')}\r\n >\r\n \r\n \r\n \r\n\r\n {/** DataTable for Users */}\r\n \r\n \r\n )\r\n}\r\n\r\n// Add user\r\nfunction Adding({setContent}) {\r\n\r\n const handleSubmit = (record) => {\r\n\r\n // We make sure some fields aren't empty\r\n if (record._Name.trim() === '' || record._Email.trim() === '' || record._Company.trim() === '' || record._Phone.trim() === '' || record._AccountID.trim() === '' || record._Role.trim() === '') {\r\n return false\r\n }\r\n\r\n axiosSiteData.post(`/users`, record, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Update user\r\nfunction Editing({selectedRecord, setContent}) {\r\n\r\n const handleSubmit = (record) => {\r\n\r\n if (record._Name.trim() === '' || record._Email.trim() === '' || record._Company.trim() === '' || record._Phone.trim() === '' || record._AccountID.trim() === '' || record._Role.trim() === '') {\r\n return false\r\n }\r\n\r\n axiosSiteData.put(`/users/${record._id}`, record, axiosSiteDataConfig)\r\n .then(_ => setContent('list'))\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Delete user\r\nfunction Deleting({selectedRecord, setContent}) {\r\n\r\n const handleDelete = (setOpen) => {\r\n\r\n axiosSiteData.delete(`/users/${selectedRecord._id}`, axiosSiteDataConfig)\r\n .then(() => {\r\n setOpen(false)\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n Would you really like to delete this user ?\r\n }\r\n onClose={() => {\r\n setContent(\"list\")\r\n }}\r\n onAction={handleDelete}\r\n />\r\n )\r\n}\r\n","import React, { useState } from 'react'\r\nimport { IconButton, Button, TextField, CardContent, Card, FormControl, FormGroup, Typography, Box, Grid }from '@material-ui/core'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport Loader from '../../Components/Loader'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport IconArrowBackIos from '@material-ui/icons/ArrowBackIosTwoTone'\r\n\r\n\r\nexport default function ContentForm({selectedRecord, content, setContent, handleSubmit}) {\r\n\r\n const [record, setRecord] = useState(selectedRecord)\r\n const [loader, setLoader] = useState(false)\r\n const theme = useTheme()\r\n\r\n return (\r\n \r\n \r\n \r\n {/* Card Header, Title & Back Button */}\r\n \r\n setContent('list')} style={{marginRight: theme.spacing(1)}}>\r\n \r\n \r\n \r\n {content === \"add\" ? \r\n :\r\n {record._Label}}} />\r\n }\r\n \r\n \r\n {/* Series Form */}\r\n
\r\n\r\n \r\n\t\t\t\t\t{/** Field Label */}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tid=\"_Label\"\r\n\t\t\t\t\t\t\tplaceholder=\"Label\"\r\n\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\tvalue={record._Label}\r\n\t\t\t\t\t\t\tonChange={event => setRecord({...record, _Label: event.target.value})}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\r\n \r\n {/** Button Submit */}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n )\r\n}","import React, {useEffect, useState, useContext, Fragment} from 'react'\r\nimport { Box, Button, DialogContentText, TextField } from '@material-ui/core'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport {SeriesContext} from '../../../contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig } from '../../../variables'\r\nimport Dialoger from '../../Components/dialoger'\r\nimport DataTable from \"../../Components/DataTable\"\r\nimport ContentForm from './ContentForm'\r\n\r\n//\r\n// ─── ICONS ──────────────────────────────────────────────────────────────────────\r\nimport IconAdd from '@material-ui/icons/AddTwoTone'\r\nimport IconSearch from '@material-ui/icons/SearchTwoTone'\r\n\r\n// API config\r\n\r\nlet searchTimeout = 0\r\n\r\n// Series module\r\nexport default function Series() {\r\n const [content, setContent] = useState('list') // list | add | edit | delete\r\n const [selectedRecord, setSelectedRecord] = useState({})\r\n\r\n const { setSeries } = useContext(SeriesContext)\r\n\r\n useEffect(() => {\r\n axiosSiteData.get(`/series/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setSeries(response.data)\r\n })\r\n }, [setSeries, content])\r\n\r\n return (\r\n \r\n {/** Conditional list of UI to render */}\r\n {(content === 'list' || content === 'delete') &&\r\n }\r\n {(content === 'add') && }\r\n {(content === 'edit') && }\r\n {content === 'delete' && }\r\n \r\n )\r\n}\r\n\r\n// List series\r\nfunction Listing({setSelectedRecord, setContent}) {\r\n\r\n // ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n const { series, setSeries } = useContext(SeriesContext)\r\n\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n const [search, setSearch] = useState('')\r\n const [searchResults, setSearchResults] = useState([])\r\n\r\n // ─── Table Columns ───────────────────────────────────────────────────────────────────\r\n let columns = []\r\n columns = [\r\n\t\t{id: '_Label', numeric: false, label: },\r\n\t\t{id: 'actions', numeric: false, label: }\r\n\t]\r\n\r\n // ─── SEARCH ACTION ──────────────────────────────────────────────────────────────\r\n const searchAction = (toSearch) => {\r\n\r\n clearTimeout(searchTimeout)\r\n toSearch = toSearch.toLowerCase()\r\n setSearch(toSearch)\r\n searchTimeout = setTimeout(() => {\r\n if (toSearch.trim() === \"\") {\r\n axiosSiteData.get(`/series/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setSeries(response.data)\r\n setSearchResults([])\r\n })\r\n \r\n return\r\n }\r\n \r\n axiosSiteData.get(`/series/search/${toSearch}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setSeries(response.data)\r\n setSearchResults(response.data)\r\n })\r\n }, 200)\r\n }\r\n\r\n // ─── Edit Action ───────────────────────────────────────────────────────────────────\r\n const editAction = (row) => {\r\n setSelectedRecord(row)\r\n setContent('edit')\r\n }\r\n\r\n // ─── Delete Action ───────────────────────────────────────────────────────────────────\r\n const deleteAction = (row) => {\r\n setSelectedRecord(row)\r\n setContent('delete')\r\n }\r\n\r\n return (\r\n \r\n \r\n {/** Search bar */}\r\n searchAction(event.target.value)}\r\n style={{ width: \"40%\" }}\r\n variant=\"outlined\"\r\n label={}\r\n InputProps={{\r\n endAdornment: (\r\n \r\n ),\r\n }}\r\n />\r\n\r\n {/** Button Add */}\r\n setContent('add')}\r\n >\r\n \r\n \r\n \r\n\r\n {/** DataTable for Series */}\r\n \r\n \r\n )\r\n}\r\n\r\n// Add serie\r\nfunction Adding({setContent}) {\r\n\r\n const handleSubmit = (record) => {\r\n\r\n // We make sure some fields aren't empty\r\n if (record._Label.trim() === '') {\r\n return false\r\n }\r\n\r\n axiosSiteData.post(`/series`, record, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Update serie\r\nfunction Editing({selectedRecord, setContent}) {\r\n\r\n const handleSubmit = (record) => {\r\n\r\n if (record._Label.trim() === '') {\r\n return false\r\n }\r\n\r\n axiosSiteData.put(`/series/${record._id}`, record, axiosSiteDataConfig)\r\n .then(_ => setContent('list'))\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Delete serie\r\nfunction Deleting({selectedRecord, setContent}) {\r\n\r\n const handleDelete = (setOpen) => {\r\n\r\n axiosSiteData.delete(`/series/${selectedRecord._id}`, axiosSiteDataConfig)\r\n .then(() => {\r\n setOpen(false)\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n Would you really like to delete this serie ?\r\n }\r\n onClose={() => {\r\n setContent(\"list\")\r\n }}\r\n onAction={handleDelete}\r\n />\r\n )\r\n}\r\n","import React, { useState } from 'react'\r\nimport { IconButton, Button, TextField, CardContent, Card, FormControl, FormGroup, Typography, Box, Grid }from '@material-ui/core'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport Loader from '../../Components/Loader'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport IconArrowBackIos from '@material-ui/icons/ArrowBackIosTwoTone'\r\n\r\n\r\nexport default function ContentForm({selectedRecord, content, setContent, handleSubmit}) {\r\n\r\n const [record, setRecord] = useState(selectedRecord)\r\n const [loader, setLoader] = useState(false)\r\n const theme = useTheme()\r\n\r\n return (\r\n \r\n \r\n \r\n {/* Card Header, Title & Back Button */}\r\n \r\n setContent('list')} style={{marginRight: theme.spacing(1)}}>\r\n \r\n \r\n \r\n {content === \"add\" ? \r\n :\r\n {record._Label}}} />\r\n }\r\n \r\n \r\n {/* Colors Form */}\r\n
\r\n\r\n \r\n\t\t\t\t\t{/** Field Label */}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tid=\"_Label\"\r\n\t\t\t\t\t\t\tplaceholder=\"Label\"\r\n\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\tvalue={record._Label}\r\n\t\t\t\t\t\t\tonChange={event => setRecord({...record, _Label: event.target.value})}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\r\n \r\n {/** Button Submit */}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n )\r\n}","import React, {useEffect, useState, useContext, Fragment} from 'react'\r\nimport { Box, Button, DialogContentText, TextField } from '@material-ui/core'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport {ColorsContext} from '../../../contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig } from '../../../variables'\r\nimport Dialoger from '../../Components/dialoger'\r\nimport DataTable from \"../../Components/DataTable\"\r\nimport ContentForm from './ContentForm'\r\n\r\n//\r\n// ─── ICONS ──────────────────────────────────────────────────────────────────────\r\nimport IconAdd from '@material-ui/icons/AddTwoTone'\r\nimport IconSearch from '@material-ui/icons/SearchTwoTone'\r\n\r\n// API config\r\n\r\nlet searchTimeout = 0\r\n\r\n// Colors module\r\nexport default function Colors() {\r\n const [content, setContent] = useState('list') // list | add | edit | delete\r\n const [selectedRecord, setSelectedRecord] = useState({})\r\n\r\n const { setColors } = useContext(ColorsContext)\r\n\r\n useEffect(() => {\r\n axiosSiteData.get(`/colors/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setColors(response.data)\r\n })\r\n }, [setColors, content])\r\n\r\n return (\r\n \r\n {/** Conditional list of UI to render */}\r\n {(content === 'list' || content === 'delete') &&\r\n }\r\n {(content === 'add') && }\r\n {(content === 'edit') && }\r\n {content === 'delete' && }\r\n \r\n )\r\n}\r\n\r\n// List colors\r\nfunction Listing({setSelectedRecord, setContent}) {\r\n\r\n // ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n const { colors, setColors } = useContext(ColorsContext)\r\n\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n const [search, setSearch] = useState('')\r\n const [searchResults, setSearchResults] = useState([])\r\n\r\n // ─── Table Columns ───────────────────────────────────────────────────────────────────\r\n let columns = []\r\n columns = [\r\n\t\t{id: '_Label', numeric: false, label: },\r\n\t\t{id: 'actions', numeric: false, label: }\r\n\t]\r\n\r\n // ─── SEARCH ACTION ──────────────────────────────────────────────────────────────\r\n const searchAction = (toSearch) => {\r\n\r\n clearTimeout(searchTimeout)\r\n toSearch = toSearch.toLowerCase()\r\n setSearch(toSearch)\r\n searchTimeout = setTimeout(() => {\r\n if (toSearch.trim() === \"\") {\r\n axiosSiteData.get(`/colors/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setColors(response.data)\r\n setSearchResults([])\r\n })\r\n \r\n return\r\n }\r\n \r\n axiosSiteData.get(`/colors/search/${toSearch}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setColors(response.data)\r\n setSearchResults(response.data)\r\n })\r\n }, 200)\r\n }\r\n\r\n // ─── Edit Action ───────────────────────────────────────────────────────────────────\r\n const editAction = (row) => {\r\n setSelectedRecord(row)\r\n setContent('edit')\r\n }\r\n\r\n // ─── Delete Action ───────────────────────────────────────────────────────────────────\r\n const deleteAction = (row) => {\r\n setSelectedRecord(row)\r\n setContent('delete')\r\n }\r\n\r\n return (\r\n \r\n \r\n {/** Search bar */}\r\n searchAction(event.target.value)}\r\n style={{ width: \"40%\" }}\r\n variant=\"outlined\"\r\n label={}\r\n InputProps={{\r\n endAdornment: (\r\n \r\n ),\r\n }}\r\n />\r\n\r\n {/** Button Add */}\r\n setContent('add')}\r\n >\r\n \r\n \r\n \r\n\r\n {/** DataTable for Colors */}\r\n \r\n \r\n )\r\n}\r\n\r\n// Add color\r\nfunction Adding({setContent}) {\r\n\r\n const handleSubmit = (record) => {\r\n\r\n // We make sure some fields aren't empty\r\n if (record._Label.trim() === '') {\r\n return false\r\n }\r\n\r\n axiosSiteData.post(`/colors`, record, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Update color\r\nfunction Editing({selectedRecord, setContent}) {\r\n\r\n const handleSubmit = (record) => {\r\n\r\n if (record._Label.trim() === '') {\r\n return false\r\n }\r\n\r\n axiosSiteData.put(`/colors/${record._id}`, record, axiosSiteDataConfig)\r\n .then(_ => setContent('list'))\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Delete color\r\nfunction Deleting({selectedRecord, setContent}) {\r\n\r\n const handleDelete = (setOpen) => {\r\n\r\n axiosSiteData.delete(`/colors/${selectedRecord._id}`, axiosSiteDataConfig)\r\n .then(() => {\r\n setOpen(false)\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n Would you really like to delete this color ?\r\n }\r\n onClose={() => {\r\n setContent(\"list\")\r\n }}\r\n onAction={handleDelete}\r\n />\r\n )\r\n}\r\n","import React, { useState, useCallback } from 'react'\r\nimport { IconButton, Button, TextField, CardContent, Card, FormControl, FormGroup, Typography, Box, Grid } from '@material-ui/core'\r\nimport { useDropzone } from 'react-dropzone'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport Loader from '../../Components/Loader'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport IconArrowBackIos from '@material-ui/icons/ArrowBackIosTwoTone'\r\nimport IconDelete from '@material-ui/icons/DeleteTwoTone'\r\n\r\n\r\nexport default function ContentForm({ selectedRecord, content, setContent, handleSubmit }) {\r\n\r\n const [record, setRecord] = useState(selectedRecord)\r\n const [loader, setLoader] = useState(false)\r\n const [file, setFile] = useState(null)\r\n const theme = useTheme()\r\n\r\n // ─── FUNCTIONS ──────────────────────────────────────────────────────────────────\r\n const onDrop = useCallback(acceptedFiles => {\r\n\r\n acceptedFiles.forEach((theFile) => {\r\n \r\n setFile(theFile)\r\n return\t// 1 file only\r\n })\r\n }, [])\r\n\r\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\r\n onDrop, maxFiles: 1, maxSize: 15728640,\r\n accept: 'application/pdf'\r\n })\r\n\r\n return (\r\n \r\n \r\n \r\n {/* Card Header, Title & Back Button */}\r\n \r\n setContent('list')} style={{ marginRight: theme.spacing(1) }}>\r\n \r\n \r\n \r\n {content === \"add\" ?\r\n :\r\n {record._Name} }} />\r\n }\r\n \r\n \r\n {/* Catalogs Form */}\r\n
\r\n\r\n\r\n {/** Field Name */}\r\n \r\n }\r\n id=\"_Name\"\r\n placeholder=\"Name\"\r\n variant=\"outlined\"\r\n fullWidth\r\n required\r\n value={record._Name}\r\n onChange={event => setRecord({ ...record, _Name: event.target.value })}\r\n />\r\n \r\n\r\n \r\n {!file &&\r\n
\r\n \r\n {\r\n isDragActive ?\r\n

Drop the files here ...

:\r\n

Drag & drop some files here, or click to select files

\r\n }\r\n
}\r\n {file &&\r\n \r\n { setFile(null); setRecord({ ...record, _Link: '' }) }} >\r\n \r\n \r\n \r\n {file.name}\r\n }\r\n
\r\n\r\n\r\n\r\n {/** Button Submit */}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n )\r\n}","\r\nexport function generateNumber(length = 4) {\r\n return Math.floor(Math.pow(10, length - 1) + Math.random() * 9 * Math.pow(10, length - 1))\r\n}","import React, { useEffect, useState, useContext, Fragment } from 'react'\r\nimport { Box, Button, DialogContentText, TextField } from '@material-ui/core'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport { CatalogsContext } from '../../../contexts'\r\nimport { appendToFileName, axiosSiteData, axiosSiteDataConfig, GetCatalogLink } from '../../../variables'\r\nimport Dialoger from '../../Components/dialoger'\r\nimport DataTable from \"../../Components/DataTable\"\r\nimport ContentForm from './ContentFormCustom'\r\n\r\n//\r\n// ─── ICONS ──────────────────────────────────────────────────────────────────────\r\nimport IconAdd from '@material-ui/icons/AddTwoTone'\r\nimport IconSearch from '@material-ui/icons/SearchTwoTone'\r\nimport { generateNumber } from 'utils/generators'\r\n\r\n// API config\r\n\r\nlet searchTimeout = 0\r\n\r\n// Catalogs module\r\nexport default function Catalogs() {\r\n const [content, setContent] = useState('list') // list | add | edit | delete\r\n const [selectedRecord, setSelectedRecord] = useState({})\r\n const [rendered, setRendered] = useState([])\r\n\r\n const { setCatalogs } = useContext(CatalogsContext)\r\n\r\n useEffect(() => {\r\n axiosSiteData.get(`/catalogs/${(new Date()).toJSON()}`)\r\n .then(response => {\r\n setCatalogs(response.data)\r\n setRendered(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _Link: Download\r\n }\r\n )))\r\n })\r\n }, [setCatalogs, content])\r\n\r\n return (\r\n \r\n {/** Conditional list of UI to render */}\r\n {(content === 'list' || content === 'delete') &&\r\n }\r\n {(content === 'add') && }\r\n {(content === 'edit') && }\r\n {content === 'delete' && }\r\n \r\n )\r\n}\r\n\r\n// List catalogs\r\nfunction Listing({ setSelectedRecord, setContent, rendered, setRendered }) {\r\n\r\n // ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n const { catalogs, setCatalogs } = useContext(CatalogsContext)\r\n\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n const [search, setSearch] = useState('')\r\n const [searchResults, setSearchResults] = useState([])\r\n\r\n // ─── Table Columns ───────────────────────────────────────────────────────────────────\r\n let columns = []\r\n columns = [\r\n { id: '_Name', numeric: false, label: },\r\n { id: '_Link', numeric: false, label: },\r\n { id: 'actions', numeric: false, label: }\r\n ]\r\n\r\n // ─── SEARCH ACTION ──────────────────────────────────────────────────────────────\r\n const searchAction = (toSearch) => {\r\n\r\n clearTimeout(searchTimeout)\r\n toSearch = toSearch.toLowerCase()\r\n setSearch(toSearch)\r\n searchTimeout = setTimeout(() => {\r\n if (toSearch.trim() === \"\") {\r\n axiosSiteData.get(`/catalogs/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setCatalogs(response.data)\r\n setRendered(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _Link: Download\r\n }\r\n )))\r\n setSearchResults([])\r\n })\r\n\r\n return\r\n }\r\n\r\n axiosSiteData.get(`/catalogs/search/${toSearch}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setCatalogs(response.data)\r\n setSearchResults(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _Link: Download\r\n }\r\n )))\r\n })\r\n }, 200)\r\n }\r\n\r\n // ─── Edit Action ───────────────────────────────────────────────────────────────────\r\n const editAction = (row) => {\r\n setSelectedRecord(catalogs.filter(aRecord => {\r\n return aRecord._id === row._id\r\n })[0])\r\n setContent('edit')\r\n }\r\n\r\n // ─── Delete Action ───────────────────────────────────────────────────────────────────\r\n const deleteAction = (row) => {\r\n setSelectedRecord(row)\r\n setContent('delete')\r\n }\r\n\r\n return (\r\n \r\n \r\n {/** Search bar */}\r\n searchAction(event.target.value)}\r\n style={{ width: \"40%\" }}\r\n variant=\"outlined\"\r\n label={}\r\n InputProps={{\r\n endAdornment: (\r\n \r\n ),\r\n }}\r\n />\r\n\r\n {/** Button Add */}\r\n setContent('add')}\r\n >\r\n \r\n \r\n \r\n\r\n {/** DataTable for Catalogs */}\r\n \r\n \r\n )\r\n}\r\n\r\n// Add catalog\r\nfunction Adding({ setContent }) {\r\n\r\n const handleSubmit = (record, file) => {\r\n\r\n // We make sure some fields aren't empty\r\n if (record._Name.trim() === '' || file === null) {\r\n return false\r\n }\r\n\r\n // We upload the file\r\n const reader = new FileReader()\r\n reader.onabort = () => { return }\r\n reader.onerror = () => { return }\r\n reader.onload = () => {\r\n\r\n // We upload file\r\n axiosSiteData.post(`/files/catalogs/${appendToFileName(file.name, \"-\" + generateNumber().toString())}`, reader.result, axiosSiteDataConfig)\r\n .then((result) => {\r\n\r\n // We now add the catalog with the file link\r\n const theRecord = { ...record, _Link: result.data.result }\r\n axiosSiteData.post(`/catalogs`, theRecord, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n reader.readAsArrayBuffer(file)\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Update catalog\r\nfunction Editing({ selectedRecord, setContent }) {\r\n\r\n const handleSubmit = (record, file) => {\r\n\r\n // We make sure some fields aren't empty\r\n if (record._Name.trim() === '' || file === null) {\r\n return false\r\n }\r\n\r\n // We upload the file\r\n const reader = new FileReader()\r\n reader.onabort = () => { return }\r\n reader.onerror = () => { return }\r\n reader.onload = () => {\r\n\r\n // We upload file\r\n axiosSiteData.post(`/files/catalogs/${appendToFileName(file.name, \"-\" + generateNumber().toString())}`, reader.result, axiosSiteDataConfig)\r\n .then((result) => {\r\n\r\n // We now add the catalog with the file link\r\n const theRecord = { ...record, _Link: result.data.result }\r\n axiosSiteData.put(`/catalogs/${record._id}`, theRecord, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n reader.readAsArrayBuffer(file)\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Delete catalog\r\nfunction Deleting({ selectedRecord, setContent }) {\r\n\r\n const handleDelete = (setOpen) => {\r\n\r\n axiosSiteData.delete(`/catalogs/${selectedRecord._id}`, axiosSiteDataConfig)\r\n .then(() => {\r\n setOpen(false)\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n Would you really like to delete this catalog ?\r\n }\r\n onClose={() => {\r\n setContent(\"list\")\r\n }}\r\n onAction={handleDelete}\r\n />\r\n )\r\n}\r\n","\r\nexport const documentContentTypes = [\r\n 'application/pdf',\r\n 'application/msword',\r\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\r\n 'application/vnd.ms-excel',\r\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\r\n 'application/vnd.ms-powerpoint',\r\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\r\n]","import React, { useState, useCallback } from 'react'\r\nimport { IconButton, Button, TextField, CardContent, Card, FormControl, FormGroup, Typography, Box, Grid } from '@material-ui/core'\r\nimport { useDropzone } from 'react-dropzone'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport Loader from '../../Components/Loader'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport IconArrowBackIos from '@material-ui/icons/ArrowBackIosTwoTone'\r\nimport IconDelete from '@material-ui/icons/DeleteTwoTone'\r\nimport { documentContentTypes } from 'constants/files'\r\n\r\n\r\nexport default function ContentForm({ selectedRecord, content, setContent, handleSubmit }) {\r\n\r\n const [record, setRecord] = useState(selectedRecord)\r\n const [loader, setLoader] = useState(false)\r\n const [file, setFile] = useState(selectedRecord._Link)\r\n const theme = useTheme()\r\n\r\n // ─── FUNCTIONS ──────────────────────────────────────────────────────────────────\r\n const onDrop = useCallback(acceptedFiles => {\r\n\r\n acceptedFiles.forEach((theFile) => {\r\n\r\n setFile(theFile)\r\n return\t// 1 file only\r\n })\r\n }, [])\r\n\r\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\r\n onDrop, maxFiles: 1, maxSize: 15728640,\r\n accept: documentContentTypes\r\n })\r\n\r\n return (\r\n \r\n \r\n \r\n {/* Card Header, Title & Back Button */}\r\n \r\n setContent('list')} style={{ marginRight: theme.spacing(1) }}>\r\n \r\n \r\n \r\n {content === \"add\" ?\r\n :\r\n {record._Label} }} />\r\n }\r\n \r\n \r\n {/* Documents Form */}\r\n
\r\n\r\n\r\n {/** Field Name */}\r\n \r\n }\r\n id=\"_Name\"\r\n placeholder=\"Name\"\r\n variant=\"outlined\"\r\n fullWidth\r\n required\r\n value={record._Name}\r\n onChange={event => setRecord({ ...record, _Name: event.target.value })}\r\n />\r\n \r\n\r\n\r\n {/** Field Link */}\r\n \r\n {!file &&\r\n
\r\n \r\n {\r\n isDragActive ?\r\n

Drop the files here ...

:\r\n

Drag & drop some files here, or click to select files

\r\n }\r\n
}\r\n {file &&\r\n \r\n { setFile(null); setRecord({ ...record, _Link: '' }) }} >\r\n \r\n \r\n \r\n {file.name}\r\n }\r\n
\r\n\r\n\r\n {/** Button Submit */}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n )\r\n}","import React, { useEffect, useState, useContext, Fragment } from 'react'\r\nimport { Box, Button, DialogContentText, TextField } from '@material-ui/core'\r\n\r\n\r\n// Others\r\nimport { DocumentsContext, PanelUserContext } from 'contexts'\r\nimport { appendToFileName, axiosSiteData, axiosSiteDataConfig, GetDocumentLink } from 'variables'\r\n\r\n// Libs\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport Dialoger from 'Views/Components/dialoger'\r\nimport DataTable from \"Views/Components/DataTable\"\r\n\r\n// Views\r\nimport ContentForm from './ContentFormCustom'\r\n\r\n//\r\n// ─── ICONS ──────────────────────────────────────────────────────────────────────\r\nimport IconAdd from '@material-ui/icons/AddTwoTone'\r\nimport IconSearch from '@material-ui/icons/SearchTwoTone'\r\nimport { generateNumber } from 'utils/generators'\r\n\r\n// API config\r\n\r\nlet searchTimeout = 0\r\n\r\nfunction CustomRowsRender(rows) {\r\n\r\n return rows.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _Link: Download\r\n }\r\n ))\r\n}\r\n\r\n// Documents module\r\nexport default function Documents() {\r\n\r\n const [content, setContent] = useState('list') // list | add | edit | delete\r\n const [selectedRecord, setSelectedRecord] = useState({})\r\n const [rendered, setRendered] = useState([])\r\n\r\n const { setDocuments } = useContext(DocumentsContext)\r\n\r\n useEffect(() => {\r\n\r\n axiosSiteData.get(`/documents/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setDocuments(response.data)\r\n setRendered(CustomRowsRender(response.data))\r\n })\r\n .catch(errors => console.log(errors))\r\n }, [setDocuments, content,])\r\n\r\n return (\r\n \r\n {/** Conditional list of UI to render */}\r\n {(content === 'list' || content === 'delete') &&\r\n }\r\n {(content === 'add') && }\r\n {(content === 'edit') && }\r\n {content === 'delete' && }\r\n \r\n )\r\n}\r\n\r\n// List documents\r\nfunction Listing({ setSelectedRecord, setContent, rendered, setRendered }) {\r\n\r\n // ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n const { documents, setDocuments } = useContext(DocumentsContext)\r\n const { panelUser } = useContext(PanelUserContext)\r\n\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n const [search, setSearch] = useState('')\r\n const [searchResults, setSearchResults] = useState([])\r\n\r\n // ─── Table Columns ───────────────────────────────────────────────────────────────────\r\n let columns = []\r\n columns = [\r\n { id: '_Name', numeric: false, label: },\r\n { id: '_Link', numeric: false, label: },\r\n ...panelUser.type === 'admin' ? [{ id: 'actions', numeric: false, label: }] : []\r\n ]\r\n\r\n console.log(columns)\r\n\r\n // ─── SEARCH ACTION ──────────────────────────────────────────────────────────────\r\n const searchAction = (toSearch) => {\r\n\r\n clearTimeout(searchTimeout)\r\n toSearch = toSearch.toLowerCase()\r\n setSearch(toSearch)\r\n searchTimeout = setTimeout(() => {\r\n if (toSearch.trim() === \"\") {\r\n axiosSiteData.get(`/documents/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setDocuments(response.data)\r\n setRendered(CustomRowsRender(response.data))\r\n setSearchResults([])\r\n })\r\n .catch(errors => console.log(errors))\r\n\r\n return\r\n }\r\n\r\n axiosSiteData.get(`/documents/search/${toSearch}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setDocuments(response.data)\r\n setSearchResults(response.data)\r\n })\r\n .catch(errors => console.log(errors))\r\n }, 200)\r\n }\r\n\r\n // ─── Edit Action ───────────────────────────────────────────────────────────────────\r\n const editAction = (row) => {\r\n setSelectedRecord(documents.filter(aRecord => {\r\n return aRecord._id === row._id\r\n })[0])\r\n setContent('edit')\r\n }\r\n\r\n // ─── Delete Action ───────────────────────────────────────────────────────────────────\r\n const deleteAction = (row) => {\r\n setSelectedRecord(row)\r\n setContent('delete')\r\n }\r\n\r\n return (\r\n \r\n \r\n {/** Search bar */}\r\n searchAction(event.target.value)}\r\n style={{ width: \"40%\" }}\r\n variant=\"outlined\"\r\n label={}\r\n InputProps={{\r\n endAdornment: (\r\n \r\n ),\r\n }}\r\n />\r\n\r\n {/** Button Add */}\r\n {panelUser.type === 'admin' && setContent('add')}\r\n >\r\n \r\n }\r\n \r\n\r\n {/** DataTable for Documents */}\r\n \r\n \r\n )\r\n}\r\n\r\n// Add document\r\nfunction Adding({ setContent }) {\r\n\r\n const handleSubmit = (record, file) => {\r\n\r\n // We make sure some fields aren't empty\r\n if (record._Name.trim() === '' || file === null) {\r\n return false\r\n }\r\n\r\n // We upload the file\r\n const reader = new FileReader()\r\n reader.onabort = () => { return }\r\n reader.onerror = () => { return }\r\n reader.onload = () => {\r\n\r\n // We upload file\r\n axiosSiteData.post(`/files/documents/${appendToFileName(file.name, \"-\" + generateNumber().toString())}`, reader.result, axiosSiteDataConfig)\r\n .then((result) => {\r\n\r\n // We now add the catalog with the file link\r\n const theRecord = { ...record, _Link: result.data.result }\r\n axiosSiteData.post(`/documents`, theRecord, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n reader.readAsArrayBuffer(file)\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Update document\r\nfunction Editing({ selectedRecord, setContent }) {\r\n\r\n const handleSubmit = (record, file) => {\r\n\r\n // We make sure some fields aren't empty\r\n if (record._Name.trim() === '' || (record._Link === '' && file === null)) {\r\n return false\r\n }\r\n\r\n if (record._Link !== '') {\r\n\r\n axiosSiteData.put(`/documents/${record._id}`, record, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n return\r\n }\r\n\r\n // We upload the file\r\n const reader = new FileReader()\r\n reader.onabort = () => { return }\r\n reader.onerror = () => { return }\r\n reader.onload = () => {\r\n\r\n // We upload file\r\n axiosSiteData.post(`/files/documents/${appendToFileName(file.name, \"-\" + generateNumber().toString())}`, reader.result, axiosSiteDataConfig)\r\n .then((result) => {\r\n\r\n // We now add the catalog with the file link\r\n const theRecord = { ...record, _Link: result.data.result }\r\n axiosSiteData.put(`/documents/${record._id}`, theRecord, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n reader.readAsArrayBuffer(file)\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Delete document\r\nfunction Deleting({ selectedRecord, setContent }) {\r\n\r\n const handleDelete = (setOpen) => {\r\n\r\n axiosSiteData.delete(`/documents/${selectedRecord._id}`, axiosSiteDataConfig)\r\n .then(() => {\r\n setOpen(false)\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n Would you really like to delete this document ?\r\n }\r\n onClose={() => {\r\n setContent(\"list\")\r\n }}\r\n onAction={handleDelete}\r\n />\r\n )\r\n}\r\n","import React, { useState, useContext, useEffect, useCallback } from 'react'\r\nimport {\r\n\tIconButton, Button, TextField, CardContent, Card, FormControl, FormGroup, Typography, Box, Grid, InputLabel,\r\n\tSelect, MenuItem, FormControlLabel\r\n} from '@material-ui/core'\r\nimport { useDropzone } from 'react-dropzone'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport Loader from '../../Components/Loader'\r\nimport SwitchIOS from '../../Components/SwitchIOS'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport IconArrowBackIos from '@material-ui/icons/ArrowBackIosTwoTone'\r\nimport IconDelete from '@material-ui/icons/DeleteTwoTone'\r\nimport { SeriesContext } from 'contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig, GetArticleLink } from 'variables'\r\n\r\n\r\n\r\nexport default function ContentForm({ selectedRecord, content, setContent, handleSubmit }) {\r\n\r\n\r\n\r\n\tconst [record, setRecord] = useState(selectedRecord)\r\n\tconst [loader, setLoader] = useState(false)\r\n\tconst [image, setImage] = useState(selectedRecord._Picture)\r\n\tconst [file, setFile] = useState()\r\n\tconst theme = useTheme()\r\n\r\n\tconst { series, setSeries } = useContext(SeriesContext)\r\n\r\n\tconst units = [\"mt\", \"un\", \"5,8\", \"6,0\", \"6,1\", \"6,5\", \"6,0 6,5\"]\r\n\r\n\t// ─── FUNCTIONS ──────────────────────────────────────────────────────────────────\r\n\tconst onDrop = useCallback(acceptedFiles => {\r\n\r\n\t\tacceptedFiles.forEach((theFile) => {\r\n\t\t\tconst reader = new FileReader()\r\n\r\n\t\t\treader.onabort = () => setImage('')\r\n\t\t\treader.onerror = () => setImage('')\r\n\t\t\treader.onload = () => {\r\n\t\t\t\t// Do whatever you want with the file contents\r\n\t\t\t\tsetFile(theFile)\r\n\t\t\t\tsetImage(reader.result)\r\n\t\t\t}\r\n\t\t\treader.readAsDataURL(theFile)\r\n\t\t\treturn\t// 1 file only\r\n\t\t})\r\n\t}, [])\r\n\r\n\tconst { getRootProps, getInputProps, isDragActive } = useDropzone({\r\n\t\tonDrop, maxFiles: 1, maxSize: 15728640,\r\n\t\taccept: 'image/jpeg, image/png'\r\n\t})\r\n\r\n\t// ─── GET SERIES ─────────────────────────────────────────────────────────────────\r\n\tuseEffect(() => {\r\n\t\taxiosSiteData.get(`/series/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n\t\t\t.then(response => {\r\n\t\t\t\tsetSeries(response.data)\r\n\t\t\t})\r\n\t}, [setSeries])\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{/* Card Header, Title & Back Button */}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t setContent('list')} style={{ marginRight: theme.spacing(1) }}>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{content === \"add\" ?\r\n\t\t\t\t\t\t\t\t :\r\n\t\t\t\t\t\t\t\t{record._Label} }} />\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t{/* Products Form */}\r\n\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t{/** Active and HasColor */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t setRecord({ ...record, _Active: event.target.checked })} name=\"active\" />}\r\n\t\t\t\t\t\t\t\tlabel={}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t setRecord({ ...record, _HasColor: event.target.checked })} name=\"hasColor\" />}\r\n\t\t\t\t\t\t\t\tlabel={}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{image === '' &&\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tisDragActive ?\r\n\t\t\t\t\t\t\t\t\t\t\t

Drop the files here ...

:\r\n\t\t\t\t\t\t\t\t\t\t\t

Drag & drop some files here, or click to select files

\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t
}\r\n\t\t\t\t\t\t\t{image !== '' &&\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"Product\"\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Serie */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tvalue={record._Serie}\r\n\t\t\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Serie: event.target.value })}\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t{series.map(aSerie => (\r\n\t\t\t\t\t\t\t\t\t\t\t{aSerie._Label}\r\n\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t{/** Field Label */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Label\"\r\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Label\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tvalue={record._Label}\r\n\t\t\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Label: event.target.value })}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\r\n\r\n\t\t\t\t\t\t\t\t{/** Field Description */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Description\"\r\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Description\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tmultiline\r\n\t\t\t\t\t\t\t\t\t\tvalue={record._Description}\r\n\t\t\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Description: event.target.value })}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{/** Field Unit */}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tvalue={record._Unit}\r\n\t\t\t\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Unit: event.target.value })}\r\n\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t{units.map(aUnit => (\r\n\t\t\t\t\t\t\t\t\t\t\t\t{aUnit}\r\n\t\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{/** Field Price */}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tid=\"_Price\"\r\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Price\"\r\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\t\tvalue={record._Price}\r\n\t\t\t\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Price: parseFloat(event.target.value) })}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t{/** Colors */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t setRecord({ ...record, _ColorI: event.target.checked })} name=\"colorI\" />}\r\n\t\t\t\t\t\t\t\t\t\tlabel={}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t setRecord({ ...record, _ColorM: event.target.checked })} name=\"colorM\" />}\r\n\t\t\t\t\t\t\t\t\t\tlabel={}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t setRecord({ ...record, _ColorE: event.target.checked })} name=\"colorE\" />}\r\n\t\t\t\t\t\t\t\t\t\tlabel={}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t{/** Button Submit */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t)\r\n}","import React, { useEffect, useState, useContext, Fragment } from 'react'\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport { Box, Button, DialogContentText, TextField, Typography } from '@material-ui/core'\r\nimport { makeStyles } from '@material-ui/core/styles'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport { ProductsContext } from '../../../contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig, GetArticleLink, getFileExtension } from '../../../variables'\r\nimport Dialoger from '../../Components/dialoger'\r\nimport DataTable from \"../../Components/DataTable\"\r\nimport ContentForm from './ContentFormCustom'\r\n\r\n//\r\n// ─── ICONS ──────────────────────────────────────────────────────────────────────\r\nimport IconAdd from '@material-ui/icons/AddTwoTone'\r\nimport IconSearch from '@material-ui/icons/SearchTwoTone'\r\n\r\n// API config\r\n\r\nlet searchTimeout = 0\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n tableImage: {\r\n width: \"100%\", maxWidth: 150, height: 'auto'\r\n },\r\n boolTextYes: {\r\n color: '#00A4FF'\r\n },\r\n boolTextNo: {\r\n color: '#ff3f34'\r\n }\r\n}))\r\n\r\nexport function ProductImage({ picture, label, hei }) {\r\n\r\n const classes = useStyles()\r\n\r\n return (\r\n <>\r\n {label}\r\n \r\n )\r\n}\r\n\r\n// Products module\r\nexport default function Products() {\r\n\r\n const classes = useStyles()\r\n\r\n const [content, setContent] = useState('list') // list | add | edit | delete\r\n const [selectedRecord, setSelectedRecord] = useState({})\r\n const [productsRendered, setProductsRendered] = useState([])\r\n const [hasMore, setHasMore] = useState(false)\r\n const [noMore, setNoMore] = useState(false)\r\n\r\n const { setProducts } = useContext(ProductsContext)\r\n\r\n useEffect(() => {\r\n axiosSiteData.get(`/products`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setProducts(response.data)\r\n setProductsRendered(response.data.map((aProduct) => (\r\n {\r\n ...aProduct,\r\n _Picture: ,\r\n _Active: {aProduct._Active ? 'Yes' : 'No'},\r\n _HasColor: {aProduct._HasColor ? 'Yes' : 'No'},\r\n _ColorI: {aProduct._ColorI ? 'Yes' : 'No'},\r\n _ColorM: {aProduct._ColorM ? 'Yes' : 'No'},\r\n _ColorE: {aProduct._ColorE ? 'Yes' : 'No'}\r\n }\r\n )))\r\n })\r\n }, [setProducts, content, classes])\r\n\r\n return (\r\n \r\n {/** Conditional list of UI to render */}\r\n {(content === 'list' || content === 'delete') &&\r\n \r\n }\r\n {(content === 'add') && }\r\n {(content === 'edit') && }\r\n {content === 'delete' && }\r\n \r\n )\r\n}\r\n\r\n// List products\r\nfunction Listing({ setSelectedRecord, setContent, productsRendered, setProductsRendered, hasMore, setHasMore, setNoMore, noMore }) {\r\n\r\n // ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n const classes = useStyles()\r\n const { products, setProducts } = useContext(ProductsContext)\r\n\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n const [search, setSearch] = useState('')\r\n const [searchResults, setSearchResults] = useState([])\r\n\r\n // ─── Table Columns ───────────────────────────────────────────────────────────────────\r\n let columns = []\r\n columns = [\r\n { id: '_Label', numeric: false, label: },\r\n { id: '_Picture', numeric: true, label: },\r\n { id: '_Price', numeric: false, label: },\r\n { id: '_Unit', numeric: false, label: },\r\n { id: '_Active', numeric: false, label: },\r\n { id: '_HasColor', numeric: false, label: },\r\n { id: '_ColorI', numeric: false, label: },\r\n { id: '_ColorM', numeric: false, label: },\r\n { id: '_ColorE', numeric: false, label: },\r\n { id: '_Serie', numeric: false, label: },\r\n { id: 'actions', numeric: false, label: }\r\n ]\r\n\r\n // ─── SEARCH ACTION ──────────────────────────────────────────────────────────────\r\n const searchAction = (toSearch) => {\r\n\r\n clearTimeout(searchTimeout)\r\n toSearch = toSearch.toLowerCase()\r\n setSearch(toSearch)\r\n searchTimeout = setTimeout(() => {\r\n if (toSearch.trim() === \"\") {\r\n axiosSiteData.get(`/products`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setProducts(response.data)\r\n setProductsRendered(response.data.map(aProduct => (\r\n {\r\n ...aProduct,\r\n _Picture: ,\r\n _Active: {aProduct._Active ? 'Yes' : 'No'},\r\n _HasColor: {aProduct._HasColor ? 'Yes' : 'No'},\r\n _ColorI: {aProduct._ColorI ? 'Yes' : 'No'},\r\n _ColorM: {aProduct._ColorM ? 'Yes' : 'No'},\r\n _ColorE: {aProduct._ColorE ? 'Yes' : 'No'}\r\n }\r\n )))\r\n setSearchResults([])\r\n })\r\n\r\n return\r\n }\r\n\r\n axiosSiteData.get(`/products/search/${toSearch}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setProducts(response.data)\r\n setSearchResults(response.data.map(aProduct => (\r\n {\r\n ...aProduct,\r\n _Picture: ,\r\n _Active: {aProduct._Active ? 'Yes' : 'No'},\r\n _HasColor: {aProduct._HasColor ? 'Yes' : 'No'},\r\n _ColorI: {aProduct._ColorI ? 'Yes' : 'No'},\r\n _ColorM: {aProduct._ColorM ? 'Yes' : 'No'},\r\n _ColorE: {aProduct._ColorE ? 'Yes' : 'No'}\r\n }\r\n )))\r\n })\r\n }, 200)\r\n }\r\n\r\n //\r\n // ─── LOAD MORE ACTION ───────────────────────────────────────────────────────────\r\n const loadMoreAction = () => {\r\n\r\n if (products.length <= 0) return\r\n\r\n if (search.trim() === \"\") {\r\n axiosSiteData.get(`/products/${products[products.length - 1]._Label}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setProducts(products.concat(response.data))\r\n setProductsRendered(productsRendered.concat(response.data.map(aProduct => (\r\n {\r\n ...aProduct,\r\n _Picture: ,\r\n _Active: {aProduct._Active ? 'Yes' : 'No'},\r\n _HasColor: {aProduct._HasColor ? 'Yes' : 'No'},\r\n _ColorI: {aProduct._ColorI ? 'Yes' : 'No'},\r\n _ColorM: {aProduct._ColorM ? 'Yes' : 'No'},\r\n _ColorE: {aProduct._ColorE ? 'Yes' : 'No'}\r\n }\r\n ))))\r\n })\r\n\r\n return\r\n }\r\n\r\n if (searchResults.length <= 0) return\r\n axiosSiteData.get(`/products/search/${search}/${new Date(searchResults[searchResults.length - 1]._Label).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setSearchResults(searchResults.concat(response.data.map(aProduct => (\r\n {\r\n ...aProduct,\r\n _Picture: ,\r\n _Active: {aProduct._Active ? 'Yes' : 'No'},\r\n _HasColor: {aProduct._HasColor ? 'Yes' : 'No'},\r\n _ColorI: {aProduct._ColorI ? 'Yes' : 'No'},\r\n _ColorM: {aProduct._ColorM ? 'Yes' : 'No'},\r\n _ColorE: {aProduct._ColorE ? 'Yes' : 'No'}\r\n }\r\n ))))\r\n\r\n })\r\n\r\n }\r\n\r\n // ─── Edit Action ───────────────────────────────────────────────────────────────────\r\n const editAction = (row) => {\r\n setSelectedRecord(products.filter(aProduct => {\r\n return aProduct._id === row._id\r\n })[0])\r\n setContent('edit')\r\n }\r\n\r\n // ─── Delete Action ───────────────────────────────────────────────────────────────────\r\n const deleteAction = (row) => {\r\n setSelectedRecord(row)\r\n setContent('delete')\r\n }\r\n\r\n // Handle infinite scroll\r\n useEffect(() => {\r\n\r\n if (search.trim() === \"\") {\r\n if (productsRendered.length > 0 && (productsRendered.length % 100) === 0 && !noMore) {\r\n setHasMore(true)\r\n } else {\r\n setHasMore(false)\r\n }\r\n return\r\n }\r\n\r\n if (searchResults.length > 0 && (searchResults.length % 100) === 0 && !noMore) {\r\n setHasMore(true)\r\n } else {\r\n setHasMore(false)\r\n }\r\n }, [productsRendered, noMore, setHasMore, searchResults, search])\r\n\r\n return (\r\n \r\n \r\n {/** Search bar */}\r\n searchAction(event.target.value)}\r\n style={{ width: \"40%\" }}\r\n variant=\"outlined\"\r\n label={}\r\n InputProps={{\r\n endAdornment: (\r\n \r\n ),\r\n }}\r\n />\r\n\r\n {/** Button Add */}\r\n setContent('add')}\r\n >\r\n \r\n \r\n \r\n\r\n {/** DataTable for Products */}\r\n \r\n \r\n )\r\n}\r\n\r\n// Add product\r\nfunction Adding({ setContent }) {\r\n\r\n const handleSubmit = (record, file) => {\r\n\r\n // We make sure some fields aren't empty\r\n if (record._Label.trim() === '' || record._Description.trim() === '' || record._Serie.trim() === '' || record._Unit.trim() === '' || record._Price === 0) {\r\n return false\r\n }\r\n\r\n // We upload file first\r\n if (file !== null) {\r\n\r\n const reader = new FileReader()\r\n\r\n reader.onabort = () => { return }\r\n reader.onerror = () => { return }\r\n reader.onload = () => {\r\n\r\n // We upload file\r\n axiosSiteData.post(`/files/articles/product-${uuidv4()}.${getFileExtension(file.name)}`, reader.result, axiosSiteDataConfig)\r\n .then((result) => {\r\n\r\n // We now add the product with the pic link\r\n const theRecord = { ...record, _Picture: result.data.result }\r\n axiosSiteData.post(`/products`, theRecord, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n reader.readAsArrayBuffer(file)\r\n return\t// 1 file only\r\n }\r\n\r\n // No pic, we save product directly\r\n axiosSiteData.post(`/products`, record, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Update product\r\nfunction Editing({ selectedRecord, setContent }) {\r\n\r\n const handleSubmit = (record, file) => {\r\n\r\n // We make sure some fields aren't empty\r\n if (record._Label.trim() === '' || record._Description.trim() === '' || record._Serie.trim() === '' || record._Unit.trim() === '' || record._Price === 0) {\r\n return false\r\n }\r\n\r\n // We upload file first\r\n if (file !== null && record._Picture !== selectedRecord._Picture) {\r\n\r\n const reader = new FileReader()\r\n\r\n reader.onabort = () => { return }\r\n reader.onerror = () => { return }\r\n reader.onload = () => {\r\n\r\n // We upload file\r\n axiosSiteData.post(`/files/articles/product-${uuidv4()}.${getFileExtension(file.name)}`, reader.result, axiosSiteDataConfig)\r\n .then((result) => {\r\n\r\n // We now add the product with the pic link\r\n const theRecord = { ...record, _Picture: result.data.result }\r\n axiosSiteData.put(`/products/${record._id}`, theRecord, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n reader.readAsArrayBuffer(file)\r\n return\t// 1 file only\r\n }\r\n\r\n // No pic or pic didn;t change, we save product directly\r\n axiosSiteData.put(`/products/${record._id}`, record, axiosSiteDataConfig)\r\n .then(_ => setContent('list'))\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Delete product\r\nfunction Deleting({ selectedRecord, setContent }) {\r\n\r\n const handleDelete = (setOpen) => {\r\n\r\n axiosSiteData.delete(`/products/${selectedRecord._id}`, axiosSiteDataConfig)\r\n .then(() => {\r\n setOpen(false)\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n Would you really like to delete this product ?\r\n }\r\n onClose={() => {\r\n setContent(\"list\")\r\n }}\r\n onAction={handleDelete}\r\n />\r\n )\r\n}\r\n","import React, { useState } from 'react'\r\nimport { IconButton, Button, TextField, CardContent, Card, FormControl, FormGroup, Typography, Box, Grid } from '@material-ui/core'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport Loader from '../../Components/Loader'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport IconArrowBackIos from '@material-ui/icons/ArrowBackIosTwoTone'\r\n\r\n\r\nexport default function ContentForm({ selectedRecord, content, setContent, handleSubmit }) {\r\n\r\n\tconst [record, setRecord] = useState(selectedRecord)\r\n\tconst [loader, setLoader] = useState(false)\r\n\tconst theme = useTheme()\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{/* Card Header, Title & Back Button */}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t setContent('list')} style={{ marginRight: theme.spacing(1) }}>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{content === \"add\" ?\r\n\t\t\t\t\t\t\t\t :\r\n\t\t\t\t\t\t\t\t{record._Name} }} />\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t{/* Contacts Form */}\r\n\t\t\t\t\t
\r\n\r\n\r\n\t\t\t\t\t\t{/** Field Name */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tid=\"_Name\"\r\n\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\tplaceholder=\"Name\"\r\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\tvalue={record._Name}\r\n\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Name: event.target.value })}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\r\n\r\n\t\t\t\t\t\t{/** Field Email */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tid=\"_Email\"\r\n\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\tplaceholder=\"Email\"\r\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\tvalue={record._Email}\r\n\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Email: event.target.value.toLowerCase() })}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\r\n\r\n\t\t\t\t\t\t{/** Field Company */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tid=\"_Company\"\r\n\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\tplaceholder=\"Company\"\r\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\tvalue={record._Company}\r\n\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Company: event.target.value })}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\r\n\r\n\t\t\t\t\t\t{/** Field Phone */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tid=\"_Phone\"\r\n\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\tplaceholder=\"Phone\"\r\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\tvalue={record._Phone}\r\n\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Phone: event.target.value })}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\r\n\r\n\t\t\t\t\t\t{/** Field Motivation */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tid=\"_Motivation\"\r\n\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\tplaceholder=\"Motivation\"\r\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\tfullWidth\r\n\r\n\t\t\t\t\t\t\t\tvalue={record._Motivation}\r\n\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Motivation: event.target.value })}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\r\n\r\n\t\t\t\t\t\t{/** Field Message */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tid=\"_Message\"\r\n\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\tplaceholder=\"Message\"\r\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\tfullWidth\r\n\r\n\t\t\t\t\t\t\t\tvalue={record._Message}\r\n\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Message: event.target.value })}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\r\n\r\n\r\n\t\t\t\t\t\t{/** Button Submit */}\r\n\t\t\t\t\t\t{!record._Converted && \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t)\r\n}","import React, {useEffect, useState, useContext, Fragment} from 'react'\r\nimport { Box, Button, DialogContentText, TextField, Typography } from '@material-ui/core'\r\nimport { makeStyles } from '@material-ui/core/styles'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport {ContactsContext} from '../../../contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig } from '../../../variables'\r\nimport Dialoger from '../../Components/dialoger'\r\nimport DataTable from \"../../Components/DataTable\"\r\nimport ContentForm from './ContentFormCustom'\r\n\r\n//\r\n// ─── ICONS ──────────────────────────────────────────────────────────────────────\r\nimport IconAdd from '@material-ui/icons/AddTwoTone'\r\nimport IconSearch from '@material-ui/icons/SearchTwoTone'\r\n\r\n// API config\r\n\r\nlet searchTimeout = 0\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n tableImage: {\r\n width: \"100%\", maxWidth: 150, height: 'auto'\r\n },\r\n boolTextYes: {\r\n color: '#00A4FF'\r\n },\r\n boolTextNo: {\r\n color: '#ff3f34'\r\n }\r\n}))\r\n\r\n\r\n// CustomRowsRender\r\n/* function CustomRowsRender(rows) {\r\n \r\n return rows.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _Converted: {aRecord._Converted ? 'Yes' : 'No'}\r\n }\r\n ))\r\n} */\r\n\r\n// Contacts module\r\nexport default function Contacts() {\r\n\r\n const classes = useStyles()\r\n\r\n const [content, setContent] = useState('list') // list | add | edit | delete\r\n const [selectedRecord, setSelectedRecord] = useState({})\r\n const [rendered, setRendered] = useState([])\r\n\r\n const { setContacts } = useContext(ContactsContext)\r\n\r\n useEffect(() => {\r\n axiosSiteData.get(`/contacts/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setContacts(response.data)\r\n setRendered(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _Converted: {aRecord._Converted ? 'Yes' : 'No'}\r\n }\r\n )))\r\n })\r\n }, [setContacts, content, classes])\r\n\r\n return (\r\n \r\n {/** Conditional list of UI to render */}\r\n {(content === 'list' || content === 'delete') &&\r\n }\r\n {/* (content === 'add') && */}\r\n {(content === 'edit') && }\r\n {content === 'delete' && }\r\n \r\n )\r\n}\r\n\r\n// List contacts\r\nfunction Listing({setSelectedRecord, setContent, rendered, setRendered }) {\r\n\r\n // ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n const classes = useStyles()\r\n const { contacts, setContacts } = useContext(ContactsContext)\r\n\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n const [search, setSearch] = useState('')\r\n const [searchResults, setSearchResults] = useState([])\r\n\r\n // ─── Table Columns ───────────────────────────────────────────────────────────────────\r\n let columns = []\r\n columns = [\r\n\t\t{id: '_Name', numeric: false, label: },\r\n\t\t{id: '_Email', numeric: false, label: },\r\n\t\t{id: '_Company', numeric: false, label: },\r\n\t\t{id: '_Phone', numeric: false, label: },\r\n\t\t{id: '_Motivation', numeric: false, label: },\r\n\t\t{id: '_Message', numeric: false, label: },\r\n\t\t{id: '_Converted', numeric: false, label: },\r\n\t\t{id: 'actions', numeric: false, label: }\r\n\t]\r\n\r\n // ─── SEARCH ACTION ──────────────────────────────────────────────────────────────\r\n const searchAction = (toSearch) => {\r\n\r\n clearTimeout(searchTimeout)\r\n toSearch = toSearch.toLowerCase()\r\n setSearch(toSearch)\r\n searchTimeout = setTimeout(() => {\r\n if (toSearch.trim() === \"\") {\r\n axiosSiteData.get(`/contacts/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setContacts(response.data)\r\n setRendered(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _Converted: {aRecord._Converted ? 'Yes' : 'No'}\r\n }\r\n )))\r\n setSearchResults([])\r\n })\r\n \r\n return\r\n }\r\n \r\n axiosSiteData.get(`/contacts/search/${toSearch}`, axiosSiteDataConfig)\r\n .then(response => {\r\n setContacts(response.data)\r\n setSearchResults(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _Converted: {aRecord._Converted ? 'Yes' : 'No'}\r\n }\r\n )))\r\n })\r\n }, 200)\r\n }\r\n\r\n // ─── Edit Action ───────────────────────────────────────────────────────────────────\r\n const editAction = (row) => {\r\n setSelectedRecord(contacts.filter(aRecord => {\r\n return aRecord._id === row._id\r\n })[0])\r\n setContent('edit')\r\n }\r\n\r\n // ─── Delete Action ───────────────────────────────────────────────────────────────────\r\n const deleteAction = (row) => {\r\n setSelectedRecord(row)\r\n setContent('delete')\r\n }\r\n\r\n return (\r\n \r\n \r\n {/** Search bar */}\r\n searchAction(event.target.value)}\r\n style={{ width: \"40%\" }}\r\n variant=\"outlined\"\r\n label={}\r\n InputProps={{\r\n endAdornment: (\r\n \r\n ),\r\n }}\r\n />\r\n\r\n {/** Button Add */}\r\n setContent('add')}\r\n >\r\n \r\n \r\n \r\n\r\n {/** DataTable for Contacts */}\r\n \r\n \r\n )\r\n}\r\n\r\n// Add contact\r\n/* function Adding({setContent}) {\r\n\r\n const handleSubmit = (record) => {\r\n\r\n // We make sure some fields aren't empty\r\n if (record._Name.trim() === '' || record._Email.trim() === '' || record._Company.trim() === '' || record._Phone.trim() === '' || record._Motivation.trim() === '' || record._Message.trim() === '') {\r\n return false\r\n }\r\n\r\n axiosSiteData.post(`/contacts`, record, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n} */\r\n\r\n// Update contact\r\nfunction Editing({selectedRecord, setContent}) {\r\n\r\n const handleSubmit = (record) => {\r\n\r\n /* if (record._Name.trim() === '' || record._Email.trim() === '' || record._Company.trim() === '' || record._Phone.trim() === '' || record._Motivation.trim() === '' || record._Message.trim() === '') {\r\n return false\r\n } */\r\n\r\n axiosSiteData.put(`/contacts/${record._id}/convert`, record, axiosSiteDataConfig)\r\n .then(_ => setContent('list'))\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Delete contact\r\nfunction Deleting({selectedRecord, setContent}) {\r\n\r\n const handleDelete = (setOpen) => {\r\n\r\n axiosSiteData.delete(`/contacts/${selectedRecord._id}`, axiosSiteDataConfig)\r\n .then(() => {\r\n setOpen(false)\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n Would you really like to delete this contact ?\r\n }\r\n onClose={() => {\r\n setContent(\"list\")\r\n }}\r\n onAction={handleDelete}\r\n />\r\n )\r\n}\r\n","import React, { useEffect, useState } from 'react'\r\nimport {\r\n Paper,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableContainer,\r\n TableHead,\r\n TableRow,\r\n TableSortLabel,\r\n IconButton,\r\n Typography\r\n} from '@material-ui/core'\r\nimport IconEdit from '@material-ui/icons/EditTwoTone'\r\nimport IconView from '@material-ui/icons/VisibilityTwoTone'\r\nimport IconDelete from '@material-ui/icons/DeleteTwoTone'\r\nimport { makeStyles } from '@material-ui/core/styles'\r\nimport { Box } from '@material-ui/core'\r\n\r\n// Libs\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport InfiniteScroll from 'react-infinite-scroller'\r\nimport { CircularProgress } from '@material-ui/core'\r\n\r\nconst parentID = `datatable-${uuidv4().split('-')[0]}`\r\nconst inifiniteLoaderKey = `ifnl-${uuidv4().split('-')[0]}`\r\nconst headerHeight = 50\r\nlet tableHeight = headerHeight\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n visuallyHidden: {\r\n border: 0,\r\n clip: 'rect(0 0 0 0)',\r\n height: 1,\r\n margin: -1,\r\n overflow: 'hidden',\r\n padding: 0,\r\n position: 'absolute',\r\n top: 20,\r\n width: 1,\r\n },\r\n tableHead: {\r\n fontSize: '1.2em',\r\n height: headerHeight,\r\n fontWeight: 600\r\n },\r\n boolTextYes: {\r\n color: '#00A4FF'\r\n },\r\n boolTextNo: {\r\n color: '#ff3f34'\r\n },\r\n root: {\r\n // flexGrow: 1\r\n }\r\n}))\r\n\r\n// DataTable Component\r\nexport default function DataTable({ columns, order, orderBy, rows, editAction, deleteAction, loadMoreFunc = null, hasMore = false }) {\r\n\r\n const classes = useStyles()\r\n\r\n // States\r\n const [sort, setSort] = useState(order)\r\n const [sortBy, setSortBy] = useState(orderBy)\r\n\r\n const handleRequestSort = (event, property) => {\r\n const isAsc = sortBy === property && sort === 'asc'\r\n setSort(isAsc ? 'desc' : 'asc')\r\n setSortBy(property)\r\n }\r\n\r\n const handleColumnID = (row, columnID) => {\r\n return columnID.split('|').reduce((total, current) => total === '' ? row[current] : total[current], '')\r\n }\r\n\r\n useEffect(() => {\r\n\r\n // We get parent height\r\n const resizeObserver = new ResizeObserver(entries => {\r\n for (let entry of entries) {\r\n tableHeight = entry.contentRect.height\r\n }\r\n })\r\n\r\n resizeObserver.observe(document.getElementById(parentID))\r\n }, [])\r\n\r\n return (\r\n \r\n \r\n }\r\n useWindow={false} threshold={300}\r\n initialLoad={false}\r\n >\r\n \r\n {/* Table Header Row */}\r\n \r\n {/* Table Body */}\r\n \r\n {stableSort(rows, getComparator(sort, sortBy))\r\n .map(row => (\r\n \r\n {columns.map(column => (\r\n column.id !== 'actions' ?\r\n \r\n {!column.type &&\r\n \r\n {handleColumnID(row, column.id)}\r\n }\r\n {column.type && column.type === 'bool' &&\r\n {\r\n handleColumnID(row, column.id) ? 'Yes' : 'No'}\r\n \r\n }\r\n \r\n\r\n :\r\n \r\n editAction(row)}\r\n >\r\n {row._Status !== 'Rascunho' ? : }\r\n \r\n {(deleteAction && row._Status === 'Rascunho') && deleteAction(row)}\r\n >\r\n \r\n }\r\n \r\n ))}\r\n \r\n ))\r\n }\r\n \r\n
\r\n \r\n
\r\n
\r\n )\r\n}\r\n\r\n// Descending Comparator\r\nfunction descendingComparator(a, b, orderBy) {\r\n if (b[orderBy] < a[orderBy]) {\r\n return -1\r\n }\r\n if (b[orderBy] > a[orderBy]) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\n// Get Comparator\r\nfunction getComparator(order, orderBy) {\r\n return order === 'desc'\r\n ? (a, b) => descendingComparator(a, b, orderBy)\r\n : (a, b) => -descendingComparator(a, b, orderBy)\r\n}\r\n\r\n// Sort Columns\r\nfunction stableSort(array, comparator) {\r\n const stabilizedThis = array.map((el, index) => [el, index])\r\n stabilizedThis.sort((a, b) => {\r\n const order = comparator(a[0], b[0])\r\n if (order !== 0) return order\r\n return a[1] - b[1]\r\n })\r\n return stabilizedThis.map((el) => el[0])\r\n}\r\n\r\n// DataTable Heading Row\r\nfunction TableHeading({ columns, order, orderBy, onRequestSort }) {\r\n const classes = useStyles()\r\n\r\n const sortHandler = (property) => (event) => {\r\n onRequestSort(event, property);\r\n }\r\n\r\n return (\r\n \r\n \r\n {columns.map(column => (\r\n \r\n {column.id !== 'actions' ?\r\n \r\n {column.label}\r\n {orderBy === column.id ? (\r\n \r\n {order === 'desc' ? 'sorted descending' : 'sorted ascending'}\r\n )\r\n : null\r\n }\r\n \r\n : column.label\r\n }\r\n \r\n ))}\r\n \r\n \r\n )\r\n}\r\n","import React, { useRef, useState } from 'react'\r\nimport PropTypes from 'prop-types'\r\n\r\nimport { TextField, InputAdornment, IconButton, Popper, Fade, Box, ListItem, useTheme, ClickAwayListener } from '@material-ui/core'\r\n\r\n// Icons\r\nimport IconClosed from '@material-ui/icons/ArrowDropDown'\r\nimport IconOpened from '@material-ui/icons/ArrowDropUp'\r\n\r\n// Libs\r\nimport { FixedSizeList } from 'react-window'\r\n\r\nfunction ItemRow({ index, data, style }) {\r\n\r\n return (\r\n data.handleSelectedItem(data.data[index])}\r\n >\r\n {data.itemRender(data.data[index])}\r\n \r\n )\r\n}\r\n\r\nfunction Listing({ items, opened, anchorEl, itemRender, itemHeight, listHeight, itemKey, itemsWidth, handleSelectedItem, selected }) {\r\n\r\n const theme = useTheme()\r\n\r\n return (\r\n \r\n {({ TransitionProps }) => (\r\n \r\n\r\n {/** Items */}\r\n \r\n data.data[index][itemKey]}\r\n itemData={{ data: items, itemRender: itemRender, handleSelectedItem }}\r\n >\r\n {ItemRow}\r\n \r\n {/* \r\n {items.map(item => (\r\n \r\n {itemRender(item)}\r\n \r\n ))}\r\n */}\r\n \r\n \r\n )}\r\n \r\n )\r\n}\r\n\r\n//\r\n// ─── AUTOCOMPLETE ───────────────────────────────────────────────────────────────\r\nfunction Autocomplete(\r\n {\r\n items, itemRender,\r\n itemHeight = 40, listHeight = 200, itemsWidth = 300,\r\n itemKey = \"_id\",\r\n variant = \"outlined\", label, margin=\"normal\", style, fullWidth,\r\n setSelecetdItemLabel, onSearch, value, setValue\r\n }) {\r\n\r\n //\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n const [opened, setOpened] = useState(false)\r\n // const [search, setSearch] = useState('')\r\n const [searchResults, setSearchResults] = useState([])\r\n const [selected, setSelected] = useState(null)\r\n\r\n //\r\n // ─── REFS ───────────────────────────────────────────────────────────────────────\r\n const anchorRef = useRef(null)\r\n\r\n //\r\n // ─── FUNCTIONS ──────────────────────────────────────────────────────────────────\r\n const handleItemsOpenStatus = () => {\r\n\r\n setValue('')\r\n setSearchResults([])\r\n setOpened(!opened)\r\n }\r\n\r\n const handleClickedAway = () => {\r\n setOpened(false)\r\n }\r\n\r\n const handleSearch = (event) => {\r\n\r\n const searchedValue = event.target.value\r\n setValue(searchedValue)\r\n setSelected(null)\r\n\r\n if (searchedValue.trim() === '') {\r\n setOpened(false)\r\n setSearchResults([])\r\n return\r\n }\r\n\r\n\r\n setOpened(true)\r\n setSearchResults(onSearch(searchedValue))\r\n }\r\n\r\n const handleSelectedItem = (item) => {\r\n\r\n setOpened(false)\r\n setSelected(item)\r\n setSelecetdItemLabel(item)\r\n }\r\n\r\n\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {opened ? : }\r\n \r\n \r\n ),\r\n }}\r\n \r\n />\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nAutocomplete.propTypes = {\r\n // id: PropTypes.string.isRequired,\r\n items: PropTypes.array.isRequired,\r\n setSelecetdItemLabel: PropTypes.func.isRequired,\r\n onSearch: PropTypes.func.isRequired,\r\n itemRender: PropTypes.func.isRequired,\r\n variant: PropTypes.string,\r\n label: PropTypes.node,\r\n margin: PropTypes.string\r\n}\r\n\r\nexport default Autocomplete","import React, { useContext, useState, useEffect } from 'react'\r\nimport {\r\n\tIconButton, Button, TextField, CardContent, Card, FormControl, FormGroup, Typography, Box, Grid,\r\n\tTableContainer, Table, TableCell,\r\n\tPaper,\r\n\tTableHead,\r\n\tTableBody,\r\n\tTableRow\r\n} from '@material-ui/core'\r\nimport MUIAutocomplete from 'Views/Components/Autocomplete'\r\nimport { Autocomplete } from '@material-ui/lab'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport Loader from '../../Components/Loader'\r\nimport { FormattedMessage } from 'react-intl'\r\nimport { ColorsContext, PanelUserContext } from 'contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig } from 'variables'\r\n\r\nimport IconArrowBackIos from '@material-ui/icons/ArrowBackIosTwoTone'\r\nimport IconUpdate from '@material-ui/icons/EditTwoTone'\r\nimport IconDelete from '@material-ui/icons/DeleteTwoTone'\r\n\r\nimport { useSnackbar } from 'notistack'\r\n\r\n\r\nexport default function ContentForm({ selectedRecord, content, setContent, handleSubmit }) {\r\n\r\n\t// ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n\tconst theme = useTheme()\r\n\tconst { enqueueSnackbar } = useSnackbar()\r\n\tconst { panelUser } = useContext(PanelUserContext)\r\n\r\n\tconst [activeProducts, setActiveProducts] = useState([])\r\n\tconst [itemsAction, setItemsAction] = useState('add')\r\n\tconst { colors, setColors } = useContext(ColorsContext)\r\n\r\n\tconst [record, setRecord] = useState(selectedRecord)\r\n\tconst [selectedProduct, setSelectedProduct] = useState(\r\n\t\t{\r\n\t\t\t_id: '', _Label: '', _Description: '', _Picture: '', _Unit: '',\r\n\t\t\t_ColorI: false, _ColorM: false, _ColorE: false, _Serie: '',\r\n\t\t})\r\n\tconst [currentItem, setCurrentItem] = useState({\r\n\t\t_Label: '',\r\n\t\t_Description: '',\r\n\t\t_Picture: '',\r\n\t\t_Unit: '',\r\n\t\t_ColorI: '', _ColorM: '', _ColorE: '',\r\n\t\t_Serie: '',\r\n\t\t_Quantity: ''\r\n\t})\r\n\tconst [loader, setLoader] = useState(false)\r\n\r\n\r\n\t// ─── FUNCTIONS ──────────────────────────────────────────────────────────────────\r\n\tconst itemRender = (item) => (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{item._Label}\r\n\t\t\t\t\r\n\t\t\t\t\t{item._Serie}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{item._Description}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{item._Unit}\r\n\t\t\t\t\r\n\t\t\t\r\n\r\n\t\t\r\n\t)\r\n\r\n\tconst handleProduct = (theValue) => {\r\n\r\n\t\tif (theValue === null) {\r\n\t\t\tsetSelectedProduct(theValue)\r\n\t\t\tsetCurrentItem({\r\n\t\t\t\t_Label: '',\r\n\t\t\t\t_Description: '',\r\n\t\t\t\t_Picture: '',\r\n\t\t\t\t_Unit: '',\r\n\t\t\t\t_ColorI: '', _ColorM: '', _ColorE: '',\r\n\t\t\t\t_Serie: '',\r\n\t\t\t\t_Quantity: ''\r\n\t\t\t})\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\tsetSelectedProduct(theValue)\r\n\t\tsetCurrentItem({\r\n\t\t\t_Label: theValue._Label,\r\n\t\t\t_Description: theValue._Description,\r\n\t\t\t_Picture: theValue._Picture,\r\n\t\t\t_Unit: theValue._Unit,\r\n\t\t\t_ColorI: '', _ColorM: '', _ColorE: '',\r\n\t\t\t_Serie: theValue._Serie,\r\n\t\t\t_Quantity: ''\r\n\t\t})\r\n\t}\r\n\r\n\tconst handleItem = () => {\r\n\r\n\t\tif (itemsAction === 'update') {\r\n\r\n\t\t\tsetRecord({\r\n\t\t\t\t...record,\r\n\t\t\t\t_Items: record._Items.map(elem => (\r\n\t\t\t\t\t`${elem._Label}|${elem._Description}|${elem._Serie}` === `${currentItem._Label}|${currentItem._Description}|${currentItem._Serie}` ? { ...currentItem, _Quantity: parseFloat(currentItem._Quantity) } : elem\r\n\t\t\t\t))\r\n\t\t\t})\r\n\t\t\tsetItemsAction('add')\r\n\t\t\tsetCurrentItem({\r\n\t\t\t\t_Label: '',\r\n\t\t\t\t_Description: '',\r\n\t\t\t\t_Picture: '',\r\n\t\t\t\t_Unit: '',\r\n\t\t\t\t_ColorI: '', _ColorM: '', _ColorE: '',\r\n\t\t\t\t_Serie: '',\r\n\t\t\t\t_Quantity: ''\r\n\t\t\t})\r\n\t\t\tsetSelectedProduct({\r\n\t\t\t\t_id: '', _Label: '', _Description: '', _Picture: '', _Unit: '',\r\n\t\t\t\t_ColorI: false, _ColorM: false, _ColorE: false, _Serie: '',\r\n\t\t\t})\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\tif (currentItem._Label === '' || currentItem._Description === '' || currentItem._Quantity === '') {\r\n\t\t\tenqueueSnackbar(\"Please select a product and specify a quantity first\", { variant: 'warning' })\r\n\t\t\treturn\r\n\t\t}\r\n\t\tif ((selectedProduct._ColorI && currentItem._ColorI === '') || (selectedProduct._ColorM && currentItem._ColorM === '') || (selectedProduct._ColorE && currentItem._ColorE === '')) {\r\n\t\t\tenqueueSnackbar(\"Please select the colors first\", { variant: 'warning' })\r\n\t\t\treturn\r\n\t\t}\r\n\t\tif (record._Items.filter((elem) => {\r\n\t\t\treturn `${elem._Label}|${elem._Description}|${elem._Serie}` === `${currentItem._Label}|${currentItem._Description}|${currentItem._Serie}`\r\n\t\t}).length !== 0) {\r\n\t\t\tenqueueSnackbar(\"Sorry this product has already been added to the list of items\", { variant: 'warning' })\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\tsetRecord({ ...record, _Items: [...record._Items, { ...currentItem, _Quantity: parseFloat(currentItem._Quantity) }] })\r\n\t\tsetItemsAction('add')\r\n\t\tsetCurrentItem({\r\n\t\t\t_Label: '',\r\n\t\t\t_Description: '',\r\n\t\t\t_Picture: '',\r\n\t\t\t_Unit: '',\r\n\t\t\t_ColorI: '', _ColorM: '', _ColorE: '',\r\n\t\t\t_Serie: '',\r\n\t\t\t_Quantity: ''\r\n\t\t})\r\n\t\tsetSelectedProduct({\r\n\t\t\t_id: '', _Label: '', _Description: '', _Picture: '', _Unit: '',\r\n\t\t\t_ColorI: false, _ColorM: false, _ColorE: false, _Serie: '',\r\n\t\t})\r\n\t}\r\n\r\n\tconst handleItemUpdate = anItem => {\r\n\r\n\t\tsetItemsAction('update')\r\n\t\tsetCurrentItem(anItem)\r\n\t\tsetSelectedProduct(activeProducts.filter(elem => (\r\n\t\t\t`${elem._Label}|${elem._Description}|${elem._Serie}` === `${anItem._Label}|${anItem._Description}|${anItem._Serie}`\r\n\t\t))[0] || [])\r\n\t}\r\n\r\n\t//\r\n\t// ─── EFFECTS ────────────────────────────────────────────────────────────────────\r\n\t// Get products and colors\r\n\tuseEffect(() => {\r\n\t\taxiosSiteData.get(`/products/list/active`)\r\n\t\t\t.then(response => {\r\n\t\t\t\tsetActiveProducts(response.data)\r\n\t\t\t})\r\n\t\taxiosSiteData.get(`/colors/search/-all`, axiosSiteDataConfig)\r\n\t\t\t.then(response => {\r\n\t\t\t\tsetColors(response.data)\r\n\t\t\t})\r\n\t}, [setActiveProducts, setColors])\r\n\r\n\t// Reset items form everytime we go back to add\r\n\tuseEffect(() => {\r\n\r\n\t\tif (itemsAction !== 'add') return\r\n\t\tsetCurrentItem({\r\n\t\t\t_Label: '',\r\n\t\t\t_Description: '',\r\n\t\t\t_Picture: '',\r\n\t\t\t_Unit: '',\r\n\t\t\t_ColorI: '', _ColorM: '', _ColorE: '',\r\n\t\t\t_Serie: '',\r\n\t\t\t_Quantity: ''\r\n\t\t})\r\n\t\tsetSelectedProduct({\r\n\t\t\t_id: '', _Label: '', _Description: '', _Picture: '', _Unit: '',\r\n\t\t\t_ColorI: false, _ColorM: false, _ColorE: false, _Serie: '',\r\n\t\t})\r\n\r\n\t\treturn\r\n\t}, [itemsAction])\r\n\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{/* Card Header, Title & Back Button */}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t setContent('list')} style={{ marginRight: theme.spacing(1) }}>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{content === \"add\" ?\r\n\t\t\t\t\t\t\t\t :\r\n\t\t\t\t\t\t\t\t{`#${record._Number}`} }} />\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t{(content !== 'add' && panelUser.type === 'admin') &&\r\n\t\t\t\t\t\t\t{`${record._User._Name}, ${record._User._Company}`}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t{/* Orders Form */}\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Reference */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Reference\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tvalue={record._Reference}\r\n\t\t\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Reference: event.target.value })}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Date */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_CreatedAt\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\tvalue={content !== 'add' ? new Date(record._CreatedAt).toLocaleDateString() : new Date().toLocaleDateString()}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Status */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Status\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\tvalue={record._Status}\r\n\t\t\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Status: event.target.value })}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Description */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Description\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tvalue={record._Description}\r\n\t\t\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Description: event.target.value })}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t{/** Items */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tItems\r\n\r\n\t\t\t\t\t\t\t{/** Product */}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\tstyle={{ marginTop: 0, marginBottom: 0 }}\r\n\t\t\t\t\t\t\t\t\t\tid=\"combo-select-product-label\"\r\n\t\t\t\t\t\t\t\t\t\titemHeight={60}\r\n\t\t\t\t\t\t\t\t\t\tlistHeight={200}\r\n\t\t\t\t\t\t\t\t\t\titemsWidth={350}\r\n\t\t\t\t\t\t\t\t\t\titems={activeProducts}\r\n\t\t\t\t\t\t\t\t\t\tvalue={selectedProduct._Label}\r\n\t\t\t\t\t\t\t\t\t\tsetValue={search => setSelectedProduct({...selectedProduct, _Label: search})}\r\n\t\t\t\t\t\t\t\t\t\titemRender={itemRender}\r\n\t\t\t\t\t\t\t\t\t\tsetSelecetdItemLabel={item => {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\thandleProduct(item)\r\n\t\t\t\t\t\t\t\t\t\t\treturn item._Label\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\tonSearch={search => activeProducts.filter(elem => elem._Label.toLowerCase().includes(search.trim().toLowerCase()))}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{/** Field Product Description */}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\tstyle={{ marginTop: 0, marginBottom: 0 }}\r\n\t\t\t\t\t\t\t\t\t\tid=\"combo-select-product-label\"\r\n\t\t\t\t\t\t\t\t\t\titemHeight={60}\r\n\t\t\t\t\t\t\t\t\t\tlistHeight={200}\r\n\t\t\t\t\t\t\t\t\t\titemsWidth={350}\r\n\t\t\t\t\t\t\t\t\t\titems={activeProducts}\r\n\t\t\t\t\t\t\t\t\t\tvalue={selectedProduct._Description}\r\n\t\t\t\t\t\t\t\t\t\tsetValue={search => setSelectedProduct({...selectedProduct, _Description: search})}\r\n\t\t\t\t\t\t\t\t\t\titemRender={itemRender}\r\n\t\t\t\t\t\t\t\t\t\tsetSelecetdItemLabel={item => {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\thandleProduct(item)\r\n\t\t\t\t\t\t\t\t\t\t\treturn item._Description\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\tonSearch={search => activeProducts.filter(elem => elem._Description.toLowerCase().includes(search.trim().toLowerCase()))}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{/** Field Product Unit */}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Product-_Unit\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\tvalue={currentItem._Unit}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{/** Field Quantity */}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Quantity\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\t\t\tvalue={currentItem._Quantity}\r\n\t\t\t\t\t\t\t\t\t\tonChange={event => setCurrentItem({\r\n\t\t\t\t\t\t\t\t\t\t\t...currentItem,\r\n\t\t\t\t\t\t\t\t\t\t\t_Quantity: (event.target.value !== '' && parseFloat(event.target.value) <= 1) ? 1 : event.target.value\r\n\t\t\t\t\t\t\t\t\t\t})}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t{/** Colors */}\r\n\t\t\t\t\t\t\t{currentItem._Label !== '' && \r\n\t\t\t\t\t\t\t\t{selectedProduct._ColorI && \r\n\t\t\t\t\t\t\t\t\t elem._Label)}\r\n\t\t\t\t\t\t\t\t\t\tgetOptionLabel={(option) => option}\r\n\t\t\t\t\t\t\t\t\t\tvalue={currentItem._ColorI}\r\n\t\t\t\t\t\t\t\t\t\tonChange={(_, newValue) => setCurrentItem({ ...currentItem, _ColorI: newValue === null ? '' : newValue })}\r\n\t\t\t\t\t\t\t\t\t\trenderInput={(params) => } variant=\"outlined\" margin=\"dense\" />}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t{selectedProduct._ColorM && \r\n\t\t\t\t\t\t\t\t\t elem._Label)}\r\n\t\t\t\t\t\t\t\t\t\tgetOptionLabel={(option) => option}\r\n\t\t\t\t\t\t\t\t\t\tvalue={currentItem._ColorM}\r\n\t\t\t\t\t\t\t\t\t\tonChange={(_, newValue) => setCurrentItem({ ...currentItem, _ColorM: newValue === null ? '' : newValue })}\r\n\t\t\t\t\t\t\t\t\t\trenderInput={(params) => } variant=\"outlined\" margin=\"dense\" />}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t{selectedProduct._ColorE && \r\n\t\t\t\t\t\t\t\t\t elem._Label)}\r\n\t\t\t\t\t\t\t\t\t\tgetOptionLabel={(option) => option}\r\n\t\t\t\t\t\t\t\t\t\tvalue={currentItem._ColorE}\r\n\t\t\t\t\t\t\t\t\t\tonChange={(_, newValue) => setCurrentItem({ ...currentItem, _ColorE: newValue === null ? '' : newValue })}\r\n\t\t\t\t\t\t\t\t\t\trenderInput={(params) => } variant=\"outlined\" margin=\"dense\" />}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Cancel Button */}\r\n\t\t\t\t\t\t\t\t{itemsAction !== 'add' &&\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t{/** Add/Update Button */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{/** Selected products list */}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{record._Items.map((anItem) => (\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Label}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Description}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Unit}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Quantity}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._ColorI}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._ColorM}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._ColorE}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t handleItemUpdate(anItem)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetItemsAction('add')\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetRecord({ ...record, _Items: record._Items.filter(elem => elem._Label !== anItem._Label) })\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t{/** Field Observations */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tid=\"_Observations\"\r\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\tmultiline\r\n\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\tvalue={record._Observations}\r\n\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Observations: event.target.value })}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\r\n\r\n\r\n\t\t\t\t\t\t{/** Button SAVE */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{/** Button SAVE AND SUBMIT*/}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t)\r\n}","import React from 'react'\r\nimport { Document, Page, View, Text, Image, StyleSheet, Font } from '@react-pdf/renderer'\r\n\r\nimport Logo from '../../../res/images/logo.png'\r\n\r\n// Libs\r\nimport { FormattedMessage, IntlProvider } from 'react-intl'\r\n\r\n// Others\r\nimport { gvUserConnected, langMessages } from '../../../variables'\r\n\r\nFont.register({\r\n family: 'Oswald',\r\n src: '/Oswald.ttf'\r\n})\r\n\r\nconst styles = StyleSheet.create({\r\n body: {\r\n paddingTop: 35,\r\n paddingBottom: 65,\r\n paddingHorizontal: 35,\r\n },\r\n title: {\r\n fontSize: 22,\r\n marginVertical: 10,\r\n fontFamily: 'Oswald'\r\n },\r\n author: {\r\n fontSize: 12,\r\n textAlign: 'center',\r\n marginBottom: 40,\r\n },\r\n subtitle: {\r\n fontSize: 14,\r\n fontFamily: 'Oswald'\r\n },\r\n text: {\r\n fontSize: 12,\r\n textAlign: 'justify',\r\n fontFamily: 'Times-Roman'\r\n },\r\n textItems: {\r\n fontSize: 10,\r\n textAlign: 'justify',\r\n flexGrow: 1,\r\n flexBasis: '19%',\r\n fontFamily: 'Times-Roman'\r\n },\r\n textItemsTiny: {\r\n fontSize: 10,\r\n textAlign: 'justify',\r\n flexGrow: 1,\r\n flexBasis: '10%',\r\n fontFamily: 'Times-Roman'\r\n },\r\n image: {\r\n marginVertical: 15,\r\n marginHorizontal: 100,\r\n },\r\n header: {\r\n fontSize: 12,\r\n marginBottom: 20,\r\n textAlign: 'center',\r\n color: 'grey',\r\n },\r\n pageNumber: {\r\n position: 'absolute',\r\n fontSize: 12,\r\n bottom: 30,\r\n left: 0,\r\n right: 0,\r\n textAlign: 'center',\r\n color: 'grey',\r\n },\r\n})\r\n\r\n\r\nexport default function Report({ record }) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n  {[`#${record._Number}`, record._Reference].join(', ')}\r\n \r\n {/** Reference and date */}\r\n \r\n : {[record._User._Name, record._User._Company].join(', ')}\r\n \r\n : {new Date(record._CreatedAt).toLocaleDateString()}\r\n \r\n \r\n {/** Description */}\r\n \r\n \r\n {record._Description}\r\n \r\n {/** Observations */}\r\n \r\n \r\n {record._Observations}\r\n \r\n\r\n {/** Items */}\r\n {/** Iteams header */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {record._Items.map(item => (\r\n \r\n {item._Label}\r\n {item._Unit}\r\n {item._Quantity}\r\n {item._ColorI}\r\n {item._ColorM}\r\n {item._ColorE}\r\n \r\n ))}\r\n \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState, useContext } from 'react'\r\nimport { PDFDownloadLink } from '@react-pdf/renderer'\r\nimport {\r\n\tIconButton, Button, TextField, CardContent, Card, FormControl, FormGroup, Typography, Box, Grid,\r\n\tTableContainer, Table, TableCell,\r\n\tPaper,\r\n\tTableHead,\r\n\tTableBody,\r\n\tTableRow,\r\n\tCircularProgress,\r\n\tFormControlLabel\r\n} from '@material-ui/core'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport IconArrowBackIos from '@material-ui/icons/ArrowBackIosTwoTone'\r\n\r\nimport { PanelUserContext } from 'contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig } from 'variables'\r\n\r\n// Views\r\nimport Report from './Report'\r\n\r\n// Components\r\nimport SwitchIOS from 'Views/Components/SwitchIOS'\r\n\r\n\r\nexport default function ContentForm({ selectedRecord, setContent }) {\r\n\r\n\t// ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n\tconst theme = useTheme()\r\n\tconst { panelUser } = useContext(PanelUserContext)\r\n\r\n\tconst [download, setDownload] = useState(false)\r\n\tconst [exported, setExported] = useState(selectedRecord._Exported)\r\n\r\n\r\n\t// ─── FUNCTIONS ──────────────────────────────────────────────────────────────────\r\n\tconst handleExported = (event) => {\r\n\r\n\t\tconst bExported = event.target.checked\r\n\r\n\t\taxiosSiteData.put(`/orders/${selectedRecord._id}`,\r\n\t\t\t{\r\n\t\t\t\t_Exported: bExported\r\n\t\t\t},\r\n\t\t\taxiosSiteDataConfig)\r\n\t\t\t.then(_ => setExported(bExported))\r\n\t\t\t.catch(errors => console.log(errors))\r\n\t}\r\n\r\n\r\n\t//\r\n\t// ─── EFFECTS ────────────────────────────────────────────────────────────────────\r\n\tuseEffect(() => {\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\tsetDownload(true)\r\n\t\t}, 500)\r\n\t}, [])\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{/* Card Header, Title & Back Button */}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t setContent('list')} style={{ marginRight: theme.spacing(1) }}>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t{`#${selectedRecord._Number}`}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t{panelUser.type === 'admin' &&\r\n\t\t\t\t\t\t\t{`${selectedRecord._User._Name}, ${selectedRecord._User._Company}`}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t{/* Orders Form */}\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Reference */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Reference\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tvalue={selectedRecord._Reference}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Date */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_CreatedAt\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\tvalue={new Date(selectedRecord._CreatedAt).toLocaleDateString()}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Status */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Status\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\tvalue={selectedRecord._Status}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t{panelUser.type === 'admin' && \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Description */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Description\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tvalue={selectedRecord._Description}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Exported */}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tlabel={}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t{/** Items */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tItems\r\n\r\n\t\t\t\t\t\t\t{/** Selected products list */}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{selectedRecord._Items.map((anItem) => (\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Label}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Description}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Unit}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Quantity}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._ColorI}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._ColorM}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._ColorE}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t{/** Field Observations */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tid=\"_Observations\"\r\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\tmultiline\r\n\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\tvalue={selectedRecord._Observations}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t{/** Button EXPORT PDF */}\r\n\t\t\t\t\t\t{download && } fileName={`Alumace order - ${selectedRecord._Number}.pdf`}>\r\n\t\t\t\t\t\t\t{({ blob, url, loading, error }) => (loading ?\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t:\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t)\r\n}","import React, { useEffect, useState, useContext, Fragment } from 'react'\r\nimport {\r\n Box, Button, DialogContentText, TextField, Grid,\r\n FormLabel, RadioGroup, FormControlLabel, Radio, FormControl\r\n} from '@material-ui/core'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport { OrdersContext, PanelUserContext } from '../../../contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig, gvUserConnected } from '../../../variables'\r\nimport Dialoger from '../../Components/dialoger'\r\nimport DataTable from \"./DataTable\"\r\nimport ContentForm from './ContentFormCustom'\r\nimport ContentView from './ContentView'\r\n\r\n//\r\n// ─── ICONS ──────────────────────────────────────────────────────────────────────\r\nimport IconAdd from '@material-ui/icons/AddTwoTone'\r\nimport IconSearch from '@material-ui/icons/SearchTwoTone'\r\n\r\n// API config\r\n\r\nlet searchTimeout = 0\r\n\r\n// Orders module\r\nexport default function Orders() {\r\n\r\n const { panelUser } = useContext(PanelUserContext)\r\n\r\n const [content, setContent] = useState('list') // list | add | edit | view | delete\r\n const [selectedRecord, setSelectedRecord] = useState({})\r\n const [rendered, setRendered] = useState([])\r\n const [filter, setFilter] = useState({ status: 'Submetida', exported: panelUser.type === 'admin' ? false : 'All' })\r\n const [hasMore, setHasMore] = useState(false)\r\n const [noMore, setNoMore] = useState(false)\r\n\r\n\r\n const { setOrders } = useContext(OrdersContext)\r\n\r\n useEffect(() => {\r\n axiosSiteData.get(`/orders`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setOrders(response.data)\r\n setRendered(response.data.filter(elem => (\r\n (filter.status === 'All' ? true : elem._Status === filter.status) && (filter.exported === 'All' ? true : elem._Exported === filter.exported)\r\n ))\r\n .map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _CreatedAt: new Date(aRecord._CreatedAt).toLocaleString()\r\n }\r\n )))\r\n })\r\n }, [setOrders, content, filter])\r\n\r\n return (\r\n \r\n {/** Conditional list of UI to render */}\r\n {(content === 'list' || content === 'delete') &&\r\n }\r\n {(content === 'add') && }\r\n {(content === 'edit') && }\r\n {(content === 'view') && }\r\n {content === 'delete' && }\r\n \r\n )\r\n}\r\n\r\n// List orders\r\nfunction Listing({ setSelectedRecord, setContent, rendered, setRendered, filter, setFilter, hasMore, setHasMore, setNoMore, noMore }) {\r\n\r\n // ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n const { orders, setOrders } = useContext(OrdersContext)\r\n const { panelUser } = useContext(PanelUserContext)\r\n\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n const [search, setSearch] = useState('')\r\n const [searchResults, setSearchResults] = useState([])\r\n\r\n\r\n // ─── Table Columns ───────────────────────────────────────────────────────────────────\r\n let columns = []\r\n columns = [\r\n { id: '_Number', numeric: false, label: \"#\" },\r\n { id: '_Reference', numeric: false, label: },\r\n panelUser.type === 'admin' ?\r\n { id: '_User|_Company', numeric: false, label: }\r\n :\r\n { id: '_Description', numeric: false, label: },\r\n { id: '_Status', numeric: false, label: },\r\n ...panelUser.type === 'admin' ? [{ id: '_Exported', numeric: false, type: 'bool', label: }] : [],\r\n { id: '_CreatedAt', numeric: false, label: },\r\n { id: 'actions', numeric: false, label: }\r\n ]\r\n\r\n // ─── SEARCH ACTION ──────────────────────────────────────────────────────────────\r\n const searchAction = (toSearch) => {\r\n\r\n clearTimeout(searchTimeout)\r\n toSearch = toSearch.toLowerCase()\r\n setSearch(toSearch)\r\n searchTimeout = setTimeout(() => {\r\n if (toSearch.trim() === \"\") {\r\n axiosSiteData.get(`/orders/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setOrders(response.data)\r\n setRendered(response.data.filter(elem => (\r\n (filter.status === 'All' ? true : elem._Status === filter.status) && (filter.exported === 'All' ? true : elem._Exported === filter.exported)\r\n ))\r\n .map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _CreatedAt: new Date(aRecord._CreatedAt).toLocaleString()\r\n }\r\n )))\r\n setSearchResults([])\r\n })\r\n\r\n return\r\n }\r\n\r\n axiosSiteData.get(`/orders/search/${toSearch}/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setOrders(response.data)\r\n setSearchResults(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _CreatedAt: new Date(aRecord._CreatedAt).toLocaleString()\r\n }\r\n )))\r\n /* setFilter({ status: 'All', exported: 'All' }) */\r\n })\r\n }, 200)\r\n }\r\n\r\n const loadMoreAction = () => {\r\n\r\n if (orders.length <= 0) return\r\n\r\n if (search.trim() === \"\") {\r\n axiosSiteData.get(`/orders/${orders[orders.length - 1]._CreatedAt}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setOrders(orders.concat(response.data))\r\n setRendered(rendered.concat(response.data\r\n .filter(elem => (\r\n (filter.status === 'All' ? true : elem._Status === filter.status) && (filter.exported === 'All' ? true : elem._Exported === filter.exported)\r\n ))\r\n .map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _CreatedAt: new Date(aRecord._CreatedAt).toLocaleString()\r\n }\r\n ))))\r\n })\r\n\r\n return\r\n }\r\n\r\n if (searchResults.length <= 0) return\r\n axiosSiteData.get(`/orders/search/${search}/${new Date(searchResults[searchResults.length - 1]._CreatedAt).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setSearchResults(searchResults.concat(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _CreatedAt: new Date(aRecord._CreatedAt).toLocaleString()\r\n }\r\n ))))\r\n /* setFilter({ status: 'All', exported: 'All' }) */\r\n })\r\n\r\n }\r\n\r\n //\r\n // ─── FILTER ACTION ──────────────────────────────────────────────────────────────\r\n const filterAction = (myFilter) => {\r\n\r\n let myExported = 'All'\r\n switch (myFilter.exported) {\r\n case 'true':\r\n case true:\r\n myExported = true\r\n break\r\n\r\n case 'false':\r\n case false:\r\n myExported = false\r\n break\r\n default:\r\n break;\r\n }\r\n\r\n setFilter({ ...myFilter, exported: myExported })\r\n }\r\n\r\n // ─── Edit Action ───────────────────────────────────────────────────────────────────\r\n const editAction = (row) => {\r\n setSelectedRecord(orders.filter(aRecord => {\r\n return aRecord._id === row._id\r\n })[0])\r\n setContent(row._Status !== 'Rascunho' ? 'view' : 'edit')\r\n }\r\n\r\n // ─── Delete Action ───────────────────────────────────────────────────────────────────\r\n const deleteAction = (row) => {\r\n setSelectedRecord(row)\r\n setContent('delete')\r\n }\r\n\r\n // Handle infinite scroll\r\n useEffect(() => {\r\n\r\n if (search.trim() === \"\") {\r\n if (rendered.length > 0 && (rendered.length % 100) === 0 && !noMore) {\r\n setHasMore(true)\r\n } else {\r\n setHasMore(false)\r\n }\r\n return\r\n }\r\n\r\n if (searchResults.length > 0 && (searchResults.length % 100) === 0 && !noMore) {\r\n setHasMore(true)\r\n } else {\r\n setHasMore(false)\r\n }\r\n }, [rendered, noMore, setHasMore, searchResults, search])\r\n\r\n return (\r\n \r\n \r\n {/** Search bar */}\r\n searchAction(event.target.value)}\r\n style={{ width: \"40%\" }}\r\n variant=\"outlined\"\r\n label={}\r\n InputProps={{\r\n endAdornment: (\r\n \r\n ),\r\n }}\r\n />\r\n\r\n {/** Button Add */}\r\n setContent('add')}\r\n >\r\n \r\n \r\n \r\n\r\n {/** Filters */}\r\n \r\n {/** Status filter */}\r\n \r\n \r\n \r\n filterAction({ ...filter, status: event.target.value })}>\r\n } label={} />\r\n } label=\"Rascunho\" />\r\n } label=\"Submetida\" />\r\n } label=\"Terminado\" />\r\n \r\n \r\n \r\n {/** Exported filter */}\r\n {panelUser.type === 'admin' &&\r\n \r\n \r\n \r\n filterAction({ ...filter, exported: event.target.value })}\r\n >\r\n } label={} />\r\n } label={} />\r\n } label={} />\r\n \r\n \r\n }\r\n \r\n\r\n {/** DataTable for Orders */}\r\n \r\n \r\n )\r\n}\r\n\r\n// Add order\r\nfunction Adding({ setContent }) {\r\n\r\n const handleSubmit = (record) => {\r\n\r\n // We make sure some fields aren't empty\r\n if (record._Reference.trim() === '' || record._Description.trim() === '' || record._Status.trim() === '') {\r\n return false\r\n }\r\n\r\n if (record._Observations.trim() === '' && record._Items.length === 0) {\r\n return false\r\n }\r\n\r\n axiosSiteData.post(`/orders`, {\r\n ...record, _User: {\r\n _Name: gvUserConnected.name, _Email: gvUserConnected.email, _Company: gvUserConnected.company,\r\n _Phone: gvUserConnected.phone, _AccountID: gvUserConnected.accountID\r\n }\r\n }, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Update order\r\nfunction Editing({ selectedRecord, setContent }) {\r\n\r\n const handleSubmit = (record) => {\r\n\r\n if (record._Reference.trim() === '' || record._Description.trim() === '' || record._Status.trim() === '') {\r\n return false\r\n }\r\n\r\n if (record._Observations.trim() === '' && record._Items.length === 0) {\r\n return false\r\n }\r\n\r\n axiosSiteData.put(`/orders/${record._id}`, {\r\n ...record, _User: {\r\n _Name: gvUserConnected.name, _Email: gvUserConnected.email, _Company: gvUserConnected.company,\r\n _Phone: gvUserConnected.phone, _AccountID: gvUserConnected.accountID\r\n }\r\n }, axiosSiteDataConfig)\r\n .then(_ => setContent('list'))\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// View order\r\nfunction Viewing({ selectedRecord, setContent }) {\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Delete order\r\nfunction Deleting({ selectedRecord, setContent }) {\r\n\r\n const handleDelete = (setOpen) => {\r\n\r\n axiosSiteData.delete(`/orders/${selectedRecord._id}`, axiosSiteDataConfig)\r\n .then(() => {\r\n setOpen(false)\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n Would you really like to delete this order ?\r\n }\r\n onClose={() => {\r\n setContent(\"list\")\r\n }}\r\n onAction={handleDelete}\r\n />\r\n )\r\n}\r\n","import React, { useEffect, useState } from 'react'\r\nimport {\r\n Paper,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableContainer,\r\n TableHead,\r\n TableRow,\r\n TableSortLabel,\r\n IconButton,\r\n Typography\r\n} from '@material-ui/core'\r\nimport IconEdit from '@material-ui/icons/EditTwoTone'\r\nimport IconView from '@material-ui/icons/VisibilityTwoTone'\r\nimport IconDelete from '@material-ui/icons/DeleteTwoTone'\r\nimport { makeStyles } from '@material-ui/core/styles'\r\nimport { Box } from '@material-ui/core'\r\n\r\n// Libs\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport InfiniteScroll from 'react-infinite-scroller'\r\nimport { CircularProgress } from '@material-ui/core'\r\n\r\nconst parentID = `datatable-${uuidv4().split('-')[0]}`\r\nconst inifiniteLoaderKey = `ifnl-${uuidv4().split('-')[0]}`\r\nconst headerHeight = 50\r\nlet tableHeight = headerHeight\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n visuallyHidden: {\r\n border: 0,\r\n clip: 'rect(0 0 0 0)',\r\n height: 1,\r\n margin: -1,\r\n overflow: 'hidden',\r\n padding: 0,\r\n position: 'absolute',\r\n top: 20,\r\n width: 1,\r\n },\r\n tableHead: {\r\n fontSize: '1.2em',\r\n height: headerHeight,\r\n fontWeight: 600\r\n },\r\n boolTextYes: {\r\n color: '#00A4FF'\r\n },\r\n boolTextNo: {\r\n color: '#ff3f34'\r\n },\r\n root: {\r\n // flexGrow: 1\r\n }\r\n}))\r\n\r\n// DataTable Component\r\nexport default function DataTable({ columns, order, orderBy, rows, editAction, deleteAction, loadMoreFunc = null, hasMore = false }) {\r\n\r\n const classes = useStyles()\r\n\r\n // States\r\n const [sort, setSort] = useState(order)\r\n const [sortBy, setSortBy] = useState(orderBy)\r\n\r\n const handleRequestSort = (event, property) => {\r\n const isAsc = sortBy === property && sort === 'asc'\r\n setSort(isAsc ? 'desc' : 'asc')\r\n setSortBy(property)\r\n }\r\n\r\n const handleColumnID = (row, columnID) => {\r\n return columnID.split('|').reduce((total, current) => total === '' ? row[current] : total[current], '')\r\n }\r\n\r\n useEffect(() => {\r\n\r\n // We get parent height\r\n const resizeObserver = new ResizeObserver(entries => {\r\n for (let entry of entries) {\r\n tableHeight = entry.contentRect.height\r\n }\r\n })\r\n\r\n resizeObserver.observe(document.getElementById(parentID))\r\n }, [])\r\n\r\n return (\r\n \r\n \r\n }\r\n useWindow={false} threshold={300}\r\n initialLoad={false}\r\n >\r\n \r\n {/* Table Header Row */}\r\n \r\n {/* Table Body */}\r\n \r\n {stableSort(rows, getComparator(sort, sortBy))\r\n .map(row => (\r\n \r\n {columns.map(column => (\r\n column.id !== 'actions' ?\r\n \r\n {!column.type &&\r\n \r\n {handleColumnID(row, column.id)}\r\n }\r\n {column.type && column.type === 'bool' &&\r\n {\r\n handleColumnID(row, column.id) ? 'Yes' : 'No'}\r\n \r\n }\r\n \r\n\r\n :\r\n \r\n editAction(row)}\r\n >\r\n {row._Status !== 'Rascunho' ? : }\r\n \r\n {(deleteAction && row._Status === 'Rascunho') && deleteAction(row)}\r\n >\r\n \r\n }\r\n \r\n ))}\r\n \r\n ))\r\n }\r\n \r\n
\r\n \r\n
\r\n
\r\n )\r\n}\r\n\r\n// Descending Comparator\r\nfunction descendingComparator(a, b, orderBy) {\r\n if (b[orderBy] < a[orderBy]) {\r\n return -1\r\n }\r\n if (b[orderBy] > a[orderBy]) {\r\n return 1\r\n }\r\n return 0\r\n}\r\n\r\n// Get Comparator\r\nfunction getComparator(order, orderBy) {\r\n return order === 'desc'\r\n ? (a, b) => descendingComparator(a, b, orderBy)\r\n : (a, b) => -descendingComparator(a, b, orderBy)\r\n}\r\n\r\n// Sort Columns\r\nfunction stableSort(array, comparator) {\r\n const stabilizedThis = array.map((el, index) => [el, index])\r\n stabilizedThis.sort((a, b) => {\r\n const order = comparator(a[0], b[0])\r\n if (order !== 0) return order\r\n return a[1] - b[1]\r\n })\r\n return stabilizedThis.map((el) => el[0])\r\n}\r\n\r\n// DataTable Heading Row\r\nfunction TableHeading({ columns, order, orderBy, onRequestSort }) {\r\n const classes = useStyles()\r\n\r\n const sortHandler = (property) => (event) => {\r\n onRequestSort(event, property);\r\n }\r\n\r\n return (\r\n \r\n \r\n {columns.map(column => (\r\n \r\n {column.id !== 'actions' ?\r\n \r\n {column.label}\r\n {orderBy === column.id ? (\r\n \r\n {order === 'desc' ? 'sorted descending' : 'sorted ascending'}\r\n )\r\n : null\r\n }\r\n \r\n : column.label\r\n }\r\n \r\n ))}\r\n \r\n \r\n )\r\n}\r\n","import React, { useContext, useState, useEffect } from 'react'\r\nimport {\r\n\tIconButton, Button, TextField, CardContent, Card, FormControl, FormGroup, Typography, Box, Grid,\r\n\tTableContainer, Table, TableCell,\r\n\tPaper,\r\n\tTableHead,\r\n\tTableBody,\r\n\tTableRow\r\n} from '@material-ui/core'\r\nimport MUIAutocomplete from 'Views/Components/Autocomplete'\r\nimport { Autocomplete } from '@material-ui/lab'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport Loader from '../../Components/Loader'\r\nimport { FormattedMessage } from 'react-intl'\r\nimport { ColorsContext, PanelUserContext } from '../../../contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig } from '../../../variables'\r\n\r\nimport IconArrowBackIos from '@material-ui/icons/ArrowBackIosTwoTone'\r\nimport IconUpdate from '@material-ui/icons/EditTwoTone'\r\nimport IconDelete from '@material-ui/icons/DeleteTwoTone'\r\n\r\nimport { useSnackbar } from 'notistack'\r\n\r\n\r\nexport default function ContentForm({ selectedRecord, content, setContent, handleSubmit }) {\r\n\r\n\t// ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n\tconst theme = useTheme()\r\n\tconst { enqueueSnackbar } = useSnackbar()\r\n\tconst { panelUser } = useContext(PanelUserContext)\r\n\r\n\tconst [activeProducts, setActiveProducts] = useState([])\r\n\tconst [itemsAction, setItemsAction] = useState('add')\r\n\tconst { colors, setColors } = useContext(ColorsContext)\r\n\r\n\tconst [record, setRecord] = useState(selectedRecord)\r\n\tconst [selectedProduct, setSelectedProduct] = useState(\r\n\t\t{\r\n\t\t\t_id: '', _Label: '', _Description: '', _Picture: '', _Unit: '',\r\n\t\t\t_ColorI: false, _ColorM: false, _ColorE: false, _Serie: '',\r\n\t\t})\r\n\tconst [currentItem, setCurrentItem] = useState({\r\n\t\t_Label: '',\r\n\t\t_Description: '',\r\n\t\t_Picture: '',\r\n\t\t_Unit: '',\r\n\t\t_ColorI: '', _ColorM: '', _ColorE: '',\r\n\t\t_Serie: '',\r\n\t\t_Quantity: ''\r\n\t})\r\n\tconst [loader, setLoader] = useState(false)\r\n\r\n\r\n\t// ─── FUNCTIONS ──────────────────────────────────────────────────────────────────\r\n\tconst itemRender = (item) => (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{item._Label}\r\n\t\t\t\t\r\n\t\t\t\t\t{item._Serie}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{item._Description}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{item._Unit}\r\n\t\t\t\t\r\n\t\t\t\r\n\r\n\t\t\r\n\t)\r\n\r\n\tconst handleProduct = (theValue) => {\r\n\r\n\t\tif (theValue === null) {\r\n\t\t\tsetSelectedProduct(theValue)\r\n\t\t\tsetCurrentItem({\r\n\t\t\t\t_Label: '',\r\n\t\t\t\t_Description: '',\r\n\t\t\t\t_Picture: '',\r\n\t\t\t\t_Unit: '',\r\n\t\t\t\t_ColorI: '', _ColorM: '', _ColorE: '',\r\n\t\t\t\t_Serie: '',\r\n\t\t\t\t_Quantity: ''\r\n\t\t\t})\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\tsetSelectedProduct(theValue)\r\n\t\tsetCurrentItem({\r\n\t\t\t_Label: theValue._Label,\r\n\t\t\t_Description: theValue._Description,\r\n\t\t\t_Picture: theValue._Picture,\r\n\t\t\t_Unit: theValue._Unit,\r\n\t\t\t_ColorI: '', _ColorM: '', _ColorE: '',\r\n\t\t\t_Serie: theValue._Serie,\r\n\t\t\t_Quantity: ''\r\n\t\t})\r\n\t}\r\n\r\n\tconst handleItem = () => {\r\n\r\n\t\tif (itemsAction === 'update') {\r\n\r\n\t\t\tsetRecord({\r\n\t\t\t\t...record,\r\n\t\t\t\t_Items: record._Items.map(elem => (\r\n\t\t\t\t\t`${elem._Label}|${elem._Description}|${elem._Serie}` === `${currentItem._Label}|${currentItem._Description}|${currentItem._Serie}` ? { ...currentItem, _Quantity: parseFloat(currentItem._Quantity) } : elem\r\n\t\t\t\t))\r\n\t\t\t})\r\n\t\t\tsetItemsAction('add')\r\n\t\t\tsetCurrentItem({\r\n\t\t\t\t_Label: '',\r\n\t\t\t\t_Description: '',\r\n\t\t\t\t_Picture: '',\r\n\t\t\t\t_Unit: '',\r\n\t\t\t\t_ColorI: '', _ColorM: '', _ColorE: '',\r\n\t\t\t\t_Serie: '',\r\n\t\t\t\t_Quantity: ''\r\n\t\t\t})\r\n\t\t\tsetSelectedProduct({\r\n\t\t\t\t_id: '', _Label: '', _Description: '', _Picture: '', _Unit: '',\r\n\t\t\t\t_ColorI: false, _ColorM: false, _ColorE: false, _Serie: '',\r\n\t\t\t})\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\tif (currentItem._Label === '' || currentItem._Quantity === '') {\r\n\t\t\tenqueueSnackbar(\"Please select a product and specify a quantity first\", { variant: 'warning' })\r\n\t\t\treturn\r\n\t\t}\r\n\t\tif ((selectedProduct._ColorI && currentItem._ColorI === '') || (selectedProduct._ColorM && currentItem._ColorM === '') || (selectedProduct._ColorE && currentItem._ColorE === '')) {\r\n\t\t\tenqueueSnackbar(\"Please select the colors first\", { variant: 'warning' })\r\n\t\t\treturn\r\n\t\t}\r\n\t\tif (record._Items.filter((elem) => {\r\n\t\t\treturn `${elem._Label}|${elem._Description}|${elem._Serie}` === `${currentItem._Label}|${currentItem._Description}|${currentItem._Serie}`\r\n\t\t}).length !== 0) {\r\n\t\t\tenqueueSnackbar(\"Sorry this product has already been added to the list of items\", { variant: 'warning' })\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\tsetRecord({ ...record, _Items: [...record._Items, { ...currentItem, _Quantity: parseFloat(currentItem._Quantity) }] })\r\n\t\tsetItemsAction('add')\r\n\t\tsetCurrentItem({\r\n\t\t\t_Label: '',\r\n\t\t\t_Description: '',\r\n\t\t\t_Picture: '',\r\n\t\t\t_Unit: '',\r\n\t\t\t_ColorI: '', _ColorM: '', _ColorE: '',\r\n\t\t\t_Serie: '',\r\n\t\t\t_Quantity: ''\r\n\t\t})\r\n\t\tsetSelectedProduct({\r\n\t\t\t_id: '', _Label: '', _Description: '', _Picture: '', _Unit: '',\r\n\t\t\t_ColorI: false, _ColorM: false, _ColorE: false, _Serie: '',\r\n\t\t})\r\n\t}\r\n\r\n\tconst handleItemUpdate = anItem => {\r\n\r\n\t\tsetItemsAction('update')\r\n\t\tsetCurrentItem(anItem)\r\n\t\tsetSelectedProduct(activeProducts.filter(elem => (\r\n\t\t\t`${elem._Label}|${elem._Description}|${elem._Serie}` === `${anItem._Label}|${anItem._Description}|${anItem._Serie}`\r\n\t\t))[0] || [])\r\n\t}\r\n\r\n\t//\r\n\t// ─── EFFECTS ────────────────────────────────────────────────────────────────────\r\n\t// Get products and colors\r\n\tuseEffect(() => {\r\n\t\taxiosSiteData.get(`/products/list/active`)\r\n\t\t\t.then(response => {\r\n\t\t\t\tsetActiveProducts(response.data)\r\n\t\t\t})\r\n\t\taxiosSiteData.get(`/colors/search/-all`, axiosSiteDataConfig)\r\n\t\t\t.then(response => {\r\n\t\t\t\tsetColors(response.data)\r\n\t\t\t})\r\n\t}, [setActiveProducts, setColors])\r\n\r\n\t// Reset items form everytime we go back to add\r\n\tuseEffect(() => {\r\n\r\n\t\tif (itemsAction !== 'add') return\r\n\t\tsetCurrentItem({\r\n\t\t\t_Label: '',\r\n\t\t\t_Description: '',\r\n\t\t\t_Picture: '',\r\n\t\t\t_Unit: '',\r\n\t\t\t_ColorI: '', _ColorM: '', _ColorE: '',\r\n\t\t\t_Serie: '',\r\n\t\t\t_Quantity: ''\r\n\t\t})\r\n\t\tsetSelectedProduct({\r\n\t\t\t_id: '', _Label: '', _Description: '', _Picture: '', _Unit: '',\r\n\t\t\t_ColorI: false, _ColorM: false, _ColorE: false, _Serie: '',\r\n\t\t})\r\n\r\n\t\treturn\r\n\t}, [itemsAction])\r\n\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{/* Card Header, Title & Back Button */}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t setContent('list')} style={{ marginRight: theme.spacing(1) }}>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{content === \"add\" ?\r\n\t\t\t\t\t\t\t\t :\r\n\t\t\t\t\t\t\t\t{`#${record._Number}`} }} />\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t{(content !== 'add' && panelUser.type === 'admin') &&\r\n\t\t\t\t\t\t\t{`${record._User._Name}, ${record._User._Company}`}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t{/* Quotations Form */}\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Reference */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Reference\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tvalue={record._Reference}\r\n\t\t\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Reference: event.target.value })}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Date */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_CreatedAt\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\tvalue={content !== 'add' ? new Date(record._CreatedAt).toLocaleDateString() : new Date().toLocaleDateString()}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Status */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Status\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\tvalue={record._Status}\r\n\t\t\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Status: event.target.value })}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Description */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Description\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tvalue={record._Description}\r\n\t\t\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Description: event.target.value })}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t{/** Items */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tItems\r\n\r\n\t\t\t\t\t\t\t{/** Product */}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\tstyle={{ marginTop: 0, marginBottom: 0 }}\r\n\t\t\t\t\t\t\t\t\t\tid=\"combo-select-product-label\"\r\n\t\t\t\t\t\t\t\t\t\titemHeight={60}\r\n\t\t\t\t\t\t\t\t\t\tlistHeight={200}\r\n\t\t\t\t\t\t\t\t\t\titemsWidth={350}\r\n\t\t\t\t\t\t\t\t\t\titems={activeProducts}\r\n\t\t\t\t\t\t\t\t\t\tvalue={selectedProduct._Label}\r\n\t\t\t\t\t\t\t\t\t\tsetValue={search => setSelectedProduct({ ...selectedProduct, _Label: search })}\r\n\t\t\t\t\t\t\t\t\t\titemRender={itemRender}\r\n\t\t\t\t\t\t\t\t\t\tsetSelecetdItemLabel={item => {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\thandleProduct(item)\r\n\t\t\t\t\t\t\t\t\t\t\treturn item._Label\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\tonSearch={search => activeProducts.filter(elem => elem._Label.toLowerCase().includes(search.trim().toLowerCase()))}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{/** Field Product Description */}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\tstyle={{ marginTop: 0, marginBottom: 0 }}\r\n\t\t\t\t\t\t\t\t\t\tid=\"combo-select-product-label\"\r\n\t\t\t\t\t\t\t\t\t\titemHeight={60}\r\n\t\t\t\t\t\t\t\t\t\tlistHeight={200}\r\n\t\t\t\t\t\t\t\t\t\titemsWidth={350}\r\n\t\t\t\t\t\t\t\t\t\titems={activeProducts}\r\n\t\t\t\t\t\t\t\t\t\tvalue={selectedProduct._Description}\r\n\t\t\t\t\t\t\t\t\t\tsetValue={search => setSelectedProduct({ ...selectedProduct, _Description: search })}\r\n\t\t\t\t\t\t\t\t\t\titemRender={itemRender}\r\n\t\t\t\t\t\t\t\t\t\tsetSelecetdItemLabel={item => {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\thandleProduct(item)\r\n\t\t\t\t\t\t\t\t\t\t\treturn item._Description\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\tonSearch={search => activeProducts.filter(elem => elem._Description.toLowerCase().includes(search.trim().toLowerCase()))}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{/** Field Product Unit */}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Product-_Unit\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\tvalue={currentItem._Unit}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t{/** Field Quantity */}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Quantity\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\t\t\tvalue={currentItem._Quantity}\r\n\t\t\t\t\t\t\t\t\t\tonChange={event => setCurrentItem({\r\n\t\t\t\t\t\t\t\t\t\t\t...currentItem,\r\n\t\t\t\t\t\t\t\t\t\t\t_Quantity: (event.target.value !== '' && parseFloat(event.target.value) <= 1) ? 1 : event.target.value\r\n\t\t\t\t\t\t\t\t\t\t})}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t{/** Colors */}\r\n\t\t\t\t\t\t\t{currentItem._Label !== '' && \r\n\t\t\t\t\t\t\t\t{selectedProduct._ColorI && \r\n\t\t\t\t\t\t\t\t\t elem._Label)}\r\n\t\t\t\t\t\t\t\t\t\tgetOptionLabel={(option) => option}\r\n\t\t\t\t\t\t\t\t\t\tvalue={currentItem._ColorI}\r\n\t\t\t\t\t\t\t\t\t\tonChange={(_, newValue) => setCurrentItem({ ...currentItem, _ColorI: newValue === null ? '' : newValue })}\r\n\t\t\t\t\t\t\t\t\t\trenderInput={(params) => } variant=\"outlined\" margin=\"dense\" />}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t{selectedProduct._ColorM && \r\n\t\t\t\t\t\t\t\t\t elem._Label)}\r\n\t\t\t\t\t\t\t\t\t\tgetOptionLabel={(option) => option}\r\n\t\t\t\t\t\t\t\t\t\tvalue={currentItem._ColorM}\r\n\t\t\t\t\t\t\t\t\t\tonChange={(_, newValue) => setCurrentItem({ ...currentItem, _ColorM: newValue === null ? '' : newValue })}\r\n\t\t\t\t\t\t\t\t\t\trenderInput={(params) => } variant=\"outlined\" margin=\"dense\" />}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t{selectedProduct._ColorE && \r\n\t\t\t\t\t\t\t\t\t elem._Label)}\r\n\t\t\t\t\t\t\t\t\t\tgetOptionLabel={(option) => option}\r\n\t\t\t\t\t\t\t\t\t\tvalue={currentItem._ColorE}\r\n\t\t\t\t\t\t\t\t\t\tonChange={(_, newValue) => setCurrentItem({ ...currentItem, _ColorE: newValue === null ? '' : newValue })}\r\n\t\t\t\t\t\t\t\t\t\trenderInput={(params) => } variant=\"outlined\" margin=\"dense\" />}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Cancel Button */}\r\n\t\t\t\t\t\t\t\t{itemsAction !== 'add' &&\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t{/** Add/Update Button */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{/** Selected products list */}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{record._Items.map((anItem) => (\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Label}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Description}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Unit}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Quantity}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._ColorI}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._ColorM}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._ColorE}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t handleItemUpdate(anItem)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetItemsAction('add')\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetRecord({ ...record, _Items: record._Items.filter(elem => elem._Label !== anItem._Label) })\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t{/** Field Observations */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tid=\"_Observations\"\r\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\tmultiline\r\n\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\tvalue={record._Observations}\r\n\t\t\t\t\t\t\t\tonChange={event => setRecord({ ...record, _Observations: event.target.value })}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\r\n\r\n\r\n\t\t\t\t\t\t{/** Button SAVE */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{/** Button SAVE AND SUBMIT*/}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t)\r\n}","import React from 'react'\r\nimport { Document, Page, View, Text, Image, StyleSheet, Font } from '@react-pdf/renderer'\r\n\r\nimport Logo from '../../../res/images/logo.png'\r\n\r\n// Libs\r\nimport { FormattedMessage, IntlProvider } from 'react-intl'\r\n\r\n// Others\r\nimport { gvUserConnected, langMessages } from '../../../variables'\r\n\r\nFont.register({\r\n family: 'Oswald',\r\n src: '/Oswald.ttf'\r\n})\r\n\r\n\r\nconst styles = StyleSheet.create({\r\n body: {\r\n paddingTop: 35,\r\n paddingBottom: 65,\r\n paddingHorizontal: 35,\r\n },\r\n title: {\r\n fontSize: 22,\r\n marginVertical: 10,\r\n fontFamily: 'Oswald'\r\n },\r\n author: {\r\n fontSize: 12,\r\n textAlign: 'center',\r\n marginBottom: 40,\r\n },\r\n subtitle: {\r\n fontSize: 14,\r\n fontFamily: 'Oswald'\r\n },\r\n text: {\r\n fontSize: 12,\r\n textAlign: 'justify',\r\n fontFamily: 'Times-Roman'\r\n },\r\n textItems: {\r\n fontSize: 10,\r\n textAlign: 'justify',\r\n flexGrow: 1,\r\n flexBasis: '19%',\r\n fontFamily: 'Times-Roman'\r\n },\r\n textItemsTiny: {\r\n fontSize: 10,\r\n textAlign: 'justify',\r\n flexGrow: 1,\r\n flexBasis: '10%',\r\n fontFamily: 'Times-Roman'\r\n },\r\n image: {\r\n marginVertical: 15,\r\n marginHorizontal: 100,\r\n },\r\n header: {\r\n fontSize: 12,\r\n marginBottom: 20,\r\n textAlign: 'center',\r\n color: 'grey',\r\n },\r\n pageNumber: {\r\n position: 'absolute',\r\n fontSize: 12,\r\n bottom: 30,\r\n left: 0,\r\n right: 0,\r\n textAlign: 'center',\r\n color: 'grey',\r\n },\r\n})\r\n\r\n\r\nexport default function Report({ record }) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n  {[`#${record._Number}`, record._Reference].join(', ')}\r\n \r\n {/** Reference and date */}\r\n \r\n : {[record._User._Name, record._User._Company].join(', ')}\r\n \r\n : {new Date(record._CreatedAt).toLocaleDateString()}\r\n \r\n \r\n {/** Description */}\r\n \r\n \r\n {record._Description}\r\n \r\n {/** Observations */}\r\n \r\n \r\n {record._Observations}\r\n \r\n\r\n {/** Items */}\r\n {/** Iteams header */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {record._Items.map(item => (\r\n \r\n {item._Label}\r\n {item._Unit}\r\n {item._Quantity}\r\n {item._ColorI}\r\n {item._ColorM}\r\n {item._ColorE}\r\n \r\n ))}\r\n \r\n \r\n \r\n\r\n )\r\n}","import React, { useEffect, useState, useContext } from 'react'\r\nimport { PDFDownloadLink } from '@react-pdf/renderer'\r\nimport {\r\n\tIconButton, Button, TextField, CardContent, Card, FormControl, FormGroup, Typography, Box, Grid,\r\n\tTableContainer, Table, TableCell,\r\n\tPaper,\r\n\tTableHead,\r\n\tTableBody,\r\n\tTableRow,\r\n\tCircularProgress,\r\n\tFormControlLabel\r\n} from '@material-ui/core'\r\nimport { useTheme } from '@material-ui/core/styles'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport IconArrowBackIos from '@material-ui/icons/ArrowBackIosTwoTone'\r\n\r\nimport { PanelUserContext } from 'contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig } from 'variables'\r\n\r\n// Views\r\nimport Report from './Report'\r\n\r\n// Components\r\nimport SwitchIOS from 'Views/Components/SwitchIOS'\r\n\r\n\r\nexport default function ContentForm({ selectedRecord, setContent }) {\r\n\r\n\t// ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n\tconst theme = useTheme()\r\n\tconst { panelUser } = useContext(PanelUserContext)\r\n\r\n\tconst [download, setDownload] = useState(false)\r\n\tconst [exported, setExported] = useState(selectedRecord._Exported)\r\n\r\n\r\n\t// ─── FUNCTIONS ──────────────────────────────────────────────────────────────────\r\n\tconst handleExported = (event) => {\r\n\r\n\t\tconst bExported = event.target.checked\r\n\r\n\t\taxiosSiteData.put(`/quotations/${selectedRecord._id}`,\r\n\t\t\t{\r\n\t\t\t\t_Exported: bExported\r\n\t\t\t},\r\n\t\t\taxiosSiteDataConfig)\r\n\t\t\t.then(_ => setExported(bExported))\r\n\t\t\t.catch(errors => console.log(errors))\r\n\t}\r\n\r\n\r\n\t//\r\n\t// ─── EFFECTS ────────────────────────────────────────────────────────────────────\r\n\tuseEffect(() => {\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\tsetDownload(true)\r\n\t\t}, 500)\r\n\t}, [])\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{/* Card Header, Title & Back Button */}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t setContent('list')} style={{ marginRight: theme.spacing(1) }}>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t{`#${selectedRecord._Number}`}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t{panelUser.type === 'admin' &&\r\n\t\t\t\t\t\t\t{`${selectedRecord._User._Name}, ${selectedRecord._User._Company}`}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t{/* Quotations Form */}\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Reference */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Reference\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tvalue={selectedRecord._Reference}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Date */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_CreatedAt\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\tvalue={new Date(selectedRecord._CreatedAt).toLocaleDateString()}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Status */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Status\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\t\t\tvalue={selectedRecord._Status}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t{panelUser.type === 'admin' && \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Field Description */}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tid=\"_Description\"\r\n\t\t\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\t\t\tmargin=\"dense\"\r\n\t\t\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\t\t\tvalue={selectedRecord._Description}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{/** Exported */}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tlabel={}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t{/** Items */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tItems\r\n\r\n\t\t\t\t\t\t\t{/** Selected products list */}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t{selectedRecord._Items.map((anItem) => (\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Label}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Description}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Unit}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._Quantity}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._ColorI}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._ColorM}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{anItem._ColorE}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\r\n\t\t\t\t\t\t{/** Field Observations */}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tid=\"_Observations\"\r\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\t\t\t\t\tfullWidth\r\n\t\t\t\t\t\t\t\tmultiline\r\n\t\t\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\t\t\tvalue={selectedRecord._Observations}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t{/** Button EXPORT PDF */}\r\n\t\t\t\t\t\t{download && } fileName={`Alumace quotation - ${selectedRecord._Number}.pdf`}>\r\n\t\t\t\t\t\t\t{({ blob, url, loading, error }) => (loading ?\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t:\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t)\r\n}","import React, { useEffect, useState, useContext, Fragment } from 'react'\r\nimport {\r\n Box, Button, DialogContentText, Grid, TextField,\r\n FormLabel, RadioGroup, FormControlLabel, Radio, FormControl\r\n} from '@material-ui/core'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport { PanelUserContext, QuotationsContext } from '../../../contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig, gvUserConnected } from '../../../variables'\r\nimport Dialoger from '../../Components/dialoger'\r\nimport DataTable from \"./DataTable\"\r\nimport ContentForm from './ContentFormCustom'\r\nimport ContentView from './ContentView'\r\n\r\n//\r\n// ─── ICONS ──────────────────────────────────────────────────────────────────────\r\nimport IconAdd from '@material-ui/icons/AddTwoTone'\r\nimport IconSearch from '@material-ui/icons/SearchTwoTone'\r\n\r\n// API config\r\n\r\nlet searchTimeout = 0\r\n\r\n// Quotations module\r\nexport default function Quotations() {\r\n\r\n const { panelUser } = useContext(PanelUserContext)\r\n\r\n const [content, setContent] = useState('list') // list | add | edit | view | delete\r\n const [selectedRecord, setSelectedRecord] = useState({})\r\n const [rendered, setRendered] = useState([])\r\n const [filter, setFilter] = useState({ status: 'Submetida', exported: panelUser.type === 'admin' ? false : 'All' })\r\n const [hasMore, setHasMore] = useState(false)\r\n const [noMore, setNoMore] = useState(false)\r\n\r\n const { setQuotations } = useContext(QuotationsContext)\r\n\r\n useEffect(() => {\r\n axiosSiteData.get(`/quotations/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setQuotations(response.data)\r\n setRendered(response.data.filter(elem => (\r\n (filter.status === 'All' ? true : elem._Status === filter.status) && (filter.exported === 'All' ? true : elem._Exported === filter.exported)\r\n ))\r\n .map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _CreatedAt: new Date(aRecord._CreatedAt).toLocaleString()\r\n }\r\n )))\r\n })\r\n }, [setQuotations, content, filter])\r\n\r\n return (\r\n \r\n {/** Conditional list of UI to render */}\r\n {(content === 'list' || content === 'delete') &&\r\n }\r\n {(content === 'add') && }\r\n {(content === 'edit') && }\r\n {(content === 'view') && }\r\n {content === 'delete' && }\r\n \r\n )\r\n}\r\n\r\n// List quotations\r\nfunction Listing({ setSelectedRecord, setContent, rendered, setRendered, filter, setFilter, hasMore, setHasMore, setNoMore, noMore }) {\r\n\r\n // ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n const { quotations, setQuotations } = useContext(QuotationsContext)\r\n const { panelUser } = useContext(PanelUserContext)\r\n\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n const [search, setSearch] = useState('')\r\n const [searchResults, setSearchResults] = useState([])\r\n\r\n // ─── Table Columns ───────────────────────────────────────────────────────────────────\r\n let columns = []\r\n columns = [\r\n { id: '_Number', numeric: false, label: \"#\" },\r\n { id: '_Reference', numeric: false, label: },\r\n panelUser.type === 'admin' ?\r\n { id: '_User|_Company', numeric: false, label: }\r\n :\r\n { id: '_Description', numeric: false, label: },\r\n { id: '_Status', numeric: false, label: },\r\n ...panelUser.type === 'admin' ? [{ id: '_Exported', numeric: false, type: 'bool', label: }] : [],\r\n { id: '_CreatedAt', numeric: false, label: },\r\n { id: 'actions', numeric: false, label: }\r\n ]\r\n\r\n // ─── SEARCH ACTION ──────────────────────────────────────────────────────────────\r\n const searchAction = (toSearch) => {\r\n\r\n clearTimeout(searchTimeout)\r\n toSearch = toSearch.toLowerCase()\r\n setSearch(toSearch)\r\n searchTimeout = setTimeout(() => {\r\n if (toSearch.trim() === \"\") {\r\n axiosSiteData.get(`/quotations/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setQuotations(response.data)\r\n setRendered(response.data.filter(elem => (\r\n (filter.status === 'All' ? true : elem._Status === filter.status) && (filter.exported === 'All' ? true : elem._Exported === filter.exported)\r\n ))\r\n .map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _CreatedAt: new Date(aRecord._CreatedAt).toLocaleString()\r\n }\r\n )))\r\n setSearchResults([])\r\n })\r\n\r\n return\r\n }\r\n\r\n axiosSiteData.get(`/quotations/search/${toSearch}/${(new Date()).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setQuotations(response.data)\r\n setSearchResults(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _CreatedAt: new Date(aRecord._CreatedAt).toLocaleString()\r\n }\r\n )))\r\n /* setFilter({ status: 'All', exported: 'All' }) */\r\n })\r\n }, 200)\r\n }\r\n\r\n const loadMoreAction = () => {\r\n\r\n if (quotations.length <= 0) return\r\n\r\n if (search.trim() === \"\") {\r\n axiosSiteData.get(`/quotations/${quotations[quotations.length - 1]._CreatedAt}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setQuotations(quotations.concat(response.data))\r\n setRendered(rendered.concat(response.data\r\n .filter(elem => (\r\n (filter.status === 'All' ? true : elem._Status === filter.status) && (filter.exported === 'All' ? true : elem._Exported === filter.exported)\r\n ))\r\n .map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _CreatedAt: new Date(aRecord._CreatedAt).toLocaleString()\r\n }\r\n ))))\r\n })\r\n\r\n return\r\n }\r\n\r\n if (searchResults.length <= 0) return\r\n axiosSiteData.get(`/quotations/search/${search}/${new Date(searchResults[searchResults.length - 1]._CreatedAt).toJSON()}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n if (response.data.length === 100) {\r\n setNoMore(false)\r\n } else {\r\n setHasMore(true)\r\n }\r\n\r\n setSearchResults(searchResults.concat(response.data.map((aRecord) => (\r\n {\r\n ...aRecord,\r\n _CreatedAt: new Date(aRecord._CreatedAt).toLocaleString()\r\n }\r\n ))))\r\n /* setFilter({ status: 'All', exported: 'All' }) */\r\n })\r\n\r\n }\r\n\r\n //\r\n // ─── FILTER ACTION ──────────────────────────────────────────────────────────────\r\n const filterAction = (myFilter) => {\r\n\r\n let myExported = 'All'\r\n switch (myFilter.exported) {\r\n case 'true':\r\n case true:\r\n myExported = true\r\n break\r\n\r\n case 'false':\r\n case false:\r\n myExported = false\r\n break\r\n default:\r\n break;\r\n }\r\n\r\n setFilter({ ...myFilter, exported: myExported })\r\n }\r\n\r\n // ─── Edit Action ───────────────────────────────────────────────────────────────────\r\n const editAction = (row) => {\r\n setSelectedRecord(quotations.filter(aRecord => {\r\n return aRecord._id === row._id\r\n })[0])\r\n setContent(row._Status !== 'Rascunho' ? 'view' : 'edit')\r\n }\r\n\r\n // ─── Delete Action ───────────────────────────────────────────────────────────────────\r\n const deleteAction = (row) => {\r\n setSelectedRecord(row)\r\n setContent('delete')\r\n }\r\n\r\n // Handle infinite scroll\r\n useEffect(() => {\r\n\r\n if (search.trim() === \"\") {\r\n if (rendered.length > 0 && (rendered.length % 100) === 0 && !noMore) {\r\n setHasMore(true)\r\n } else {\r\n setHasMore(false)\r\n }\r\n return\r\n }\r\n\r\n if (searchResults.length > 0 && (searchResults.length % 100) === 0 && !noMore) {\r\n setHasMore(true)\r\n } else {\r\n setHasMore(false)\r\n }\r\n }, [rendered, noMore, setHasMore, searchResults, search])\r\n\r\n return (\r\n \r\n \r\n {/** Search bar */}\r\n searchAction(event.target.value)}\r\n style={{ width: \"40%\" }}\r\n variant=\"outlined\"\r\n label={}\r\n InputProps={{\r\n endAdornment: (\r\n \r\n ),\r\n }}\r\n />\r\n\r\n {/** Button Add */}\r\n setContent('add')}\r\n >\r\n \r\n \r\n \r\n\r\n {/** Filters */}\r\n \r\n {/** Status filter */}\r\n \r\n \r\n \r\n filterAction({ ...filter, status: event.target.value })}>\r\n } label={} />\r\n } label=\"Rascunho\" />\r\n } label=\"Submetida\" />\r\n } label=\"Terminado\" />\r\n \r\n \r\n \r\n {/** Exported filter */}\r\n {panelUser.type === 'admin' &&\r\n \r\n \r\n \r\n filterAction({ ...filter, exported: event.target.value })}\r\n >\r\n } label={} />\r\n } label={} />\r\n } label={} />\r\n \r\n \r\n }\r\n \r\n\r\n {/** DataTable for Quotations */}\r\n \r\n \r\n )\r\n}\r\n\r\n// Add quotation\r\nfunction Adding({ setContent }) {\r\n\r\n const handleSubmit = (record) => {\r\n\r\n // We make sure some fields aren't empty\r\n if (record._Reference.trim() === '' || record._Description.trim() === '' || record._Status.trim() === '') {\r\n return false\r\n }\r\n\r\n if (record._Observations.trim() === '' && record._Items.length === 0) {\r\n return false\r\n }\r\n\r\n axiosSiteData.post(`/quotations`, {\r\n ...record, _User: {\r\n _Name: gvUserConnected.name, _Email: gvUserConnected.email, _Company: gvUserConnected.company,\r\n _Phone: gvUserConnected.phone, _AccountID: gvUserConnected.accountID\r\n }\r\n }, axiosSiteDataConfig)\r\n .then(() => {\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Update quotation\r\nfunction Editing({ selectedRecord, setContent }) {\r\n\r\n const handleSubmit = (record) => {\r\n\r\n if (record._Reference.trim() === '' || record._Description.trim() === '' || record._Status.trim() === '') {\r\n return false\r\n }\r\n\r\n if (record._Observations.trim() === '' && record._Items.length === 0) {\r\n return false\r\n }\r\n\r\n axiosSiteData.put(`/quotations/${record._id}`, {\r\n ...record, _User: {\r\n _Name: gvUserConnected.name, _Email: gvUserConnected.email.toLowerCase(), _Company: gvUserConnected.company,\r\n _Phone: gvUserConnected.phone, _AccountID: gvUserConnected.accountID\r\n }\r\n }, axiosSiteDataConfig)\r\n .then(_ => setContent('list'))\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// View quotation\r\nfunction Viewing({ selectedRecord, setContent }) {\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n// Delete quotation\r\nfunction Deleting({ selectedRecord, setContent }) {\r\n\r\n const handleDelete = (setOpen) => {\r\n\r\n axiosSiteData.delete(`/quotations/${selectedRecord._id}`, axiosSiteDataConfig)\r\n .then(() => {\r\n setOpen(false)\r\n setContent('list')\r\n })\r\n .catch(errors => console.log(errors))\r\n }\r\n\r\n return (\r\n Would you really like to delete this quotation ?\r\n }\r\n onClose={() => {\r\n setContent(\"list\")\r\n }}\r\n onAction={handleDelete}\r\n />\r\n )\r\n}\r\n","import React, { useState, useContext, useEffect } from 'react'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\nimport {\r\n Drawer,\r\n List,\r\n ListItem,\r\n ListItemText,\r\n CssBaseline,\r\n AppBar,\r\n Toolbar,\r\n Typography,\r\n IconButton,\r\n Box,\r\n useMediaQuery,\r\n Dialog, Slide\r\n} from '@material-ui/core'\r\nimport { Tooltip } from '@material-ui/core'\r\nimport { useTheme, makeStyles } from '@material-ui/core/styles'\r\n\r\n// Views\r\nimport Settings from './Settings/Settings'\r\n\r\nimport {\r\n PanelUserContext,\r\n UtilitiesContext,\r\n UsersContext,\r\n SeriesContext,\r\n ColorsContext,\r\n CatalogsContext,\r\n ProductsContext,\r\n ContactsContext,\r\n OrdersContext,\r\n QuotationsContext,\r\n DocumentsContext\r\n} from '../../contexts'\r\nimport { axiosSiteData, axiosSiteDataConfig, gvUserConnected, setGvUserConnected, projectName, langMessages } from '../../variables'\r\n\r\n// Libs\r\nimport { Link } from 'react-router-dom'\r\n\r\n// Views\r\nimport Splash from './Splash'\r\n\r\n// Images\r\nimport Logo from '../../res/images/logo.png'\r\n\r\n// Icons\r\nimport IconClose from '@material-ui/icons/CloseTwoTone'\r\nimport IconMenu from '@material-ui/icons/MenuTwoTone'\r\n\r\n//\r\n// ────────────────────────────────────────────────── I ──────────\r\n// :::::: I C O N S : : : : : : : :\r\n// ────────────────────────────────────────────────────────────\r\n//\r\n// import BrightnessLowTwoToneIcon from '@material-ui/icons/BrightnessLowTwoTone';\r\n// import BrightnessMediumTwoToneIcon from '@material-ui/icons/BrightnessMediumTwoTone';\r\nimport IconSettings from '@material-ui/icons/SettingsTwoTone'\r\nimport IconLogout from '@material-ui/icons/ExitToAppTwoTone'\r\n\r\n//\r\n// ────────────────────────────────────────────────── I ──────────\r\n// :::::: P A G E S : : : : : : : :\r\n// ────────────────────────────────────────────────────────────\r\n//\r\n\r\nimport Dashboard from './Dashboard/Dashboard'\r\nimport Users from './Users/UsersCustom'\r\nimport Series from './Series/Series'\r\nimport Colors from './Colors/Colors'\r\nimport Catalogs from './Catalogs/CatalogsCustom'\r\nimport Documents from './Documents/DocumentsCustom'\r\nimport Products from './Products/ProductsCustom'\r\nimport Contacts from './Contacts/ContactsCustom'\r\nimport Orders from './Orders/OrdersCustom'\r\nimport Quotations from './Quotations/QuotationsCustom'\r\n\r\n\r\n\r\n\r\nconst drawerWidth = 240\r\n\r\n//\r\n// ──────────────────────────────────────────────────── I ──────────\r\n// :::::: S T Y L E S : : : : : : : :\r\n// ──────────────────────────────────────────────────────────────\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n drawer: {\r\n width: drawerWidth,\r\n flexShrink: 0,\r\n },\r\n drawerPaper: {\r\n width: drawerWidth,\r\n color: 'white',\r\n backgroundColor: '#363636'\r\n },\r\n appBar: {\r\n width: `calc(100% - ${drawerWidth}px)`,\r\n [theme.breakpoints.down('md')]: {\r\n width: '100%'\r\n },\r\n marginLeft: drawerWidth,\r\n backgroundColor: theme.palette.primary.main\r\n },\r\n toolbar: theme.mixins.toolbar,\r\n content: {\r\n display: \"flex\",\r\n width: \"100%\",\r\n flexDirection: \"column\",\r\n flexGrow: 1,\r\n backgroundColor: theme.palette.background.default\r\n }\r\n}))\r\n// ─────────────────────────────────────────────────────────────── END STYLES ─────\r\n\r\n// AppMenu is the Menu of the app\r\nfunction AppMenu({ currentBody, onSelectedMenu }) {\r\n\r\n //\r\n // ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n const classes = useStyles()\r\n const { panelUser } = useContext(PanelUserContext)\r\n\r\n //\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n // const [currentTab, setCurrentTab] = useState(0)\r\n\r\n const fullMenu = [\r\n { id: 'dashboard', name: , component: , roles: ['admin', 'customer'] },\r\n { id: 'users', name: , component: , roles: ['admin'] },\r\n {\r\n id: 'series',\r\n name: ,\r\n component: ,\r\n roles: ['admin']\r\n },\r\n { id: 'colors', name: , component: , roles: ['admin'] },\r\n { id: 'catalogs', name: , component: , roles: ['admin'] },\r\n { id: 'documents', name: , component: , roles: ['admin', 'customer'] },\r\n { id: 'products', name: , component: , roles: ['admin'] },\r\n { id: 'contacts', name: , component: , roles: ['admin'] },\r\n { id: 'orders', name: , component: , roles: ['admin', 'customer'] },\r\n { id: 'quotations', name: , component: , roles: ['admin', 'customer'] },\r\n ].filter((element) => element.roles.includes(panelUser.type))\r\n\r\n return (\r\n \r\n\r\n \r\n \r\n {Logo}\r\n \r\n \r\n {/** Menu options */}\r\n \r\n {fullMenu.map(option => (\r\n onSelectedMenu(action, option)}>\r\n \r\n \r\n ))}\r\n \r\n \r\n );\r\n}\r\n\r\nconst TransitionMobileMenu = React.forwardRef(function Transition(props, ref) {\r\n return ;\r\n});\r\n\r\n// AppMenuMobile is the menu of the mobile app\r\nfunction AppMenuMobile({ openMobileMenu, setOpenMobileMenu, currentBody, onSelectedMenu }) {\r\n\r\n const theme = useTheme()\r\n const classes = useStyles()\r\n const { panelUser } = useContext(PanelUserContext)\r\n\r\n const inMobile = useMediaQuery(theme.breakpoints.down('md'))\r\n\r\n const fullMenu = [\r\n { id: 'dashboard', name: , component: , roles: ['admin', 'customer'] },\r\n { id: 'users', name: , component: , roles: ['admin'] },\r\n {\r\n id: 'series',\r\n name: ,\r\n component: ,\r\n roles: ['admin']\r\n },\r\n { id: 'colors', name: , component: , roles: ['admin'] },\r\n { id: 'catalogs', name: , component: , roles: ['admin'] },\r\n { id: 'documents', name: , component: , roles: ['admin', 'customer'] },\r\n { id: 'products', name: , component: , roles: ['admin'] },\r\n { id: 'contacts', name: , component: , roles: ['admin'] },\r\n { id: 'orders', name: , component: , roles: ['admin', 'customer'] },\r\n { id: 'quotations', name: , component: , roles: ['admin', 'customer'] },\r\n ].filter((element) => element.roles.includes(panelUser.type))\r\n\r\n const handleClose = () => {\r\n setOpenMobileMenu(false)\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ALUMACE\r\n \r\n \r\n \r\n
\r\n \r\n {fullMenu.map(option => (\r\n onSelectedMenu(action, option)}>\r\n \r\n \r\n ))}\r\n \r\n
\r\n )\r\n}\r\n\r\n//AppBody is the body of the app\r\nfunction AppBody({ currentBody }) {\r\n // ─── CONETXTS ───────────────────────────────────────────────────────────────────\r\n const classes = useStyles()\r\n\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n\r\n // ─── FUNCTIONS ──────────────────────────────────────────────────────────────────\r\n\r\n return (\r\n
\r\n
\r\n { currentBody.component}\r\n
\r\n )\r\n}\r\n\r\nfunction Home() {\r\n\r\n\r\n // ─── CONTEXTS ───────────────────────────────────────────────────────────────────\r\n const theme = useTheme()\r\n const classes = useStyles()\r\n const { Logout } = useContext(UtilitiesContext)\r\n const inMobile = useMediaQuery(theme.breakpoints.down('md'))\r\n\r\n // ─── STATES ─────────────────────────────────────────────────────────────────────\r\n const [page, setPage] = useState('loading')\r\n const [currentBody, setCurrentBody] = useState({\r\n id: 'dashboard', name: , component: , roles: ['admin', 'customer']\r\n })\r\n\r\n const [panelUser, setPanelUser] = useState(gvUserConnected)\r\n const [users, setUsers] = useState([])\r\n const [series, setSeries] = useState([])\r\n const [colors, setColors] = useState([])\r\n const [catalogs, setCatalogs] = useState([])\r\n const [documents, setDocuments] = useState([])\r\n const [products, setProducts] = useState([])\r\n const [contacts, setContacts] = useState([])\r\n const [orders, setOrders] = useState([])\r\n const [quotations, setQuotations] = useState([])\r\n\r\n const [openMobileMenu, setOpenMobileMenu] = useState(false)\r\n\r\n document.title = projectName + ` - ${langMessages.messages?.[panelUser.lang]?.['Website.Menu.Panel'] || 'Panel'}`\r\n\r\n // ─── FUNCTIONS ──────────────────────────────────────────────────────────────────\r\n\r\n const handleSelectedMenu = (_, option) => {\r\n setCurrentBody(option)\r\n setOpenMobileMenu(false)\r\n }\r\n\r\n const openSettings = () => {\r\n setCurrentBody({ id: 'settings', name: 'Settings', component: , roles: ['admin'] })\r\n }\r\n\r\n // effects for checking token\r\n useEffect(() => {\r\n\r\n let theUser\r\n try {\r\n theUser = JSON.parse(localStorage.getItem('user'))\r\n if (theUser.email.trim() === '') {\r\n Logout()\r\n return\r\n }\r\n } catch (_) {\r\n Logout()\r\n return\r\n }\r\n setGvUserConnected(theUser)\r\n\r\n const checkToken = () => {\r\n axiosSiteData.get(`/users/refresh-token/${theUser.email}`, axiosSiteDataConfig)\r\n .then(response => {\r\n\r\n setGvUserConnected({\r\n ...theUser,\r\n token: response.data.result\r\n })\r\n setPanelUser({ ...gvUserConnected, token: '' })\r\n setPage('default')\r\n })\r\n .catch(_ => {\r\n Logout()\r\n })\r\n }\r\n checkToken()\r\n\r\n let ticker = setInterval(() => {\r\n checkToken()\r\n }, 480000)\r\n\r\n // cancel timer\r\n return () => {\r\n clearInterval(ticker)\r\n }\r\n\r\n }, [Logout])\r\n\r\n return (\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {page === 'loading' && }\r\n {page === 'default' &&\r\n
\r\n \r\n\r\n {/** Menu */}\r\n \r\n {!inMobile && }\r\n\r\n\r\n {/** AppBar */}\r\n \r\n \r\n {/** Mobile Menu */}\r\n {inMobile &&\r\n setOpenMobileMenu(true)}>\r\n \r\n \r\n }\r\n {/** Title */}\r\n {!inMobile && \r\n ALUMACE\r\n }\r\n {/** Switch Theme */}\r\n {/* \r\n \r\n {panelUser.type === 'light'\r\n ?\r\n \r\n :\r\n \r\n }\r\n \r\n */}\r\n {/** Settings */}\r\n {panelUser.type === 'admin' &&\r\n \r\n openSettings()} style={{\r\n marginLeft: theme.spacing(1),\r\n color: 'white'\r\n }}>\r\n }\r\n\r\n {/** Logout */}\r\n \r\n Logout()} style={{\r\n marginLeft: theme.spacing(1),\r\n color: 'white'\r\n }}>\r\n \r\n {/** User name */}\r\n {panelUser.name}\r\n \r\n \r\n\r\n {/** AppBody */}\r\n \r\n
}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n )\r\n}\r\n\r\nexport default Home\r\n","import React from 'react'\r\nimport { BuilderComponent } from '@builder.io/react'\r\n\r\n\r\nfunction BodyBuilder({ bodyEntry }) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default BodyBuilder\r\n","import React, { useState } from 'react'\r\nimport { Grid, useMediaQuery, IconButton, Box, Dialog, Slide } from '@material-ui/core'\r\nimport { useTheme, makeStyles } from '@material-ui/core/styles'\r\n\r\n// Images\r\nimport Logo from '../../../res/images/logo.png'\r\n\r\n// Libs\r\nimport { NavLink, Link } from 'react-router-dom'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\n// Icons\r\nimport IconMenu from '@material-ui/icons/MenuTwoTone'\r\n\r\n// Others\r\nimport { Button } from '@builder.io/react'\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n\r\n headerRoot: {\r\n zIndex: 99,\r\n backgroundColor: theme.palette.background.default,\r\n display: 'flex', flexDirection: 'row', alignItems: 'center',\r\n boxShadow: theme.shadows[4],\r\n [theme.breakpoints.up('md')]: { padding: theme.spacing(1, 10) },\r\n [theme.breakpoints.down('md')]: { padding: theme.spacing(1, 3) }\r\n },\r\n navLlink: {\r\n color: theme.palette.text.primary,\r\n fontFamily: theme.typography.h1.fontFamily,\r\n fontSize: theme.typography.subtitle1.fontSize,\r\n [theme.breakpoints.down('md')]: { fontSize: 30 },\r\n fontWeight: \"bold\",\r\n textDecoration: 'none',\r\n // paddingLeft: theme.spacing(12)\r\n },\r\n\r\n navLinkSelected: {\r\n color: theme.palette.primary.main,\r\n textDecorationLine: 'underline'\r\n }\r\n}))\r\n\r\n// AppMenuMobile is the menu of the mobile app\r\nfunction AppMenuMobile({ openMobileMenu, setOpenMobileMenu }) {\r\n\r\n const theme = useTheme()\r\n const classes = useStyles()\r\n const inMobile = useMediaQuery(theme.breakpoints.down('md'))\r\n\r\n const handleClose = () => {\r\n setOpenMobileMenu(false)\r\n }\r\n\r\n return (\r\n \r\n \r\n {/** Company */}\r\n \r\n \r\n \r\n {/** Articles */}\r\n \r\n \r\n \r\n {/** Catalog */}\r\n \r\n \r\n \r\n {/** Reserved Area */}\r\n \r\n \r\n \r\n {/** Contact */}\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n )\r\n}\r\n\r\nconst TransitionMobileMenu = React.forwardRef(function Transition(props, ref) {\r\n return ;\r\n})\r\n\r\nfunction Header() {\r\n\r\n const theme = useTheme()\r\n const classes = useStyles()\r\n const [openMobileMenu, setOpenMobileMenu] = useState(false)\r\n\r\n const inMobile = useMediaQuery(theme.breakpoints.down('md'))\r\n\r\n return (\r\n
\r\n {/** Logo */}\r\n \r\n \"Alumace\"\r\n \r\n\r\n \r\n\r\n {/** Mobile Menu */}\r\n {inMobile &&\r\n setOpenMobileMenu(true)}>\r\n \r\n \r\n }\r\n\r\n {/** Menu */}\r\n \r\n\r\n {/** Switch Theme */}\r\n {/* \r\n {\r\n\r\n if (userConnected.theme === 'light') {\r\n setGvUserConnected({ ...userConnected, theme: 'dark' })\r\n } else {\r\n setGvUserConnected({ ...userConnected, theme: 'light' })\r\n }\r\n setUserConnected({ ...userConnected, theme: gvUserConnected.theme })\r\n }}\r\n >\r\n {userConnected.theme === 'light'\r\n ?\r\n \r\n :\r\n \r\n }\r\n \r\n */}\r\n
\r\n )\r\n}\r\n\r\nexport default Header","import React, { useContext } from 'react'\r\nimport { Button, Grid, Typography, Select, MenuItem, Box } from '@material-ui/core'\r\nimport { useTheme, makeStyles } from '@material-ui/core/styles'\r\n\r\n// Icons\r\nimport IconMail from '@material-ui/icons/MailTwoTone'\r\nimport IconPhone from '@material-ui/icons/PhoneTwoTone'\r\nimport IconLocation from '@material-ui/icons/PinDropTwoTone'\r\n\r\n// Images\r\n\r\n// Libs\r\nimport { NavLink } from 'react-router-dom'\r\nimport { FormattedMessage } from 'react-intl'\r\n\r\n// Others\r\nimport { gvUserConnected, langMessages, setGvUserConnected } from 'variables'\r\nimport { UserConnectedContext } from 'contexts'\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n\r\n footerRoot: {\r\n backgroundColor: 'rgba(29, 29, 41, 0.8)',\r\n display: 'flex', flexDirection: 'column', alignItems: 'center',\r\n },\r\n footerSection: {\r\n [theme.breakpoints.up('lg')]: { padding: theme.spacing(5, 10) },\r\n [theme.breakpoints.down('lg')]: { padding: theme.spacing(5, 3) }\r\n },\r\n footerSection1: {\r\n [theme.breakpoints.up('lg')]: { padding: theme.spacing(2, 10) },\r\n [theme.breakpoints.down('lg')]: { padding: theme.spacing(2, 3) }\r\n },\r\n colorWhite: {\r\n color: 'white'\r\n },\r\n navLlink: {\r\n color: 'white',\r\n fontFamily: theme.typography.fontFamily,\r\n fontSize: theme.typography.subtitle2.fontSize,\r\n textDecoration: 'underline',\r\n },\r\n\r\n navLinkSelected: {\r\n color: theme.palette.primary.main,\r\n textDecorationLine: 'underline'\r\n },\r\n\r\n buttonTextTransform: {\r\n textTransform: 'none'\r\n }\r\n}))\r\n\r\nfunction Footer() {\r\n\r\n const theme = useTheme()\r\n const classes = useStyles()\r\n const { userConnected, setUserConnected } = useContext(UserConnectedContext)\r\n\r\n //\r\n // ─── FUNTIONS ───────────────────────────────────────────────────────────────────\r\n const handleLanguage = (event) => {\r\n setGvUserConnected({...gvUserConnected, lang: event.target.value})\r\n setUserConnected(gvUserConnected)\r\n }\r\n\r\n return (\r\n
\r\n \r\n\r\n {/** Headquarters */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/** Email */}\r\n \r\n \r\n \r\n {/** Phone */}\r\n \r\n \r\n \r\n \r\n \r\n {/** Address */}\r\n \r\n \r\n \r\n \r\n \r\n\r\n {/** Subsidiary */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/** Email */}\r\n \r\n \r\n \r\n {/** Phone */}\r\n \r\n \r\n \r\n \r\n \r\n {/** Address */}\r\n \r\n \r\n \r\n \r\n \r\n {/** Language */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {langMessages.locales.map(lang => (\r\n {lang}\r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n {/** use full links */}\r\n \r\n \r\n \r\n \r\n {/** Company */}\r\n \r\n \r\n \r\n \r\n \r\n {/** Articles */}\r\n \r\n \r\n \r\n \r\n \r\n {/** Catalog */}\r\n \r\n \r\n \r\n \r\n \r\n {/** Reserved Area */}\r\n \r\n \r\n \r\n \r\n \r\n {/** Contact */}\r\n \r\n \r\n \r\n \r\n \r\n {/** Privacy Policy */}\r\n \r\n \r\n \r\n \r\n \r\n {/** Copyright*/}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n )\r\n}\r\n\r\nexport default Footer","import React, { Fragment } from 'react'\r\nimport { Box } from '@material-ui/core'\r\n\r\n// Libs\r\nimport BodyBuilder from './Builder/BodyBuilder'\r\n\r\n// Pages\r\nimport Header from './Header'\r\nimport Footer from './Footer'\r\n\r\n// Others\r\nimport { projectName } from '../../../variables'\r\n\r\nfunction Home() {\r\n\r\n document.title = projectName\r\n\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n