Migration to Vite.
This commit is contained in:
parent
e7fe26f2da
commit
4c3d37a7d0
@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": [
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:prettier/recommended",
|
|
||||||
"plugin:react/recommended",
|
|
||||||
"plugin:react-hooks/recommended"
|
|
||||||
],
|
|
||||||
"env": {
|
|
||||||
"browser": true, // Allows access to browser globals like `localStorage`
|
|
||||||
"node": true, // If you're also using Node.js
|
|
||||||
"es2021": true // Use ECMAScript 2021 features
|
|
||||||
},
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": "latest",
|
|
||||||
"sourceType": "module",
|
|
||||||
"ecmaFeatures": {
|
|
||||||
"jsx": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"settings": {
|
|
||||||
"react": {
|
|
||||||
"version": "detect" // Automatically detect the React version
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"camelcase": ["error", { "properties": "always" }],
|
|
||||||
"multiline-ternary": ["error", "never"],
|
|
||||||
"no-debugger": "off",
|
|
||||||
"no-console": "warn"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
38
eslint.config.js
Normal file
38
eslint.config.js
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import js from '@eslint/js'
|
||||||
|
import globals from 'globals'
|
||||||
|
import react from 'eslint-plugin-react'
|
||||||
|
import reactHooks from 'eslint-plugin-react-hooks'
|
||||||
|
import reactRefresh from 'eslint-plugin-react-refresh'
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{ ignores: ['dist'] },
|
||||||
|
{
|
||||||
|
files: ['**/*.{js,jsx}'],
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: 2020,
|
||||||
|
globals: globals.browser,
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 'latest',
|
||||||
|
ecmaFeatures: { jsx: true },
|
||||||
|
sourceType: 'module'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
settings: { react: { version: '18.3' } },
|
||||||
|
plugins: {
|
||||||
|
react,
|
||||||
|
'react-hooks': reactHooks,
|
||||||
|
'react-refresh': reactRefresh
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
...js.configs.recommended.rules,
|
||||||
|
...react.configs.recommended.rules,
|
||||||
|
...react.configs['jsx-runtime'].rules,
|
||||||
|
...reactHooks.configs.recommended.rules,
|
||||||
|
'react/jsx-no-target-blank': 'off',
|
||||||
|
'react-refresh/only-export-components': [
|
||||||
|
'warn',
|
||||||
|
{ allowConstantExport: true }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
22
index.html
Normal file
22
index.html
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="theme-color" content="#000000" />
|
||||||
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="Web site created using create-react-app"
|
||||||
|
/>
|
||||||
|
<link rel="apple-touch-icon" href="/logo192.png" />
|
||||||
|
<link rel="manifest" href="/manifest.json" />
|
||||||
|
<link rel="stylesheet" href="/fonts/fonts.css" />
|
||||||
|
<script type="module" src="/src/index.jsx"></script>
|
||||||
|
<title>Farm Control</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
<div id="root"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
13729
package-lock.json
generated
13729
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
21
package.json
21
package.json
@ -40,6 +40,7 @@
|
|||||||
"eslint-plugin-prettier": "^5.5.4",
|
"eslint-plugin-prettier": "^5.5.4",
|
||||||
"eslint-plugin-react": "^7.37.5",
|
"eslint-plugin-react": "^7.37.5",
|
||||||
"eslint-plugin-react-hooks": "^5.2.0",
|
"eslint-plugin-react-hooks": "^5.2.0",
|
||||||
|
"eslint-plugin-react-refresh": "^0.4.20",
|
||||||
"gcode-preview": "^2.18.0",
|
"gcode-preview": "^2.18.0",
|
||||||
"keycloak-js": "^26.2.0",
|
"keycloak-js": "^26.2.0",
|
||||||
"loglevel": "^1.9.2",
|
"loglevel": "^1.9.2",
|
||||||
@ -53,7 +54,6 @@
|
|||||||
"react-markdown": "^10.1.0",
|
"react-markdown": "^10.1.0",
|
||||||
"react-responsive": "^10.0.1",
|
"react-responsive": "^10.0.1",
|
||||||
"react-router-dom": "^7.8.0",
|
"react-router-dom": "^7.8.0",
|
||||||
"react-scripts": "^5.0.1",
|
|
||||||
"react-stl-viewer": "^2.5.0",
|
"react-stl-viewer": "^2.5.0",
|
||||||
"remark-gfm": "^4.0.1",
|
"remark-gfm": "^4.0.1",
|
||||||
"socket.io-client": "*",
|
"socket.io-client": "*",
|
||||||
@ -63,27 +63,22 @@
|
|||||||
"svgo-loader": "^4.0.0",
|
"svgo-loader": "^4.0.0",
|
||||||
"three": "^0.179.1",
|
"three": "^0.179.1",
|
||||||
"tsparticles": "^3.9.1",
|
"tsparticles": "^3.9.1",
|
||||||
"web-vitals": "^5.1.0",
|
"web-vitals": "^5.1.0"
|
||||||
"webpack": "^5.101.1",
|
|
||||||
"webpack-cli": "^6.0.1"
|
|
||||||
},
|
},
|
||||||
"main": "build/electron.js",
|
"main": "build/electron.js",
|
||||||
"description": "3D Printer ERP and Control Software.",
|
"description": "3D Printer ERP and Control Software.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "react-scripts start",
|
"dev": "vite",
|
||||||
"electron": "ELECTRON_START_URL=http://192.168.68.53:3000 electron .",
|
"electron": "ELECTRON_START_URL=http://192.168.68.53:3000 electron .",
|
||||||
"start": "serve -s build",
|
"start": "serve -s build",
|
||||||
"build": "react-scripts build",
|
"build": "vite build",
|
||||||
"test": "react-scripts test",
|
|
||||||
"eject": "react-scripts eject",
|
|
||||||
"minify-svgs": "node scripts/minify-svgs.js",
|
"minify-svgs": "node scripts/minify-svgs.js",
|
||||||
"dev:electron": "concurrently \"react-scripts start\" \"ELECTRON_START_URL=http://192.168.68.53:3000 electron public/electron.js\"",
|
"dev:electron": "concurrently \"react-scripts start\" \"ELECTRON_START_URL=http://192.168.68.53:3000 electron public/electron.js\"",
|
||||||
"build:electron": "npm run build && electron-builder"
|
"build:electron": "npm run build && electron-builder"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": [
|
"extends": [
|
||||||
"react-app",
|
"react-app"
|
||||||
"react-app/jest"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
@ -100,6 +95,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
||||||
|
"@vitejs/plugin-react": "^5.0.1",
|
||||||
"concurrently": "^9.2.0",
|
"concurrently": "^9.2.0",
|
||||||
"electron": "^37.2.6",
|
"electron": "^37.2.6",
|
||||||
"electron-builder": "^26.0.12",
|
"electron-builder": "^26.0.12",
|
||||||
@ -115,8 +111,9 @@
|
|||||||
"standard": "^17.1.2",
|
"standard": "^17.1.2",
|
||||||
"svgo": "^4.0.0",
|
"svgo": "^4.0.0",
|
||||||
"svgo-loader": "^4.0.0",
|
"svgo-loader": "^4.0.0",
|
||||||
"webpack": "^5.101.1",
|
"vite": "^7.1.3",
|
||||||
"webpack-cli": "^6.0.1"
|
"vite-plugin-eslint": "^1.8.1",
|
||||||
|
"vite-plugin-svgr": "^4.3.0"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"appId": "com.tombutcher.farmcontrol",
|
"appId": "com.tombutcher.farmcontrol",
|
||||||
|
|||||||
@ -17,8 +17,8 @@ function createWindow() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// For development, load from localhost; for production, load the built index.html
|
// For development, load from localhost; for production, load the built index.html
|
||||||
if (process.env.ELECTRON_START_URL) {
|
if (import.meta.env.ELECTRON_START_URL) {
|
||||||
win.loadURL(process.env.ELECTRON_START_URL)
|
win.loadURL(import.meta.env.ELECTRON_START_URL)
|
||||||
} else {
|
} else {
|
||||||
win.loadFile(path.join(__dirname, '../build/index.html'))
|
win.loadFile(path.join(__dirname, '../build/index.html'))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,44 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<meta name="theme-color" content="#000000" />
|
|
||||||
<meta
|
|
||||||
name="description"
|
|
||||||
content="Web site created using create-react-app"
|
|
||||||
/>
|
|
||||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
||||||
<!--
|
|
||||||
manifest.json provides metadata used when your web app is installed on a
|
|
||||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
||||||
-->
|
|
||||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
||||||
<!--
|
|
||||||
Notice the use of %PUBLIC_URL% in the tags above.
|
|
||||||
It will be replaced with the URL of the `public` folder during the build.
|
|
||||||
Only files inside the `public` folder can be referenced from the HTML.
|
|
||||||
|
|
||||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
||||||
work correctly both with client-side routing and a non-root public URL.
|
|
||||||
Learn how to configure a non-root public URL by running `npm run build`.
|
|
||||||
-->
|
|
||||||
<link rel="stylesheet" href="%PUBLIC_URL%/fonts/fonts.css" />
|
|
||||||
<title>Farm Control</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
||||||
<div id="root"></div>
|
|
||||||
<!--
|
|
||||||
This HTML file is a template.
|
|
||||||
If you open it directly in the browser, you will see an empty page.
|
|
||||||
|
|
||||||
You can add webfonts, meta tags, or analytics to this file.
|
|
||||||
The build step will place the bundled scripts into the <body> tag.
|
|
||||||
|
|
||||||
To begin the development, run `npm start` or `yarn start`.
|
|
||||||
To create a production bundle, use `npm run build` or `yarn build`.
|
|
||||||
-->
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
11
src/App.jsx
11
src/App.jsx
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import {
|
import {
|
||||||
HashRouter,
|
HashRouter,
|
||||||
BrowserRouter,
|
BrowserRouter,
|
||||||
@ -11,17 +10,17 @@ import { App, ConfigProvider } from 'antd'
|
|||||||
import Dashboard from './components/Dashboard/Dashboard.jsx'
|
import Dashboard from './components/Dashboard/Dashboard.jsx'
|
||||||
import PrivateRoute from './components/PrivateRoute'
|
import PrivateRoute from './components/PrivateRoute'
|
||||||
import './assets/stylesheets/App.css'
|
import './assets/stylesheets/App.css'
|
||||||
import { PrintServerProvider } from './components/Dashboard/context/PrintServerContext.js'
|
import { PrintServerProvider } from './components/Dashboard/context/PrintServerContext.jsx'
|
||||||
import { AuthProvider } from './components/Dashboard/context/AuthContext.js'
|
import { AuthProvider } from './components/Dashboard/context/AuthContext.jsx'
|
||||||
import { SpotlightProvider } from './components/Dashboard/context/SpotlightContext.js'
|
import { SpotlightProvider } from './components/Dashboard/context/SpotlightContext.jsx'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ThemeProvider,
|
ThemeProvider,
|
||||||
useThemeContext
|
useThemeContext
|
||||||
} from './components/Dashboard/context/ThemeContext'
|
} from './components/Dashboard/context/ThemeContext'
|
||||||
import AppError from './components/App/AppError'
|
import AppError from './components/App/AppError'
|
||||||
import { ApiServerProvider } from './components/Dashboard/context/ApiServerContext.js'
|
import { ApiServerProvider } from './components/Dashboard/context/ApiServerContext.jsx'
|
||||||
import { ElectronProvider } from './components/Dashboard/context/ElectronContext.js'
|
import { ElectronProvider } from './components/Dashboard/context/ElectronContext.jsx'
|
||||||
import AuthCallback from './components/App/AuthCallback.jsx'
|
import AuthCallback from './components/App/AuthCallback.jsx'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { Flex, Card, Alert, Button } from 'antd'
|
import { Flex, Card, Alert, Button } from 'antd'
|
||||||
import AuthParticles from './AppParticles'
|
import AuthParticles from './AppParticles'
|
||||||
import FarmControlLogo from '../Logos/FarmControlLogo'
|
import FarmControlLogo from '../Logos/FarmControlLogo'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
import { Flex, Card, Alert } from 'antd'
|
import { Flex, Card, Alert } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
import AuthParticles from './AppParticles'
|
import AuthParticles from './AppParticles'
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useState, useEffect, useMemo, useCallback } from 'react'
|
import { useState, useEffect, useMemo, useCallback, memo } from 'react'
|
||||||
import Particles, { initParticlesEngine } from '@tsparticles/react'
|
import Particles, { initParticlesEngine } from '@tsparticles/react'
|
||||||
import { loadSlim } from '@tsparticles/slim'
|
import { loadSlim } from '@tsparticles/slim'
|
||||||
import { useThemeContext } from '../Dashboard/context/ThemeContext'
|
import { useThemeContext } from '../Dashboard/context/ThemeContext'
|
||||||
|
|
||||||
const ParticlesComponent = React.memo(({ options, particlesLoaded }) => {
|
const ParticlesComponent = memo(({ options, particlesLoaded }) => {
|
||||||
return (
|
return (
|
||||||
<Particles
|
<Particles
|
||||||
id='tsparticles'
|
id='tsparticles'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useEffect, useContext, useCallback } from 'react'
|
import { useState, useEffect, useContext, useCallback } from 'react'
|
||||||
import { Flex, Card, Alert } from 'antd'
|
import { Flex, Card, Alert } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
import AuthParticles from './AppParticles'
|
import AuthParticles from './AppParticles'
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
// Dashboard.js
|
// Dashboard.js
|
||||||
import React from 'react'
|
|
||||||
import Layout from './Layout'
|
import Layout from './Layout'
|
||||||
import { Outlet } from 'react-router-dom'
|
import { Outlet } from 'react-router-dom'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useContext } from 'react'
|
import { useContext } from 'react'
|
||||||
import {
|
import {
|
||||||
Descriptions,
|
Descriptions,
|
||||||
Button,
|
Button,
|
||||||
@ -9,7 +9,7 @@ import {
|
|||||||
message
|
message
|
||||||
} from 'antd'
|
} from 'antd'
|
||||||
import ReloadIcon from '../../Icons/ReloadIcon.jsx'
|
import ReloadIcon from '../../Icons/ReloadIcon.jsx'
|
||||||
import { AuthContext } from '../context/AuthContext.js'
|
import { AuthContext } from '../context/AuthContext.jsx'
|
||||||
import BoolDisplay from '../common/BoolDisplay.jsx'
|
import BoolDisplay from '../common/BoolDisplay.jsx'
|
||||||
|
|
||||||
const { Text, Paragraph } = Typography
|
const { Text, Paragraph } = Typography
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import DashboardSidebar from '../common/DashboardSidebar'
|
import DashboardSidebar from '../common/DashboardSidebar'
|
||||||
import { Typography } from 'antd'
|
import { Typography } from 'antd'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useContext } from 'react'
|
import { useContext } from 'react'
|
||||||
import {
|
import {
|
||||||
Descriptions,
|
Descriptions,
|
||||||
Button,
|
Button,
|
||||||
@ -9,7 +9,7 @@ import {
|
|||||||
message
|
message
|
||||||
} from 'antd'
|
} from 'antd'
|
||||||
import ReloadIcon from '../../Icons/ReloadIcon.jsx'
|
import ReloadIcon from '../../Icons/ReloadIcon.jsx'
|
||||||
import { PrintServerContext } from '../context/PrintServerContext.js'
|
import { PrintServerContext } from '../context/PrintServerContext.jsx'
|
||||||
import BoolDisplay from '../common/BoolDisplay.jsx'
|
import BoolDisplay from '../common/BoolDisplay.jsx'
|
||||||
|
|
||||||
const { Text, Paragraph } = Typography
|
const { Text, Paragraph } = Typography
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { Descriptions, Button, Typography, Flex, Space, Dropdown } from 'antd'
|
import { Descriptions, Button, Typography, Flex, Space, Dropdown } from 'antd'
|
||||||
import ReloadIcon from '../../Icons/ReloadIcon'
|
import ReloadIcon from '../../Icons/ReloadIcon'
|
||||||
import BoolDisplay from '../common/BoolDisplay'
|
import BoolDisplay from '../common/BoolDisplay'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// src/filamentStocks.js
|
// src/filamentStocks.js
|
||||||
|
|
||||||
import React, { useState, useRef } from 'react'
|
import { useState, useRef } from 'react'
|
||||||
|
|
||||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card } from 'antd'
|
import { Space, Flex, Card } from 'antd'
|
||||||
import useCollapseState from '../../hooks/useCollapseState'
|
import useCollapseState from '../../hooks/useCollapseState'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useContext, useEffect } from 'react'
|
import { useState, useContext, useEffect } from 'react'
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
Button,
|
Button,
|
||||||
@ -103,7 +103,7 @@ const LoadFilamentStock = ({
|
|||||||
}
|
}
|
||||||
}, [printServer, loadFilamentStockFormValues.printer])
|
}, [printServer, loadFilamentStockFormValues.printer])
|
||||||
|
|
||||||
React.useEffect(() => {
|
useEffect(() => {
|
||||||
loadFilamentStockForm
|
loadFilamentStockForm
|
||||||
.validateFields({
|
.validateFields({
|
||||||
validateOnly: true
|
validateOnly: true
|
||||||
@ -158,7 +158,7 @@ const LoadFilamentStock = ({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
React.useEffect(() => {
|
useEffect(() => {
|
||||||
if (reset) {
|
if (reset) {
|
||||||
loadFilamentStockForm.resetFields()
|
loadFilamentStockForm.resetFields()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useContext, useEffect } from 'react'
|
import { useState, useContext, useEffect } from 'react'
|
||||||
import { Form, Button, Typography, Flex, Steps, Divider, Alert } from 'antd'
|
import { Form, Button, Typography, Flex, Steps, Divider, Alert } from 'antd'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
@ -77,13 +77,13 @@ const UnloadFilamentStock = ({ onOk, reset, printer = null }) => {
|
|||||||
}
|
}
|
||||||
}, [printServer, unloadFilamentStockFormValues.printer])
|
}, [printServer, unloadFilamentStockFormValues.printer])
|
||||||
|
|
||||||
React.useEffect(() => {
|
useEffect(() => {
|
||||||
if (reset) {
|
if (reset) {
|
||||||
unloadFilamentStockForm.resetFields()
|
unloadFilamentStockForm.resetFields()
|
||||||
}
|
}
|
||||||
}, [reset, unloadFilamentStockForm])
|
}, [reset, unloadFilamentStockForm])
|
||||||
|
|
||||||
React.useEffect(() => {
|
useEffect(() => {
|
||||||
unloadFilamentStockForm
|
unloadFilamentStockForm
|
||||||
.validateFields({
|
.validateFields({
|
||||||
validateOnly: true
|
validateOnly: true
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import DashboardSidebar from '../common/DashboardSidebar'
|
import DashboardSidebar from '../common/DashboardSidebar'
|
||||||
import { DashboardOutlined } from '@ant-design/icons'
|
import { DashboardOutlined } from '@ant-design/icons'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// src/partStocks.js
|
// src/partStocks.js
|
||||||
|
|
||||||
import React, { useState, useContext, useRef } from 'react'
|
import { useState, useContext, useRef } from 'react'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import { Button, Flex, Space, Modal, message, Dropdown, Typography } from 'antd'
|
import { Button, Flex, Space, Modal, message, Dropdown, Typography } from 'antd'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
import { Form, Input, Button, Space, Select, InputNumber } from 'antd'
|
import { Form, Input, Button, Space, Select, InputNumber } from 'antd'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useContext, useRef } from 'react'
|
import { useState, useContext, useRef, useEffect } from 'react'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import { Button, Flex, Space, message, Dropdown, Typography } from 'antd'
|
import { Button, Flex, Space, message, Dropdown, Typography } from 'antd'
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ const StockAudits = () => {
|
|||||||
|
|
||||||
const { authenticated } = useContext(AuthContext)
|
const { authenticated } = useContext(AuthContext)
|
||||||
|
|
||||||
React.useEffect(() => {
|
useEffect(() => {
|
||||||
if (printServer && !initialized) {
|
if (printServer && !initialized) {
|
||||||
setInitialized(true)
|
setInitialized(true)
|
||||||
printServer.on('notify_stockaudit_update', (updateData) => {
|
printServer.on('notify_stockaudit_update', (updateData) => {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect, useState, useContext } from 'react'
|
import { useEffect, useState, useContext } from 'react'
|
||||||
import { useLocation, useNavigate } from 'react-router-dom'
|
import { useLocation, useNavigate } from 'react-router-dom'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import {
|
import {
|
||||||
@ -59,6 +59,7 @@ const StockAuditInfo = () => {
|
|||||||
setStockAudit(response.data)
|
setStockAudit(response.data)
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
messageApi.error('Failed to fetch stock audit details')
|
messageApi.error('Failed to fetch stock audit details')
|
||||||
navigate('/dashboard/inventory/stockaudits')
|
navigate('/dashboard/inventory/stockaudits')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useRef } from 'react'
|
import { useRef } from 'react'
|
||||||
import { Button, Flex, Space, Dropdown } from 'antd'
|
import { Button, Flex, Space, Dropdown } from 'antd'
|
||||||
import useColumnVisibility from '../hooks/useColumnVisibility'
|
import useColumnVisibility from '../hooks/useColumnVisibility'
|
||||||
import ObjectTable from '../common/ObjectTable'
|
import ObjectTable from '../common/ObjectTable'
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
// DashboardLayout.js
|
// DashboardLayout.js
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React from 'react'
|
|
||||||
import { Layout, Flex } from 'antd'
|
import { Layout, Flex } from 'antd'
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import ProductionSidebar from './Production/ProductionSidebar'
|
import ProductionSidebar from './Production/ProductionSidebar'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useRef } from 'react'
|
import { useRef } from 'react'
|
||||||
import { Button, Flex, Space, Dropdown } from 'antd'
|
import { Button, Flex, Space, Dropdown } from 'antd'
|
||||||
|
|
||||||
import ReloadIcon from '../../Icons/ReloadIcon'
|
import ReloadIcon from '../../Icons/ReloadIcon'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useRef } from 'react'
|
import { useRef } from 'react'
|
||||||
import { Button, Flex, Space, Dropdown } from 'antd'
|
import { Button, Flex, Space, Dropdown } from 'antd'
|
||||||
import ObjectTable from '../common/ObjectTable'
|
import ObjectTable from '../common/ObjectTable'
|
||||||
import ReloadIcon from '../../Icons/ReloadIcon'
|
import ReloadIcon from '../../Icons/ReloadIcon'
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card } from 'antd'
|
import { Space, Flex, Card } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useRef } from 'react'
|
import { useState, useRef } from 'react'
|
||||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||||
import NewDocumentSize from './DocumentSizes/NewDocumentSize'
|
import NewDocumentSize from './DocumentSizes/NewDocumentSize'
|
||||||
import ObjectTable from '../common/ObjectTable'
|
import ObjectTable from '../common/ObjectTable'
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card } from 'antd'
|
import { Space, Flex, Card } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useRef } from 'react'
|
import { useState, useRef } from 'react'
|
||||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||||
import NewDocumentTemplate from './DocumentTemplates/NewDocumentTemplate'
|
import NewDocumentTemplate from './DocumentTemplates/NewDocumentTemplate'
|
||||||
import ObjectTable from '../common/ObjectTable'
|
import ObjectTable from '../common/ObjectTable'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useRef } from 'react'
|
import { useState, useRef } from 'react'
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card } from 'antd'
|
import { Space, Flex, Card } from 'antd'
|
||||||
import loglevel from 'loglevel'
|
import loglevel from 'loglevel'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useRef, useState } from 'react'
|
import { useRef, useState } from 'react'
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card } from 'antd'
|
import { Space, Flex, Card } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// src/filaments.js
|
// src/filaments.js
|
||||||
|
|
||||||
import React, { useRef, useState } from 'react'
|
import { useRef, useState } from 'react'
|
||||||
import { Button, Flex, Space, Modal, message, Dropdown } from 'antd'
|
import { Button, Flex, Space, Modal, message, Dropdown } from 'antd'
|
||||||
|
|
||||||
import NewFilament from './Filaments/NewFilament'
|
import NewFilament from './Filaments/NewFilament'
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card } from 'antd'
|
import { Space, Flex, Card } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// src/hosts.js
|
// src/hosts.js
|
||||||
|
|
||||||
import React, { useRef, useState } from 'react'
|
import { useRef, useState } from 'react'
|
||||||
import { Button, Flex, Space, Modal, message, Dropdown } from 'antd'
|
import { Button, Flex, Space, Modal, message, Dropdown } from 'antd'
|
||||||
|
|
||||||
import NewHost from './Hosts/NewHost'
|
import NewHost from './Hosts/NewHost'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useRef, useState } from 'react'
|
import { useRef, useState } from 'react'
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card, Modal } from 'antd'
|
import { Space, Flex, Card, Modal } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useContext, useEffect, useState, useRef } from 'react'
|
import { useContext, useEffect, useState, useRef } from 'react'
|
||||||
import { Input, Result, Typography, Flex, Progress, Button } from 'antd'
|
import { Input, Result, Typography, Flex, Progress, Button } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
import { ApiServerContext } from '../../context/ApiServerContext'
|
import { ApiServerContext } from '../../context/ApiServerContext'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import DashboardSidebar from '../common/DashboardSidebar'
|
import DashboardSidebar from '../common/DashboardSidebar'
|
||||||
import FilamentIcon from '../../Icons/FilamentIcon'
|
import FilamentIcon from '../../Icons/FilamentIcon'
|
||||||
@ -107,7 +106,7 @@ const items = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (import.meta.env.MODE === 'development') {
|
||||||
items.push(
|
items.push(
|
||||||
{ type: 'divider' },
|
{ type: 'divider' },
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// src/materials.js
|
// src/materials.js
|
||||||
|
|
||||||
import React, { useEffect, useState, useContext, useCallback } from 'react'
|
import { useEffect, useState, useContext, useCallback } from 'react'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import {
|
import {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useState } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
@ -43,7 +43,7 @@ const NewMaterial = ({ onSuccess }) => {
|
|||||||
|
|
||||||
const newMaterialFormUpdateValues = Form.useWatch([], newMaterialForm)
|
const newMaterialFormUpdateValues = Form.useWatch([], newMaterialForm)
|
||||||
|
|
||||||
React.useEffect(() => {
|
useEffect(() => {
|
||||||
newMaterialForm
|
newMaterialForm
|
||||||
.validateFields({
|
.validateFields({
|
||||||
validateOnly: true
|
validateOnly: true
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useRef } from 'react'
|
import { useState, useRef } from 'react'
|
||||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||||
import NewNoteType from './NoteTypes/NewNoteType'
|
import NewNoteType from './NoteTypes/NewNoteType'
|
||||||
import ObjectTable from '../common/ObjectTable'
|
import ObjectTable from '../common/ObjectTable'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex } from 'antd'
|
import { Space, Flex } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// src/gcodefiles.js
|
// src/gcodefiles.js
|
||||||
|
|
||||||
import React, { useState, useRef } from 'react'
|
import { useState, useRef } from 'react'
|
||||||
|
|
||||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||||
import ObjectTable from '../common/ObjectTable'
|
import ObjectTable from '../common/ObjectTable'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useContext } from 'react'
|
import { useContext } from 'react'
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card } from 'antd'
|
import { Space, Flex, Card } from 'antd'
|
||||||
import useCollapseState from '../../hooks/useCollapseState'
|
import useCollapseState from '../../hooks/useCollapseState'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// src/gcodefiles.js
|
// src/gcodefiles.js
|
||||||
|
|
||||||
import React, { useState, useRef } from 'react'
|
import { useState, useRef } from 'react'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useState, useContext, useEffect, useRef } from 'react'
|
import { useState, useContext, useEffect, useRef } from 'react'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
import {
|
import {
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card } from 'antd'
|
import { Space, Flex, Card } from 'antd'
|
||||||
import useCollapseState from '../../hooks/useCollapseState'
|
import useCollapseState from '../../hooks/useCollapseState'
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { Select, Typography, Descriptions, Collapse, Flex } from 'antd'
|
import { Select, Typography, Descriptions, Collapse, Flex } from 'antd'
|
||||||
import { CaretLeftOutlined } from '@ant-design/icons'
|
import { CaretLeftOutlined } from '@ant-design/icons'
|
||||||
import { useThemeContext } from '../context/ThemeContext'
|
import { useThemeContext } from '../context/ThemeContext'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useRef } from 'react'
|
import { useRef } from 'react'
|
||||||
import { Button, Flex, Space, Dropdown } from 'antd'
|
import { Button, Flex, Space, Dropdown } from 'antd'
|
||||||
import ObjectTable from '../common/ObjectTable'
|
import ObjectTable from '../common/ObjectTable'
|
||||||
import ReloadIcon from '../../Icons/ReloadIcon'
|
import ReloadIcon from '../../Icons/ReloadIcon'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
import {
|
import {
|
||||||
@ -37,7 +37,7 @@ const NewUser = ({ onOk, reset }) => {
|
|||||||
|
|
||||||
const newUserFormUpdateValues = Form.useWatch([], newUserForm)
|
const newUserFormUpdateValues = Form.useWatch([], newUserForm)
|
||||||
|
|
||||||
React.useEffect(() => {
|
useEffect(() => {
|
||||||
newUserForm
|
newUserForm
|
||||||
.validateFields({
|
.validateFields({
|
||||||
validateOnly: true
|
validateOnly: true
|
||||||
@ -74,7 +74,7 @@ const NewUser = ({ onOk, reset }) => {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
React.useEffect(() => {
|
useEffect(() => {
|
||||||
if (reset) {
|
if (reset) {
|
||||||
newUserForm.resetFields()
|
newUserForm.resetFields()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card } from 'antd'
|
import { Space, Flex, Card } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useRef } from 'react'
|
import { useState, useRef } from 'react'
|
||||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||||
import NewVendor from './Vendors/NewVendor'
|
import NewVendor from './Vendors/NewVendor'
|
||||||
import ObjectTable from '../common/ObjectTable'
|
import ObjectTable from '../common/ObjectTable'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card } from 'antd'
|
import { Space, Flex, Card } from 'antd'
|
||||||
import loglevel from 'loglevel'
|
import loglevel from 'loglevel'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// src/gcodefiles.js
|
// src/gcodefiles.js
|
||||||
|
|
||||||
import React, { useState, useRef } from 'react'
|
import { useState, useRef } from 'react'
|
||||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||||
import NewGCodeFile from './GCodeFiles/NewGCodeFile'
|
import NewGCodeFile from './GCodeFiles/NewGCodeFile'
|
||||||
import useColumnVisibility from '../hooks/useColumnVisibility'
|
import useColumnVisibility from '../hooks/useColumnVisibility'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useContext } from 'react'
|
import { useContext } from 'react'
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card, Typography } from 'antd'
|
import { Space, Flex, Card, Typography } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React, { useState, useContext, useEffect } from 'react'
|
import { useState, useContext, useEffect } from 'react'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
import {
|
import {
|
||||||
@ -24,7 +24,7 @@ import {
|
|||||||
} from 'antd'
|
} from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
|
|
||||||
import { AuthContext } from '../../context/AuthContext.js'
|
import { AuthContext } from '../../context/AuthContext.jsx'
|
||||||
|
|
||||||
import GCodeFileIcon from '../../../Icons/GCodeFileIcon'
|
import GCodeFileIcon from '../../../Icons/GCodeFileIcon'
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ const NewGCodeFile = ({ onOk, reset }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
React.useEffect(() => {
|
useEffect(() => {
|
||||||
newGCodeFileForm
|
newGCodeFileForm
|
||||||
.validateFields({
|
.validateFields({
|
||||||
validateOnly: true
|
validateOnly: true
|
||||||
@ -140,14 +140,17 @@ const NewGCodeFile = ({ onOk, reset }) => {
|
|||||||
key: 'filament',
|
key: 'filament',
|
||||||
label: 'Filament',
|
label: 'Filament',
|
||||||
children:
|
children:
|
||||||
newGCodeFileFormValues?.filament != null ??
|
newGCodeFileFormValues?.filament != null ? (
|
||||||
(<>
|
<>
|
||||||
{newGCodeFileFormValues.filament}
|
{newGCodeFileFormValues.filament}
|
||||||
<Badge
|
<Badge
|
||||||
text={newGCodeFileFormValues.filament.name}
|
text={newGCodeFileFormValues.filament.name}
|
||||||
color={newGCodeFileFormValues.filament.color}
|
color={newGCodeFileFormValues.filament.color}
|
||||||
/>
|
/>
|
||||||
</>)('n/a')
|
</>
|
||||||
|
) : (
|
||||||
|
'n/a'
|
||||||
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'cost',
|
key: 'cost',
|
||||||
@ -205,7 +208,7 @@ const NewGCodeFile = ({ onOk, reset }) => {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
React.useEffect(() => {
|
useEffect(() => {
|
||||||
if (reset) {
|
if (reset) {
|
||||||
setCurrentStep(0)
|
setCurrentStep(0)
|
||||||
newGCodeFileForm.resetFields()
|
newGCodeFileForm.resetFields()
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// src/Jobs.js
|
// src/Jobs.js
|
||||||
|
|
||||||
import React, { useState, useRef } from 'react'
|
import { useState, useRef } from 'react'
|
||||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||||
import NewJob from './Jobs/NewJob.jsx'
|
import NewJob from './Jobs/NewJob.jsx'
|
||||||
import useColumnVisibility from '../hooks/useColumnVisibility.js'
|
import useColumnVisibility from '../hooks/useColumnVisibility.js'
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card } from 'antd'
|
import { Space, Flex, Card } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// src/Printers.js
|
// src/Printers.js
|
||||||
|
|
||||||
import React, { useState, useRef } from 'react'
|
import { useState, useRef } from 'react'
|
||||||
import { Button, message, Dropdown, Space, Flex, Modal } from 'antd'
|
import { Button, message, Dropdown, Space, Flex, Modal } from 'antd'
|
||||||
import NewPrinter from './Printers/NewPrinter'
|
import NewPrinter from './Printers/NewPrinter'
|
||||||
import PlusIcon from '../../Icons/PlusIcon'
|
import PlusIcon from '../../Icons/PlusIcon'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useContext, useCallback, useEffect } from 'react'
|
import { useState, useContext, useCallback, useEffect } from 'react'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { useMediaQuery } from 'react-responsive'
|
import { useMediaQuery } from 'react-responsive'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useContext, useEffect, useCallback } from 'react'
|
import { useState, useContext, useEffect, useCallback } from 'react'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useRef, useState } from 'react'
|
import { useRef, useState } from 'react'
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Space, Flex, Card } from 'antd'
|
import { Space, Flex, Card } from 'antd'
|
||||||
import { LoadingOutlined } from '@ant-design/icons'
|
import { LoadingOutlined } from '@ant-design/icons'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect, useState, useCallback, useContext } from 'react'
|
import { useEffect, useState, useCallback, useContext } from 'react'
|
||||||
import {
|
import {
|
||||||
Descriptions,
|
Descriptions,
|
||||||
Space,
|
Space,
|
||||||
@ -78,6 +78,7 @@ const ProductionOverview = () => {
|
|||||||
setStats((prev) => ({ ...prev, printers: printStats }))
|
setStats((prev) => ({ ...prev, printers: printStats }))
|
||||||
setError(null)
|
setError(null)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
setError('Failed to fetch printer details')
|
setError('Failed to fetch printer details')
|
||||||
messageApi.error('Failed to fetch printer details')
|
messageApi.error('Failed to fetch printer details')
|
||||||
} finally {
|
} finally {
|
||||||
@ -98,6 +99,7 @@ const ProductionOverview = () => {
|
|||||||
setStats((prev) => ({ ...prev, jobs: jobstats }))
|
setStats((prev) => ({ ...prev, jobs: jobstats }))
|
||||||
setError(null)
|
setError(null)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
setError('Failed to fetch printer details')
|
setError('Failed to fetch printer details')
|
||||||
messageApi.error('Failed to fetch printer details')
|
messageApi.error('Failed to fetch printer details')
|
||||||
} finally {
|
} finally {
|
||||||
@ -115,6 +117,7 @@ const ProductionOverview = () => {
|
|||||||
})
|
})
|
||||||
setChartData(response.data)
|
setChartData(response.data)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
console.error('Failed to fetch chart data:', err)
|
console.error('Failed to fetch chart data:', err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import DashboardSidebar from '../common/DashboardSidebar'
|
import DashboardSidebar from '../common/DashboardSidebar'
|
||||||
import ProductionIcon from '../../Icons/ProductionIcon'
|
import ProductionIcon from '../../Icons/ProductionIcon'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// src/SubJobs.js
|
// src/SubJobs.js
|
||||||
|
|
||||||
import React, { useRef } from 'react'
|
import { useRef } from 'react'
|
||||||
import { Button, Flex, Space, Dropdown } from 'antd'
|
import { Button, Flex, Space, Dropdown } from 'antd'
|
||||||
import useColumnVisibility from '../hooks/useColumnVisibility.js'
|
import useColumnVisibility from '../hooks/useColumnVisibility.js'
|
||||||
import ReloadIcon from '../../Icons/ReloadIcon.jsx'
|
import ReloadIcon from '../../Icons/ReloadIcon.jsx'
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Space, Tag } from 'antd'
|
import { Space, Tag } from 'antd'
|
||||||
import CheckIcon from '../../Icons/CheckIcon'
|
import CheckIcon from '../../Icons/CheckIcon'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useMemo, useState } from 'react'
|
import { useMemo, useState } from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import CodeMirror from '@uiw/react-codemirror'
|
import CodeMirror from '@uiw/react-codemirror'
|
||||||
import { javascript } from '@codemirror/lang-javascript'
|
import { javascript } from '@codemirror/lang-javascript'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
import { ColorPicker, Checkbox, Flex } from 'antd'
|
import { ColorPicker, Checkbox, Flex } from 'antd'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import ViewButton from './ViewButton'
|
import ViewButton from './ViewButton'
|
||||||
import { getModelByName } from '../../../database/ObjectModels'
|
import { getModelByName } from '../../../database/ObjectModels'
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Button, Tooltip, message } from 'antd'
|
import { Button, Tooltip, message } from 'antd'
|
||||||
import CopyIcon from '../../Icons/CopyIcon'
|
import CopyIcon from '../../Icons/CopyIcon'
|
||||||
@ -37,6 +36,8 @@ const CopyButton = ({
|
|||||||
document.execCommand('copy')
|
document.execCommand('copy')
|
||||||
messageApi.success('Copied to clipboard')
|
messageApi.success('Copied to clipboard')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
|
console.error(err)
|
||||||
messageApi.error('Failed to copy')
|
messageApi.error('Failed to copy')
|
||||||
}
|
}
|
||||||
document.body.removeChild(textarea)
|
document.body.removeChild(textarea)
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Flex, Typography } from 'antd'
|
import { Flex, Typography } from 'antd'
|
||||||
import Flag from './Flag'
|
import Flag from './Flag'
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { Select, Flex, Typography } from 'antd'
|
import { Select, Flex, Typography } from 'antd'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import Flag from './Flag'
|
import Flag from './Flag'
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
// DashboardBreadcrumb.js
|
// DashboardBreadcrumb.js
|
||||||
import React from 'react'
|
|
||||||
import { Breadcrumb, Button, Flex, Space } from 'antd'
|
import { Breadcrumb, Button, Flex, Space } from 'antd'
|
||||||
import { Link, useLocation, useNavigate } from 'react-router-dom'
|
import { Link, useLocation, useNavigate } from 'react-router-dom'
|
||||||
import ArrowLeftIcon from '../../Icons/ArrowLeftIcon'
|
import ArrowLeftIcon from '../../Icons/ArrowLeftIcon'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// DashboardNavigation.js
|
// DashboardNavigation.js
|
||||||
import React, { useContext, useEffect, useState } from 'react'
|
import { useContext, useEffect, useState } from 'react'
|
||||||
import {
|
import {
|
||||||
Menu,
|
Menu,
|
||||||
Flex,
|
Flex,
|
||||||
@ -176,7 +176,7 @@ const DashboardNavigation = () => {
|
|||||||
</Badge>
|
</Badge>
|
||||||
</Space>
|
</Space>
|
||||||
|
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{import.meta.env.MODE === 'development' && (
|
||||||
<Space>
|
<Space>
|
||||||
{apiServerState === 'connected' ? (
|
{apiServerState === 'connected' ? (
|
||||||
<Tooltip title='Connected to api server' arrow={false}>
|
<Tooltip title='Connected to api server' arrow={false}>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useEffect, useContext } from 'react'
|
import { useState, useEffect, useContext } from 'react'
|
||||||
import { Layout, Menu, Flex, Button } from 'antd'
|
import { Layout, Menu, Flex, Button } from 'antd'
|
||||||
import { CaretDownFilled } from '@ant-design/icons'
|
import { CaretDownFilled } from '@ant-design/icons'
|
||||||
import CollapseSidebarIcon from '../../Icons/CollapseSidebarIcon'
|
import CollapseSidebarIcon from '../../Icons/CollapseSidebarIcon'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useContext } from 'react'
|
import { useContext } from 'react'
|
||||||
import { Flex, Button } from 'antd'
|
import { Flex, Button } from 'antd'
|
||||||
import { ElectronContext } from '../context/ElectronContext'
|
import { ElectronContext } from '../context/ElectronContext'
|
||||||
import XMarkIcon from '../../Icons/XMarkIcon'
|
import XMarkIcon from '../../Icons/XMarkIcon'
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Modal, Button, Space, Typography } from 'antd'
|
import { Modal, Button, Space, Typography } from 'antd'
|
||||||
import { getModelByName } from '../../../database/ObjectModels'
|
import { getModelByName } from '../../../database/ObjectModels'
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { Button, Space } from 'antd'
|
import { Button, Space } from 'antd'
|
||||||
import CheckIcon from '../../Icons/CheckIcon.jsx'
|
import CheckIcon from '../../Icons/CheckIcon.jsx'
|
||||||
import XMarkIcon from '../../Icons/XMarkIcon.jsx'
|
import XMarkIcon from '../../Icons/XMarkIcon.jsx'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, {
|
import {
|
||||||
useState,
|
useState,
|
||||||
useEffect,
|
useEffect,
|
||||||
useContext,
|
useContext,
|
||||||
@ -90,6 +90,7 @@ const EditObjectForm = forwardRef(
|
|||||||
setFetchLoading(false)
|
setFetchLoading(false)
|
||||||
onStateChange({ loading: false })
|
onStateChange({ loading: false })
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
messageApi.error('Failed to fetch object info')
|
messageApi.error('Failed to fetch object info')
|
||||||
showError(
|
showError(
|
||||||
`Failed to fetch object information. Message: ${err.message}. Code: ${err.code}`,
|
`Failed to fetch object information. Message: ${err.message}. Code: ${err.code}`,
|
||||||
@ -172,6 +173,7 @@ const EditObjectForm = forwardRef(
|
|||||||
onStateChange({ isEditing: false })
|
onStateChange({ isEditing: false })
|
||||||
messageApi.success('Information updated successfully')
|
messageApi.success('Information updated successfully')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
if (err.errorFields) {
|
if (err.errorFields) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -199,6 +201,7 @@ const EditObjectForm = forwardRef(
|
|||||||
messageApi.success('Deleted successfully')
|
messageApi.success('Deleted successfully')
|
||||||
// Optionally: trigger a callback to parent to remove this object from view
|
// Optionally: trigger a callback to parent to remove this object from view
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
messageApi.error('Failed to delete')
|
messageApi.error('Failed to delete')
|
||||||
showError(
|
showError(
|
||||||
`Failed to delete. Message: ${err.message}. Code: ${err.code}`,
|
`Failed to delete. Message: ${err.message}. Code: ${err.code}`,
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Typography, Flex, Button, Tooltip } from 'antd'
|
import { Typography, Flex, Button, Tooltip } from 'antd'
|
||||||
import NewMailIcon from '../../Icons/NewMailIcon'
|
import NewMailIcon from '../../Icons/NewMailIcon'
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
// FilamentSelect.js
|
// FilamentSelect.js
|
||||||
import React from 'react'
|
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import config from '../../../config'
|
import config from '../../../config'
|
||||||
import ObjectSelect from './ObjectSelect'
|
import ObjectSelect from './ObjectSelect'
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { Flex, Typography, Badge } from 'antd'
|
import { Flex, Typography, Badge } from 'antd'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import config from '../../../config'
|
import config from '../../../config'
|
||||||
import ObjectSelect from './ObjectSelect'
|
import ObjectSelect from './ObjectSelect'
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Progress, Flex, Space } from 'antd'
|
import { Progress, Flex, Space } from 'antd'
|
||||||
import React from 'react'
|
|
||||||
import StateTag from './StateTag'
|
import StateTag from './StateTag'
|
||||||
|
|
||||||
const getProgressColor = (percent) => {
|
const getProgressColor = (percent) => {
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Flex } from 'antd'
|
import { Flex } from 'antd'
|
||||||
const Flag = ({
|
const Flag = ({
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
// GCodeFileSelect.js
|
// GCodeFileSelect.js
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import React from 'react'
|
|
||||||
import config from '../../../config'
|
import config from '../../../config'
|
||||||
import ObjectSelect from './ObjectSelect'
|
import ObjectSelect from './ObjectSelect'
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
// PrinterSelect.js
|
// PrinterSelect.js
|
||||||
import React from 'react'
|
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Flex, Typography, Popover } from 'antd'
|
import { Flex, Typography, Popover } from 'antd'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import React from 'react'
|
|
||||||
import { Collapse, Flex, Typography } from 'antd'
|
import { Collapse, Flex, Typography } from 'antd'
|
||||||
import { CaretLeftOutlined } from '@ant-design/icons'
|
import { CaretLeftOutlined } from '@ant-design/icons'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user