Edit and actions updates

This commit is contained in:
Darren Clarke 2024-04-25 12:31:03 +02:00
parent 0997e449bb
commit f87bcc43a5
30 changed files with 759 additions and 139 deletions

View file

@ -0,0 +1,36 @@
"use server";
import { addAction, updateAction, deleteAction } from "@/app/_lib/actions";
const entity = "voice";
const table = "VoiceLine";
export const addVoiceLineAction = async (
currentState: any,
formData: FormData,
) => {
return addAction({
entity,
table,
fields: ["name"],
currentState,
formData,
});
};
export const updateVoiceLineAction = async (
currentState: any,
formData: FormData,
) => {
return updateAction({
entity,
table,
fields: ["name"],
currentState,
formData,
});
};
export const deleteVoiceLineAction = async (id: string) => {
return deleteAction({ entity, table, id });
};

View file

@ -36,5 +36,12 @@ export const VoiceBotsList: FC<VoiceBotsListProps> = ({ rows }) => {
},
];
return <List title="Voice Bots" entity="voice" rows={rows} columns={columns} />;
return (
<List
title="Voice Connections"
entity="voice"
rows={rows}
columns={columns}
/>
);
};