Cleanup
This commit is contained in:
@ -116,7 +116,6 @@ export default function AccountMenu() {
|
||||
anchorOrigin={{ horizontal: 'right', vertical: 'bottom' }}
|
||||
>
|
||||
<MenuItem onClick={() => {
|
||||
console.log()
|
||||
}}>
|
||||
<ListItemIcon>
|
||||
<Android12Switch
|
||||
|
@ -12,7 +12,7 @@ export function useDataFetching<T>(url: string, initData: T): T {
|
||||
|
||||
fetchData()
|
||||
}, [url])
|
||||
console.log(data)
|
||||
|
||||
// Memoize the data value
|
||||
const memoizedData = useMemo<T>(() => data, [data])
|
||||
return memoizedData
|
||||
|
@ -118,7 +118,6 @@ export default function FolderViewer() {
|
||||
}
|
||||
|
||||
const handleDocumentClick = async (doc: IDocument, index: number) => {
|
||||
console.log(doc)
|
||||
setCurrentFileNo(index)
|
||||
setFileViewerModal(true)
|
||||
}
|
||||
|
@ -25,14 +25,12 @@ function ServerData({ id }: IServer) {
|
||||
columns={serverIpsColumns}
|
||||
actions
|
||||
onRowClick={(params, event, details) => {
|
||||
console.log(params.id, event, details)
|
||||
//setCurrentServerData(params.row)
|
||||
//setServerDataOpen(true)
|
||||
}}
|
||||
onSave={undefined}
|
||||
onDelete={function (data: any): Promise<AxiosResponse<any, any>> {
|
||||
console.log(data)
|
||||
throw new Error('Function not implemented.')
|
||||
throw new Error('N/A.')
|
||||
}}
|
||||
loading={false}
|
||||
/>
|
||||
|
@ -127,7 +127,6 @@ export default function ServerHardware() {
|
||||
}} />
|
||||
)} />}
|
||||
onSave={(id: any) => {
|
||||
console.log(id)
|
||||
}}
|
||||
onDelete={ServerService.removeServer}
|
||||
initialRows={hardwares}
|
||||
|
@ -125,7 +125,6 @@ export default function ServerIpsView() {
|
||||
}} />
|
||||
)} />}
|
||||
onSave={(id: any) => {
|
||||
console.log(id)
|
||||
}}
|
||||
onDelete={ServerService.removeServer}
|
||||
initialRows={serverIps}
|
||||
|
@ -116,7 +116,6 @@ export default function ServerStorage() {
|
||||
}} />
|
||||
)} />}
|
||||
onSave={(id: any) => {
|
||||
console.log(id)
|
||||
}}
|
||||
onDelete={ServerService.removeServer}
|
||||
initialRows={storages}
|
||||
|
@ -170,7 +170,6 @@ export default function ServersView() {
|
||||
/>
|
||||
}
|
||||
onSave={(id: any) => {
|
||||
console.log(id)
|
||||
}}
|
||||
onDelete={ServerService.removeServer}
|
||||
initialRows={servers}
|
||||
|
@ -43,7 +43,6 @@ export default function CreateCompanyModal({
|
||||
const onSubmit: SubmitHandler<ICompany> = async (data) => {
|
||||
try {
|
||||
const response: AxiosResponse<ApiResponse> = await RoleService.createRole(data)
|
||||
console.log(response.data)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ export default function CreateDepartmentModal({
|
||||
const onSubmit: SubmitHandler<ICompany> = async (data) => {
|
||||
try {
|
||||
const response: AxiosResponse<ApiResponse> = await RoleService.createRole(data)
|
||||
console.log(response.data)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
|
@ -39,7 +39,6 @@ export default function CreateRoleModal({
|
||||
const onSubmit: SubmitHandler<IRoleCreate> = async (data) => {
|
||||
try {
|
||||
const response: AxiosResponse<ApiResponse> = await RoleService.createRole(data)
|
||||
console.log(response.data)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
|
@ -44,7 +44,6 @@ export default function CreateUserModal({
|
||||
const onSubmit: SubmitHandler<IUserCreate> = async (data) => {
|
||||
try {
|
||||
const response: AxiosResponse<ApiResponse> = await UserService.createUser(data)
|
||||
console.log(response.data)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ import React, { useEffect } from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import App from './App.tsx'
|
||||
import './index.css'
|
||||
import { registerSW } from 'virtual:pwa-register'
|
||||
import { ThemeProvider } from '@emotion/react'
|
||||
import { createTheme } from '@mui/material'
|
||||
import { ruRU } from '@mui/material/locale'
|
||||
@ -51,17 +50,6 @@ const lightTheme = createTheme(
|
||||
ruRU,
|
||||
);
|
||||
|
||||
const updateSW = registerSW({
|
||||
onNeedRefresh() {
|
||||
if (confirm("New content available. Reload?")) {
|
||||
updateSW(true);
|
||||
}
|
||||
},
|
||||
onOfflineReady() {
|
||||
console.log("offline ready");
|
||||
},
|
||||
});
|
||||
|
||||
function ThemedApp() {
|
||||
const prefStore = usePrefStore()
|
||||
|
||||
|
@ -68,12 +68,10 @@ export default function Reports() {
|
||||
disableRowSelectionOnClick
|
||||
|
||||
processRowUpdate={(updatedRow, originalRow) => {
|
||||
console.log(updatedRow, originalRow)
|
||||
return updatedRow
|
||||
}}
|
||||
|
||||
onProcessRowUpdateError={(error) => {
|
||||
console.log(error)
|
||||
}}
|
||||
/>
|
||||
}
|
||||
|
@ -49,12 +49,10 @@ export default function Roles() {
|
||||
disableRowSelectionOnClick
|
||||
|
||||
processRowUpdate={(updatedRow, originalRow) => {
|
||||
console.log(updatedRow, originalRow)
|
||||
return updatedRow
|
||||
}}
|
||||
|
||||
onProcessRowUpdateError={(error) => {
|
||||
console.log(error)
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
|
@ -9,7 +9,6 @@ export default function Servers() {
|
||||
const [currentTab, setCurrentTab] = useState(0)
|
||||
|
||||
const handleTabChange = (event: React.SyntheticEvent, newValue: number) => {
|
||||
console.log(event)
|
||||
setCurrentTab(newValue);
|
||||
}
|
||||
|
||||
|
@ -70,12 +70,10 @@ export default function Settings() {
|
||||
disableRowSelectionOnClick
|
||||
|
||||
processRowUpdate={(updatedRow, originalRow) => {
|
||||
console.log(updatedRow, originalRow)
|
||||
return updatedRow
|
||||
}}
|
||||
|
||||
onProcessRowUpdateError={(error) => {
|
||||
console.log(error)
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
|
@ -65,12 +65,10 @@ export default function Users() {
|
||||
disableRowSelectionOnClick
|
||||
|
||||
processRowUpdate={(updatedRow, originalRow) => {
|
||||
console.log(updatedRow, originalRow)
|
||||
return updatedRow
|
||||
}}
|
||||
|
||||
onProcessRowUpdateError={(error) => {
|
||||
console.log(error)
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
|
@ -29,14 +29,11 @@ const SignIn = () => {
|
||||
|
||||
try {
|
||||
const response: AxiosResponse<ApiResponse> = await AuthService.login(formBody)
|
||||
console.log('Вход произошел успешно:', response.data);
|
||||
|
||||
const token = response.data.access_token
|
||||
|
||||
const userDataResponse: AxiosResponse<ApiResponse> = await UserService.getCurrentUser(token)
|
||||
|
||||
console.log('Пользователь:', userDataResponse.data)
|
||||
|
||||
setUserData(JSON.stringify(userDataResponse.data))
|
||||
|
||||
login(token)
|
||||
|
@ -22,7 +22,6 @@ const SignUp = () => {
|
||||
const onSubmit: SubmitHandler<IUserCreate> = async (data) => {
|
||||
try {
|
||||
const response: AxiosResponse<ApiResponse> = await UserService.createUser(data)
|
||||
console.log('Успешная регистрация:', response.data);
|
||||
} catch (error) {
|
||||
console.error('Ошибка регистрации:', error);
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ const initAuth = async () => {
|
||||
if (currentTime - issuedDate < TOKEN_EXPIRY_DURATION) {
|
||||
useAuthStore.setState(() => ({ isAuthenticated: true, token: token }))
|
||||
} else {
|
||||
console.log("refreshing token")
|
||||
try {
|
||||
await refreshToken();
|
||||
} catch (error) {
|
||||
|
Reference in New Issue
Block a user