Metamigo -> Bridge
This commit is contained in:
parent
242f3cf6b8
commit
a445762a37
145 changed files with 396 additions and 16668 deletions
3
apps/bridge-frontend/app/whatsapp/[id]/edit/page.tsx
Normal file
3
apps/bridge-frontend/app/whatsapp/[id]/edit/page.tsx
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export default function Page() {
|
||||
return <h1>Whatsapp edit</h1>;
|
||||
}
|
||||
6
apps/bridge-frontend/app/whatsapp/[id]/page.tsx
Normal file
6
apps/bridge-frontend/app/whatsapp/[id]/page.tsx
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import { db } from "@/app/_lib/database";
|
||||
|
||||
export default async function Page() {
|
||||
const rows = await db.selectFrom("WhatsAppBot").
|
||||
return <h1>Whatsapp View</h1>;
|
||||
}
|
||||
3
apps/bridge-frontend/app/whatsapp/new/page.tsx
Normal file
3
apps/bridge-frontend/app/whatsapp/new/page.tsx
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export default function Page() {
|
||||
return <h1>Whatsapp new</h1>;
|
||||
}
|
||||
45
apps/bridge-frontend/app/whatsapp/page.tsx
Normal file
45
apps/bridge-frontend/app/whatsapp/page.tsx
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
"use client";
|
||||
|
||||
import { GridColDef } from "@mui/x-data-grid-pro";
|
||||
import { List } from "ui";
|
||||
import { db } from "@/app/_lib/database";
|
||||
|
||||
export default async function Page() {
|
||||
const columns: GridColDef[] = [
|
||||
{
|
||||
field: "id",
|
||||
headerName: "ID",
|
||||
flex: 1,
|
||||
},
|
||||
{
|
||||
field: "phoneNumber",
|
||||
headerName: "Phone Number",
|
||||
flex: 2,
|
||||
},
|
||||
{
|
||||
field: "createdAt",
|
||||
headerName: "Created At",
|
||||
valueGetter: (params: any) =>
|
||||
new Date(params.row?.createdAt).toLocaleString(),
|
||||
flex: 1,
|
||||
},
|
||||
{
|
||||
field: "updatedAt",
|
||||
headerName: "Updated At",
|
||||
valueGetter: (params: any) =>
|
||||
new Date(params.row?.updatedAt).toLocaleString(),
|
||||
flex: 1,
|
||||
},
|
||||
];
|
||||
|
||||
const rows = await db.selectFrom("WhatsAppBot").selectAll().execute();
|
||||
|
||||
return (
|
||||
<List
|
||||
title="Whatsapp Bots"
|
||||
rows={rows}
|
||||
columns={columns}
|
||||
onRowClick={() => {}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue