Add CRUD for other entities
This commit is contained in:
parent
f87bcc43a5
commit
a3e8b89128
64 changed files with 949 additions and 62 deletions
|
|
@ -0,0 +1,35 @@
|
|||
"use client";
|
||||
|
||||
import { FC } from "react";
|
||||
import { Grid } from "@mui/material";
|
||||
import { DisplayTextField } from "ui";
|
||||
import { WhatsappBot } from "@/app/_lib/database";
|
||||
import { Detail as InternalDetail } from "@/app/_components/Detail";
|
||||
import { deleteWhatsappBotAction } from "../../_actions/whatsapp";
|
||||
|
||||
type DetailProps = {
|
||||
row: WhatsappBot;
|
||||
};
|
||||
|
||||
export const Detail: FC<DetailProps> = ({ row }) => (
|
||||
<InternalDetail
|
||||
title={`WhatsApp Connection: ${row.name}`}
|
||||
entity="whatsapp"
|
||||
id={row.id}
|
||||
deleteAction={deleteWhatsappBotAction}
|
||||
>
|
||||
<Grid container direction="row" rowSpacing={3} columnSpacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<DisplayTextField name="name" label="Name" value={row.name} />
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<DisplayTextField
|
||||
name="description"
|
||||
label="Description"
|
||||
lines={3}
|
||||
value={row.description}
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</InternalDetail>
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue