-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintcache
1 lines (1 loc) · 17.4 KB
/
.eslintcache
1
[{"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\index.js":"1","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\App.js":"2","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\reportWebVitals.js":"3","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\actions\\Actions.js":"4","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\clients\\Clients.js":"5","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\Analytics.js":"6","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\NavBar.js":"7","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\stores\\CRMStores.js":"8","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\actions\\AddClient.js":"9","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\actions\\UpdateClient.js":"10","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\stores\\updateStore.js":"11","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\charts\\TopEmployeesChart.js":"12","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\badges\\Badges.js":"13","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\badges\\Badge.js":"14","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\charts\\SalesByCountries.js":"15","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\charts\\SalesFromChart.js":"16","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\charts\\ClientAcquisition.js":"17"},{"size":791,"mtime":1610449941044,"results":"18","hashOfConfig":"19"},{"size":614,"mtime":1612133081360,"results":"20","hashOfConfig":"19"},{"size":362,"mtime":499162500000,"results":"21","hashOfConfig":"19"},{"size":379,"mtime":1612146588379,"results":"22","hashOfConfig":"19"},{"size":3442,"mtime":1612134572570,"results":"23","hashOfConfig":"19"},{"size":603,"mtime":1612146751725,"results":"24","hashOfConfig":"19"},{"size":1160,"mtime":1612134244609,"results":"25","hashOfConfig":"19"},{"size":3419,"mtime":1612132830055,"results":"26","hashOfConfig":"19"},{"size":5785,"mtime":1612146607255,"results":"27","hashOfConfig":"19"},{"size":2091,"mtime":1612146617600,"results":"28","hashOfConfig":"19"},{"size":1049,"mtime":1612146780866,"results":"29","hashOfConfig":"19"},{"size":701,"mtime":1612146689524,"results":"30","hashOfConfig":"19"},{"size":694,"mtime":1612146638808,"results":"31","hashOfConfig":"19"},{"size":798,"mtime":1612053921876,"results":"32","hashOfConfig":"19"},{"size":725,"mtime":1612146653426,"results":"33","hashOfConfig":"19"},{"size":1539,"mtime":1612146678523,"results":"34","hashOfConfig":"19"},{"size":607,"mtime":1612144242808,"results":"35","hashOfConfig":"19"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},"1tm8x67",{"filePath":"39","messages":"40","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"41","usedDeprecatedRules":"38"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"48","usedDeprecatedRules":"38"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"53","messages":"54","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"55","usedDeprecatedRules":"38"},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"60","messages":"61","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"64","messages":"65","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"66","usedDeprecatedRules":"38"},{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"69","messages":"70","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"71","messages":"72","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"73","messages":"74","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\index.js",[],["75","76"],"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\App.js",["77"],"import './App.css';\nimport React from 'react';\nimport NavBar from './components/NavBar';\nimport Clients from './components/clients/Clients';\nimport Actions from './components/actions/Actions';\nimport Analytics from './components/analytics/Analytics';\n\nimport { BrowserRouter as Router, Route, Link } from 'react-router-dom'\n\n\nexport default function App() {\n return (\n <Router>\n <NavBar />\n <Route path=\"/\" exact render={() => <Clients />} />\n <Route path=\"/actions\" exact render={() => <Actions />} />\n <Route path=\"/analytics\" exact render={() => <Analytics />} />\n </Router>\n );\n}\n\n\n","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\reportWebVitals.js",[],"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\actions\\Actions.js",[],"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\clients\\Clients.js",["78","79"],"import React, { useState, useEffect } from 'react'\r\nimport { inject, observer } from 'mobx-react'\r\nimport { withStyles, makeStyles } from '@material-ui/core/styles';\r\nimport { Table, Paper, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@material-ui/core'\r\n\r\nconst StyledTableCell = withStyles((theme) => ({\r\n head: {\r\n backgroundColor: '#cfd8dc',\r\n color: '#263238',\r\n fontSize: 18,\r\n },\r\n body: {\r\n fontSize: 14,\r\n },\r\n}))(TableCell);\r\n\r\nconst StyledTableRow = withStyles((theme) => ({\r\n root: {\r\n '&:nth-of-type(odd)': {\r\n backgroundColor: theme.palette.action.hover,\r\n },\r\n },\r\n}))(TableRow);\r\n\r\nfunction createData(surname, name, country, firstContact, email, sold, owner) {\r\n return { surname, name, country, firstContact, email, sold, owner };\r\n}\r\n\r\nconst useStyles = makeStyles({\r\n table: {\r\n minWidth: 700,\r\n },\r\n});\r\n\r\nconst Clients = inject(\"CRMStores\")(observer((props) => {\r\n\r\n const [relevantClients, setRelevantClients] = useState([...props.CRMStores.clients])\r\n const [input, setInput] = useState('')\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n await props.CRMStores.getClients()\r\n setRelevantClients(props.CRMStores.clients)\r\n console.log(relevantClients)\r\n }\r\n fetchData()\r\n }, [])\r\n\r\n useEffect(() => {\r\n let tempList = props.CRMStores.clients.filter(c => {\r\n return c.last.toLowerCase().includes(input.toLowerCase())\r\n })\r\n setRelevantClients(tempList)\r\n }, [input.length])\r\n\r\n const handleChange = (event) => setInput(event.target.value)\r\n\r\n const rows = relevantClients && relevantClients.map(c => {\r\n return (createData(\r\n c.last, c.first, c.country, c.date, c.email, c.sold, c.owner))\r\n })\r\n\r\n const classes = useStyles();\r\n return (\r\n <>\r\n <input className='findClient' value={input} onChange={handleChange} placeholder='name'></input>\r\n <TableContainer component={Paper}>\r\n <Table className={classes.table} aria-label=\"customized table\">\r\n <TableHead>\r\n <TableRow>\r\n <StyledTableCell align=\"center\">Surname</StyledTableCell>\r\n <StyledTableCell align=\"center\">Name</StyledTableCell>\r\n <StyledTableCell align=\"center\">Country</StyledTableCell>\r\n <StyledTableCell align=\"center\">First Contact</StyledTableCell>\r\n <StyledTableCell align=\"center\">Email</StyledTableCell>\r\n <StyledTableCell align=\"center\">Sold</StyledTableCell>\r\n <StyledTableCell align=\"center\">Owner</StyledTableCell>\r\n </TableRow>\r\n </TableHead>\r\n <TableBody>\r\n {rows.length && rows.map((row) => (\r\n <StyledTableRow >\r\n <StyledTableCell align=\"center\">{row.surname}</StyledTableCell>\r\n <StyledTableCell align=\"center\">{row.name}</StyledTableCell>\r\n <StyledTableCell align=\"center\">{row.country}</StyledTableCell>\r\n <StyledTableCell align=\"center\">{row.firstContact}</StyledTableCell>\r\n <StyledTableCell align=\"center\">{row.email}</StyledTableCell>\r\n <StyledTableCell align=\"center\">{row.sold}</StyledTableCell>\r\n <StyledTableCell align=\"center\">{row.owner}</StyledTableCell>\r\n </StyledTableRow>\r\n ))}\r\n </TableBody>\r\n </Table>\r\n </TableContainer>\r\n </>\r\n )\r\n}))\r\n\r\nexport default Clients\r\n","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\Analytics.js",[],"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\NavBar.js",[],"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\stores\\CRMStores.js",["80","81","82","83"],"import { observable, computed, action, makeObservable } from 'mobx'\r\nimport axios from 'axios'\r\n\r\n\r\nexport class CRMStores {\r\n constructor() {\r\n this.clients = []\r\n this.owners = []\r\n this.emailTypes = []\r\n this.chartsData = []\r\n\r\n makeObservable(this, {\r\n clients: observable,\r\n owners: observable,\r\n emailTypes: observable,\r\n getClients: action,\r\n getOwners: action,\r\n getHottestCountry: action,\r\n addClient: action,\r\n getEmailTypes: action,\r\n addClient: action,\r\n updateEmailType: action,\r\n newClients: computed,\r\n emailsSent: computed,\r\n outstandingClients: computed,\r\n getBudgetsData: action,\r\n getChartsData: action,\r\n chartsData: observable\r\n\r\n })\r\n }\r\n\r\n async getClients() {\r\n let data = await axios.get(\"http://localhost:3002/clients\")\r\n this.clients = data.data[0]\r\n }\r\n\r\n async getOwners() {\r\n let data = await axios.get(\"http://localhost:3002/owners\")\r\n this.owners = data.data[0]\r\n }\r\n\r\n async getEmailTypes() {\r\n let data = await axios.get(\"http://localhost:3002/email\")\r\n this.emailTypes = data.data[0]\r\n }\r\n\r\n async getHottestCountry() {\r\n let data = await axios.get(\"http://localhost:3002/hottestCountry\")\r\n return data.data.category\r\n }\r\n\r\n async addClient(newClient) {\r\n await axios.post('http://localhost:3002/client', newClient)\r\n this.getClients()\r\n }\r\n async updateEmailType(name, newType) {\r\n await axios.put(`http://localhost:3002/client/${name}`, newType)\r\n this.getClients()\r\n }\r\n\r\n async updateOwner(name, newOwner) {\r\n await axios.put(`http://localhost:3002/client/${name}`, newOwner)\r\n this.getClients()\r\n }\r\n\r\n async updateSold(name, newValue) {\r\n await axios.put(`http://localhost:3002/client/${name}`, newValue)\r\n this.getClients()\r\n }\r\n\r\n get newClients() {\r\n const currentDate = new Date().toLocaleDateString()\r\n const newClientsList = this.clients.filter(c => c.date.slice(1)[0] == currentDate[0] && c.date.slice(6) == currentDate.slice(5))\r\n return newClientsList.length\r\n }\r\n\r\n get emailsSent() {\r\n return this.clients.filter(c => c.email_type !== null).length\r\n }\r\n\r\n get outstandingClients() {\r\n return this.clients.filter(c => c.sold == 0).length\r\n }\r\n\r\n async getBudgetsData() {\r\n let data = await this.getHottestCountry()\r\n const newClients = { value: this.newClients, title: 'New Clients this Month', icon: 'faChartLine', color: 'green' }\r\n const emailsSent = { value: this.emailsSent, title: 'Emails Sent', icon: 'faEnvelope', color: 'blue' }\r\n const outStandingClients = { value: this.outstandingClients, title: 'Outstanding Clients', icon: 'faUserCircle', color: 'red' }\r\n const hottestCountry = { value: data, title: 'Hottest Country', icon: 'faGlobeAmericas', color: 'yellow' }\r\n const budgetsData = [newClients, emailsSent, outStandingClients, hottestCountry]\r\n return budgetsData\r\n }\r\n\r\n async getChartsData() {\r\n let data = await axios.get(\"http://localhost:3002/chartsData\")\r\n console.log(data.data);\r\n this.chartsData = data.data\r\n }\r\n \r\n}\r\n\r\n","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\actions\\AddClient.js",[],"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\actions\\UpdateClient.js",[],"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\stores\\updateStore.js",[],"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\charts\\TopEmployeesChart.js",[],"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\badges\\Badges.js",["84"],"import React, { useState, useEffect } from 'react';\r\nimport { observer, inject } from 'mobx-react'\r\nimport Budge from './Badge'\r\n\r\nconst Budges = inject(\"CRMStores\")(observer((props) => {\r\n const [budges, setBudges] = useState([])\r\n useEffect(() => {\r\n const getData = async () => {\r\n await props.CRMStores.getClients()\r\n let data = await props.CRMStores.getBudgetsData()\r\n await props.CRMStores.getChartsData()\r\n setBudges(data)\r\n }\r\n getData()\r\n }, [])\r\n\r\n return (\r\n <div className=\"budges\">\r\n {budges && budges.map(b => <Budge budge={b} />)}\r\n </div>\r\n )\r\n}))\r\n\r\nexport default Budges;","C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\badges\\Badge.js",[],"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\charts\\SalesByCountries.js",[],"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\charts\\SalesFromChart.js",[],"C:\\Users\\natal\\code\\Elevation_Projects\\crm\\src\\components\\analytics\\charts\\ClientAcquisition.js",[],{"ruleId":"85","replacedBy":"86"},{"ruleId":"87","replacedBy":"88"},{"ruleId":"89","severity":1,"message":"90","line":8,"column":42,"nodeType":"91","messageId":"92","endLine":8,"endColumn":46},{"ruleId":"93","severity":1,"message":"94","line":47,"column":6,"nodeType":"95","endLine":47,"endColumn":8,"suggestions":"96"},{"ruleId":"93","severity":1,"message":"97","line":54,"column":6,"nodeType":"95","endLine":54,"endColumn":20,"suggestions":"98"},{"ruleId":"99","severity":1,"message":"100","line":21,"column":13,"nodeType":"101","messageId":"102","endLine":21,"endColumn":22},{"ruleId":"103","severity":1,"message":"104","line":74,"column":76,"nodeType":"105","messageId":"102","endLine":74,"endColumn":78},{"ruleId":"103","severity":1,"message":"104","line":74,"column":113,"nodeType":"105","messageId":"102","endLine":74,"endColumn":115},{"ruleId":"103","severity":1,"message":"104","line":83,"column":48,"nodeType":"105","messageId":"102","endLine":83,"endColumn":50},{"ruleId":"93","severity":1,"message":"106","line":15,"column":8,"nodeType":"95","endLine":15,"endColumn":10,"suggestions":"107"},"no-native-reassign",["108"],"no-negated-in-lhs",["109"],"no-unused-vars","'Link' is defined but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'props.CRMStores' and 'relevantClients'. Either include them or remove the dependency array.","ArrayExpression",["110"],"React Hook useEffect has missing dependencies: 'input' and 'props.CRMStores.clients'. Either include them or remove the dependency array.",["111"],"no-dupe-keys","Duplicate key 'addClient'.","ObjectExpression","unexpected","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","React Hook useEffect has a missing dependency: 'props.CRMStores'. Either include it or remove the dependency array.",["112"],"no-global-assign","no-unsafe-negation",{"desc":"113","fix":"114"},{"desc":"115","fix":"116"},{"desc":"117","fix":"118"},"Update the dependencies array to be: [props.CRMStores, relevantClients]",{"range":"119","text":"120"},"Update the dependencies array to be: [input, input.length, props.CRMStores.clients]",{"range":"121","text":"122"},"Update the dependencies array to be: [props.CRMStores]",{"range":"123","text":"124"},[1292,1294],"[props.CRMStores, relevantClients]",[1490,1504],"[input, input.length, props.CRMStores.clients]",[525,527],"[props.CRMStores]"]