mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
accounts table and many other fixes
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
import { AccountProps } from "@src/app/Accounts/page";
|
||||
import React from "react";
|
||||
|
||||
|
||||
export const Account: React.FC<AccountProps> = ({ account }) => {
|
||||
return (
|
||||
<div className="account-card">
|
||||
<h2>{account.name}</h2>
|
||||
<p>{account.email}</p>
|
||||
{/* Add more fields as necessary */}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export default Account;
|
||||
106
src/components/AccountsTable/index.tsx
Normal file
106
src/components/AccountsTable/index.tsx
Normal file
@@ -0,0 +1,106 @@
|
||||
import React from "react";
|
||||
import { ChevronDownIcon } from "@heroicons/react/20/solid";
|
||||
import { PlusCircleIcon } from "@heroicons/react/20/solid";
|
||||
import { ColumnHeadings } from "@src/lib/utils";
|
||||
import styles from '../styles.module.css';
|
||||
import PageHero from "@components/PageHero";
|
||||
|
||||
import { Suspense } from "react";
|
||||
import Loading from "@src/app/components/Loading/loading";
|
||||
import Link from "next/link";
|
||||
|
||||
export default async function AccountsTable( props: any ) {
|
||||
|
||||
return (
|
||||
<div className="pb-12">
|
||||
|
||||
<div className="mt-8 flow-root">
|
||||
<div className="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
||||
<div className="inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8">
|
||||
<table className="min-w-full divide-y divide-gray-300">
|
||||
<thead>
|
||||
<tr>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3.5 pl-4 pr-3 text-left text-xs font-semibold text-gray-900 "
|
||||
>
|
||||
<a href="#" className="group inline-flex">
|
||||
{props.newColumnHeadings.getHeading()}
|
||||
<span className="invisible ml-2 flex-none rounded text-gray-400 group-hover:visible group-focus:visible">
|
||||
<ChevronDownIcon
|
||||
aria-hidden="true"
|
||||
className="size-5"
|
||||
/>
|
||||
</span>
|
||||
</a>
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="px-3 py-3.5 text-left text-xs font-semibold text-gray-900"
|
||||
>
|
||||
<a href="#" className="group inline-flex">
|
||||
{props.newColumnHeadings.getHeading()}
|
||||
<span className="ml-2 flex-none rounded bg-gray-100 text-gray-900 group-hover:bg-gray-200">
|
||||
<ChevronDownIcon
|
||||
aria-hidden="true"
|
||||
className="size-5"
|
||||
/>
|
||||
</span>
|
||||
</a>
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="px-3 py-3.5 text-left text-xs font-semibold text-gray-900"
|
||||
>
|
||||
<a href="#" className="group inline-flex">
|
||||
{props.newColumnHeadings.getHeading()}
|
||||
<span className="ml-2 flex-none rounded bg-gray-100 text-gray-900 group-hover:bg-gray-200">
|
||||
<ChevronDownIcon
|
||||
aria-hidden="true"
|
||||
className="size-5"
|
||||
/>
|
||||
</span>
|
||||
</a>
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className=" divide-y divide-gray-200 bg-white">
|
||||
{props.data.map((item: any) => (
|
||||
<tr key={item.uuid}>
|
||||
<td className="whitespace-wrap flex items-center py-4 pl-4 pr-3 text-xs font-medium text-gray-900 ">
|
||||
|
||||
<Link href={`/userProfile/${item.uuid}`}><span className="pl-2"> {item.first_name}</span></Link>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-3 py-4 text-xs text-gray-900">
|
||||
{item.last_name}
|
||||
</td>
|
||||
|
||||
|
||||
<td className="whitespace-nowrap px-3 py-4 text-xs text-gray-900">
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex items-center gap-x-1.5 rounded-xl bg-lime-800 px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-lime-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-lime-900"
|
||||
>
|
||||
Edit
|
||||
<PlusCircleIcon
|
||||
aria-hidden="true"
|
||||
className="-mr-0.5 size-5"
|
||||
/>
|
||||
</button>
|
||||
</td>
|
||||
<td style={{display:'none'}}>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
);
|
||||
};
|
||||
@@ -1,9 +1,9 @@
|
||||
import Header from "../Header";
|
||||
import Hero from "../Hero";
|
||||
import FeaturesSection from "../FeaturesSection";
|
||||
import About from "../../app/site/About/page";
|
||||
import Contact from "../../app/site/Contact/page";
|
||||
import Footer from "../../app/site/Footer/page";
|
||||
import About from "@siteInfo/About/page";
|
||||
import Contact from "@siteInfo/Contact/page";
|
||||
import Footer from "@siteInfo/Footer/page";
|
||||
|
||||
export default function HomeContent() {
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ export default async function UsersTable(props: any) {
|
||||
{item.last_name}
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-3 py-4 text-xs text-gray-900">
|
||||
${item.username}
|
||||
{item.username}
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-3 py-4 text-xs text-gray-900">
|
||||
<button
|
||||
|
||||
@@ -12,6 +12,7 @@ const navigation = {
|
||||
{ name: 'Users', href: '/Admin/Users' },
|
||||
],
|
||||
account: [
|
||||
{ name: 'Accounts', href: '/Accounts' },
|
||||
{ name: 'My Account', href: '/MyAccount' },
|
||||
{ name: 'Register', href: '/signin' },
|
||||
{ name: 'Guides', href: '/Guides' },
|
||||
|
||||
Reference in New Issue
Block a user