mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov-ui.git
synced 2025-11-01 19:17:50 +00:00
Revert "[WIFI-10810] React 18, Vite and Chakra v2 migration"
Signed-off-by: Charles <charles.bourque96@gmail.com>
This commit is contained in:
3
.env
3
.env
@@ -1 +1,2 @@
|
|||||||
VITE_UCENTRALSEC_URL="https://ucentral.dpaas.arilia.com:16001"
|
REACT_APP_VERSION=$npm_package_version
|
||||||
|
REACT_APP_UCENTRALSEC_URL="https://ucentral.dpaas.arilia.com:16001"
|
||||||
|
|||||||
60
.eslintrc
Normal file
60
.eslintrc
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"es2021": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"plugin:react/recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"airbnb",
|
||||||
|
"airbnb-typescript",
|
||||||
|
"prettier"
|
||||||
|
],
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaFeatures": {
|
||||||
|
"jsx": true
|
||||||
|
},
|
||||||
|
"ecmaVersion": 12,
|
||||||
|
"sourceType": "module",
|
||||||
|
"allowImportExportEverywhere": false,
|
||||||
|
"codeFrame": false,
|
||||||
|
"project": "./tsconfig.json"
|
||||||
|
},
|
||||||
|
"plugins": ["react", "@typescript-eslint", "prettier"],
|
||||||
|
"rules": {
|
||||||
|
"import/extensions": [
|
||||||
|
"error",
|
||||||
|
"ignorePackages",
|
||||||
|
{
|
||||||
|
"js": "never",
|
||||||
|
"jsx": "never",
|
||||||
|
"ts": "never",
|
||||||
|
"tsx": "never"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@typescript-eslint/ban-ts-comment": ["off"],
|
||||||
|
"max-len": ["error", { "code": 150 }],
|
||||||
|
"prefer-promise-reject-errors": ["off"],
|
||||||
|
"react/jsx-filename-extension": ["off"],
|
||||||
|
"react/prop-types": ["warn"],
|
||||||
|
"no-return-assign": ["off"],
|
||||||
|
"react/jsx-props-no-spreading": ["off"],
|
||||||
|
"react/destructuring-assignment": ["off"],
|
||||||
|
"no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
|
||||||
|
"react/jsx-one-expression-per-line": "off",
|
||||||
|
"react/jsx-wrap-multilines": "off",
|
||||||
|
"react/require-default-props": "off",
|
||||||
|
"react/jsx-curly-newline": "off",
|
||||||
|
"no-underscore-dangle": "off",
|
||||||
|
"react/function-component-definition": "off"
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"import/resolver": {
|
||||||
|
"node": {
|
||||||
|
"paths": ["src"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
86
.eslintrc.js
86
.eslintrc.js
@@ -1,86 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
env: {
|
|
||||||
browser: true,
|
|
||||||
es2021: true,
|
|
||||||
},
|
|
||||||
parser: '@typescript-eslint/parser',
|
|
||||||
parserOptions: {
|
|
||||||
ecmaFeatures: {
|
|
||||||
jsx: true,
|
|
||||||
},
|
|
||||||
ecmaVersion: 12,
|
|
||||||
sourceType: 'module',
|
|
||||||
allowImportExportEverywhere: false,
|
|
||||||
codeFrame: false,
|
|
||||||
project: './tsconfig.json',
|
|
||||||
},
|
|
||||||
ignorePatterns: ['build/', 'dist/'],
|
|
||||||
plugins: ['import'],
|
|
||||||
extends: [
|
|
||||||
'plugin:react/recommended',
|
|
||||||
'plugin:@typescript-eslint/eslint-recommended',
|
|
||||||
'plugin:@typescript-eslint/recommended',
|
|
||||||
'airbnb',
|
|
||||||
'airbnb-typescript',
|
|
||||||
'prettier',
|
|
||||||
'plugin:import/errors',
|
|
||||||
'plugin:import/warnings',
|
|
||||||
'plugin:import/typescript',
|
|
||||||
],
|
|
||||||
plugins: ['react', '@typescript-eslint', 'prettier'],
|
|
||||||
rules: {
|
|
||||||
'import/extensions': [
|
|
||||||
'error',
|
|
||||||
'ignorePackages',
|
|
||||||
{
|
|
||||||
js: 'never',
|
|
||||||
jsx: 'never',
|
|
||||||
ts: 'never',
|
|
||||||
tsx: 'never',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'@typescript-eslint/naming-convention': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
selector: 'function',
|
|
||||||
format: ['PascalCase', 'camelCase'],
|
|
||||||
leadingUnderscore: 'allowSingleOrDouble',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
|
|
||||||
'react/function-component-definition': [2, { namedComponents: 'arrow-function' }],
|
|
||||||
'import/order': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
alphabetize: {
|
|
||||||
order: 'asc',
|
|
||||||
caseInsensitive: true,
|
|
||||||
},
|
|
||||||
'newlines-between': 'never',
|
|
||||||
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
|
|
||||||
pathGroups: [
|
|
||||||
{
|
|
||||||
pattern: 'react',
|
|
||||||
group: 'external',
|
|
||||||
position: 'before',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
pathGroupsExcludedImportTypes: ['builtin'],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'max-len': ['error', { code: 150 }],
|
|
||||||
'@typescript-eslint/ban-ts-comment': ['off'],
|
|
||||||
'react/prop-types': ['warn'],
|
|
||||||
'react/require-default-props': 'off',
|
|
||||||
'react/jsx-props-no-spreading': ['off'],
|
|
||||||
'react/jsx-curly-newline': 'off',
|
|
||||||
'no-underscore-dangle': 'off',
|
|
||||||
},
|
|
||||||
settings: {
|
|
||||||
'import/resolver': {
|
|
||||||
node: {
|
|
||||||
paths: ['src'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
29891
package-lock.json
generated
29891
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
35
package.json
35
package.json
@@ -1,31 +1,27 @@
|
|||||||
{
|
{
|
||||||
"name": "wlan-cloud-owprov-ui",
|
"name": "wlan-cloud-owprov-ui",
|
||||||
"version": "2.7.0(14)",
|
"version": "2.7.0(13)",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.tsx",
|
"main": "index.tsx",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite",
|
"start": "react-scripts start",
|
||||||
"build": "vite build",
|
"build": "react-scripts build",
|
||||||
"format": "prettier --write \"src/**/*.js\"",
|
"format": "prettier --write \"src/**/*.js\"",
|
||||||
"analyze": "source-map-explorer 'build/static/js/*.js'",
|
"analyze": "source-map-explorer 'build/static/js/*.js'"
|
||||||
"lint": "TIMING=1 eslint \"src/**/*.{ts,tsx,js,jsx}\" --fix",
|
|
||||||
"clean": "rm -rf node_modules && rm -rf build"
|
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/icons": "^2.0.8",
|
"@chakra-ui/icons": "^1.1.1",
|
||||||
"@chakra-ui/react": "^2.2.3",
|
"@chakra-ui/react": "^1.7.3",
|
||||||
"@chakra-ui/theme-tools": "^2.0.9",
|
"@chakra-ui/theme-tools": "^1.3.1",
|
||||||
"@chakra-ui/utils": "^2.0.8",
|
"@chakra-ui/utils": "^1.10.4",
|
||||||
"@fontsource/inter": "^4.5.1",
|
"@fontsource/inter": "^4.5.1",
|
||||||
"@nivo/circle-packing": "^0.79.1",
|
"@nivo/circle-packing": "^0.79.1",
|
||||||
"@nivo/core": "^0.79.0",
|
"@nivo/core": "^0.79.0",
|
||||||
"@react-spring/web": "^9.4.4",
|
"@react-spring/web": "^9.4.4",
|
||||||
"cronstrue": "2.11.0",
|
"cronstrue": "2.11.0",
|
||||||
"axios": "^0.24.0",
|
"axios": "^0.24.0",
|
||||||
"@emotion/react": "^11.8.1",
|
|
||||||
"@emotion/styled": "^11.6.0",
|
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
"chakra-react-select": "^3.0.0",
|
"chakra-react-select": "^3.0.0",
|
||||||
"currency-codes": "^2.1.0",
|
"currency-codes": "^2.1.0",
|
||||||
@@ -37,9 +33,8 @@
|
|||||||
"libphonenumber-js": "^1.9.49",
|
"libphonenumber-js": "^1.9.49",
|
||||||
"papaparse": "^5.3.1",
|
"papaparse": "^5.3.1",
|
||||||
"phosphor-react": "^1.3.1",
|
"phosphor-react": "^1.3.1",
|
||||||
"framer-motion": "^6.3.6",
|
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
"react": "^18.2.0",
|
"react": "^17.0.2",
|
||||||
"react-app-polyfill": "^3.0.0",
|
"react-app-polyfill": "^3.0.0",
|
||||||
"react-country-flag": "^3.0.2",
|
"react-country-flag": "^3.0.2",
|
||||||
"react-csv": "^2.2.2",
|
"react-csv": "^2.2.2",
|
||||||
@@ -52,26 +47,24 @@
|
|||||||
"react-papaparse": "^4.0.2",
|
"react-papaparse": "^4.0.2",
|
||||||
"react-query": "^3.35.0",
|
"react-query": "^3.35.0",
|
||||||
"react-router-dom": "^6.2.1",
|
"react-router-dom": "^6.2.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-scripts": "^5.0.1",
|
||||||
"react-table": "^7.7.0",
|
"react-table": "^7.7.0",
|
||||||
"react-tooltip": "^4.2.21",
|
"react-tooltip": "^4.2.21",
|
||||||
"source-map-explorer": "^2.5.2",
|
"source-map-explorer": "^2.5.2",
|
||||||
"typescript": "^4.6.3",
|
"typescript": "^4.6.3",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
"vite": "^3.0.4",
|
|
||||||
"yup": "^0.32.11"
|
"yup": "^0.32.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^17.0.27",
|
"@types/node": "^17.0.27",
|
||||||
"@types/react": "^18.0.17",
|
"@types/react": "^17.0.44",
|
||||||
"@types/react-csv": "^1.1.2",
|
"@types/react-csv": "^1.1.2",
|
||||||
"@types/react-dom": "^18.0.6",
|
"@types/react-dom": "^18.0.0",
|
||||||
"@types/react-table": "^7.7.12",
|
|
||||||
"@types/uuid": "^8.3.4",
|
"@types/uuid": "^8.3.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
||||||
"@typescript-eslint/parser": "^5.21.0",
|
"@typescript-eslint/parser": "^5.21.0",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"eslint": "8.15.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-config-airbnb": "^19.0.4",
|
"eslint-config-airbnb": "^19.0.4",
|
||||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||||
"eslint-config-airbnb-typescript-prettier": "^5.0.0",
|
"eslint-config-airbnb-typescript-prettier": "^5.0.0",
|
||||||
@@ -79,14 +72,12 @@
|
|||||||
"eslint-import-resolver-alias": "^1.1.2",
|
"eslint-import-resolver-alias": "^1.1.2",
|
||||||
"eslint-loader": "^4.0.2",
|
"eslint-loader": "^4.0.2",
|
||||||
"eslint-plugin-babel": "^5.3.1",
|
"eslint-plugin-babel": "^5.3.1",
|
||||||
"vite-tsconfig-paths": "^3.5.0",
|
|
||||||
"eslint-plugin-import": "^2.25.3",
|
"eslint-plugin-import": "^2.25.3",
|
||||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||||
"eslint-plugin-no-inline-styles": "^1.0.5",
|
"eslint-plugin-no-inline-styles": "^1.0.5",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"eslint-plugin-react": "^7.29.4",
|
"eslint-plugin-react": "^7.29.4",
|
||||||
"eslint-plugin-react-hooks": "^4.3.0",
|
"eslint-plugin-react-hooks": "^4.3.0",
|
||||||
"@vitejs/plugin-react": "^2.0.1",
|
|
||||||
"lint-staged": "^12.1.3",
|
"lint-staged": "^12.1.3",
|
||||||
"prettier": "^2.5.1"
|
"prettier": "^2.5.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,6 +11,5 @@
|
|||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script type="module" src="./src/index.tsx"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
23
src/App.tsx
23
src/App.tsx
@@ -1,10 +1,11 @@
|
|||||||
import React, { Suspense } from 'react';
|
import React, { Suspense } from 'react';
|
||||||
import { Spinner } from '@chakra-ui/react';
|
|
||||||
import { QueryClientProvider, QueryClient } from 'react-query';
|
|
||||||
import { HashRouter } from 'react-router-dom';
|
import { HashRouter } from 'react-router-dom';
|
||||||
|
import { ChakraProvider, Spinner } from '@chakra-ui/react';
|
||||||
|
import { QueryClientProvider, QueryClient } from 'react-query';
|
||||||
|
import theme from 'theme/theme';
|
||||||
import { AuthProvider } from 'contexts/AuthProvider';
|
import { AuthProvider } from 'contexts/AuthProvider';
|
||||||
import { WebSocketProvider } from 'contexts/WebSocketProvider';
|
|
||||||
import Router from 'router';
|
import Router from 'router';
|
||||||
|
import { WebSocketProvider } from 'contexts/WebSocketProvider';
|
||||||
|
|
||||||
const queryClient = new QueryClient({
|
const queryClient = new QueryClient({
|
||||||
defaultOptions: {
|
defaultOptions: {
|
||||||
@@ -21,13 +22,15 @@ const App = () => {
|
|||||||
return (
|
return (
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
<HashRouter>
|
<HashRouter>
|
||||||
<Suspense fallback={<Spinner />}>
|
<ChakraProvider portalZIndex={40} theme={theme}>
|
||||||
<AuthProvider token={storageToken !== null ? storageToken : undefined}>
|
<Suspense fallback={<Spinner />}>
|
||||||
<WebSocketProvider>
|
<AuthProvider token={storageToken !== null ? storageToken : undefined}>
|
||||||
<Router />
|
<WebSocketProvider>
|
||||||
</WebSocketProvider>
|
<Router />
|
||||||
</AuthProvider>
|
</WebSocketProvider>
|
||||||
</Suspense>
|
</AuthProvider>
|
||||||
|
</Suspense>
|
||||||
|
</ChakraProvider>
|
||||||
</HashRouter>
|
</HashRouter>
|
||||||
</QueryClientProvider>
|
</QueryClientProvider>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
||||||
import { Warning } from 'phosphor-react';
|
import { Warning } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { ThemeProps } from 'models/Theme';
|
import { ThemeProps } from 'models/Theme';
|
||||||
|
|
||||||
interface Props extends ThemeProps {
|
interface Props extends ThemeProps {
|
||||||
|
|||||||
@@ -1,28 +1,40 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { IconButton, SpaceProps } from '@chakra-ui/react';
|
|
||||||
import { X } from 'phosphor-react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { IconButton, Tooltip } from '@chakra-ui/react';
|
||||||
|
import { X } from 'phosphor-react';
|
||||||
|
|
||||||
interface CloseButtonProps extends SpaceProps {
|
interface Props {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
isDisabled?: boolean;
|
isDisabled?: boolean;
|
||||||
isLoading?: boolean;
|
isLoading?: boolean;
|
||||||
|
ml?: string | number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CloseButton: React.FC<CloseButtonProps> = ({ onClick, isDisabled, isLoading, ...props }) => {
|
const defaultProps = {
|
||||||
|
isDisabled: false,
|
||||||
|
isLoading: false,
|
||||||
|
ml: undefined,
|
||||||
|
};
|
||||||
|
|
||||||
|
const CloseButton: React.FC<Props> = ({ onClick, isDisabled, isLoading, ml, ...props }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IconButton
|
<Tooltip label={t('common.close')}>
|
||||||
aria-label={t('common.close')}
|
<IconButton
|
||||||
colorScheme="gray"
|
aria-label="close"
|
||||||
onClick={onClick}
|
colorScheme="gray"
|
||||||
icon={<X size={20} />}
|
onClick={onClick}
|
||||||
isLoading={isLoading}
|
icon={<X size={20} />}
|
||||||
isDisabled={isDisabled}
|
isLoading={isLoading}
|
||||||
{...props}
|
isDisabled={isDisabled}
|
||||||
/>
|
ml={ml}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default React.memo(CloseButton);
|
CloseButton.defaultProps = defaultProps;
|
||||||
|
|
||||||
|
export default CloseButton;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Button, IconButton, Tooltip, useBreakpoint, SpaceProps } from '@chakra-ui/react';
|
|
||||||
import { Plus } from 'phosphor-react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { Button, IconButton, Tooltip, useBreakpoint, LayoutProps, SpaceProps } from '@chakra-ui/react';
|
||||||
|
import { Plus } from 'phosphor-react';
|
||||||
|
|
||||||
interface CreateButtonProps extends SpaceProps {
|
interface Props extends LayoutProps, SpaceProps {
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
isDisabled?: boolean;
|
isDisabled?: boolean;
|
||||||
isLoading?: boolean;
|
isLoading?: boolean;
|
||||||
@@ -11,7 +11,15 @@ interface CreateButtonProps extends SpaceProps {
|
|||||||
label?: string;
|
label?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CreateButton: React.FC<CreateButtonProps> = ({ onClick, isDisabled, isLoading, isCompact, label, ...props }) => {
|
const defaultProps = {
|
||||||
|
onClick: () => {},
|
||||||
|
isDisabled: false,
|
||||||
|
isLoading: false,
|
||||||
|
isCompact: false,
|
||||||
|
label: undefined,
|
||||||
|
};
|
||||||
|
|
||||||
|
const CreateButton: React.FC<Props> = ({ onClick, isDisabled, isLoading, isCompact, label, ...props }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const breakpoint = useBreakpoint();
|
const breakpoint = useBreakpoint();
|
||||||
|
|
||||||
@@ -46,4 +54,6 @@ const CreateButton: React.FC<CreateButtonProps> = ({ onClick, isDisabled, isLoad
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CreateButton.defaultProps = defaultProps;
|
||||||
|
|
||||||
export default React.memo(CreateButton);
|
export default React.memo(CreateButton);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
||||||
import { Trash } from 'phosphor-react';
|
import { Trash } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
||||||
import { ArrowsClockwise } from 'phosphor-react';
|
import { ArrowsClockwise } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Button, IconButton, SpaceProps, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
import { Button, IconButton, LayoutProps, SpaceProps, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
||||||
|
|
||||||
interface ResponsiveButtonProps extends SpaceProps {
|
interface ResponsiveButtonProps extends LayoutProps, SpaceProps {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
isDisabled?: boolean;
|
isDisabled?: boolean;
|
||||||
isLoading?: boolean;
|
isLoading?: boolean;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
||||||
import { FloppyDisk } from 'phosphor-react';
|
import { FloppyDisk } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
interface Props extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
interface Props extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useCallback, useMemo } from 'react';
|
import React, { useCallback, useMemo } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
||||||
import { ArrowRight, FloppyDisk } from 'phosphor-react';
|
import { ArrowRight, FloppyDisk } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onNext: () => void;
|
onNext: () => void;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, IconButton, Tooltip, useBreakpoint, useDisclosure } from '@chakra-ui/react';
|
import { Button, IconButton, Tooltip, useBreakpoint, useDisclosure } from '@chakra-ui/react';
|
||||||
import { Pencil, X } from 'phosphor-react';
|
import { Pencil, X } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
import { Button, IconButton, Tooltip, useBreakpoint } from '@chakra-ui/react';
|
||||||
import { Warning } from 'phosphor-react';
|
import { Warning } from 'phosphor-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { ThemeProps } from 'models/Theme';
|
import { ThemeProps } from 'models/Theme';
|
||||||
|
|
||||||
interface Props extends ThemeProps {
|
interface Props extends ThemeProps {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { Button, Checkbox, IconButton, Menu, MenuButton, MenuItem, MenuList, useBreakpoint } from '@chakra-ui/react';
|
|
||||||
import { FunnelSimple } from 'phosphor-react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { Button, Checkbox, IconButton, Menu, MenuButton, MenuItem, MenuList, useBreakpoint } from '@chakra-ui/react';
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
import { FunnelSimple } from 'phosphor-react';
|
||||||
import { Column } from 'models/Table';
|
import { Column } from 'models/Table';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { SimpleGrid, Box } from '@chakra-ui/react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { SimpleGrid, Box } from '@chakra-ui/react';
|
||||||
import AddressSearchField from 'components/CustomFields/AddressSearchField';
|
|
||||||
import CreatableSelectField from 'components/FormFields/CreatableSelectField';
|
|
||||||
import SelectField from 'components/FormFields/SelectField';
|
|
||||||
import StringField from 'components/FormFields/StringField';
|
import StringField from 'components/FormFields/StringField';
|
||||||
import COUNTRY_LIST from 'constants/countryList';
|
import COUNTRY_LIST from 'constants/countryList';
|
||||||
|
import AddressSearchField from 'components/CustomFields/AddressSearchField';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import SelectField from 'components/FormFields/SelectField';
|
||||||
|
import CreatableSelectField from 'components/FormFields/CreatableSelectField';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { CloseButton, Modal, ModalBody, ModalContent, ModalOverlay, SimpleGrid, useDisclosure } from '@chakra-ui/react';
|
|
||||||
import { Form, Formik } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { CloseButton, Modal, ModalBody, ModalContent, ModalOverlay, SimpleGrid, useDisclosure } from '@chakra-ui/react';
|
||||||
import SaveButton from 'components/Buttons/SaveButton';
|
|
||||||
import AddressSearchField from 'components/CustomFields/AddressSearchField';
|
|
||||||
import CreatableSelectField from 'components/FormFields/CreatableSelectField';
|
|
||||||
import SelectField from 'components/FormFields/SelectField';
|
|
||||||
import StringField from 'components/FormFields/StringField';
|
|
||||||
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
import COUNTRY_LIST from 'constants/countryList';
|
import SaveButton from 'components/Buttons/SaveButton';
|
||||||
|
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
||||||
|
import { Form, Formik } from 'formik';
|
||||||
import { CreateLocationSchema } from 'constants/formSchemas';
|
import { CreateLocationSchema } from 'constants/formSchemas';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import StringField from 'components/FormFields/StringField';
|
||||||
|
import SelectField from 'components/FormFields/SelectField';
|
||||||
|
import CreatableSelectField from 'components/FormFields/CreatableSelectField';
|
||||||
|
import AddressSearchField from 'components/CustomFields/AddressSearchField';
|
||||||
|
import COUNTRY_LIST from 'constants/countryList';
|
||||||
import useFormRef from 'hooks/useFormRef';
|
import useFormRef from 'hooks/useFormRef';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { useToast } from '@chakra-ui/react';
|
|
||||||
import { useField } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { useField } from 'formik';
|
||||||
|
import { useGetAllLocations, useGetSelectLocations } from 'hooks/Network/Locations';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import SelectField from 'components/FormFields/SelectField';
|
||||||
|
import { useToast } from '@chakra-ui/react';
|
||||||
|
import { useGetEntity } from 'hooks/Network/Entity';
|
||||||
import Form from './Form';
|
import Form from './Form';
|
||||||
import LocationPickerCreatorModal from './Modal';
|
import LocationPickerCreatorModal from './Modal';
|
||||||
import SelectField from 'components/FormFields/SelectField';
|
|
||||||
import { useGetEntity } from 'hooks/Network/Entity';
|
|
||||||
import { useGetAllLocations, useGetSelectLocations } from 'hooks/Network/Locations';
|
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
locationName: PropTypes.string.isRequired,
|
locationName: PropTypes.string.isRequired,
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Box, FormControl, LayoutProps, SpaceProps } from '@chakra-ui/react';
|
import { Box, FormControl, LayoutProps, SpaceProps } from '@chakra-ui/react';
|
||||||
import { useFormikContext } from 'formik';
|
|
||||||
import AddressSearchBar from 'components/SearchBars/AddressSearchBar';
|
import AddressSearchBar from 'components/SearchBars/AddressSearchBar';
|
||||||
|
import { useFormikContext } from 'formik';
|
||||||
import { AddressObject } from 'models/Location';
|
import { AddressObject } from 'models/Location';
|
||||||
|
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Box, Button, Center, SimpleGrid } from '@chakra-ui/react';
|
|
||||||
import { useField } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { Box, Button, Center, SimpleGrid } from '@chakra-ui/react';
|
||||||
import DeleteButton from 'components/Buttons/DeleteButton';
|
|
||||||
import NumberField from 'components/FormFields/NumberField';
|
|
||||||
import StringField from 'components/FormFields/StringField';
|
import StringField from 'components/FormFields/StringField';
|
||||||
import ToggleField from 'components/FormFields/ToggleField';
|
import ToggleField from 'components/FormFields/ToggleField';
|
||||||
|
import NumberField from 'components/FormFields/NumberField';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { useField } from 'formik';
|
||||||
|
import DeleteButton from 'components/Buttons/DeleteButton';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
editing: PropTypes.bool.isRequired,
|
editing: PropTypes.bool.isRequired,
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Select } from '@chakra-ui/react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import isEqual from 'react-fast-compare';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
|
import isEqual from 'react-fast-compare';
|
||||||
|
import { Select } from '@chakra-ui/react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
value: PropTypes.string.isRequired,
|
value: PropTypes.string.isRequired,
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
import React, { useCallback, useMemo } from 'react';
|
import React, { useCallback, useMemo } from 'react';
|
||||||
import { useToast } from '@chakra-ui/react';
|
|
||||||
import { useField } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useField } from 'formik';
|
||||||
import ResourcePicker from './ResourcePicker';
|
|
||||||
import { useGetAllResources } from 'hooks/Network/Resources';
|
import { useGetAllResources } from 'hooks/Network/Resources';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { useToast } from '@chakra-ui/react';
|
||||||
|
import ResourcePicker from './ResourcePicker';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
import useFastField from 'hooks/useFastField';
|
||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import MultiSelectInput from './Input';
|
import MultiSelectInput from './Input';
|
||||||
import useFastField from 'hooks/useFastField';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isDisabled?: boolean;
|
isDisabled?: boolean;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormControl, FormLabel, Switch } from '@chakra-ui/react';
|
import { FormControl, FormLabel, Switch } from '@chakra-ui/react';
|
||||||
import ConfigurationFieldExplanation from 'components/FormFields/ConfigurationFieldExplanation';
|
|
||||||
import { FieldInputProps } from 'models/Form';
|
import { FieldInputProps } from 'models/Form';
|
||||||
|
import ConfigurationFieldExplanation from 'components/FormFields/ConfigurationFieldExplanation';
|
||||||
|
|
||||||
interface Props extends FieldInputProps<boolean> {
|
interface Props extends FieldInputProps<boolean> {
|
||||||
element?: React.ReactNode;
|
element?: React.ReactNode;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import Field from './FastToggleInput';
|
|
||||||
import useFastField from 'hooks/useFastField';
|
import useFastField from 'hooks/useFastField';
|
||||||
import { FieldProps } from 'models/Form';
|
import { FieldProps } from 'models/Form';
|
||||||
|
import Field from './FastToggleInput';
|
||||||
|
|
||||||
interface Props extends FieldProps {
|
interface Props extends FieldProps {
|
||||||
defaultValue: object;
|
defaultValue: object;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import {
|
import {
|
||||||
FormControl,
|
FormControl,
|
||||||
FormErrorMessage,
|
FormErrorMessage,
|
||||||
@@ -11,7 +12,6 @@ import {
|
|||||||
InputGroup,
|
InputGroup,
|
||||||
InputRightAddon,
|
InputRightAddon,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
value: PropTypes.number.isRequired,
|
value: PropTypes.number.isRequired,
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useField } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { useField } from 'formik';
|
||||||
import Field from './FastNumberInput';
|
import Field from './FastNumberInput';
|
||||||
|
|
||||||
const parseToInt = (val) => {
|
const parseToInt = (val) => {
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { useCallback, useEffect, useState } from 'react';
|
import React, { useCallback, useEffect, useState } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
useDisclosure,
|
useDisclosure,
|
||||||
@@ -14,14 +15,13 @@ import {
|
|||||||
IconButton,
|
IconButton,
|
||||||
Box,
|
Box,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { ArrowDown, ArrowUp, Plus, Trash } from 'phosphor-react';
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import CloseButton from 'components/Buttons/CloseButton';
|
import CloseButton from 'components/Buttons/CloseButton';
|
||||||
import SaveButton from 'components/Buttons/SaveButton';
|
import SaveButton from 'components/Buttons/SaveButton';
|
||||||
import DataTable from 'components/DataTable';
|
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
|
||||||
import { useGetConfigurations } from 'hooks/Network/Configurations';
|
import { useGetConfigurations } from 'hooks/Network/Configurations';
|
||||||
|
import { ArrowDown, ArrowUp, Plus, Trash } from 'phosphor-react';
|
||||||
|
import DataTable from 'components/DataTable';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
initialValue: PropTypes.arrayOf(PropTypes.string).isRequired,
|
initialValue: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Field } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { Field } from 'formik';
|
||||||
import DeviceConfigurationsModal from './Modal';
|
import DeviceConfigurationsModal from './Modal';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import RrmFormField from '../RrmFormField';
|
|
||||||
import SelectField from 'components/FormFields/SelectField';
|
import SelectField from 'components/FormFields/SelectField';
|
||||||
|
import RrmFormField from '../RrmFormField';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isDisabled?: boolean;
|
isDisabled?: boolean;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Box, ListItem, UnorderedList } from '@chakra-ui/react';
|
|
||||||
import { useField } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import ListInputModalField from 'components/FormFields/ListInputModalField';
|
import ListInputModalField from 'components/FormFields/ListInputModalField';
|
||||||
|
import { useField } from 'formik';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { Box, ListItem, UnorderedList } from '@chakra-ui/react';
|
||||||
import IP_REGEX from 'constants/IP_REGEX';
|
import IP_REGEX from 'constants/IP_REGEX';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import { isValidNumber, isValidPhoneNumber, parsePhoneNumber } from 'libphonenumber-js';
|
||||||
import { FormControl, FormErrorMessage, FormLabel } from '@chakra-ui/react';
|
import { FormControl, FormErrorMessage, FormLabel } from '@chakra-ui/react';
|
||||||
import { CreatableSelect } from 'chakra-react-select';
|
import { CreatableSelect } from 'chakra-react-select';
|
||||||
import { isValidNumber, isValidPhoneNumber, parsePhoneNumber } from 'libphonenumber-js';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import ConfigurationFieldExplanation from 'components/FormFields/ConfigurationFieldExplanation';
|
import ConfigurationFieldExplanation from 'components/FormFields/ConfigurationFieldExplanation';
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useField } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { useField } from 'formik';
|
||||||
import MultiPhoneNumberFieldInput from './MultiPhoneNumberFieldInput';
|
import MultiPhoneNumberFieldInput from './MultiPhoneNumberFieldInput';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
import React, { useCallback, useMemo, useState } from 'react';
|
import React, { useCallback, useMemo, useState } from 'react';
|
||||||
import { AddIcon } from '@chakra-ui/icons';
|
|
||||||
import { IconButton, Input, InputGroup, InputRightElement, Tooltip } from '@chakra-ui/react';
|
|
||||||
import { useField } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { IconButton, Input, InputGroup, InputRightElement, Tooltip } from '@chakra-ui/react';
|
||||||
import DataTable from 'components/DataTable';
|
import { AddIcon } from '@chakra-ui/icons';
|
||||||
import FormattedDate from 'components/FormattedDate';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
import DataTable from 'components/DataTable';
|
||||||
|
import { v4 as uuid } from 'uuid';
|
||||||
|
import FormattedDate from 'components/FormattedDate';
|
||||||
|
import { useField } from 'formik';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
name: PropTypes.string,
|
name: PropTypes.string,
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { Select } from '@chakra-ui/react';
|
|
||||||
import { useField } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import useCurrency from 'hooks/useCurrency';
|
import useCurrency from 'hooks/useCurrency';
|
||||||
import useSelectOptions from 'hooks/useSelectOptions';
|
import useSelectOptions from 'hooks/useSelectOptions';
|
||||||
|
import { Select } from '@chakra-ui/react';
|
||||||
|
import { useField } from 'formik';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import {
|
import {
|
||||||
FormControl,
|
FormControl,
|
||||||
FormErrorMessage,
|
FormErrorMessage,
|
||||||
@@ -11,9 +12,8 @@ import {
|
|||||||
InputGroup,
|
InputGroup,
|
||||||
InputRightAddon,
|
InputRightAddon,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import CurrencySelect from './CurrencySelect';
|
|
||||||
import ConfigurationFieldExplanation from 'components/FormFields/ConfigurationFieldExplanation';
|
import ConfigurationFieldExplanation from 'components/FormFields/ConfigurationFieldExplanation';
|
||||||
|
import CurrencySelect from './CurrencySelect';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useField } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { useField } from 'formik';
|
||||||
import Field from './Input';
|
import Field from './Input';
|
||||||
|
|
||||||
const parseToInt = (e, acceptEmptyValue) => {
|
const parseToInt = (e, acceptEmptyValue) => {
|
||||||
@@ -14,9 +14,9 @@ import {
|
|||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { areRrmParamsValid } from './helper';
|
|
||||||
import { InfoPopover } from 'components/InfoPopover';
|
import { InfoPopover } from 'components/InfoPopover';
|
||||||
import { RrmAlgorithm } from 'hooks/Network/Rrm';
|
import { RrmAlgorithm } from 'hooks/Network/Rrm';
|
||||||
|
import { areRrmParamsValid } from './helper';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
algorithms?: RrmAlgorithm[];
|
algorithms?: RrmAlgorithm[];
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ import * as React from 'react';
|
|||||||
import { Alert, Box, Flex, FormControl, FormLabel, Select, UseDisclosureReturn } from '@chakra-ui/react';
|
import { Alert, Box, Flex, FormControl, FormLabel, Select, UseDisclosureReturn } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
|
import { RrmAlgorithm, RrmProvider } from 'hooks/Network/Rrm';
|
||||||
|
import { Modal } from 'components/Modals/Modal';
|
||||||
|
import SaveButton from 'components/Buttons/SaveButton';
|
||||||
import AlgorithmPicker from './AlgorithmPicker';
|
import AlgorithmPicker from './AlgorithmPicker';
|
||||||
import { CUSTOM_RRM, DEFAULT_RRM_CRON, isCustomRrm, isValidCustomRrm, RRM_VALUE } from './helper';
|
import { CUSTOM_RRM, DEFAULT_RRM_CRON, isCustomRrm, isValidCustomRrm, RRM_VALUE } from './helper';
|
||||||
import RrmProviderPicker from './ProviderPicker';
|
import RrmProviderPicker from './ProviderPicker';
|
||||||
import RrmScheduler from './Scheduler';
|
import RrmScheduler from './Scheduler';
|
||||||
import SaveButton from 'components/Buttons/SaveButton';
|
|
||||||
import { Modal } from 'components/Modals/Modal';
|
|
||||||
import { RrmAlgorithm, RrmProvider } from 'hooks/Network/Rrm';
|
|
||||||
|
|
||||||
const extractValueFromProps: (value: unknown) => RRM_VALUE = (value: unknown) => {
|
const extractValueFromProps: (value: unknown) => RRM_VALUE = (value: unknown) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { FormControl, FormErrorMessage, FormHelperText, FormLabel, Textarea } from '@chakra-ui/react';
|
import { FormControl, FormErrorMessage, FormHelperText, FormLabel, Textarea } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { areRrmParamsValid } from './helper';
|
|
||||||
import { RrmAlgorithm } from 'hooks/Network/Rrm';
|
import { RrmAlgorithm } from 'hooks/Network/Rrm';
|
||||||
|
import { areRrmParamsValid } from './helper';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
algorithm?: RrmAlgorithm;
|
algorithm?: RrmAlgorithm;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Button, FormControl, FormErrorMessage, FormLabel, useDisclosure } from '@chakra-ui/react';
|
import { Button, FormControl, FormErrorMessage, FormLabel, useDisclosure } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import EditRrmForm from './Form';
|
|
||||||
import { isCustomRrm } from './helper';
|
|
||||||
import { useGetRrmAlgorithms, useGetRrmProvider } from 'hooks/Network/Rrm';
|
import { useGetRrmAlgorithms, useGetRrmProvider } from 'hooks/Network/Rrm';
|
||||||
import useFastField from 'hooks/useFastField';
|
import useFastField from 'hooks/useFastField';
|
||||||
|
import EditRrmForm from './Form';
|
||||||
|
import { isCustomRrm } from './helper';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
namePrefix?: string;
|
namePrefix?: string;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { SimpleGrid } from '@chakra-ui/react';
|
|
||||||
import { Formik } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
|
import { Formik } from 'formik';
|
||||||
|
import { SimpleGrid } from '@chakra-ui/react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import SelectField from 'components/FormFields/SelectField';
|
import SelectField from 'components/FormFields/SelectField';
|
||||||
import ToggleField from 'components/FormFields/ToggleField';
|
import ToggleField from 'components/FormFields/ToggleField';
|
||||||
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
import React, { useCallback, useEffect, useState } from 'react';
|
import React, { useCallback, useEffect, useState } from 'react';
|
||||||
import { Button, Center, Heading, Spacer } from '@chakra-ui/react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import isEqual from 'react-fast-compare';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import SpecialConfigurationForm from './SpecialConfigurationForm';
|
import isEqual from 'react-fast-compare';
|
||||||
import DeleteButton from 'components/Buttons/DeleteButton';
|
import { Button, Center, Heading, Spacer } from '@chakra-ui/react';
|
||||||
import { BASE_SECTIONS } from 'constants/configuration';
|
|
||||||
import { useGetConfiguration } from 'hooks/Network/Configurations';
|
import { useGetConfiguration } from 'hooks/Network/Configurations';
|
||||||
import ConfigurationSectionsCard from 'pages/ConfigurationPage/ConfigurationCard/ConfigurationSectionsCard';
|
import ConfigurationSectionsCard from 'pages/ConfigurationPage/ConfigurationCard/ConfigurationSectionsCard';
|
||||||
|
import { BASE_SECTIONS } from 'constants/configuration';
|
||||||
|
import DeleteButton from 'components/Buttons/DeleteButton';
|
||||||
|
import SpecialConfigurationForm from './SpecialConfigurationForm';
|
||||||
|
|
||||||
const convertConfigManagerData = (form, sections) => {
|
const convertConfigManagerData = (form, sections) => {
|
||||||
if (form === null || sections === null) return null;
|
if (form === null || sections === null) return null;
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
import React, { useCallback, useEffect, useState } from 'react';
|
import React, { useCallback, useEffect, useState } from 'react';
|
||||||
import { Button, Center } from '@chakra-ui/react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import isEqual from 'react-fast-compare';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { BASE_SECTIONS } from 'constants/configuration';
|
import isEqual from 'react-fast-compare';
|
||||||
|
import { Button, Center } from '@chakra-ui/react';
|
||||||
import ConfigurationSectionsCard from 'pages/ConfigurationPage/ConfigurationCard/ConfigurationSectionsCard';
|
import ConfigurationSectionsCard from 'pages/ConfigurationPage/ConfigurationCard/ConfigurationSectionsCard';
|
||||||
|
import { BASE_SECTIONS } from 'constants/configuration';
|
||||||
|
|
||||||
const convertConfigManagerData = (sections) => {
|
const convertConfigManagerData = (sections) => {
|
||||||
if (sections === null) return null;
|
if (sections === null) return null;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Icon } from '@chakra-ui/react';
|
|
||||||
import { ArrowDown, ArrowUp, Circle } from 'phosphor-react';
|
import { ArrowDown, ArrowUp, Circle } from 'phosphor-react';
|
||||||
|
import { Icon } from '@chakra-ui/react';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isSorted: boolean;
|
isSorted: boolean;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { ArrowRightIcon, ArrowLeftIcon, ChevronRightIcon, ChevronLeftIcon } from '@chakra-ui/icons';
|
import { v4 as uuid } from 'uuid';
|
||||||
import {
|
import {
|
||||||
Table,
|
Table,
|
||||||
Tbody,
|
Tbody,
|
||||||
@@ -24,13 +24,13 @@ import {
|
|||||||
Heading,
|
Heading,
|
||||||
useBreakpoint,
|
useBreakpoint,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { ArrowRightIcon, ArrowLeftIcon, ChevronRightIcon, ChevronLeftIcon } from '@chakra-ui/icons';
|
||||||
import { useTable, usePagination, useSortBy, Row } from 'react-table';
|
|
||||||
import { v4 as uuid } from 'uuid';
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import SortIcon from './SortIcon';
|
import { useTable, usePagination, useSortBy, Row } from 'react-table';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import LoadingOverlay from 'components/LoadingOverlay';
|
import LoadingOverlay from 'components/LoadingOverlay';
|
||||||
import { Column, PageInfo } from 'models/Table';
|
import { Column, PageInfo } from 'models/Table';
|
||||||
|
import SortIcon from './SortIcon';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
columns: Column[];
|
columns: Column[];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { forwardRef } from 'react';
|
import React, { forwardRef } from 'react';
|
||||||
import { Button } from '@chakra-ui/react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { Button } from '@chakra-ui/react';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
value: PropTypes.string,
|
value: PropTypes.string,
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormControl, FormLabel, LayoutProps, SpaceProps } from '@chakra-ui/react';
|
import { FormControl, FormLabel, LayoutProps, SpaceProps } from '@chakra-ui/react';
|
||||||
import { ObjectArrayFieldInput } from 'components/FormFields/ObjectArrayFieldModal/Input';
|
import ObjectArrayFieldInput from 'components/FormFields/ObjectArrayFieldModal/Input';
|
||||||
import { Column } from 'models/Table';
|
import { Column } from 'models/Table';
|
||||||
|
|
||||||
interface ObjectArrayFieldModalOptions {
|
interface ObjectArrayFieldModalOptions {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormControl, FormLabel, LayoutProps, Select, SpaceProps } from '@chakra-ui/react';
|
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
|
import { FormControl, FormLabel, LayoutProps, Select, SpaceProps } from '@chakra-ui/react';
|
||||||
|
|
||||||
interface Props extends LayoutProps, SpaceProps {
|
interface Props extends LayoutProps, SpaceProps {
|
||||||
label: string;
|
label: string;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import { InfoIcon } from '@chakra-ui/icons';
|
|
||||||
import { Tooltip } from '@chakra-ui/react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { Tooltip } from '@chakra-ui/react';
|
||||||
|
import { InfoIcon } from '@chakra-ui/icons';
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
|
|
||||||
const findDefinition = (definitionKey, CONFIGURATION_DESCRIPTIONS) => {
|
const findDefinition = (definitionKey, CONFIGURATION_DESCRIPTIONS) => {
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import { FormControl, FormErrorMessage, FormLabel } from '@chakra-ui/react';
|
import { FormControl, FormErrorMessage, FormLabel } from '@chakra-ui/react';
|
||||||
import { CreatableSelect } from 'chakra-react-select';
|
import { CreatableSelect } from 'chakra-react-select';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useField } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { useField } from 'formik';
|
||||||
import Field from './FastCreatableSelectInput';
|
import Field from './FastCreatableSelectInput';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import { v4 as uuid } from 'uuid';
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
CloseButton,
|
CloseButton,
|
||||||
@@ -16,14 +18,12 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
useDisclosure,
|
useDisclosure,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { UploadSimple } from 'phosphor-react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { v4 as uuid } from 'uuid';
|
|
||||||
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
|
||||||
import FileInputButton from 'components/Buttons/FileInputButton';
|
|
||||||
import SaveButton from 'components/Buttons/SaveButton';
|
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
|
import FileInputButton from 'components/Buttons/FileInputButton';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { UploadSimple } from 'phosphor-react';
|
||||||
|
import SaveButton from 'components/Buttons/SaveButton';
|
||||||
|
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
value: PropTypes.string,
|
value: PropTypes.string,
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useField } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { useField } from 'formik';
|
||||||
import FileInputModal from './FileInputModal';
|
import FileInputModal from './FileInputModal';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import { v4 as uuid } from 'uuid';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
useDisclosure,
|
useDisclosure,
|
||||||
@@ -18,13 +20,11 @@ import {
|
|||||||
IconButton,
|
IconButton,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { Trash } from 'phosphor-react';
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
|
||||||
import CloseButton from 'components/Buttons/CloseButton';
|
import CloseButton from 'components/Buttons/CloseButton';
|
||||||
import SaveButton from 'components/Buttons/SaveButton';
|
import SaveButton from 'components/Buttons/SaveButton';
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
import { Trash } from 'phosphor-react';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
initialValue: PropTypes.arrayOf(PropTypes.string).isRequired,
|
initialValue: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import { FormControl, FormErrorMessage, FormLabel } from '@chakra-ui/react';
|
import { FormControl, FormErrorMessage, FormLabel } from '@chakra-ui/react';
|
||||||
import { Select } from 'chakra-react-select';
|
import { Select } from 'chakra-react-select';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import isEqual from 'react-fast-compare';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import isEqual from 'react-fast-compare';
|
||||||
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useField } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { useField } from 'formik';
|
||||||
import Field from './FastMultiSelectInput';
|
import Field from './FastMultiSelectInput';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/naming-convention */
|
||||||
import React, { useCallback, useMemo, useState } from 'react';
|
import React, { useCallback, useMemo, useState } from 'react';
|
||||||
import { AddIcon } from '@chakra-ui/icons';
|
|
||||||
import { IconButton, Input, InputGroup, InputRightElement, Tooltip } from '@chakra-ui/react';
|
|
||||||
import { Trash } from 'phosphor-react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { IconButton, Input, InputGroup, InputRightElement, Tooltip } from '@chakra-ui/react';
|
||||||
|
import { AddIcon } from '@chakra-ui/icons';
|
||||||
|
import { Trash } from 'phosphor-react';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import DataTable from 'components/DataTable';
|
|
||||||
import FormattedDate from 'components/FormattedDate';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
import useFastField from 'hooks/useFastField';
|
|
||||||
import { Note } from 'models/Note';
|
import { Note } from 'models/Note';
|
||||||
|
import DataTable from 'components/DataTable';
|
||||||
|
import useFastField from 'hooks/useFastField';
|
||||||
|
import FormattedDate from 'components/FormattedDate';
|
||||||
|
|
||||||
export interface NotesFieldProps {
|
export interface NotesFieldProps {
|
||||||
name?: string;
|
name?: string;
|
||||||
@@ -16,10 +17,10 @@ export interface NotesFieldProps {
|
|||||||
hasDeleteButton?: boolean;
|
hasDeleteButton?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const _NotesField: React.FC<NotesFieldProps> = ({ name, isDisabled, hasDeleteButton }) => {
|
const _NotesField: React.FC<NotesFieldProps> = ({ name = 'notes', isDisabled, hasDeleteButton }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
const { value: notes, onChange: setNotes } = useFastField({ name: name ?? 'notes' });
|
const { value: notes, onChange: setNotes } = useFastField({ name });
|
||||||
const [newNote, setNewNote] = useState('');
|
const [newNote, setNewNote] = useState('');
|
||||||
|
|
||||||
const addNoteToForm = () => {
|
const addNoteToForm = () => {
|
||||||
@@ -42,11 +43,9 @@ const _NotesField: React.FC<NotesFieldProps> = ({ name, isDisabled, hasDeleteBut
|
|||||||
setNotes(newArr);
|
setNotes(newArr);
|
||||||
};
|
};
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
const memoizedDate = useCallback((cell) => <FormattedDate date={cell.row.values.created} key={uuid()} />, []);
|
const memoizedDate = useCallback((cell) => <FormattedDate date={cell.row.values.created} key={uuid()} />, []);
|
||||||
|
|
||||||
const removeAction = useCallback(
|
const removeAction = useCallback(
|
||||||
// @ts-ignore
|
|
||||||
(cell) => (
|
(cell) => (
|
||||||
<Tooltip hasArrow label={t('common.remove')} placement="top">
|
<Tooltip hasArrow label={t('common.remove')} placement="top">
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -96,7 +95,7 @@ const _NotesField: React.FC<NotesFieldProps> = ({ name, isDisabled, hasDeleteBut
|
|||||||
Cell: ({ cell }) => removeAction(cell),
|
Cell: ({ cell }) => removeAction(cell),
|
||||||
});
|
});
|
||||||
return cols;
|
return cols;
|
||||||
}, [memoizedDate, removeAction]);
|
}, [notes]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import {
|
|||||||
InputGroup,
|
InputGroup,
|
||||||
InputRightAddon,
|
InputRightAddon,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
|
||||||
import { FieldInputProps } from 'models/Form';
|
import { FieldInputProps } from 'models/Form';
|
||||||
|
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
||||||
|
|
||||||
interface Props extends FieldInputProps<string | undefined | string[]> {
|
interface Props extends FieldInputProps<string | undefined | string[]> {
|
||||||
onChange: (v: string) => void;
|
onChange: (v: string) => void;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import Field from './NumberInput';
|
|
||||||
import useFastField from 'hooks/useFastField';
|
import useFastField from 'hooks/useFastField';
|
||||||
import { FieldProps } from 'models/Form';
|
import { FieldProps } from 'models/Form';
|
||||||
|
import Field from './NumberInput';
|
||||||
|
|
||||||
const parseToInt = (val: string, acceptEmptyValue: boolean) => {
|
const parseToInt = (val: string, acceptEmptyValue: boolean) => {
|
||||||
if (acceptEmptyValue && val === '') return undefined;
|
if (acceptEmptyValue && val === '') return undefined;
|
||||||
|
|||||||
@@ -14,21 +14,17 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
IconButton,
|
IconButton,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { Formik } from 'formik';
|
|
||||||
import { Trash } from 'phosphor-react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import CloseButton from 'components/Buttons/CloseButton';
|
|
||||||
import SaveButton from 'components/Buttons/SaveButton';
|
|
||||||
import DataTable from 'components/DataTable';
|
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
|
||||||
import { FieldInputProps } from 'models/Form';
|
import { FieldInputProps } from 'models/Form';
|
||||||
|
import { Trash } from 'phosphor-react';
|
||||||
|
import { Formik } from 'formik';
|
||||||
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
|
import SaveButton from 'components/Buttons/SaveButton';
|
||||||
|
import CloseButton from 'components/Buttons/CloseButton';
|
||||||
|
import DataTable from 'components/DataTable';
|
||||||
import { Column } from 'models/Table';
|
import { Column } from 'models/Table';
|
||||||
// eslint-disable-next-line import/no-cycle
|
// eslint-disable-next-line import/no-cycle
|
||||||
|
import { ObjectArrayFieldModalOptions } from '.';
|
||||||
export interface ObjectArrayFieldModalOptions {
|
|
||||||
buttonLabel?: string;
|
|
||||||
modalTitle?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Props extends FieldInputProps<object[]> {
|
interface Props extends FieldInputProps<object[]> {
|
||||||
name: string;
|
name: string;
|
||||||
@@ -42,7 +38,7 @@ interface Props extends FieldInputProps<object[]> {
|
|||||||
schema: (t: (e: string) => string, useDefault?: boolean) => object;
|
schema: (t: (e: string) => string, useDefault?: boolean) => object;
|
||||||
}
|
}
|
||||||
|
|
||||||
const _ObjectArrayFieldInput: React.FC<Props> = ({
|
const ObjectArrayFieldInput: React.FC<Props> = ({
|
||||||
name,
|
name,
|
||||||
label,
|
label,
|
||||||
value,
|
value,
|
||||||
@@ -179,4 +175,4 @@ const _ObjectArrayFieldInput: React.FC<Props> = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ObjectArrayFieldInput = React.memo(_ObjectArrayFieldInput);
|
export default React.memo(ObjectArrayFieldInput);
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { ObjectArrayFieldInput, ObjectArrayFieldModalOptions } from './Input';
|
|
||||||
import useFastField from 'hooks/useFastField';
|
import useFastField from 'hooks/useFastField';
|
||||||
import { FieldProps } from 'models/Form';
|
import { FieldProps } from 'models/Form';
|
||||||
import { Column } from 'models/Table';
|
import { Column } from 'models/Table';
|
||||||
|
// eslint-disable-next-line import/no-cycle
|
||||||
|
import ObjectArrayFieldInput from './Input';
|
||||||
|
|
||||||
|
export interface ObjectArrayFieldModalOptions {
|
||||||
|
buttonLabel?: string;
|
||||||
|
modalTitle?: string;
|
||||||
|
}
|
||||||
|
|
||||||
interface Props extends FieldProps {
|
interface Props extends FieldProps {
|
||||||
fields: React.ReactNode;
|
fields: React.ReactNode;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { useCallback, useMemo } from 'react';
|
import React, { useCallback, useMemo } from 'react';
|
||||||
import { LayoutProps } from '@chakra-ui/react';
|
import { LayoutProps } from '@chakra-ui/react';
|
||||||
import Input from './Input';
|
|
||||||
import useFastField from 'hooks/useFastField';
|
import useFastField from 'hooks/useFastField';
|
||||||
import { FieldProps } from 'models/Form';
|
import { FieldProps } from 'models/Form';
|
||||||
|
import Input from './Input';
|
||||||
|
|
||||||
const parseToInt = (val: string, acceptEmptyValue: boolean) => {
|
const parseToInt = (val: string, acceptEmptyValue: boolean) => {
|
||||||
if (acceptEmptyValue && val === '') return undefined;
|
if (acceptEmptyValue && val === '') return undefined;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormControl, FormErrorMessage, FormLabel, Select } from '@chakra-ui/react';
|
import { FormControl, FormErrorMessage, FormLabel, Select } from '@chakra-ui/react';
|
||||||
import isEqual from 'react-fast-compare';
|
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
import isEqual from 'react-fast-compare';
|
||||||
import { defaultFormInput, FormInputProps } from 'models/FormField';
|
import { defaultFormInput, FormInputProps } from 'models/FormField';
|
||||||
|
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
||||||
|
|
||||||
interface Props extends FormInputProps {
|
interface Props extends FormInputProps {
|
||||||
value?: string;
|
value?: string;
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useField } from 'formik';
|
import { useField } from 'formik';
|
||||||
import SelectInput from './FastSelectInput';
|
import { defaultFormField, FormFieldProps } from 'models/FormField';
|
||||||
import { FormFieldProps } from 'models/FormField';
|
import Field from './FastSelectInput';
|
||||||
|
|
||||||
interface SelectFieldProps extends FormFieldProps {
|
interface Props extends FormFieldProps {
|
||||||
options: { label: string; value: string | number }[];
|
options: { label: string; value: string | number }[];
|
||||||
}
|
}
|
||||||
|
const defaultProps = defaultFormField;
|
||||||
|
|
||||||
const SelectField = ({
|
const SelectField: React.FC<Props> = ({
|
||||||
options,
|
options,
|
||||||
name,
|
name,
|
||||||
isDisabled,
|
isDisabled,
|
||||||
@@ -21,11 +22,11 @@ const SelectField = ({
|
|||||||
isInt,
|
isInt,
|
||||||
w,
|
w,
|
||||||
definitionKey,
|
definitionKey,
|
||||||
}: SelectFieldProps) => {
|
}) => {
|
||||||
const [{ value }, { touched, error }, { setValue, setTouched }] = useField(name);
|
const [{ value }, { touched, error }, { setValue, setTouched }] = useField(name);
|
||||||
|
|
||||||
const onChange = useCallback(
|
const onChange = useCallback(
|
||||||
(e: React.ChangeEvent<HTMLSelectElement>) => {
|
(e) => {
|
||||||
if (onCustomChange) {
|
if (onCustomChange) {
|
||||||
onCustomChange(e);
|
onCustomChange(e);
|
||||||
} else {
|
} else {
|
||||||
@@ -48,7 +49,7 @@ const SelectField = ({
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SelectInput
|
<Field
|
||||||
label={label}
|
label={label}
|
||||||
value={value}
|
value={value}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
@@ -66,4 +67,6 @@ const SelectField = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SelectField.defaultProps = defaultProps;
|
||||||
|
|
||||||
export default React.memo(SelectField);
|
export default React.memo(SelectField);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormControl, FormErrorMessage, FormLabel } from '@chakra-ui/react';
|
|
||||||
import { Select } from 'chakra-react-select';
|
|
||||||
import { Field, useFormikContext } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { FormControl, FormErrorMessage, FormLabel } from '@chakra-ui/react';
|
||||||
|
import { Field, useFormikContext } from 'formik';
|
||||||
|
import { Select } from 'chakra-react-select';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
@@ -11,8 +11,8 @@ import {
|
|||||||
useBoolean,
|
useBoolean,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
|
||||||
import { FieldInputProps } from 'models/Form';
|
import { FieldInputProps } from 'models/Form';
|
||||||
|
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
||||||
|
|
||||||
interface Props extends FieldInputProps<string | undefined | string[]> {
|
interface Props extends FieldInputProps<string | undefined | string[]> {
|
||||||
isError: boolean;
|
isError: boolean;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { LayoutProps } from '@chakra-ui/react';
|
|
||||||
import StringInput from './StringInput';
|
|
||||||
import useFastField from 'hooks/useFastField';
|
import useFastField from 'hooks/useFastField';
|
||||||
import { FieldProps } from 'models/Form';
|
import { FieldProps } from 'models/Form';
|
||||||
|
import { LayoutProps } from '@chakra-ui/react';
|
||||||
|
import StringInput from './StringInput';
|
||||||
|
|
||||||
interface Props extends FieldProps, LayoutProps {
|
interface Props extends FieldProps, LayoutProps {
|
||||||
hideButton?: boolean;
|
hideButton?: boolean;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormControl, FormErrorMessage, FormLabel, Switch } from '@chakra-ui/react';
|
import { FormControl, FormErrorMessage, FormLabel, Switch } from '@chakra-ui/react';
|
||||||
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
|
||||||
import { FieldInputProps } from 'models/Form';
|
import { FieldInputProps } from 'models/Form';
|
||||||
|
import ConfigurationFieldExplanation from '../ConfigurationFieldExplanation';
|
||||||
|
|
||||||
interface Props extends FieldInputProps<boolean> {
|
interface Props extends FieldInputProps<boolean> {
|
||||||
element?: React.ReactNode;
|
element?: React.ReactNode;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import Field from './FastToggleInput';
|
|
||||||
import useFastField from 'hooks/useFastField';
|
import useFastField from 'hooks/useFastField';
|
||||||
import { FieldProps } from 'models/Form';
|
import { FieldProps } from 'models/Form';
|
||||||
|
import Field from './FastToggleInput';
|
||||||
|
|
||||||
interface Props extends FieldProps {
|
interface Props extends FieldProps {
|
||||||
falseIsUndefined?: boolean;
|
falseIsUndefined?: boolean;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Tooltip } from '@chakra-ui/react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { Tooltip } from '@chakra-ui/react';
|
||||||
import { compactDate, formatDaysAgo } from 'utils/dateFormatting';
|
import { compactDate, formatDaysAgo } from 'utils/dateFormatting';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useMemo } from 'react';
|
|
||||||
import { IconButton, Menu, MenuButton, MenuItem, MenuList, Tooltip } from '@chakra-ui/react';
|
import { IconButton, Menu, MenuButton, MenuItem, MenuList, Tooltip } from '@chakra-ui/react';
|
||||||
|
import React, { useMemo } from 'react';
|
||||||
import ReactCountryFlag from 'react-country-flag';
|
import ReactCountryFlag from 'react-country-flag';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Spinner, useColorMode } from '@chakra-ui/react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { Spinner, useColorMode } from '@chakra-ui/react';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
isLoading: PropTypes.bool.isRequired,
|
isLoading: PropTypes.bool.isRequired,
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { useRef } from 'react';
|
import React, { useRef } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import {
|
import {
|
||||||
AlertDialog,
|
AlertDialog,
|
||||||
AlertDialogBody,
|
AlertDialogBody,
|
||||||
@@ -8,7 +9,6 @@ import {
|
|||||||
AlertDialogOverlay,
|
AlertDialogOverlay,
|
||||||
Button,
|
Button,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import {
|
import {
|
||||||
Modal,
|
Modal,
|
||||||
ModalOverlay,
|
ModalOverlay,
|
||||||
@@ -10,14 +11,13 @@ import {
|
|||||||
ListItem,
|
ListItem,
|
||||||
Heading,
|
Heading,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import CloseButton from 'components/Buttons/CloseButton';
|
import CloseButton from 'components/Buttons/CloseButton';
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
|
import { useGetConfigurationInUse } from 'hooks/Network/Configurations';
|
||||||
import EntityCell from 'components/TableCells/EntityCell';
|
import EntityCell from 'components/TableCells/EntityCell';
|
||||||
import VenueCell from 'components/TableCells/VenueCell';
|
import VenueCell from 'components/TableCells/VenueCell';
|
||||||
import { useGetConfigurationInUse } from 'hooks/Network/Configurations';
|
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
isOpen: PropTypes.bool.isRequired,
|
isOpen: PropTypes.bool.isRequired,
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { useToast, SimpleGrid, Heading } from '@chakra-ui/react';
|
|
||||||
import { Formik, Form } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useQueryClient } from 'react-query';
|
|
||||||
import { useNavigate } from 'react-router-dom';
|
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import SelectField from 'components/FormFields/SelectField';
|
import { useToast, SimpleGrid, Heading } from '@chakra-ui/react';
|
||||||
import StringField from 'components/FormFields/StringField';
|
import { Formik, Form } from 'formik';
|
||||||
import { EntitySchema } from 'constants/formSchemas';
|
import { EntitySchema } from 'constants/formSchemas';
|
||||||
|
import StringField from 'components/FormFields/StringField';
|
||||||
import { useCreateEntity } from 'hooks/Network/Entity';
|
import { useCreateEntity } from 'hooks/Network/Entity';
|
||||||
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
import { useQueryClient } from 'react-query';
|
||||||
|
import SelectField from 'components/FormFields/SelectField';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
isOpen: PropTypes.bool.isRequired,
|
isOpen: PropTypes.bool.isRequired,
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { Modal, ModalBody, ModalContent, ModalOverlay, useDisclosure } from '@chakra-ui/react';
|
import { Modal, ModalBody, ModalContent, ModalOverlay, useDisclosure } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import CreateRootForm from './Form';
|
|
||||||
import SaveButton from 'components/Buttons/SaveButton';
|
import SaveButton from 'components/Buttons/SaveButton';
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
|
||||||
import { useAuth } from 'contexts/AuthProvider';
|
import { useAuth } from 'contexts/AuthProvider';
|
||||||
import { useGetRoot } from 'hooks/Network/Entity';
|
import { useGetRoot } from 'hooks/Network/Entity';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
import useFormRef from 'hooks/useFormRef';
|
import useFormRef from 'hooks/useFormRef';
|
||||||
|
import CreateRootForm from './Form';
|
||||||
|
|
||||||
const CreateRootModal = () => {
|
const CreateRootModal = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Modal as ChakraModal, ModalBody, ModalContent, ModalOverlay } from '@chakra-ui/react';
|
import { Modal as ChakraModal, ModalBody, ModalContent, ModalOverlay } from '@chakra-ui/react';
|
||||||
import ModalHeader from '../ModalHeader';
|
|
||||||
import CloseButton from 'components/Buttons/CloseButton';
|
import CloseButton from 'components/Buttons/CloseButton';
|
||||||
|
import ModalHeader from '../ModalHeader';
|
||||||
|
|
||||||
export type ModalProps = {
|
export type ModalProps = {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Flex, ModalHeader as Header, Spacer } from '@chakra-ui/react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { Flex, ModalHeader as Header, Spacer } from '@chakra-ui/react';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { SimpleGrid } from '@chakra-ui/react';
|
|
||||||
import { Formik, Form } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import DeviceRulesField from 'components/CustomFields/DeviceRulesField';
|
import { SimpleGrid } from '@chakra-ui/react';
|
||||||
import IpDetectionModalField from 'components/CustomFields/IpDetectionModalField';
|
import { Formik, Form } from 'formik';
|
||||||
import StringField from 'components/FormFields/StringField';
|
|
||||||
import { CreateOperatorSchema } from 'constants/formSchemas';
|
import { CreateOperatorSchema } from 'constants/formSchemas';
|
||||||
|
import StringField from 'components/FormFields/StringField';
|
||||||
import { useCreateOperator } from 'hooks/Network/Operators';
|
import { useCreateOperator } from 'hooks/Network/Operators';
|
||||||
import useMutationResult from 'hooks/useMutationResult';
|
import useMutationResult from 'hooks/useMutationResult';
|
||||||
|
import IpDetectionModalField from 'components/CustomFields/IpDetectionModalField';
|
||||||
|
import DeviceRulesField from 'components/CustomFields/DeviceRulesField';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
isOpen: PropTypes.bool.isRequired,
|
isOpen: PropTypes.bool.isRequired,
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Modal, ModalOverlay, ModalContent, ModalBody } from '@chakra-ui/react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { Modal, ModalOverlay, ModalContent, ModalBody } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import CreateOperatorForm from './Form';
|
|
||||||
import CloseButton from 'components/Buttons/CloseButton';
|
|
||||||
import CreateButton from 'components/Buttons/CreateButton';
|
|
||||||
import SaveButton from 'components/Buttons/SaveButton';
|
|
||||||
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
||||||
|
import SaveButton from 'components/Buttons/SaveButton';
|
||||||
|
import CloseButton from 'components/Buttons/CloseButton';
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
|
import CreateButton from 'components/Buttons/CreateButton';
|
||||||
import useFormModal from 'hooks/useFormModal';
|
import useFormModal from 'hooks/useFormModal';
|
||||||
import useFormRef from 'hooks/useFormRef';
|
import useFormRef from 'hooks/useFormRef';
|
||||||
|
import CreateOperatorForm from './Form';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
refresh: PropTypes.func.isRequired,
|
refresh: PropTypes.func.isRequired,
|
||||||
@@ -10,15 +10,15 @@ import {
|
|||||||
Select,
|
Select,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
||||||
|
import SaveButton from 'components/Buttons/SaveButton';
|
||||||
|
import CloseButton from 'components/Buttons/CloseButton';
|
||||||
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
|
import CreateButton from 'components/Buttons/CreateButton';
|
||||||
|
import useFormRef from 'hooks/useFormRef';
|
||||||
import InterfaceSsidResource from '../Sections/InterfaceSsid';
|
import InterfaceSsidResource from '../Sections/InterfaceSsid';
|
||||||
import InterfaceSsidRadiusResource from '../Sections/InterfaceSsidRadius';
|
import InterfaceSsidRadiusResource from '../Sections/InterfaceSsidRadius';
|
||||||
import InterfaceVlanResource from '../Sections/InterfaceVlan';
|
import InterfaceVlanResource from '../Sections/InterfaceVlan';
|
||||||
import CloseButton from 'components/Buttons/CloseButton';
|
|
||||||
import CreateButton from 'components/Buttons/CreateButton';
|
|
||||||
import SaveButton from 'components/Buttons/SaveButton';
|
|
||||||
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
|
||||||
import useFormRef from 'hooks/useFormRef';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
refresh: () => void;
|
refresh: () => void;
|
||||||
|
|||||||
@@ -10,17 +10,17 @@ import {
|
|||||||
useBoolean,
|
useBoolean,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import InterfaceSsidResource from '../Sections/InterfaceSsid';
|
|
||||||
import InterfaceSsidRadiusResource from '../Sections/InterfaceSsidRadius';
|
|
||||||
import InterfaceVlanResource from '../Sections/InterfaceVlan';
|
|
||||||
import CloseButton from 'components/Buttons/CloseButton';
|
|
||||||
import EditButton from 'components/Buttons/EditButton';
|
|
||||||
import SaveButton from 'components/Buttons/SaveButton';
|
|
||||||
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
||||||
|
import SaveButton from 'components/Buttons/SaveButton';
|
||||||
|
import EditButton from 'components/Buttons/EditButton';
|
||||||
|
import CloseButton from 'components/Buttons/CloseButton';
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
|
import { Resource } from 'models/Resource';
|
||||||
import { useGetResource } from 'hooks/Network/Resources';
|
import { useGetResource } from 'hooks/Network/Resources';
|
||||||
import useFormRef from 'hooks/useFormRef';
|
import useFormRef from 'hooks/useFormRef';
|
||||||
import { Resource } from 'models/Resource';
|
import InterfaceSsidRadiusResource from '../Sections/InterfaceSsidRadius';
|
||||||
|
import InterfaceVlanResource from '../Sections/InterfaceVlan';
|
||||||
|
import InterfaceSsidResource from '../Sections/InterfaceSsid';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ import { Formik, FormikProps } from 'formik';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { object, string } from 'yup';
|
import { object, string } from 'yup';
|
||||||
import InterfaceSsidForm from './Form';
|
|
||||||
import NotesTable from 'components/CustomFields/NotesTable';
|
import NotesTable from 'components/CustomFields/NotesTable';
|
||||||
import StringField from 'components/FormFields/StringField';
|
import StringField from 'components/FormFields/StringField';
|
||||||
import { useCreateResource, useUpdateResource } from 'hooks/Network/Resources';
|
import { useCreateResource, useUpdateResource } from 'hooks/Network/Resources';
|
||||||
import { Note } from 'models/Note';
|
import { Note } from 'models/Note';
|
||||||
import { Resource } from 'models/Resource';
|
import { Resource } from 'models/Resource';
|
||||||
import { INTERFACE_SSID_SCHEMA } from 'pages/ConfigurationPage/ConfigurationCard/ConfigurationSectionsCard/InterfaceSection/interfacesConstants';
|
import { INTERFACE_SSID_SCHEMA } from 'pages/ConfigurationPage/ConfigurationCard/ConfigurationSectionsCard/InterfaceSection/interfacesConstants';
|
||||||
|
import InterfaceSsidForm from './Form';
|
||||||
|
|
||||||
export const EDIT_SCHEMA = (t: (str: string) => string) =>
|
export const EDIT_SCHEMA = (t: (str: string) => string) =>
|
||||||
object().shape({
|
object().shape({
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import { FormControl, FormLabel, Heading, SimpleGrid, Switch } from '@chakra-ui/react';
|
|
||||||
import { useFormikContext, getIn } from 'formik';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { INTERFACE_SSID_RADIUS_LOCAL_SCHEMA, INTERFACE_SSID_RADIUS_LOCAL_USER_SCHEMA } from './schemas';
|
import { useFormikContext, getIn } from 'formik';
|
||||||
import NumberField from 'components/FormFields/NumberField';
|
|
||||||
import ObjectArrayFieldModal from 'components/FormFields/ObjectArrayFieldModal';
|
|
||||||
import StringField from 'components/FormFields/StringField';
|
import StringField from 'components/FormFields/StringField';
|
||||||
|
import NumberField from 'components/FormFields/NumberField';
|
||||||
|
import { FormControl, FormLabel, Heading, SimpleGrid, Switch } from '@chakra-ui/react';
|
||||||
import ToggleField from 'components/FormFields/ToggleField';
|
import ToggleField from 'components/FormFields/ToggleField';
|
||||||
|
import ObjectArrayFieldModal from 'components/FormFields/ObjectArrayFieldModal';
|
||||||
|
import { INTERFACE_SSID_RADIUS_LOCAL_SCHEMA, INTERFACE_SSID_RADIUS_LOCAL_USER_SCHEMA } from './schemas';
|
||||||
|
|
||||||
const InterfaceSsidRadiusResourceForm = ({ isDisabled }: { isDisabled: boolean }) => {
|
const InterfaceSsidRadiusResourceForm = ({ isDisabled }: { isDisabled: boolean }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { SimpleGrid, Tab, TabList, TabPanel, TabPanels, Tabs, useToast } from '@chakra-ui/react';
|
|
||||||
import { AxiosError } from 'axios';
|
|
||||||
import { Formik, FormikProps } from 'formik';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
|
import { AxiosError } from 'axios';
|
||||||
|
import { SimpleGrid, Tab, TabList, TabPanel, TabPanels, Tabs, useToast } from '@chakra-ui/react';
|
||||||
|
import { Formik, FormikProps } from 'formik';
|
||||||
|
import { useCreateResource, useUpdateResource } from 'hooks/Network/Resources';
|
||||||
|
import StringField from 'components/FormFields/StringField';
|
||||||
|
import NotesTable from 'components/CustomFields/NotesTable';
|
||||||
|
import { Resource } from 'models/Resource';
|
||||||
|
import { Note } from 'models/Note';
|
||||||
import InterfaceSsidRadiusForm from './Form';
|
import InterfaceSsidRadiusForm from './Form';
|
||||||
import { EDIT_SCHEMA, RADIUS_SCHEMA } from './schemas';
|
import { EDIT_SCHEMA, RADIUS_SCHEMA } from './schemas';
|
||||||
import NotesTable from 'components/CustomFields/NotesTable';
|
|
||||||
import StringField from 'components/FormFields/StringField';
|
|
||||||
import { useCreateResource, useUpdateResource } from 'hooks/Network/Resources';
|
|
||||||
import { Note } from 'models/Note';
|
|
||||||
import { Resource } from 'models/Resource';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Heading, SimpleGrid } from '@chakra-ui/react';
|
|
||||||
import NumberField from 'components/FormFields/NumberField';
|
import NumberField from 'components/FormFields/NumberField';
|
||||||
|
import { Heading, SimpleGrid } from '@chakra-ui/react';
|
||||||
|
|
||||||
const InterfaceVlanForm = ({ isDisabled }: { isDisabled: boolean }) => (
|
const InterfaceVlanForm = ({ isDisabled }: { isDisabled: boolean }) => (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { SimpleGrid, Tab, TabList, TabPanel, TabPanels, Tabs, useToast } from '@chakra-ui/react';
|
|
||||||
import { AxiosError } from 'axios';
|
|
||||||
import { Formik, FormikProps } from 'formik';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { AxiosError } from 'axios';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
|
import { SimpleGrid, Tab, TabList, TabPanel, TabPanels, Tabs, useToast } from '@chakra-ui/react';
|
||||||
|
import { Formik, FormikProps } from 'formik';
|
||||||
|
import { useCreateResource, useUpdateResource } from 'hooks/Network/Resources';
|
||||||
|
import StringField from 'components/FormFields/StringField';
|
||||||
|
import NotesTable from 'components/CustomFields/NotesTable';
|
||||||
|
import { Resource } from 'models/Resource';
|
||||||
|
import { Note } from 'models/Note';
|
||||||
import InterfaceVlanForm from './Form';
|
import InterfaceVlanForm from './Form';
|
||||||
import EDIT_SCHEMA from './schemas';
|
import EDIT_SCHEMA from './schemas';
|
||||||
import NotesTable from 'components/CustomFields/NotesTable';
|
|
||||||
import StringField from 'components/FormFields/StringField';
|
|
||||||
import { useCreateResource, useUpdateResource } from 'hooks/Network/Resources';
|
|
||||||
import { Note } from 'models/Note';
|
|
||||||
import { Resource } from 'models/Resource';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { SimpleGrid } from '@chakra-ui/react';
|
|
||||||
import { Formik, Form } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import NumberCurrencyField from 'components/CustomFields/NumberCurrencyField';
|
import { SimpleGrid } from '@chakra-ui/react';
|
||||||
import SelectField from 'components/FormFields/SelectField';
|
import { Formik, Form } from 'formik';
|
||||||
import StringField from 'components/FormFields/StringField';
|
|
||||||
import { ServiceClassSchema } from 'constants/formSchemas';
|
import { ServiceClassSchema } from 'constants/formSchemas';
|
||||||
import { useCreateServiceClass } from 'hooks/Network/ServiceClasses';
|
import StringField from 'components/FormFields/StringField';
|
||||||
import useMutationResult from 'hooks/useMutationResult';
|
import useMutationResult from 'hooks/useMutationResult';
|
||||||
|
import SelectField from 'components/FormFields/SelectField';
|
||||||
|
import { useCreateServiceClass } from 'hooks/Network/ServiceClasses';
|
||||||
|
import NumberCurrencyField from 'components/CustomFields/NumberCurrencyField';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
isOpen: PropTypes.bool.isRequired,
|
isOpen: PropTypes.bool.isRequired,
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Modal, ModalOverlay, ModalContent, ModalBody } from '@chakra-ui/react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { Modal, ModalOverlay, ModalContent, ModalBody } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import CreateServiceClassForm from './Form';
|
|
||||||
import CloseButton from 'components/Buttons/CloseButton';
|
|
||||||
import CreateButton from 'components/Buttons/CreateButton';
|
|
||||||
import SaveButton from 'components/Buttons/SaveButton';
|
|
||||||
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
||||||
|
import SaveButton from 'components/Buttons/SaveButton';
|
||||||
|
import CloseButton from 'components/Buttons/CloseButton';
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
|
import CreateButton from 'components/Buttons/CreateButton';
|
||||||
import useFormModal from 'hooks/useFormModal';
|
import useFormModal from 'hooks/useFormModal';
|
||||||
import useFormRef from 'hooks/useFormRef';
|
import useFormRef from 'hooks/useFormRef';
|
||||||
|
import CreateServiceClassForm from './Form';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
refresh: PropTypes.func.isRequired,
|
refresh: PropTypes.func.isRequired,
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { SimpleGrid, Tab, TabList, TabPanel, TabPanels, Tabs } from '@chakra-ui/react';
|
|
||||||
import { Formik, Form } from 'formik';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import NotesTable from 'components/CustomFields/NotesTable';
|
import { SimpleGrid, Tab, TabList, TabPanel, TabPanels, Tabs } from '@chakra-ui/react';
|
||||||
import NumberCurrencyField from 'components/CustomFields/NumberCurrencyField';
|
import { Formik, Form } from 'formik';
|
||||||
import SelectField from 'components/FormFields/SelectField';
|
|
||||||
import StringField from 'components/FormFields/StringField';
|
|
||||||
import { ServiceClassSchema } from 'constants/formSchemas';
|
import { ServiceClassSchema } from 'constants/formSchemas';
|
||||||
import { useUpdateServiceClass } from 'hooks/Network/ServiceClasses';
|
import StringField from 'components/FormFields/StringField';
|
||||||
|
import SelectField from 'components/FormFields/SelectField';
|
||||||
import useMutationResult from 'hooks/useMutationResult';
|
import useMutationResult from 'hooks/useMutationResult';
|
||||||
|
import { useUpdateServiceClass } from 'hooks/Network/ServiceClasses';
|
||||||
|
import NumberCurrencyField from 'components/CustomFields/NumberCurrencyField';
|
||||||
|
import NotesTable from 'components/CustomFields/NotesTable';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
isOpen: PropTypes.bool.isRequired,
|
isOpen: PropTypes.bool.isRequired,
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { Modal, ModalOverlay, ModalContent, ModalBody, useBoolean, Center, Spinner } from '@chakra-ui/react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { Modal, ModalOverlay, ModalContent, ModalBody, useBoolean, Center, Spinner } from '@chakra-ui/react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import EditServiceClassForm from './Form';
|
|
||||||
import CloseButton from 'components/Buttons/CloseButton';
|
|
||||||
import EditButton from 'components/Buttons/EditButton';
|
|
||||||
import SaveButton from 'components/Buttons/SaveButton';
|
|
||||||
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
import ConfirmCloseAlert from 'components/Modals/Actions/ConfirmCloseAlert';
|
||||||
|
import SaveButton from 'components/Buttons/SaveButton';
|
||||||
|
import CloseButton from 'components/Buttons/CloseButton';
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
import { useGetServiceClass } from 'hooks/Network/ServiceClasses';
|
|
||||||
import useFormModal from 'hooks/useFormModal';
|
|
||||||
import useFormRef from 'hooks/useFormRef';
|
import useFormRef from 'hooks/useFormRef';
|
||||||
|
import useFormModal from 'hooks/useFormModal';
|
||||||
|
import { useGetServiceClass } from 'hooks/Network/ServiceClasses';
|
||||||
|
import EditButton from 'components/Buttons/EditButton';
|
||||||
|
import EditServiceClassForm from './Form';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
isOpen: PropTypes.bool.isRequired,
|
isOpen: PropTypes.bool.isRequired,
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
import React, { useCallback, useMemo } from 'react';
|
|
||||||
import { Flex, IconButton, Tooltip } from '@chakra-ui/react';
|
import { Flex, IconButton, Tooltip } from '@chakra-ui/react';
|
||||||
import { MagnifyingGlass } from 'phosphor-react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { useNavigate } from 'react-router-dom';
|
|
||||||
import DataTable from 'components/DataTable';
|
import DataTable from 'components/DataTable';
|
||||||
import { Subscriber } from 'models/Subscriber';
|
import { Subscriber } from 'models/Subscriber';
|
||||||
|
import { MagnifyingGlass } from 'phosphor-react';
|
||||||
|
import React, { useCallback, useMemo } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
subscribers: Subscriber[];
|
subscribers: Subscriber[];
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Button, Modal, ModalOverlay, ModalContent, ModalBody, useDisclosure, Flex } from '@chakra-ui/react';
|
import { Button, Modal, ModalOverlay, ModalContent, ModalBody, useDisclosure, Flex } from '@chakra-ui/react';
|
||||||
import { MagnifyingGlass } from 'phosphor-react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import SubscriberSearchDisplayTable from './Table';
|
|
||||||
import CloseButton from 'components/Buttons/CloseButton';
|
import CloseButton from 'components/Buttons/CloseButton';
|
||||||
import ModalHeader from 'components/Modals/ModalHeader';
|
import ModalHeader from 'components/Modals/ModalHeader';
|
||||||
import SubscriberSearch from 'components/SearchBars/SubscriberSearch';
|
import SubscriberSearch from 'components/SearchBars/SubscriberSearch';
|
||||||
|
import { MagnifyingGlass } from 'phosphor-react';
|
||||||
import { Subscriber } from 'models/Subscriber';
|
import { Subscriber } from 'models/Subscriber';
|
||||||
|
import SubscriberSearchDisplayTable from './Table';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
operatorId: string;
|
operatorId: string;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user