mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat: add context menu in sms message table.
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { DataTableEditable, DataTable } from 'components';
|
||||
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
|
||||
|
||||
import { useSMSIntegrationTableColumns } from './components';
|
||||
import { useSMSIntegrationTableColumns, ActionsMenu } from './components';
|
||||
import { useSMSIntegrationContext } from './SMSIntegrationProvider';
|
||||
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
@@ -18,10 +18,12 @@ function SMSMessagesDataTable({
|
||||
const { notifications, isSMSNotificationsLoading } =
|
||||
useSMSIntegrationContext();
|
||||
|
||||
const handleEditSMSMessage = ({ key }) => {
|
||||
const handleEditMessageText = ({ key }) => {
|
||||
openDialog('sms-message-form', { notificationkey: key });
|
||||
};
|
||||
|
||||
const handleEnableNotification = () => {};
|
||||
|
||||
return (
|
||||
<DataTable
|
||||
columns={columns}
|
||||
@@ -30,8 +32,10 @@ function SMSMessagesDataTable({
|
||||
progressBarLoading={isSMSNotificationsLoading}
|
||||
TableLoadingRenderer={TableSkeletonRows}
|
||||
noInitialFetch={true}
|
||||
ContextMenu={ActionsMenu}
|
||||
payload={{
|
||||
onEditSMSMessage: handleEditSMSMessage,
|
||||
onEditMessageText: handleEditMessageText,
|
||||
onEnableNotification: handleEnableNotification,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user