Skip to content

Commit

Permalink
chore: apply v5 feedback changes (scan twaks)
Browse files Browse the repository at this point in the history
  • Loading branch information
paabloLC committed Nov 30, 2024
1 parent 42a9e98 commit 7ebf32d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
30 changes: 19 additions & 11 deletions ui/components/scans/table/scans/column-get-scans.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ColumnDef } from "@tanstack/react-table";
import { useSearchParams } from "next/navigation";

import { InfoIcon } from "@/components/icons";
import { DateWithTime, SnippetId } from "@/components/ui/entities";
import { DateWithTime } from "@/components/ui/entities";
import { TriggerSheet } from "@/components/ui/sheet";
import { DataTableColumnHeader, StatusBadge } from "@/components/ui/table";
import { ScanProps } from "@/types";
Expand All @@ -18,6 +18,15 @@ const getScanData = (row: { original: ScanProps }) => {
};

export const ColumnGetScans: ColumnDef<ScanProps>[] = [
{
accessorKey: "accountName",
header: () => <p className="pr-8">Account name</p>,
cell: ({ row }) => {
console.log(row.original);

return <span className="font-medium">providerinfo</span>;
},
},
{
accessorKey: "started_at",
header: () => <p className="pr-8">Started at</p>,
Expand Down Expand Up @@ -123,18 +132,17 @@ export const ColumnGetScans: ColumnDef<ScanProps>[] = [
return <p>{trigger}</p>;
},
},

{
accessorKey: "id",
header: () => <span>ID</span>,
cell: ({ row }) => {
return <SnippetId entityId={row.original.id} />;
},
},
// {
// accessorKey: "id",
// header: () => <span>ID</span>,
// cell: ({ row }) => {
// return <SnippetId entityId={row.original.id} />;
// },
// },
{
accessorKey: "name",
accessorKey: "scanName",
header: ({ column }) => (
<DataTableColumnHeader column={column} title={"Name"} param="name" />
<DataTableColumnHeader column={column} title={"Scan name"} param="name" />
),
cell: ({ row }) => {
const {
Expand Down
9 changes: 4 additions & 5 deletions ui/components/scans/table/scans/data-table-row-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ export function DataTableRowActions<ScanProps>({
<CustomAlertModal
isOpen={isEditOpen}
onOpenChange={setIsEditOpen}
title="Edit Scan"
description={"Edit the scan details"}
title="Edit Scan Name"
>
<EditScanForm
scanId={scanId}
Expand Down Expand Up @@ -67,12 +66,12 @@ export function DataTableRowActions<ScanProps>({
<DropdownSection title="Actions">
<DropdownItem
key="edit"
description="Allows you to edit the scan"
textValue="Edit Scan"
description="Allows you to edit the scan name"
textValue="Edit Scan Name"
startContent={<EditDocumentBulkIcon className={iconClasses} />}
onClick={() => setIsEditOpen(true)}
>
Edit Scan
Edit scan name
</DropdownItem>
</DropdownSection>
</DropdownMenu>
Expand Down

0 comments on commit 7ebf32d

Please sign in to comment.