Alejandra
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with
15 additions and
15 deletions
-
frontend/src/components/Admin/AddUser.tsx
-
frontend/src/components/Admin/EditUser.tsx
-
frontend/src/components/Items/AddItem.tsx
-
frontend/src/components/Items/EditItem.tsx
-
frontend/src/components/UserSettings/ChangePassword.tsx
-
frontend/src/components/UserSettings/DeleteConfirmation.tsx
-
frontend/src/components/UserSettings/UserInformation.tsx
-
frontend/src/hooks/useAuth.ts
|
@ -14,10 +14,10 @@ import { |
|
|
ModalHeader, |
|
|
ModalHeader, |
|
|
ModalOverlay, |
|
|
ModalOverlay, |
|
|
} from "@chakra-ui/react" |
|
|
} from "@chakra-ui/react" |
|
|
import { useForm, type SubmitHandler } from "react-hook-form" |
|
|
import { type SubmitHandler, useForm } from "react-hook-form" |
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
|
|
|
|
|
|
import { UsersService, type UserCreate } from "../../client" |
|
|
import { type UserCreate, UsersService } from "../../client" |
|
|
import type { ApiError } from "../../client/core/ApiError" |
|
|
import type { ApiError } from "../../client/core/ApiError" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
import { emailPattern } from "../../utils" |
|
|
import { emailPattern } from "../../utils" |
|
|
|
@ -14,14 +14,14 @@ import { |
|
|
ModalHeader, |
|
|
ModalHeader, |
|
|
ModalOverlay, |
|
|
ModalOverlay, |
|
|
} from "@chakra-ui/react" |
|
|
} from "@chakra-ui/react" |
|
|
import { useForm, type SubmitHandler } from "react-hook-form" |
|
|
import { type SubmitHandler, useForm } from "react-hook-form" |
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
UsersService, |
|
|
|
|
|
type ApiError, |
|
|
type ApiError, |
|
|
type UserOut, |
|
|
type UserOut, |
|
|
type UserUpdate, |
|
|
type UserUpdate, |
|
|
|
|
|
UsersService, |
|
|
} from "../../client" |
|
|
} from "../../client" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
import { emailPattern } from "../../utils" |
|
|
import { emailPattern } from "../../utils" |
|
|
|
@ -12,10 +12,10 @@ import { |
|
|
ModalHeader, |
|
|
ModalHeader, |
|
|
ModalOverlay, |
|
|
ModalOverlay, |
|
|
} from "@chakra-ui/react" |
|
|
} from "@chakra-ui/react" |
|
|
import { useForm, type SubmitHandler } from "react-hook-form" |
|
|
import { type SubmitHandler, useForm } from "react-hook-form" |
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
|
|
|
|
|
|
import { ItemsService, type ApiError, type ItemCreate } from "../../client" |
|
|
import { type ApiError, type ItemCreate, ItemsService } from "../../client" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
|
|
|
|
|
|
interface AddItemProps { |
|
|
interface AddItemProps { |
|
|
|
@ -12,14 +12,14 @@ import { |
|
|
ModalHeader, |
|
|
ModalHeader, |
|
|
ModalOverlay, |
|
|
ModalOverlay, |
|
|
} from "@chakra-ui/react" |
|
|
} from "@chakra-ui/react" |
|
|
import { useForm, type SubmitHandler } from "react-hook-form" |
|
|
import { type SubmitHandler, useForm } from "react-hook-form" |
|
|
|
|
|
|
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
import { |
|
|
import { |
|
|
ItemsService, |
|
|
|
|
|
type ApiError, |
|
|
type ApiError, |
|
|
type ItemOut, |
|
|
type ItemOut, |
|
|
type ItemUpdate, |
|
|
type ItemUpdate, |
|
|
|
|
|
ItemsService, |
|
|
} from "../../client" |
|
|
} from "../../client" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
|
|
|
|
|
|
|
@ -9,10 +9,10 @@ import { |
|
|
Input, |
|
|
Input, |
|
|
useColorModeValue, |
|
|
useColorModeValue, |
|
|
} from "@chakra-ui/react" |
|
|
} from "@chakra-ui/react" |
|
|
import { useForm, type SubmitHandler } from "react-hook-form" |
|
|
import { type SubmitHandler, useForm } from "react-hook-form" |
|
|
import { useMutation } from "react-query" |
|
|
import { useMutation } from "react-query" |
|
|
|
|
|
|
|
|
import { UsersService, type ApiError, type UpdatePassword } from "../../client" |
|
|
import { type ApiError, type UpdatePassword, UsersService } from "../../client" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
|
|
|
|
|
|
interface UpdatePasswordForm extends UpdatePassword { |
|
|
interface UpdatePasswordForm extends UpdatePassword { |
|
|
|
@ -11,7 +11,7 @@ import React from "react" |
|
|
import { useForm } from "react-hook-form" |
|
|
import { useForm } from "react-hook-form" |
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
|
|
|
|
|
|
import { UsersService, type ApiError, type UserOut } from "../../client" |
|
|
import { type ApiError, type UserOut, UsersService } from "../../client" |
|
|
import useAuth from "../../hooks/useAuth" |
|
|
import useAuth from "../../hooks/useAuth" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
|
|
|
|
|
|
|
@ -12,14 +12,14 @@ import { |
|
|
useColorModeValue, |
|
|
useColorModeValue, |
|
|
} from "@chakra-ui/react" |
|
|
} from "@chakra-ui/react" |
|
|
import { useState } from "react" |
|
|
import { useState } from "react" |
|
|
import { useForm, type SubmitHandler } from "react-hook-form" |
|
|
import { type SubmitHandler, useForm } from "react-hook-form" |
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
UsersService, |
|
|
|
|
|
type ApiError, |
|
|
type ApiError, |
|
|
type UserOut, |
|
|
type UserOut, |
|
|
type UserUpdateMe, |
|
|
type UserUpdateMe, |
|
|
|
|
|
UsersService, |
|
|
} from "../../client" |
|
|
} from "../../client" |
|
|
import useAuth from "../../hooks/useAuth" |
|
|
import useAuth from "../../hooks/useAuth" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
|
@ -2,10 +2,10 @@ import { useNavigate } from "@tanstack/react-router" |
|
|
import { useQuery } from "react-query" |
|
|
import { useQuery } from "react-query" |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
LoginService, |
|
|
|
|
|
UsersService, |
|
|
|
|
|
type Body_login_login_access_token as AccessToken, |
|
|
type Body_login_login_access_token as AccessToken, |
|
|
|
|
|
LoginService, |
|
|
type UserOut, |
|
|
type UserOut, |
|
|
|
|
|
UsersService, |
|
|
} from "../client" |
|
|
} from "../client" |
|
|
|
|
|
|
|
|
const isLoggedIn = () => { |
|
|
const isLoggedIn = () => { |
|
|