refactor: replace TestTube with ClipboardCheck icon and apply consistent code formatting in PromptManagement page
This commit is contained in:
parent
816208fd9c
commit
c427e4aa51
@ -1,6 +1,14 @@
|
||||
import { useEffect, useMemo, useState, type ReactElement } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Plus, Search, Copy, History, Trash2, Edit3, TestTube } from "lucide-react";
|
||||
import {
|
||||
Plus,
|
||||
Search,
|
||||
Copy,
|
||||
History,
|
||||
Trash2,
|
||||
Edit3,
|
||||
ClipboardCheck,
|
||||
} from "lucide-react";
|
||||
import { Layout } from "@/components/layout/Layout";
|
||||
import {
|
||||
DataTable,
|
||||
@ -121,7 +129,10 @@ const PromptManagement = (): ReactElement => {
|
||||
label: "Name & Description",
|
||||
render: (row) => (
|
||||
<div className="min-w-0">
|
||||
<p className="text-sm font-semibold text-[#112868] hover:underline cursor-pointer" onClick={() => navigate(`/tenant/ai/prompts/${row.id}/edit`)}>
|
||||
<p
|
||||
className="text-sm font-semibold text-[#112868] hover:underline cursor-pointer"
|
||||
onClick={() => navigate(`/tenant/ai/prompts/${row.id}/edit`)}
|
||||
>
|
||||
{row.name}
|
||||
</p>
|
||||
<p className="text-xs text-[#64748b] truncate max-w-[280px]">
|
||||
@ -158,14 +169,18 @@ const PromptManagement = (): ReactElement => {
|
||||
<div
|
||||
className={cn(
|
||||
"absolute top-[2px] left-[2px] w-3.5 h-3.5 rounded-full transition-transform duration-200 shadow-sm",
|
||||
row.status === "active" ? "translate-x-[18px] bg-[#00cfd5]" : "bg-white",
|
||||
row.status === "active"
|
||||
? "translate-x-[18px] bg-[#00cfd5]"
|
||||
: "bg-white",
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<span className={cn(
|
||||
<span
|
||||
className={cn(
|
||||
"text-[11px] font-medium uppercase tracking-wider",
|
||||
row.status === "active" ? "text-green-600" : "text-gray-400"
|
||||
)}>
|
||||
row.status === "active" ? "text-green-600" : "text-gray-400",
|
||||
)}
|
||||
>
|
||||
{row.status || "draft"}
|
||||
</span>
|
||||
</div>
|
||||
@ -201,7 +216,9 @@ const PromptManagement = (): ReactElement => {
|
||||
</span>
|
||||
))}
|
||||
{tags.length > 2 && (
|
||||
<span className="text-[10px] text-gray-400 font-medium">+{tags.length - 2}</span>
|
||||
<span className="text-[10px] text-gray-400 font-medium">
|
||||
+{tags.length - 2}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
@ -225,9 +242,10 @@ const PromptManagement = (): ReactElement => {
|
||||
<ActionDropdown
|
||||
actions={[
|
||||
{
|
||||
icon: <TestTube className="w-3.5 h-3.5 shrink-0" />,
|
||||
icon: <ClipboardCheck className="w-3.5 h-3.5 shrink-0" />,
|
||||
label: "Prompt Test Cases",
|
||||
onClick: () => navigate(`/tenant/ai/prompts/${row.id}/test-cases`),
|
||||
onClick: () =>
|
||||
navigate(`/tenant/ai/prompts/${row.id}/test-cases`),
|
||||
},
|
||||
{
|
||||
icon: <Edit3 className="w-3.5 h-3.5 shrink-0" />,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user