Merge login into login
This commit is contained in:
commit
787c7844f5
2 changed files with 9 additions and 3 deletions
|
|
@ -4,7 +4,6 @@ import { useContext, useEffect, useRef, useState } from "react";
|
||||||
import PaginatorComponent from "../../components/PaginatorComponent";
|
import PaginatorComponent from "../../components/PaginatorComponent";
|
||||||
import ShadTooltip from "../../components/ShadTooltipComponent";
|
import ShadTooltip from "../../components/ShadTooltipComponent";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import Header from "../../components/headerComponent";
|
|
||||||
import { Button } from "../../components/ui/button";
|
import { Button } from "../../components/ui/button";
|
||||||
import { Checkbox } from "../../components/ui/checkbox";
|
import { Checkbox } from "../../components/ui/checkbox";
|
||||||
import { Input } from "../../components/ui/input";
|
import { Input } from "../../components/ui/input";
|
||||||
|
|
@ -27,6 +26,8 @@ import {
|
||||||
import ConfirmationModal from "../../modals/ConfirmationModal";
|
import ConfirmationModal from "../../modals/ConfirmationModal";
|
||||||
import UserManagementModal from "../../modals/UserManagementModal";
|
import UserManagementModal from "../../modals/UserManagementModal";
|
||||||
import { UserInputType } from "../../types/components";
|
import { UserInputType } from "../../types/components";
|
||||||
|
import Header from "../../components/headerComponent";
|
||||||
|
import { Users } from "../../types/api";
|
||||||
|
|
||||||
export default function AdminPage() {
|
export default function AdminPage() {
|
||||||
const [inputValue, setInputValue] = useState("");
|
const [inputValue, setInputValue] = useState("");
|
||||||
|
|
@ -88,7 +89,7 @@ export default function AdminPage() {
|
||||||
if (input === "") {
|
if (input === "") {
|
||||||
setFilterUserList(userList.current);
|
setFilterUserList(userList.current);
|
||||||
} else {
|
} else {
|
||||||
const filteredList = userList.current.filter((user) =>
|
const filteredList = userList.current.filter((user:Users) =>
|
||||||
user.username.toLowerCase().includes(input.toLowerCase())
|
user.username.toLowerCase().includes(input.toLowerCase())
|
||||||
);
|
);
|
||||||
setFilterUserList(filteredList);
|
setFilterUserList(filteredList);
|
||||||
|
|
@ -182,6 +183,7 @@ export default function AdminPage() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<div className="flex flex-col">
|
||||||
<Header />
|
<Header />
|
||||||
{userData && (
|
{userData && (
|
||||||
<div className="main-page-panel">
|
<div className="main-page-panel">
|
||||||
|
|
@ -278,7 +280,7 @@ export default function AdminPage() {
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
{!loadingUsers && (
|
{!loadingUsers && (
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{filterUserList.map((user, index) => (
|
{filterUserList.map((user:UserInputType, index) => (
|
||||||
<TableRow key={index}>
|
<TableRow key={index}>
|
||||||
<TableCell className="truncate py-2 font-medium">
|
<TableCell className="truncate py-2 font-medium">
|
||||||
<ShadTooltip content={user.id}>
|
<ShadTooltip content={user.id}>
|
||||||
|
|
@ -424,6 +426,7 @@ export default function AdminPage() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -266,6 +266,9 @@ export type UserInputType = {
|
||||||
password: string;
|
password: string;
|
||||||
is_active?: boolean;
|
is_active?: boolean;
|
||||||
is_superuser?: boolean;
|
is_superuser?: boolean;
|
||||||
|
id: string;
|
||||||
|
create_at: string;
|
||||||
|
updated_at:string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ApiKeyType = {
|
export type ApiKeyType = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue