diff --git a/components/dashboard/sections/collectives/common.tsx b/components/dashboard/sections/collectives/common.tsx
index 73b97e5926a..a80c3f03151 100644
--- a/components/dashboard/sections/collectives/common.tsx
+++ b/components/dashboard/sections/collectives/common.tsx
@@ -9,6 +9,7 @@ import {
MoreHorizontal,
Pause,
Play,
+ Receipt,
ReceiptText,
SquareSigma,
Unlink,
@@ -39,6 +40,7 @@ import {
import { TableActionsButton } from '../../../ui/Table';
import { Tooltip, TooltipContent, TooltipTrigger } from '../../../ui/Tooltip';
import { DashboardContext } from '../../DashboardContext';
+import { HostCreateExpenseModal } from '../expenses/HostCreateExpenseModal';
import AddFundsModal from './AddFundsModal';
import FreezeAccountModal from './FreezeAccountModal';
@@ -287,7 +289,7 @@ export const MoreActionsMenu = ({
const router = useRouter();
const { account } = React.useContext(DashboardContext);
const [openModal, setOpenModal] = React.useState<
- null | 'ADD_FUNDS' | 'FREEZE' | 'UNHOST' | 'ADD_AGREEMENT' | 'CONTACT'
+ null | 'ADD_FUNDS' | 'ADD_EXPENSE' | 'FREEZE' | 'UNHOST' | 'ADD_AGREEMENT' | 'CONTACT'
>(null);
return (
@@ -322,6 +324,15 @@ export const MoreActionsMenu = ({
+ setOpenModal('ADD_EXPENSE')}
+ >
+
+
+
+
setOpenModal(null)} onSuccess={onEdit} />
)}
+ {openModal === 'ADD_EXPENSE' && (
+ setOpenModal(null)} host={collective.host} />
+ )}
{openModal === 'FREEZE' && (
setOpenModal(null)} onSuccess={onEdit} />
)}
diff --git a/components/dashboard/sections/expenses/HostCreateExpenseModal.tsx b/components/dashboard/sections/expenses/HostCreateExpenseModal.tsx
index e00ff2a718f..52438c54641 100644
--- a/components/dashboard/sections/expenses/HostCreateExpenseModal.tsx
+++ b/components/dashboard/sections/expenses/HostCreateExpenseModal.tsx
@@ -172,9 +172,9 @@ export const HostCreateExpenseModal = ({
host,
...props
}: {
- transactionsImport: TransactionsImport;
- transactionsImportRow: TransactionsImportRow;
host: Account;
+ transactionsImport?: TransactionsImport;
+ transactionsImportRow?: TransactionsImportRow;
} & BaseModalProps) => {
const intl = useIntl();
const [createExpense, { client }] = useMutation(hostCreateExpenseMutation, { context: API_V2_CONTEXT });