Edit and actions updates
This commit is contained in:
parent
0997e449bb
commit
f87bcc43a5
30 changed files with 759 additions and 139 deletions
36
apps/bridge-frontend/app/(main)/voice/_actions/voice.ts
Normal file
36
apps/bridge-frontend/app/(main)/voice/_actions/voice.ts
Normal 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 });
|
||||
};
|
||||
|
|
@ -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}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue