forked from VinokurovVE/tests
Build & serve
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import { Box, Button } from "@mui/material"
|
||||
import { Box } from "@mui/material"
|
||||
import { useCities } from "../hooks/swrHooks"
|
||||
import { useEffect, useState } from "react"
|
||||
import { useDebounce } from "@uidotdev/usehooks"
|
||||
import { DataGrid, GridColDef } from "@mui/x-data-grid"
|
||||
import axiosInstance from "../http/axiosInstance"
|
||||
import { BASE_URL } from "../constants"
|
||||
|
@ -2,6 +2,7 @@ import { useState } from "react"
|
||||
import { Box, Button } from "@mui/material"
|
||||
import axiosInstance from "../http/axiosInstance"
|
||||
import { DataGrid } from "@mui/x-data-grid"
|
||||
import { BASE_URL } from "../constants"
|
||||
|
||||
export default function Reports() {
|
||||
const [state, setState] = useState(null)
|
||||
@ -9,6 +10,7 @@ export default function Reports() {
|
||||
const fetch = async () => {
|
||||
await axiosInstance.get(`/info/reports/0?to_export=true`, {
|
||||
responseType: 'blob',
|
||||
baseURL: BASE_URL.info
|
||||
}).then(response => {
|
||||
const url = window.URL.createObjectURL(response.data)
|
||||
const link = document.createElement('a')
|
||||
@ -67,11 +69,11 @@ export default function Reports() {
|
||||
checkboxSelection={false}
|
||||
disableRowSelectionOnClick
|
||||
|
||||
processRowUpdate={(updatedRow, originalRow) => {
|
||||
processRowUpdate={(updatedRow) => {
|
||||
return updatedRow
|
||||
}}
|
||||
|
||||
onProcessRowUpdateError={(error) => {
|
||||
onProcessRowUpdateError={() => {
|
||||
}}
|
||||
/>
|
||||
}
|
||||
|
@ -48,11 +48,11 @@ export default function Roles() {
|
||||
pageSizeOptions={[10, 20, 50, 100]}
|
||||
disableRowSelectionOnClick
|
||||
|
||||
processRowUpdate={(updatedRow, originalRow) => {
|
||||
processRowUpdate={(updatedRow) => {
|
||||
return updatedRow
|
||||
}}
|
||||
|
||||
onProcessRowUpdateError={(error) => {
|
||||
onProcessRowUpdateError={() => {
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
|
@ -8,7 +8,7 @@ import ServerStorage from "../components/ServerStorages"
|
||||
export default function Servers() {
|
||||
const [currentTab, setCurrentTab] = useState(0)
|
||||
|
||||
const handleTabChange = (event: React.SyntheticEvent, newValue: number) => {
|
||||
const handleTabChange = (newValue: number) => {
|
||||
setCurrentTab(newValue);
|
||||
}
|
||||
|
||||
@ -38,7 +38,9 @@ export default function Servers() {
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: '16px', height: '100%' }}>
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: '16px', height: '100%', p: '16px' }}>
|
||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||
<Tabs value={currentTab} onChange={handleTabChange} aria-label="basic tabs example">
|
||||
<Tabs value={currentTab} onChange={(_, value) =>
|
||||
handleTabChange(value)
|
||||
} aria-label="basic tabs example">
|
||||
<Tab label="Серверы" />
|
||||
<Tab label="IP-адреса" />
|
||||
<Tab label="Hardware" />
|
||||
|
@ -69,11 +69,11 @@ export default function Settings() {
|
||||
checkboxSelection
|
||||
disableRowSelectionOnClick
|
||||
|
||||
processRowUpdate={(updatedRow, originalRow) => {
|
||||
processRowUpdate={(updatedRow) => {
|
||||
return updatedRow
|
||||
}}
|
||||
|
||||
onProcessRowUpdateError={(error) => {
|
||||
onProcessRowUpdateError={() => {
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
|
@ -64,11 +64,11 @@ export default function Users() {
|
||||
checkboxSelection
|
||||
disableRowSelectionOnClick
|
||||
|
||||
processRowUpdate={(updatedRow, originalRow) => {
|
||||
processRowUpdate={(updatedRow) => {
|
||||
return updatedRow
|
||||
}}
|
||||
|
||||
onProcessRowUpdateError={(error) => {
|
||||
onProcessRowUpdateError={() => {
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
|
@ -1,7 +1,5 @@
|
||||
import { useForm, SubmitHandler } from 'react-hook-form';
|
||||
import { TextField, Button, Container, Typography, Box } from '@mui/material';
|
||||
import { AxiosResponse } from 'axios';
|
||||
import { ApiResponse } from '../../interfaces/auth';
|
||||
import UserService from '../../services/UserService';
|
||||
import { IUserCreate } from '../../interfaces/user';
|
||||
|
||||
@ -21,7 +19,7 @@ const SignUp = () => {
|
||||
|
||||
const onSubmit: SubmitHandler<IUserCreate> = async (data) => {
|
||||
try {
|
||||
const response: AxiosResponse<ApiResponse> = await UserService.createUser(data)
|
||||
await UserService.createUser(data)
|
||||
} catch (error) {
|
||||
console.error('Ошибка регистрации:', error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user