katoikia-app/web-ui/web-react/node_modules/.cache/babel-loader/c51aacc20ed95ab158c938a7d63...

1 line
73 KiB
JSON
Raw Normal View History

2022-07-06 04:15:11 +00:00
{"ast":null,"code":"import _slicedToArray from \"/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\n\nvar _this = this,\n _jsxFileName = \"/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/src/components/Dashboard.js\";\n\nimport React, { useState, useEffect, useRef } from 'react';\nimport { Menu } from 'primereact/menu';\nimport { Button } from 'primereact/button';\nimport { Chart } from 'primereact/chart';\nimport { DataTable } from 'primereact/datatable';\nimport { Column } from 'primereact/column';\nimport { ProductService } from '../service/ProductService';\nvar lineData = {\n labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],\n datasets: [{\n label: 'First Dataset',\n data: [65, 59, 80, 81, 56, 55, 40],\n fill: false,\n backgroundColor: '#2f4860',\n borderColor: '#2f4860',\n tension: .4\n }, {\n label: 'Second Dataset',\n data: [28, 48, 40, 19, 86, 27, 90],\n fill: false,\n backgroundColor: '#00bb7e',\n borderColor: '#00bb7e',\n tension: .4\n }]\n};\n\nvar Dashboard = function Dashboard(props) {\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n products = _useState2[0],\n setProducts = _useState2[1];\n\n var menu1 = useRef(null);\n var menu2 = useRef(null);\n\n var _useState3 = useState(null),\n _useState4 = _slicedToArray(_useState3, 2),\n lineOptions = _useState4[0],\n setLineOptions = _useState4[1];\n\n var applyLightTheme = function applyLightTheme() {\n var lineOptions = {\n plugins: {\n legend: {\n labels: {\n color: '#495057'\n }\n }\n },\n scales: {\n x: {\n ticks: {\n color: '#495057'\n },\n grid: {\n color: '#ebedef'\n }\n },\n y: {\n ticks: {\n color: '#495057'\n },\n grid: {\n color: '#ebedef'\n }\n }\n }\n };\n setLineOptions(lineOptions);\n };\n\n var applyDarkTheme = function applyDarkTheme() {\n var lineOptions = {\n plugins: {\n legend: {\n labels: {\n color: '#ebedef'\n }\n }\n },\n scales: {\n x: {\n ticks: {\n color: '#ebedef'\n },\n grid: {\n color: 'rgba(160, 167, 181, .3)'\n }\n },\n y: {\n ticks: {\n color: '#ebedef'\n },\n grid: {\n color: 'rgba(160, 167, 181, .3)'\n }\n }\n }\n };\n setLineOptions(lineOptions);\n };\n\n useEffect(function () {\n var productService = new ProductService();\n productService.getProductsSmall().then(function (data) {\n return setProducts(data);\n });\n }, []);\n useEffect(function () {\n if (props.colorMode === 'light') {\n applyLightTheme();\n } else {\n applyDarkTheme();\n }\n }, [props.colorMode]);\n\n var formatCurrency = function formatCurrency(value) {\n return value.toLocaleString('en-US', {\n style: 'currency',\n currency: 'USD'\n });\n };\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"grid\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 119,\n columnNumber: 9\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-12 lg:col-6 xl:col-3\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 120,\n columnNumber: 13\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"card mb-0\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 121,\n columnNumber: 17\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"flex justify-content-between mb-3\",\n __self: _this,\n __source: {\n fil