Compare commits
4 Commits
30cdb3f073
...
46bb695840
| Author | SHA1 | Date | |
|---|---|---|---|
| 46bb695840 | |||
| c79496eaac | |||
| 50fcfb05ce | |||
| a6f29fe11c |
@@ -73,7 +73,7 @@ export default function OCPPage() {
|
||||
<WrapperManualTrigger />
|
||||
</ResizablePanel>
|
||||
)}
|
||||
{server[0].value === "usday1vms006" && (
|
||||
{server[0].value === "localhost" && (
|
||||
<ResizablePanel className="max-h-[300px]">
|
||||
<WrapperManualTrigger />
|
||||
</ResizablePanel>
|
||||
|
||||
6
frontend/src/utils/fixTime.ts
Normal file
6
frontend/src/utils/fixTime.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { format } from "date-fns";
|
||||
|
||||
export const fixTime = (date: any) => {
|
||||
const strippedDate = date.replace("Z", ""); // Remove Z
|
||||
return format(strippedDate, "MM/dd/yyyy hh:mm a");
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
import { fixTime } from "@/utils/fixTime";
|
||||
import { ColumnDef } from "@tanstack/react-table";
|
||||
import { format } from "date-fns";
|
||||
|
||||
// This type is used to define the shape of our data.
|
||||
// You can use a Zod schema here if you want.
|
||||
@@ -33,10 +33,7 @@ export const labelolumns: ColumnDef<Adjustmnets>[] = [
|
||||
header: "Label Date",
|
||||
cell: ({ row }) => {
|
||||
if (row.getValue("upd_date")) {
|
||||
const correctDate = format(
|
||||
row.getValue("upd_date"),
|
||||
"M/d/yyyy hh:mm"
|
||||
);
|
||||
const correctDate = fixTime(row.getValue("created_at"));
|
||||
return (
|
||||
<div className="text-left font-medium">{correctDate}</div>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { fixTime } from "@/utils/fixTime";
|
||||
import { ColumnDef } from "@tanstack/react-table";
|
||||
import { format } from "date-fns";
|
||||
import { Trash } from "lucide-react";
|
||||
|
||||
// This type is used to define the shape of our data.
|
||||
@@ -38,10 +38,7 @@ export const ocpColumns = (
|
||||
header: "Error Date",
|
||||
cell: ({ row }) => {
|
||||
if (row.getValue("created_at")) {
|
||||
const correctDate = format(
|
||||
row.getValue("created_at"),
|
||||
"M/d/yyyy hh:mm"
|
||||
);
|
||||
const correctDate = fixTime(row.getValue("created_at"));
|
||||
return (
|
||||
<div className="text-left font-medium">{correctDate}</div>
|
||||
);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
},
|
||||
"admConfig": {
|
||||
"build": 228,
|
||||
"build": 231,
|
||||
"oldBuild": "backend-0.1.3.zip"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user