Compare commits
No commits in common. "a480eb930ea232f717c7fabca46c9107691db4e5" and "32b31f9df3471e0ea30d236c14ada5b2a903922f" have entirely different histories.
a480eb930e
...
32b31f9df3
|
@ -1,76 +0,0 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import {
|
|
||||||
Card,
|
|
||||||
CardContent,
|
|
||||||
CardDescription,
|
|
||||||
CardFooter,
|
|
||||||
CardHeader,
|
|
||||||
CardTitle,
|
|
||||||
} from "@/components/ui/card";
|
|
||||||
import { Input } from "@/components/ui/input";
|
|
||||||
import { Label } from "@/components/ui/label";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
|
|
||||||
export default function Login() {
|
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="w-screen h-screen grid place-items-center">
|
|
||||||
<Card className="w-[400px]">
|
|
||||||
<CardHeader className="space-y-1">
|
|
||||||
<CardTitle className="text-2xl">Login</CardTitle>
|
|
||||||
<CardDescription>
|
|
||||||
Enter your email and password below to login
|
|
||||||
</CardDescription>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent className="grid gap-4">
|
|
||||||
{/* <div className="grid grid-cols-2 gap-6">
|
|
||||||
<Button variant="outline">
|
|
||||||
<Icons.gitHub className="mr-2 h-4 w-4" />
|
|
||||||
Github
|
|
||||||
</Button>
|
|
||||||
<Button variant="outline">
|
|
||||||
<Icons.google className="mr-2 h-4 w-4" />
|
|
||||||
Google
|
|
||||||
</Button>
|
|
||||||
</div> */}
|
|
||||||
{/* <div className="relative">
|
|
||||||
<div className="absolute inset-0 flex items-center">
|
|
||||||
<span className="w-full border-t" />
|
|
||||||
</div>
|
|
||||||
<div className="relative flex justify-center text-xs uppercase">
|
|
||||||
<span className="bg-background px-2 text-muted-foreground">
|
|
||||||
Or continue with
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div> */}
|
|
||||||
<div className="grid gap-2">
|
|
||||||
<Label htmlFor="email">Email</Label>
|
|
||||||
<Input
|
|
||||||
id="email"
|
|
||||||
type="email"
|
|
||||||
placeholder="Enter your email..."
|
|
||||||
defaultValue="johndoe@gmail.com"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="grid gap-2">
|
|
||||||
<Label htmlFor="password">Password</Label>
|
|
||||||
<Input
|
|
||||||
id="password"
|
|
||||||
type="password"
|
|
||||||
placeholder="Enter your password..."
|
|
||||||
defaultValue="123456"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</CardContent>
|
|
||||||
<CardFooter>
|
|
||||||
<Button className="w-full" onClick={() => router.push("/dashboard")}>
|
|
||||||
Login
|
|
||||||
</Button>
|
|
||||||
</CardFooter>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,6 +1,4 @@
|
||||||
"use client"
|
import AddAccountForm from "@/components/add-account-form";
|
||||||
|
|
||||||
import AccountForm from "@/components/account-form";
|
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
import Breadcrumb from "@/components/breadcrumb";
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
|
@ -12,7 +10,7 @@ const breadcrumbItems = [
|
||||||
{ title: "Add" },
|
{ title: "Add" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function Page() {
|
export default function SettingsDisplayPage() {
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
<ScrollArea className="h-[calc(100vh-53px)]">
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
||||||
|
@ -27,11 +25,7 @@ export default function Page() {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<AccountForm
|
<AddAccountForm />
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Create"
|
|
||||||
btn2_content="Create and add another"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import AccountForm from "@/components/account-form";
|
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
|
||||||
import { Separator } from "@/components/ui/separator";
|
|
||||||
import { dummyAccounts } from "@/constants/data";
|
|
||||||
import { Account } from "@/types/account";
|
|
||||||
|
|
||||||
const breadcrumbItems = [
|
|
||||||
{ title: "Dashboard", link: "/dashboard" },
|
|
||||||
{ title: "Accounts", link: "/dashboard/accounts" },
|
|
||||||
{ title: "Edit" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function Page({ params }: { params: { id: string } }) {
|
|
||||||
|
|
||||||
const account = dummyAccounts.find((account) => account.id === +params.id);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
|
||||||
<Breadcrumb items={breadcrumbItems} />
|
|
||||||
<div className="w-full h-full flex justify-center items-center">
|
|
||||||
<Card className="max-w-[700px] w-full">
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle className="mb-4 font-bold text-xl">
|
|
||||||
Edit Account
|
|
||||||
</CardTitle>
|
|
||||||
<Separator />
|
|
||||||
</CardHeader>
|
|
||||||
|
|
||||||
<CardContent>
|
|
||||||
<AccountForm
|
|
||||||
account={account as Account}
|
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Save and continue editing"
|
|
||||||
btn2_content="Save changes"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ScrollBar />
|
|
||||||
</ScrollArea>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,6 +1,4 @@
|
||||||
"use client";
|
import AddAPICommunicationForm from "@/components/add-api-communication-form";
|
||||||
|
|
||||||
import AddAPICommunicationForm from "@/components/api-communication-form";
|
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
import Breadcrumb from "@/components/breadcrumb";
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
|
@ -12,7 +10,7 @@ const breadcrumbItems = [
|
||||||
{ title: "Add" },
|
{ title: "Add" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function Page() {
|
export default function SettingsDisplayPage() {
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
<ScrollArea className="h-[calc(100vh-53px)]">
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
||||||
|
@ -27,11 +25,7 @@ export default function Page() {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<AddAPICommunicationForm
|
<AddAPICommunicationForm />
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Create"
|
|
||||||
btn2_content="Create and add another"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
|
||||||
import { Separator } from "@/components/ui/separator";
|
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
|
||||||
import { dummyApiCommunications } from "@/constants/data";
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import APICommunicationForm from "@/components/api-communication-form";
|
|
||||||
import { ApiCommunication } from "@/types/api-communication";
|
|
||||||
|
|
||||||
const breadcrumbItems = [
|
|
||||||
{ title: "Dashboard", link: "/dashboard" },
|
|
||||||
{ title: "Api Communications", link: "/dashboard/api-communications" },
|
|
||||||
{ title: "Edit" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function Page({ params }: { params: { id: string } }) {
|
|
||||||
const apiCommunication = dummyApiCommunications.find(
|
|
||||||
(apiCommunication) => apiCommunication.id === +params.id
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
|
||||||
<Breadcrumb items={breadcrumbItems} />
|
|
||||||
<div className="w-full h-full flex justify-center items-center">
|
|
||||||
<Card className="max-w-[700px] w-full mb-8">
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle className="mb-4 font-bold text-xl">
|
|
||||||
Edit Api Communication
|
|
||||||
</CardTitle>
|
|
||||||
<Separator />
|
|
||||||
</CardHeader>
|
|
||||||
|
|
||||||
<CardContent>
|
|
||||||
<APICommunicationForm
|
|
||||||
apiCommunication={apiCommunication as ApiCommunication}
|
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Save and continue editing"
|
|
||||||
btn2_content="Save changes"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ScrollBar />
|
|
||||||
</ScrollArea>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use client"
|
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
|
@ -12,7 +10,7 @@ const breadcrumbItems = [
|
||||||
{ title: "Create Commit" },
|
{ title: "Create Commit" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function Page() {
|
export default function SettingsDisplayPage() {
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
<ScrollArea className="h-[calc(100vh-53px)]">
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
||||||
|
@ -27,11 +25,7 @@ export default function Page() {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<CommitForm
|
<CommitForm />
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Create"
|
|
||||||
btn2_content="Create and add another"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
|
||||||
import { Separator } from "@/components/ui/separator";
|
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
|
||||||
import { dummyCommits } from "@/constants/data";
|
|
||||||
import { Commit } from "@/types/commit";
|
|
||||||
import CommitForm from "@/components/commit-form";
|
|
||||||
|
|
||||||
const breadcrumbItems = [
|
|
||||||
{ title: "Dashboard", link: "/dashboard" },
|
|
||||||
{ title: "Commits", link: "/dashboard/commits" },
|
|
||||||
{ title: "Edit" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function Page({ params }: { params: { id: string } }) {
|
|
||||||
const commit = dummyCommits.find((commit) => commit.id === params.id);
|
|
||||||
|
|
||||||
console.log(commit)
|
|
||||||
return (
|
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
|
||||||
<Breadcrumb items={breadcrumbItems} />
|
|
||||||
<div className="w-full h-full flex justify-center items-center">
|
|
||||||
<Card className="max-w-[700px] w-full">
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle className="mb-4 font-bold text-xl">
|
|
||||||
Edit Commit
|
|
||||||
</CardTitle>
|
|
||||||
<Separator />
|
|
||||||
</CardHeader>
|
|
||||||
|
|
||||||
<CardContent>
|
|
||||||
<CommitForm
|
|
||||||
commit={commit as Commit}
|
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Save and continue editing"
|
|
||||||
btn2_content="Save changes"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ScrollBar />
|
|
||||||
</ScrollArea>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,9 +1,7 @@
|
||||||
"use client"
|
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import ConfigurationForm from "@/components/configuration-form";
|
import AddConfigurationForm from "@/components/add-configuration-form";
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
import Breadcrumb from "@/components/breadcrumb";
|
||||||
|
|
||||||
const breadcrumbItems = [
|
const breadcrumbItems = [
|
||||||
|
@ -12,7 +10,7 @@ const breadcrumbItems = [
|
||||||
{ title: "Add" },
|
{ title: "Add" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function Page() {
|
export default function SettingsDisplayPage() {
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
<ScrollArea className="h-[calc(100vh-53px)]">
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
||||||
|
@ -27,11 +25,7 @@ export default function Page() {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<ConfigurationForm
|
<AddConfigurationForm />
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Create"
|
|
||||||
btn2_content="Create and add another"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
|
||||||
import { Separator } from "@/components/ui/separator";
|
|
||||||
import ConfigurationForm from "@/components/configuration-form";
|
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
|
||||||
import { dummyConfigurations } from "@/constants/data";
|
|
||||||
import { Configuration } from "@/types/configuration";
|
|
||||||
|
|
||||||
const breadcrumbItems = [
|
|
||||||
{ title: "Dashboard", link: "/dashboard" },
|
|
||||||
{ title: "Configurations", link: "/dashboard/configurations" },
|
|
||||||
{ title: "Edit" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function Page({ params }: { params: { id: string } }) {
|
|
||||||
const configuration = dummyConfigurations.find((configuration) => configuration.id === +params.id);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
|
||||||
<Breadcrumb items={breadcrumbItems} />
|
|
||||||
<div className="w-full h-full flex justify-center items-center">
|
|
||||||
<Card className="max-w-[700px] w-full">
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle className="mb-4 font-bold text-xl">
|
|
||||||
Edit Configuration
|
|
||||||
</CardTitle>
|
|
||||||
<Separator />
|
|
||||||
</CardHeader>
|
|
||||||
|
|
||||||
<CardContent>
|
|
||||||
<ConfigurationForm
|
|
||||||
configuration={configuration as Configuration}
|
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Save and continue editing"
|
|
||||||
btn2_content="Save changes"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ScrollBar />
|
|
||||||
</ScrollArea>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,11 +1,9 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import AddCriteriaForm from "@/components/criteria-form";
|
import AddCriteriaForm from "@/components/add-criteria-form";
|
||||||
|
|
||||||
export default function Page() {
|
export default function SettingsDisplayPage() {
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
<ScrollArea className="h-[calc(100vh-53px)]">
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6 w-full h-full flex justify-center items-center">
|
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6 w-full h-full flex justify-center items-center">
|
||||||
|
@ -18,11 +16,7 @@ export default function Page() {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<AddCriteriaForm
|
<AddCriteriaForm />
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Save and continue editing"
|
|
||||||
btn2_content="Save changes"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
|
||||||
import { Separator } from "@/components/ui/separator";
|
|
||||||
import ConfigurationForm from "@/components/configuration-form";
|
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
|
||||||
import {
|
|
||||||
dummyApiCommunications,
|
|
||||||
dummyConfigurations,
|
|
||||||
dummyCriteria,
|
|
||||||
} from "@/constants/data";
|
|
||||||
import { Configuration } from "@/types/configuration";
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import APICommunicationForm from "@/components/api-communication-form";
|
|
||||||
import { ApiCommunication } from "@/types/api-communication";
|
|
||||||
import CriteriaForm from "@/components/criteria-form";
|
|
||||||
import { Criteria } from "@/types/criteria";
|
|
||||||
|
|
||||||
const breadcrumbItems = [
|
|
||||||
{ title: "Dashboard", link: "/dashboard" },
|
|
||||||
{ title: "Api Communications", link: "/dashboard/api-communications" },
|
|
||||||
{ title: "Edit" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function Page({ params }: { params: { id: string } }) {
|
|
||||||
const criteria = dummyCriteria.find((criteria) => criteria.id === +params.id);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
|
||||||
<Breadcrumb items={breadcrumbItems} />
|
|
||||||
<div className="w-full h-full flex justify-center items-center">
|
|
||||||
<Card className="max-w-[700px] w-full mb-8">
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle className="mb-4 font-bold text-xl">
|
|
||||||
Edit Criteria
|
|
||||||
</CardTitle>
|
|
||||||
<Separator />
|
|
||||||
</CardHeader>
|
|
||||||
|
|
||||||
<CardContent>
|
|
||||||
<CriteriaForm
|
|
||||||
criteria={criteria as Criteria}
|
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Save and continue editing"
|
|
||||||
btn2_content="Save changes"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ScrollBar />
|
|
||||||
</ScrollArea>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,10 +1,8 @@
|
||||||
"use client"
|
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
import Breadcrumb from "@/components/breadcrumb";
|
||||||
import EvaluationForm from "@/components/evaluation-form";
|
import AddEvaluationForm from "@/components/evaluation-form";
|
||||||
|
|
||||||
const breadcrumbItems = [
|
const breadcrumbItems = [
|
||||||
{ title: "Dashboard", link: "/dashboard" },
|
{ title: "Dashboard", link: "/dashboard" },
|
||||||
|
@ -12,7 +10,7 @@ const breadcrumbItems = [
|
||||||
{ title: "Add" },
|
{ title: "Add" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function Page() {
|
export default function SettingsDisplayPage() {
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
<ScrollArea className="h-[calc(100vh-53px)]">
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
||||||
|
@ -27,11 +25,7 @@ export default function Page() {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<EvaluationForm
|
<AddEvaluationForm/>
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Create"
|
|
||||||
btn2_content="Create and add another"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
|
||||||
import { Separator } from "@/components/ui/separator";
|
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
|
||||||
import EvaluationForm from "@/components/evaluation-form";
|
|
||||||
import { Evaluation } from "@/types/evaluation";
|
|
||||||
import { dummyEvaluations } from "@/constants/data";
|
|
||||||
|
|
||||||
const breadcrumbItems = [
|
|
||||||
{ title: "Dashboard", link: "/dashboard" },
|
|
||||||
{ title: "Evaluation", link: "/dashboard/evaluations" },
|
|
||||||
{ title: "Edit" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function Page({ params }: { params: { id: string } }) {
|
|
||||||
const evaluation = dummyEvaluations.find(
|
|
||||||
(evaluation) => evaluation.id === +params.id
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
|
||||||
<Breadcrumb items={breadcrumbItems} />
|
|
||||||
<div className="w-full h-full flex justify-center items-center">
|
|
||||||
<Card className="max-w-[700px] w-full">
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle className="mb-4 font-bold text-xl">
|
|
||||||
Edit Evaluation
|
|
||||||
</CardTitle>
|
|
||||||
<Separator />
|
|
||||||
</CardHeader>
|
|
||||||
|
|
||||||
<CardContent>
|
|
||||||
<EvaluationForm
|
|
||||||
evaluation={evaluation as Evaluation}
|
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Save and continue editing"
|
|
||||||
btn2_content="Save changes"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
<ScrollBar />
|
|
||||||
</div>
|
|
||||||
</ScrollArea>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,9 +1,7 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import OrganizationForm from "@/components/organization-form";
|
import AddOrganizationForm from "@/components/add-organization-form";
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
import Breadcrumb from "@/components/breadcrumb";
|
||||||
|
|
||||||
const breadcrumbItems = [
|
const breadcrumbItems = [
|
||||||
|
@ -12,7 +10,7 @@ const breadcrumbItems = [
|
||||||
{ title: "Add" },
|
{ title: "Add" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function Page() {
|
export default function SettingsDisplayPage() {
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
<ScrollArea className="h-[calc(100vh-53px)]">
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
||||||
|
@ -27,11 +25,7 @@ export default function Page() {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<OrganizationForm
|
<AddOrganizationForm />
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Create"
|
|
||||||
btn2_content="Create and add another"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
"use client"
|
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
|
||||||
import { Separator } from "@/components/ui/separator";
|
|
||||||
import OrganizationForm from "@/components/organization-form";
|
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
|
||||||
import { dummyOrganizations } from "@/constants/data";
|
|
||||||
import { Organization } from "@/types/organization";
|
|
||||||
|
|
||||||
const breadcrumbItems = [
|
|
||||||
{ title: "Dashboard", link: "/dashboard" },
|
|
||||||
{ title: "Organizations", link: "/dashboard/organizations" },
|
|
||||||
{ title: "Edit" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function Page({ params }: { params: { id: string } }) {
|
|
||||||
|
|
||||||
const organization = dummyOrganizations.find((organization) => organization.id === +params.id);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
|
||||||
<Breadcrumb items={breadcrumbItems} />
|
|
||||||
<div className="w-full h-full flex justify-center items-center">
|
|
||||||
<Card className="max-w-[700px] w-full">
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle className="mb-4 font-bold text-xl">
|
|
||||||
Edit Organization
|
|
||||||
</CardTitle>
|
|
||||||
<Separator />
|
|
||||||
</CardHeader>
|
|
||||||
|
|
||||||
<CardContent>
|
|
||||||
<OrganizationForm organization={organization as Organization}
|
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Save and continue editing"
|
|
||||||
btn2_content="Save changes" />
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ScrollBar />
|
|
||||||
</ScrollArea>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,9 +1,7 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import SkillForm from "@/components/skill-form";
|
import AddSkillForm from "@/components/add-skill-form";
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
import Breadcrumb from "@/components/breadcrumb";
|
||||||
|
|
||||||
const breadcrumbItems = [
|
const breadcrumbItems = [
|
||||||
|
@ -12,7 +10,7 @@ const breadcrumbItems = [
|
||||||
{ title: "Add" },
|
{ title: "Add" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function Page() {
|
export default function SettingsDisplayPage() {
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
<ScrollArea className="h-[calc(100vh-53px)]">
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
||||||
|
@ -27,11 +25,7 @@ export default function Page() {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<SkillForm
|
<AddSkillForm />
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Create"
|
|
||||||
btn2_content="Create and add another"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
|
||||||
import { Separator } from "@/components/ui/separator";
|
|
||||||
import SkillForm from "@/components/skill-form";
|
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
|
||||||
import { dummySkills } from "@/constants/data";
|
|
||||||
import { Skill } from "@/types/skill";
|
|
||||||
|
|
||||||
const breadcrumbItems = [
|
|
||||||
{ title: "Dashboard", link: "/dashboard" },
|
|
||||||
{ title: "Skills", link: "/dashboard/skills" },
|
|
||||||
{ title: "Edit" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function Page({ params }: { params: { id: string } }) {
|
|
||||||
const skill = dummySkills.find((skill) => skill.id === +params.id);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
|
||||||
<Breadcrumb items={breadcrumbItems} />
|
|
||||||
<div className="w-full h-full flex justify-center items-center">
|
|
||||||
<Card className="max-w-[700px] w-full">
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle className="mb-4 font-bold text-xl">
|
|
||||||
Edit Skill
|
|
||||||
</CardTitle>
|
|
||||||
<Separator />
|
|
||||||
</CardHeader>
|
|
||||||
|
|
||||||
<CardContent>
|
|
||||||
<SkillForm
|
|
||||||
skill={skill as Skill}
|
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Save and continue editing"
|
|
||||||
btn2_content="Save changes"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
<ScrollBar />
|
|
||||||
</div>
|
|
||||||
</ScrollArea>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,8 +1,13 @@
|
||||||
"use client";
|
import AddUserForm from "@/components/add-user-form";
|
||||||
|
|
||||||
import UserForm from "@/components/user-form";
|
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
import Breadcrumb from "@/components/breadcrumb";
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Button } from "@/components/ui/button";
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardFooter,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
|
|
||||||
|
@ -12,7 +17,7 @@ const breadcrumbItems = [
|
||||||
{ title: "Add" },
|
{ title: "Add" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function Page() {
|
export default function SettingsDisplayPage() {
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
<ScrollArea className="h-[calc(100vh-53px)]">
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
||||||
|
@ -27,11 +32,7 @@ export default function Page() {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<UserForm
|
<AddUserForm />
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Create"
|
|
||||||
btn2_content="Create and add another"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import UserForm from "@/components/user-form";
|
|
||||||
import Breadcrumb from "@/components/breadcrumb";
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
|
||||||
import { Separator } from "@/components/ui/separator";
|
|
||||||
import { dummyUsers } from "@/constants/data";
|
|
||||||
import { User } from "@/types/user";
|
|
||||||
|
|
||||||
const breadcrumbItems = [
|
|
||||||
{ title: "Dashboard", link: "/dashboard" },
|
|
||||||
{ title: "Users", link: "/dashboard/users" },
|
|
||||||
{ title: "Edit" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function Page({ params }: { params: { id: string } }) {
|
|
||||||
|
|
||||||
const user = dummyUsers.find((user) => user.id === +params.id);
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ScrollArea className="h-[calc(100vh-53px)]">
|
|
||||||
<div className="flex-1 space-y-4 p-4 md:p-8 pt-6">
|
|
||||||
<Breadcrumb items={breadcrumbItems} />
|
|
||||||
<div className="w-full h-full flex justify-center items-center">
|
|
||||||
<Card className="max-w-[700px] w-full mb-8">
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle className="mb-4 font-bold text-xl">
|
|
||||||
Edit User
|
|
||||||
</CardTitle>
|
|
||||||
<Separator />
|
|
||||||
</CardHeader>
|
|
||||||
|
|
||||||
<CardContent>
|
|
||||||
<UserForm
|
|
||||||
user={user as User}
|
|
||||||
onSubmit={() => {}}
|
|
||||||
btn1_content="Save and continue editing"
|
|
||||||
btn2_content="Save changes"
|
|
||||||
/>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ScrollBar />
|
|
||||||
</ScrollArea>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -14,7 +14,6 @@ import { Organization } from "@/types/organization";
|
||||||
import { User } from "@/types/user";
|
import { User } from "@/types/user";
|
||||||
|
|
||||||
import { BookCheck, Edit, MoreHorizontal, Trash } from "lucide-react";
|
import { BookCheck, Edit, MoreHorizontal, Trash } from "lucide-react";
|
||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
|
@ -50,15 +49,14 @@ export const CellAction: React.FC<CellActionProps> = ({ data }) => {
|
||||||
<DropdownMenuContent align="end">
|
<DropdownMenuContent align="end">
|
||||||
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
|
||||||
<DropdownMenuItem className="cursor-pointer p-0">
|
<DropdownMenuItem
|
||||||
<Link
|
className="cursor-pointer"
|
||||||
href={`/dashboard/accounts/edit/${data.id}`}
|
// onClick={() =>
|
||||||
className="flex items-center gap-2 px-2 py-1.5 w-full"
|
// router.push(`#`)
|
||||||
|
// }
|
||||||
>
|
>
|
||||||
<Edit className="h-4 w-4" /> Edit
|
<Edit className="mr-2 h-4 w-4" /> Update
|
||||||
</Link>
|
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
onClick={() => setIsDeleteModalOpen(true)}
|
onClick={() => setIsDeleteModalOpen(true)}
|
||||||
|
|
|
@ -22,15 +22,20 @@ import {
|
||||||
SelectTrigger,
|
SelectTrigger,
|
||||||
SelectValue,
|
SelectValue,
|
||||||
} from "./ui/select";
|
} from "./ui/select";
|
||||||
import { Account } from "@/types/account";
|
|
||||||
|
|
||||||
const displayFormSchema = z.object({
|
const displayFormSchema = z.object({
|
||||||
email: z.string().trim().min(1, { message: "Please select a user." }).email(),
|
email: z
|
||||||
|
.string({
|
||||||
|
required_error: "Please select a user.",
|
||||||
|
})
|
||||||
|
.trim()
|
||||||
|
.email(),
|
||||||
balance: z.string().trim().min(1, "Balance is required."),
|
balance: z.string().trim().min(1, "Balance is required."),
|
||||||
organization: z
|
organization: z
|
||||||
.string()
|
.string({
|
||||||
.trim()
|
required_error: "Please select an organization.",
|
||||||
.min(1, { message: "Please select an organization." }),
|
})
|
||||||
|
.trim(),
|
||||||
});
|
});
|
||||||
|
|
||||||
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
||||||
|
@ -42,26 +47,10 @@ const defaultValues: Partial<DisplayFormValues> = {
|
||||||
organization: "",
|
organization: "",
|
||||||
};
|
};
|
||||||
|
|
||||||
type Props = {
|
export default function AddAccountForm() {
|
||||||
account?: Account;
|
|
||||||
onSubmit: () => void;
|
|
||||||
btn1_content: string;
|
|
||||||
btn2_content: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function AccountForm({
|
|
||||||
account,
|
|
||||||
onSubmit: onFormSubmit,
|
|
||||||
btn1_content,
|
|
||||||
btn2_content,
|
|
||||||
}: Props) {
|
|
||||||
const form = useForm<DisplayFormValues>({
|
const form = useForm<DisplayFormValues>({
|
||||||
resolver: zodResolver(displayFormSchema),
|
resolver: zodResolver(displayFormSchema),
|
||||||
defaultValues: {
|
defaultValues,
|
||||||
balance: account?.balance ? String(account?.balance) : "",
|
|
||||||
email: account?.email || "",
|
|
||||||
organization: account?.organization || "",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSubmit(data: DisplayFormValues) {
|
function onSubmit(data: DisplayFormValues) {
|
||||||
|
@ -84,19 +73,21 @@ export default function AccountForm({
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>User</FormLabel>
|
<FormLabel>User</FormLabel>
|
||||||
<Select onValueChange={field.onChange} value={field.value}>
|
<Select onValueChange={field.onChange} defaultValue={field.value}>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<SelectTrigger>
|
<SelectTrigger>
|
||||||
<SelectValue placeholder="Select a user" />
|
<SelectValue placeholder="Select a user" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="john@gmail.com">john@gmail.com</SelectItem>
|
<SelectItem value="johndoe@gmail.com">
|
||||||
<SelectItem value="sarah@example.com">
|
johndoe@gmail.com
|
||||||
sarah@example.com
|
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
<SelectItem value="michael@example.com">
|
<SelectItem value="adramov@gmail.com">
|
||||||
michael@example.com
|
adramov@gmail.com
|
||||||
|
</SelectItem>
|
||||||
|
<SelectItem value="hello@gmail.com">
|
||||||
|
hello@gmail.com
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
|
@ -132,11 +123,8 @@ export default function AccountForm({
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="XYZ Tech Inc.">XYZ Tech Inc.</SelectItem>
|
<SelectItem value="Skilld">Skilld</SelectItem>
|
||||||
<SelectItem value="ABC Solutions">ABC Solutions</SelectItem>
|
<SelectItem value="Ecareers">Ecareers</SelectItem>
|
||||||
<SelectItem value="Acme Corporation">
|
|
||||||
Acme Corporation
|
|
||||||
</SelectItem>
|
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
@ -146,10 +134,10 @@ export default function AccountForm({
|
||||||
|
|
||||||
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
||||||
<Button className="w-full" size="lg">
|
<Button className="w-full" size="lg">
|
||||||
{btn1_content}
|
Create
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="secondary" className="w-full" size="lg">
|
<Button variant="secondary" className="w-full" size="lg">
|
||||||
{btn2_content}
|
Create and add another
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
|
@ -23,7 +23,6 @@ import {
|
||||||
SelectValue,
|
SelectValue,
|
||||||
} from "./ui/select";
|
} from "./ui/select";
|
||||||
import { Textarea } from "./ui/textarea";
|
import { Textarea } from "./ui/textarea";
|
||||||
import { ApiCommunication } from "@/types/api-communication";
|
|
||||||
|
|
||||||
const displayFormSchema = z.object({
|
const displayFormSchema = z.object({
|
||||||
pt: z
|
pt: z
|
||||||
|
@ -78,43 +77,22 @@ const displayFormSchema = z.object({
|
||||||
|
|
||||||
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
||||||
|
|
||||||
// // This can come from your database or API.
|
// This can come from your database or API.
|
||||||
// const defaultValues: Partial<DisplayFormValues> = {
|
const defaultValues: Partial<DisplayFormValues> = {
|
||||||
// pt: "",
|
pt: "",
|
||||||
// messages: "",
|
messages: "",
|
||||||
// completion: "",
|
completion: "",
|
||||||
// ct: "",
|
ct: "",
|
||||||
// tt: "",
|
tt: "",
|
||||||
// status: "",
|
status: "",
|
||||||
// type: "",
|
type: "",
|
||||||
// evaluation: "",
|
evaluation: "",
|
||||||
// };
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
apiCommunication?: ApiCommunication;
|
|
||||||
onSubmit: () => void;
|
|
||||||
btn1_content: string;
|
|
||||||
btn2_content: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function APICommunicationForm({
|
export default function AddAPICommunicationForm() {
|
||||||
apiCommunication,
|
|
||||||
onSubmit: onFormSubmit,
|
|
||||||
btn1_content,
|
|
||||||
btn2_content,
|
|
||||||
}: Props) {
|
|
||||||
const form = useForm<DisplayFormValues>({
|
const form = useForm<DisplayFormValues>({
|
||||||
resolver: zodResolver(displayFormSchema),
|
resolver: zodResolver(displayFormSchema),
|
||||||
defaultValues: {
|
defaultValues,
|
||||||
pt: apiCommunication?.pt ? String(apiCommunication.pt) : "",
|
|
||||||
messages: apiCommunication?.messages || "",
|
|
||||||
completion: apiCommunication?.completion || "",
|
|
||||||
ct: apiCommunication?.ct ? String(apiCommunication.ct) : "",
|
|
||||||
tt: apiCommunication?.tt ? String(apiCommunication.tt) : "",
|
|
||||||
status: apiCommunication?.status || "",
|
|
||||||
type: apiCommunication?.type || "",
|
|
||||||
evaluation: apiCommunication?.evaluation || "",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSubmit(data: DisplayFormValues) {
|
function onSubmit(data: DisplayFormValues) {
|
||||||
|
@ -126,8 +104,6 @@ export default function APICommunicationForm({
|
||||||
</pre>
|
</pre>
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
onFormSubmit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -239,12 +215,11 @@ export default function APICommunicationForm({
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem className="truncate" value="Uploaded at: 2023-09-20 00:00:00 - Uploader: jschultz@php.net - Developer: fabien@potencier.org - Status: finished">
|
<SelectItem value="Uploaded at: 2023-09-20 00:00:00 - Uploader: jschultz@php.net - Developer: fabien@potencier.org - Status: finished">
|
||||||
Uploaded at: 2023-09-20 00:00:00 - Uploader:
|
Uploaded at: 2023-09-20 00:00:00 - Uploader:
|
||||||
jschultz@php.net - Developer: fabien@potencier.org - Status:
|
jschultz@php.net - Developer: fabien@potencier.org - Status:
|
||||||
finished
|
finished
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
|
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
@ -254,10 +229,10 @@ export default function APICommunicationForm({
|
||||||
|
|
||||||
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
||||||
<Button className="w-full" size="lg">
|
<Button className="w-full" size="lg">
|
||||||
{btn1_content}
|
Create
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="secondary" className="w-full" size="lg">
|
<Button variant="secondary" className="w-full" size="lg">
|
||||||
{btn2_content}
|
Create and add another
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
|
@ -15,7 +15,6 @@ import {
|
||||||
} from "@/components/ui/form";
|
} from "@/components/ui/form";
|
||||||
import { toast } from "@/components/ui/use-toast";
|
import { toast } from "@/components/ui/use-toast";
|
||||||
import { Input } from "./ui/input";
|
import { Input } from "./ui/input";
|
||||||
import { Configuration } from "@/types/configuration";
|
|
||||||
|
|
||||||
const displayFormSchema = z.object({
|
const displayFormSchema = z.object({
|
||||||
name: z.string().trim().min(1, "Name is required."),
|
name: z.string().trim().min(1, "Name is required."),
|
||||||
|
@ -24,25 +23,16 @@ const displayFormSchema = z.object({
|
||||||
|
|
||||||
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
||||||
|
|
||||||
type Props = {
|
// This can come from your database or API.
|
||||||
configuration?: Configuration;
|
const defaultValues: Partial<DisplayFormValues> = {
|
||||||
onSubmit: () => void;
|
name: "",
|
||||||
btn1_content: string;
|
value: "",
|
||||||
btn2_content: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function ConfigurationForm({
|
export default function AddConfigurationForm() {
|
||||||
configuration,
|
|
||||||
onSubmit: onFormSubmit,
|
|
||||||
btn1_content,
|
|
||||||
btn2_content,
|
|
||||||
}: Props) {
|
|
||||||
const form = useForm<DisplayFormValues>({
|
const form = useForm<DisplayFormValues>({
|
||||||
resolver: zodResolver(displayFormSchema),
|
resolver: zodResolver(displayFormSchema),
|
||||||
defaultValues: {
|
defaultValues,
|
||||||
name: configuration?.name || "",
|
|
||||||
value: configuration?.value || "",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSubmit(data: DisplayFormValues) {
|
function onSubmit(data: DisplayFormValues) {
|
||||||
|
@ -88,10 +78,10 @@ export default function ConfigurationForm({
|
||||||
|
|
||||||
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
||||||
<Button className="w-full" size="lg">
|
<Button className="w-full" size="lg">
|
||||||
{btn1_content}
|
Create
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="secondary" className="w-full" size="lg">
|
<Button variant="secondary" className="w-full" size="lg">
|
||||||
{btn2_content}
|
Create and add another
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
|
@ -16,7 +16,6 @@ import {
|
||||||
import { toast } from "@/components/ui/use-toast";
|
import { toast } from "@/components/ui/use-toast";
|
||||||
import { Input } from "./ui/input";
|
import { Input } from "./ui/input";
|
||||||
import { Textarea } from "./ui/textarea";
|
import { Textarea } from "./ui/textarea";
|
||||||
import { Criteria } from "@/types/criteria";
|
|
||||||
|
|
||||||
const displayFormSchema = z.object({
|
const displayFormSchema = z.object({
|
||||||
name: z.string().trim().min(1, "Name is required."),
|
name: z.string().trim().min(1, "Name is required."),
|
||||||
|
@ -26,33 +25,17 @@ const displayFormSchema = z.object({
|
||||||
|
|
||||||
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
||||||
|
|
||||||
// // This can come from your database or API.
|
// This can come from your database or API.
|
||||||
// const defaultValues: Partial<DisplayFormValues> = {
|
const defaultValues: Partial<DisplayFormValues> = {
|
||||||
// name: "",
|
name: "",
|
||||||
// description: "",
|
description: "",
|
||||||
// prompt: "",
|
prompt: "",
|
||||||
// };
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
criteria?: Criteria;
|
|
||||||
onSubmit: () => void;
|
|
||||||
btn1_content: string;
|
|
||||||
btn2_content: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function CriteriaForm({
|
export default function AddCriteriaForm() {
|
||||||
criteria,
|
|
||||||
onSubmit: onFormSubmit,
|
|
||||||
btn1_content,
|
|
||||||
btn2_content,
|
|
||||||
}: Props) {
|
|
||||||
const form = useForm<DisplayFormValues>({
|
const form = useForm<DisplayFormValues>({
|
||||||
resolver: zodResolver(displayFormSchema),
|
resolver: zodResolver(displayFormSchema),
|
||||||
defaultValues: {
|
defaultValues,
|
||||||
name: criteria?.name || "",
|
|
||||||
description: criteria?.description || "",
|
|
||||||
prompt: criteria?.prompt || "",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSubmit(data: DisplayFormValues) {
|
function onSubmit(data: DisplayFormValues) {
|
||||||
|
@ -64,8 +47,6 @@ export default function CriteriaForm({
|
||||||
</pre>
|
</pre>
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
onFormSubmit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -113,10 +94,10 @@ export default function CriteriaForm({
|
||||||
|
|
||||||
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
||||||
<Button className="w-full" size="lg">
|
<Button className="w-full" size="lg">
|
||||||
{btn1_content}
|
Create
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="secondary" className="w-full" size="lg">
|
<Button variant="secondary" className="w-full" size="lg">
|
||||||
{btn2_content}
|
Create and add another
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
|
@ -15,7 +15,6 @@ import {
|
||||||
} from "@/components/ui/form";
|
} from "@/components/ui/form";
|
||||||
import { toast } from "@/components/ui/use-toast";
|
import { toast } from "@/components/ui/use-toast";
|
||||||
import { Input } from "./ui/input";
|
import { Input } from "./ui/input";
|
||||||
import { Organization } from "@/types/organization";
|
|
||||||
|
|
||||||
const displayFormSchema = z.object({
|
const displayFormSchema = z.object({
|
||||||
name: z.string().trim().min(1, "Name is required."),
|
name: z.string().trim().min(1, "Name is required."),
|
||||||
|
@ -28,23 +27,10 @@ const defaultValues: Partial<DisplayFormValues> = {
|
||||||
name: "",
|
name: "",
|
||||||
};
|
};
|
||||||
|
|
||||||
type Props = {
|
export default function AddOrganizationForm() {
|
||||||
organization?: Organization;
|
|
||||||
onSubmit: () => void;
|
|
||||||
btn1_content: string;
|
|
||||||
btn2_content: string;
|
|
||||||
};
|
|
||||||
export default function OrganizationForm({
|
|
||||||
organization,
|
|
||||||
onSubmit: onFormSubmit,
|
|
||||||
btn1_content,
|
|
||||||
btn2_content,
|
|
||||||
}: Props) {
|
|
||||||
const form = useForm<DisplayFormValues>({
|
const form = useForm<DisplayFormValues>({
|
||||||
resolver: zodResolver(displayFormSchema),
|
resolver: zodResolver(displayFormSchema),
|
||||||
defaultValues: {
|
defaultValues,
|
||||||
name: organization?.name || "",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSubmit(data: DisplayFormValues) {
|
function onSubmit(data: DisplayFormValues) {
|
||||||
|
@ -56,8 +42,6 @@ export default function OrganizationForm({
|
||||||
</pre>
|
</pre>
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
onFormSubmit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -79,10 +63,10 @@ export default function OrganizationForm({
|
||||||
|
|
||||||
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
||||||
<Button className="w-full" size="lg">
|
<Button className="w-full" size="lg">
|
||||||
{btn1_content}
|
Create
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="secondary" className="w-full" size="lg">
|
<Button variant="secondary" className="w-full" size="lg">
|
||||||
{btn2_content}
|
Create and add another
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
|
@ -15,7 +15,6 @@ import {
|
||||||
} from "@/components/ui/form";
|
} from "@/components/ui/form";
|
||||||
import { toast } from "@/components/ui/use-toast";
|
import { toast } from "@/components/ui/use-toast";
|
||||||
import { Input } from "./ui/input";
|
import { Input } from "./ui/input";
|
||||||
import { Skill } from "@/types/skill";
|
|
||||||
|
|
||||||
const displayFormSchema = z.object({
|
const displayFormSchema = z.object({
|
||||||
name: z.string().trim().min(1, "Name is required."),
|
name: z.string().trim().min(1, "Name is required."),
|
||||||
|
@ -23,28 +22,15 @@ const displayFormSchema = z.object({
|
||||||
|
|
||||||
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
||||||
|
|
||||||
// const defaultValues: Partial<DisplayFormValues> = {
|
// This can come from your database or API.
|
||||||
// name: "",
|
const defaultValues: Partial<DisplayFormValues> = {
|
||||||
// };
|
name: "",
|
||||||
|
|
||||||
type Props = {
|
|
||||||
skill?: Skill;
|
|
||||||
onSubmit: () => void;
|
|
||||||
btn1_content: string;
|
|
||||||
btn2_content: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function SkillForm({
|
export default function AddSkillForm() {
|
||||||
skill,
|
|
||||||
onSubmit: onFormSubmit,
|
|
||||||
btn1_content,
|
|
||||||
btn2_content,
|
|
||||||
}: Props) {
|
|
||||||
const form = useForm<DisplayFormValues>({
|
const form = useForm<DisplayFormValues>({
|
||||||
resolver: zodResolver(displayFormSchema),
|
resolver: zodResolver(displayFormSchema),
|
||||||
defaultValues: {
|
defaultValues,
|
||||||
name: skill?.name || "",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSubmit(data: DisplayFormValues) {
|
function onSubmit(data: DisplayFormValues) {
|
||||||
|
@ -77,10 +63,10 @@ export default function SkillForm({
|
||||||
|
|
||||||
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
||||||
<Button className="w-full" size="lg">
|
<Button className="w-full" size="lg">
|
||||||
{btn1_content}
|
Create
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="secondary" className="w-full" size="lg">
|
<Button variant="secondary" className="w-full" size="lg">
|
||||||
{btn2_content}
|
Create and add another
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
|
@ -17,7 +17,6 @@ import {
|
||||||
} from "@/components/ui/form";
|
} from "@/components/ui/form";
|
||||||
import { toast } from "@/components/ui/use-toast";
|
import { toast } from "@/components/ui/use-toast";
|
||||||
import { Input } from "./ui/input";
|
import { Input } from "./ui/input";
|
||||||
import { User } from "@/types/user";
|
|
||||||
|
|
||||||
const roles = [
|
const roles = [
|
||||||
{
|
{
|
||||||
|
@ -62,26 +61,17 @@ const displayFormSchema = z.object({
|
||||||
|
|
||||||
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
||||||
|
|
||||||
type Props = {
|
// This can come from your database or API.
|
||||||
user?: User;
|
const defaultValues: Partial<DisplayFormValues> = {
|
||||||
onSubmit: () => void;
|
fullName: "",
|
||||||
btn1_content: string;
|
email: "",
|
||||||
btn2_content: string;
|
roles: ["ROLE_USER"],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function UserForm({
|
export default function AddUserForm() {
|
||||||
user,
|
|
||||||
onSubmit: onFormSubmit,
|
|
||||||
btn1_content,
|
|
||||||
btn2_content,
|
|
||||||
}: Props) {
|
|
||||||
const form = useForm<DisplayFormValues>({
|
const form = useForm<DisplayFormValues>({
|
||||||
resolver: zodResolver(displayFormSchema),
|
resolver: zodResolver(displayFormSchema),
|
||||||
defaultValues: {
|
defaultValues,
|
||||||
fullName: user?.fullName || "",
|
|
||||||
email: user?.email || "",
|
|
||||||
roles: [user?.role || "ROLE_USER"],
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSubmit(data: DisplayFormValues) {
|
function onSubmit(data: DisplayFormValues) {
|
||||||
|
@ -101,8 +91,6 @@ export default function UserForm({
|
||||||
</pre>
|
</pre>
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
onFormSubmit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -223,10 +211,10 @@ export default function UserForm({
|
||||||
/>
|
/>
|
||||||
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
||||||
<Button className="w-full" size="lg">
|
<Button className="w-full" size="lg">
|
||||||
{btn1_content}
|
Create
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="secondary" className="w-full" size="lg">
|
<Button variant="secondary" className="w-full" size="lg">
|
||||||
{btn2_content}
|
Create and add another
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
|
@ -12,7 +12,6 @@ import { useToast } from "@/components/ui/use-toast";
|
||||||
import { ApiCommunication } from "@/types/api-communication";
|
import { ApiCommunication } from "@/types/api-communication";
|
||||||
|
|
||||||
import { Edit, MoreHorizontal, Trash } from "lucide-react";
|
import { Edit, MoreHorizontal, Trash } from "lucide-react";
|
||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
|
@ -48,13 +47,13 @@ export const CellAction: React.FC<CellActionProps> = ({ data }) => {
|
||||||
<DropdownMenuContent align="end">
|
<DropdownMenuContent align="end">
|
||||||
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
|
||||||
<DropdownMenuItem className="cursor-pointer p-0">
|
<DropdownMenuItem
|
||||||
<Link
|
className="cursor-pointer"
|
||||||
href={`/dashboard/api-communications/edit/${data.id}`}
|
// onClick={() =>
|
||||||
className="flex items-center gap-2 px-2 py-1.5 w-full"
|
// router.push(`#`)
|
||||||
|
// }
|
||||||
>
|
>
|
||||||
<Edit className="h-4 w-4" /> Edit
|
<Edit className="mr-2 h-4 w-4" /> Update
|
||||||
</Link>
|
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
|
|
|
@ -27,7 +27,6 @@ import {
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { CommandList } from "cmdk";
|
import { CommandList } from "cmdk";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Commit } from "@/types/commit";
|
|
||||||
|
|
||||||
const statuses = [
|
const statuses = [
|
||||||
"new",
|
"new",
|
||||||
|
@ -70,34 +69,14 @@ const defaultValues: Partial<DisplayFormValues> = {
|
||||||
commitDate: "",
|
commitDate: "",
|
||||||
};
|
};
|
||||||
|
|
||||||
type Props = {
|
export default function CommitForm() {
|
||||||
commit?: Commit;
|
|
||||||
onSubmit: () => void;
|
|
||||||
btn1_content: string;
|
|
||||||
btn2_content: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function CommitForm({
|
|
||||||
commit,
|
|
||||||
onSubmit: onFormSubmit,
|
|
||||||
btn1_content,
|
|
||||||
btn2_content,
|
|
||||||
}: Props) {
|
|
||||||
const [isStatusPopoverOpen, setIsStatusPopoverOpen] = useState(false);
|
const [isStatusPopoverOpen, setIsStatusPopoverOpen] = useState(false);
|
||||||
const [isTypePopoverOpen, setIsTypePopoverOpen] = useState(false);
|
const [isTypePopoverOpen, setIsTypePopoverOpen] = useState(false);
|
||||||
const [isEvaluationPopoverOpen, setIsEvaluationPopoverOpen] = useState(false);
|
const [isEvaluationPopoverOpen, setIsEvaluationPopoverOpen] = useState(false);
|
||||||
|
|
||||||
const form = useForm<DisplayFormValues>({
|
const form = useForm<DisplayFormValues>({
|
||||||
resolver: zodResolver(displayFormSchema),
|
resolver: zodResolver(displayFormSchema),
|
||||||
defaultValues: {
|
defaultValues,
|
||||||
id: commit?.id || "",
|
|
||||||
hash: commit?.hash || "",
|
|
||||||
status: commit?.status || "",
|
|
||||||
retryCount: commit?.retryCount || "",
|
|
||||||
type: commit?.type || "",
|
|
||||||
evaluation: commit?.evaluation || "",
|
|
||||||
commitDate: commit?.commitDate || "",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSubmit(data: DisplayFormValues) {
|
function onSubmit(data: DisplayFormValues) {
|
||||||
|
@ -109,8 +88,6 @@ export default function CommitForm({
|
||||||
</pre>
|
</pre>
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
onFormSubmit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -371,10 +348,10 @@ export default function CommitForm({
|
||||||
|
|
||||||
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
||||||
<Button className="w-full" size="lg">
|
<Button className="w-full" size="lg">
|
||||||
{btn1_content}
|
Create
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="secondary" className="w-full" size="lg">
|
<Button variant="secondary" className="w-full" size="lg">
|
||||||
{btn2_content}
|
Create and add another
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -16,7 +16,6 @@ import { EvaluationStart } from "@/types/evaluation-start";
|
||||||
import { Skill } from "@/types/skill";
|
import { Skill } from "@/types/skill";
|
||||||
|
|
||||||
import { Edit, GitCommit, MoreHorizontal, Trash } from "lucide-react";
|
import { Edit, GitCommit, MoreHorizontal, Trash } from "lucide-react";
|
||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
|
@ -52,13 +51,13 @@ export const CellAction: React.FC<CellActionProps> = ({ data }) => {
|
||||||
<DropdownMenuContent align="end">
|
<DropdownMenuContent align="end">
|
||||||
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
|
||||||
<DropdownMenuItem className="cursor-pointer p-0">
|
<DropdownMenuItem
|
||||||
<Link
|
className="cursor-pointer"
|
||||||
href={`/dashboard/commits/edit/${data.id}`}
|
// onClick={() =>
|
||||||
className="flex items-center gap-2 px-2 py-1.5 w-full"
|
// router.push(`#`)
|
||||||
|
// }
|
||||||
>
|
>
|
||||||
<Edit className="h-4 w-4" /> Edit
|
<Edit className="mr-2 h-4 w-4" /> Edit
|
||||||
</Link>
|
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
|
|
|
@ -12,7 +12,6 @@ import { useToast } from "@/components/ui/use-toast";
|
||||||
import { Configuration } from "@/types/configuration";
|
import { Configuration } from "@/types/configuration";
|
||||||
|
|
||||||
import { BookCheck, Edit, MoreHorizontal, Trash } from "lucide-react";
|
import { BookCheck, Edit, MoreHorizontal, Trash } from "lucide-react";
|
||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
|
@ -48,13 +47,13 @@ export const CellAction: React.FC<CellActionProps> = ({ data }) => {
|
||||||
<DropdownMenuContent align="end">
|
<DropdownMenuContent align="end">
|
||||||
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
|
||||||
<DropdownMenuItem className="cursor-pointer p-0">
|
<DropdownMenuItem
|
||||||
<Link
|
className="cursor-pointer"
|
||||||
href={`/dashboard/configurations/edit/${data.id}`}
|
// onClick={() =>
|
||||||
className="flex items-center gap-2 px-2 py-1.5 w-full"
|
// router.push(`#`)
|
||||||
|
// }
|
||||||
>
|
>
|
||||||
<Edit className="h-4 w-4" /> Edit
|
<Edit className="mr-2 h-4 w-4" /> Update
|
||||||
</Link>
|
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
|
|
|
@ -13,7 +13,6 @@ import { Criteria } from "@/types/criteria";
|
||||||
import { EvaluationStart } from "@/types/evaluation-start";
|
import { EvaluationStart } from "@/types/evaluation-start";
|
||||||
|
|
||||||
import { Edit, GitCommit, MoreHorizontal, Trash } from "lucide-react";
|
import { Edit, GitCommit, MoreHorizontal, Trash } from "lucide-react";
|
||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
|
@ -49,13 +48,13 @@ export const CellAction: React.FC<CellActionProps> = ({ data }) => {
|
||||||
<DropdownMenuContent align="end">
|
<DropdownMenuContent align="end">
|
||||||
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
|
||||||
<DropdownMenuItem className="cursor-pointer p-0">
|
<DropdownMenuItem
|
||||||
<Link
|
className="cursor-pointer"
|
||||||
href={`/dashboard/criteria/edit/${data.id}`}
|
// onClick={() =>
|
||||||
className="flex items-center gap-2 px-2 py-1.5 w-full"
|
// router.push(`#`)
|
||||||
|
// }
|
||||||
>
|
>
|
||||||
<Edit className="h-4 w-4" /> Edit
|
<Edit className="mr-2 h-4 w-4" /> Edit
|
||||||
</Link>
|
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
|
|
|
@ -27,7 +27,6 @@ import {
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { CommandList } from "cmdk";
|
import { CommandList } from "cmdk";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Evaluation } from "@/types/evaluation";
|
|
||||||
|
|
||||||
const statuses = [
|
const statuses = [
|
||||||
"uploading",
|
"uploading",
|
||||||
|
@ -44,8 +43,8 @@ const statuses = [
|
||||||
"evaluation_failed",
|
"evaluation_failed",
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
const uploaders = ["johndoe@gmail.com", "danabramov@gmail.com"] as const;
|
const uploaders = ["hello@skilld.team", "johndoe@gmail.com"] as const;
|
||||||
const developers = ["danabramov@gmail.com", "johndoe@gmail.com"] as const;
|
const developers = ["hello@skilld.team", "johndoe@gmail.com"] as const;
|
||||||
|
|
||||||
const displayFormSchema = z.object({
|
const displayFormSchema = z.object({
|
||||||
status: z.string().trim().min(1, "Status is required"),
|
status: z.string().trim().min(1, "Status is required"),
|
||||||
|
@ -66,38 +65,22 @@ const displayFormSchema = z.object({
|
||||||
|
|
||||||
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
type DisplayFormValues = z.infer<typeof displayFormSchema>;
|
||||||
|
|
||||||
// const defaultValues: Partial<DisplayFormValues> = {
|
// This can come from your database or API.
|
||||||
// status: "",
|
const defaultValues: Partial<DisplayFormValues> = {
|
||||||
// uploadTime: "",
|
status: "",
|
||||||
// uploaderAccount: "",
|
uploadTime: "",
|
||||||
// developerUser: "",
|
uploaderAccount: "",
|
||||||
// };
|
developerUser: "",
|
||||||
|
|
||||||
type Props = {
|
|
||||||
evaluation?: Evaluation;
|
|
||||||
onSubmit: () => void;
|
|
||||||
btn1_content: string;
|
|
||||||
btn2_content: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function EvaluationForm({
|
export default function AddEvaluationForm() {
|
||||||
evaluation,
|
|
||||||
onSubmit: onFormSubmit,
|
|
||||||
btn1_content,
|
|
||||||
btn2_content,
|
|
||||||
}: Props) {
|
|
||||||
const [isStatusPopoverOpen, setIsStatusPopoverOpen] = useState(false);
|
const [isStatusPopoverOpen, setIsStatusPopoverOpen] = useState(false);
|
||||||
const [isUploaderPopoverOpen, setIsUploaderPopoverOpen] = useState(false);
|
const [isUploaderPopoverOpen, setIsUploaderPopoverOpen] = useState(false);
|
||||||
const [isDeveloperPopoverOpen, setIsDeveloperPopoverOpen] = useState(false);
|
const [isDeveloperPopoverOpen, setIsDeveloperPopoverOpen] = useState(false);
|
||||||
|
|
||||||
const form = useForm<DisplayFormValues>({
|
const form = useForm<DisplayFormValues>({
|
||||||
resolver: zodResolver(displayFormSchema),
|
resolver: zodResolver(displayFormSchema),
|
||||||
defaultValues: {
|
defaultValues,
|
||||||
status: evaluation?.status || "",
|
|
||||||
uploadTime: evaluation?.uploadTime || "",
|
|
||||||
uploaderAccount: evaluation?.uploaderAccount || "",
|
|
||||||
developerUser: evaluation?.developerUser || "",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSubmit(data: DisplayFormValues) {
|
function onSubmit(data: DisplayFormValues) {
|
||||||
|
@ -109,8 +92,6 @@ export default function EvaluationForm({
|
||||||
</pre>
|
</pre>
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
onFormSubmit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -331,10 +312,10 @@ export default function EvaluationForm({
|
||||||
|
|
||||||
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
<div className="flex items-center gap-4 flex-col sm:flex-row">
|
||||||
<Button className="w-full" size="lg">
|
<Button className="w-full" size="lg">
|
||||||
{btn1_content}
|
Create
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="secondary" className="w-full" size="lg">
|
<Button variant="secondary" className="w-full" size="lg">
|
||||||
{btn2_content}
|
Create and add another
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -15,7 +15,6 @@ import { EvaluationStart } from "@/types/evaluation-start";
|
||||||
import { Skill } from "@/types/skill";
|
import { Skill } from "@/types/skill";
|
||||||
|
|
||||||
import { Edit, GitCommit, MoreHorizontal, Trash } from "lucide-react";
|
import { Edit, GitCommit, MoreHorizontal, Trash } from "lucide-react";
|
||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
|
@ -51,13 +50,13 @@ export const CellAction: React.FC<CellActionProps> = ({ data }) => {
|
||||||
<DropdownMenuContent align="end">
|
<DropdownMenuContent align="end">
|
||||||
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
|
||||||
<DropdownMenuItem className="cursor-pointer p-0">
|
<DropdownMenuItem
|
||||||
<Link
|
className="cursor-pointer"
|
||||||
href={`/dashboard/evaluations/edit/${data.id}`}
|
// onClick={() =>
|
||||||
className="flex items-center gap-2 px-2 py-1.5 w-full"
|
// router.push(`#`)
|
||||||
|
// }
|
||||||
>
|
>
|
||||||
<Edit className="h-4 w-4" /> Edit
|
<Edit className="mr-2 h-4 w-4" /> Edit
|
||||||
</Link>
|
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
|
|
|
@ -13,7 +13,6 @@ import { Organization } from "@/types/organization";
|
||||||
import { User } from "@/types/user";
|
import { User } from "@/types/user";
|
||||||
|
|
||||||
import { BookCheck, Edit, MoreHorizontal, Trash } from "lucide-react";
|
import { BookCheck, Edit, MoreHorizontal, Trash } from "lucide-react";
|
||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
|
@ -49,13 +48,13 @@ export const CellAction: React.FC<CellActionProps> = ({ data }) => {
|
||||||
<DropdownMenuContent align="end">
|
<DropdownMenuContent align="end">
|
||||||
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
|
||||||
<DropdownMenuItem className="cursor-pointer p-0">
|
<DropdownMenuItem
|
||||||
<Link
|
className="cursor-pointer"
|
||||||
href={`/dashboard/organizations/edit/${data.id}`}
|
// onClick={() =>
|
||||||
className="flex items-center gap-2 px-2 py-1.5 w-full"
|
// router.push(`#`)
|
||||||
|
// }
|
||||||
>
|
>
|
||||||
<Edit className="h-4 w-4" /> Edit
|
<Edit className="mr-2 h-4 w-4" /> Update
|
||||||
</Link>
|
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
|
|
|
@ -14,7 +14,6 @@ import { EvaluationStart } from "@/types/evaluation-start";
|
||||||
import { Skill } from "@/types/skill";
|
import { Skill } from "@/types/skill";
|
||||||
|
|
||||||
import { Edit, GitCommit, MoreHorizontal, Trash } from "lucide-react";
|
import { Edit, GitCommit, MoreHorizontal, Trash } from "lucide-react";
|
||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
|
@ -50,13 +49,13 @@ export const CellAction: React.FC<CellActionProps> = ({ data }) => {
|
||||||
<DropdownMenuContent align="end">
|
<DropdownMenuContent align="end">
|
||||||
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
|
||||||
<DropdownMenuItem className="cursor-pointer p-0">
|
<DropdownMenuItem
|
||||||
<Link
|
className="cursor-pointer"
|
||||||
href={`/dashboard/skills/edit/${data.id}`}
|
// onClick={() =>
|
||||||
className="flex items-center gap-2 px-2 py-1.5 w-full"
|
// router.push(`#`)
|
||||||
|
// }
|
||||||
>
|
>
|
||||||
<Edit className="h-4 w-4" /> Edit
|
<Edit className="mr-2 h-4 w-4" /> Edit
|
||||||
</Link>
|
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
|
|
|
@ -11,8 +11,7 @@ import {
|
||||||
import { useToast } from "@/components/ui/use-toast";
|
import { useToast } from "@/components/ui/use-toast";
|
||||||
import { User } from "@/types/user";
|
import { User } from "@/types/user";
|
||||||
|
|
||||||
import { Edit, MoreHorizontal, Trash, UserCheck } from "lucide-react";
|
import { BookCheck, Edit, MoreHorizontal, Trash } from "lucide-react";
|
||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
|
@ -28,8 +27,7 @@ export const CellAction: React.FC<CellActionProps> = ({ data }) => {
|
||||||
|
|
||||||
const onDeleteConfirm = async () => {};
|
const onDeleteConfirm = async () => {};
|
||||||
|
|
||||||
|
const handleUpdateStatus = async () => {};
|
||||||
console.log(data)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -49,17 +47,13 @@ export const CellAction: React.FC<CellActionProps> = ({ data }) => {
|
||||||
<DropdownMenuContent align="end">
|
<DropdownMenuContent align="end">
|
||||||
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
|
||||||
<DropdownMenuItem className="cursor-pointer">
|
<DropdownMenuItem
|
||||||
<UserCheck className="mr-2 h-4 w-4" /> Approve User
|
className="cursor-pointer"
|
||||||
</DropdownMenuItem>
|
// onClick={() =>
|
||||||
|
// router.push(`#`)
|
||||||
<DropdownMenuItem className="cursor-pointer p-0">
|
// }
|
||||||
<Link
|
|
||||||
href={`/dashboard/users/edit/${data.id}`}
|
|
||||||
className="flex items-center gap-2 px-2 py-1.5 w-full"
|
|
||||||
>
|
>
|
||||||
<Edit className="h-4 w-4" /> Edit
|
<Edit className="mr-2 h-4 w-4" /> Update
|
||||||
</Link>
|
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
|
|
|
@ -9,27 +9,28 @@ import { Organization } from "@/types/organization";
|
||||||
import { Skill } from "@/types/skill";
|
import { Skill } from "@/types/skill";
|
||||||
import { User } from "@/types/user";
|
import { User } from "@/types/user";
|
||||||
import { UserRound, UserRoundCheck } from "lucide-react";
|
import { UserRound, UserRoundCheck } from "lucide-react";
|
||||||
|
import { number } from "zod";
|
||||||
|
|
||||||
export const dummyUsers: User[] = [
|
export const dummyUsers: User[] = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
email: "john@gmail.com",
|
email: "john@gmail.com",
|
||||||
fullName: "John Doe",
|
fullName: "John Doe",
|
||||||
role: "ROLE_ADMIN",
|
role: "ADMIN",
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
email: "linustorvalds@gmail.com",
|
email: "linustorvalds@gmail.com",
|
||||||
fullName: "Linus Torvalds",
|
fullName: "Linus Torvalds",
|
||||||
role: "ROLE_USER",
|
role: "USER",
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
email: "ryandahl@gmail.com",
|
email: "ryandahl@gmail.com",
|
||||||
fullName: "Ryan Dahl",
|
fullName: "Ryan Dahl",
|
||||||
role: "ROLE_ADMIN",
|
role: "ADMIN",
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -89,7 +90,7 @@ export const dummyAccounts: Account[] = [
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
email: "sarah@example.com",
|
email: "sarah@example.com",
|
||||||
balance: 2000,
|
balance: 0,
|
||||||
organization: "ABC Solutions",
|
organization: "ABC Solutions",
|
||||||
accountHistory: "None",
|
accountHistory: "None",
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
|
@ -108,31 +109,31 @@ export const dummyConfigurations: Configuration[] = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: "process_limit",
|
name: "process_limit",
|
||||||
value: "20",
|
value: 20,
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: "process_timeout",
|
name: "process_timeout",
|
||||||
value: "600",
|
value: 600,
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: "number_of_courses_to_create",
|
name: "number_of_courses_to_create",
|
||||||
value: "5",
|
value: 5,
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
name: "max_retries",
|
name: "max_retries",
|
||||||
value: "2",
|
value: 2,
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
name: "max_token_per_evaluation",
|
name: "max_token_per_evaluation",
|
||||||
value: "1000000",
|
value: 1000000,
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -164,7 +165,7 @@ export const dummyApiCommunications: ApiCommunication[] = [
|
||||||
status: "course_creation_success",
|
status: "course_creation_success",
|
||||||
type: "course_creation",
|
type: "course_creation",
|
||||||
evaluation:
|
evaluation:
|
||||||
"Uploaded at: 2023-09-20 00:00:00 - Uploader: jschultz@php.net - Developer: fabien@potencier.org - Status: finished",
|
" Uploaded at: 2023-09-20 00:00:00 - Uploader: jschultz@php.net - Developer: fabien@potencier.org - Status: finished",
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -299,10 +300,10 @@ export const dummyEvaluations: Evaluation[] = [
|
||||||
|
|
||||||
export const dummyCommits: Commit[] = [
|
export const dummyCommits: Commit[] = [
|
||||||
{
|
{
|
||||||
id: "1",
|
id: 1,
|
||||||
hash: "9998211595b05c7f8555e4a129d7792bce7a8dd6_1",
|
hash: "9998211595b05c7f8555e4a129d7792bce7a8dd6_1",
|
||||||
status: "skills_extracted",
|
status: "skills_extracted",
|
||||||
retryCount: "0",
|
retryCount: 0,
|
||||||
type: "code",
|
type: "code",
|
||||||
evaluation:
|
evaluation:
|
||||||
"Uploaded at: 2023-09-20 00:00:00 - Uploader: jschultz@php.net - Developer: fabien@potencier.org - Status: finished",
|
"Uploaded at: 2023-09-20 00:00:00 - Uploader: jschultz@php.net - Developer: fabien@potencier.org - Status: finished",
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
export interface Commit {
|
export interface Commit {
|
||||||
id: string;
|
id: number;
|
||||||
hash: string;
|
hash: string;
|
||||||
status: string;
|
status: string;
|
||||||
retryCount: string;
|
retryCount: number;
|
||||||
type: string;
|
type: string;
|
||||||
evaluation: string;
|
evaluation: string;
|
||||||
commitDate: string;
|
commitDate: string;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export interface Configuration {
|
export interface Configuration {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
value: string;
|
value: number;
|
||||||
created_at: string;
|
created_at: string;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue