Edit and actions updates
This commit is contained in:
parent
0997e449bb
commit
f87bcc43a5
30 changed files with 759 additions and 139 deletions
37
apps/bridge-frontend/app/(main)/signal/_actions/signal.ts
Normal file
37
apps/bridge-frontend/app/(main)/signal/_actions/signal.ts
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
"use server";
|
||||
|
||||
import { addAction, updateAction, deleteAction } from "@/app/_lib/actions";
|
||||
|
||||
export const addSignalBotAction = async (
|
||||
currentState: any,
|
||||
formData: FormData,
|
||||
) => {
|
||||
return addAction({
|
||||
entity: "signal",
|
||||
table: "SignalBot",
|
||||
fields: ["name", "description"],
|
||||
currentState,
|
||||
formData,
|
||||
});
|
||||
};
|
||||
|
||||
export const updateSignalBotAction = async (
|
||||
currentState: any,
|
||||
formData: FormData,
|
||||
) => {
|
||||
return updateAction({
|
||||
entity: "signal",
|
||||
table: "SignalBot",
|
||||
fields: ["name"],
|
||||
currentState,
|
||||
formData,
|
||||
});
|
||||
};
|
||||
|
||||
export const updateSignalBotAction = async (id: string) => {
|
||||
return deleteAction({
|
||||
entity: "facebook",
|
||||
table: "FacebookBot",
|
||||
id,
|
||||
});
|
||||
};
|
||||
|
|
@ -37,6 +37,11 @@ export const SignalBotsList: FC<SignalBotsListProps> = ({ rows }) => {
|
|||
];
|
||||
|
||||
return (
|
||||
<List title="Signal Bots" entity="signal" rows={rows} columns={columns} />
|
||||
<List
|
||||
title="Signal Connections"
|
||||
entity="signal"
|
||||
rows={rows}
|
||||
columns={columns}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue