mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
fix: import resource imporements
This commit is contained in:
25
packages/webapp/src/containers/Customers/CustomersImport.tsx
Normal file
25
packages/webapp/src/containers/Customers/CustomersImport.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
// @ts-nocheck
|
||||
import { DashboardInsider } from '@/components';
|
||||
import { ImportView } from '../Import/ImportView';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
||||
export default function CustomersImport() {
|
||||
const history = useHistory();
|
||||
|
||||
const handleImportSuccess = () => {
|
||||
history.push('/customers');
|
||||
};
|
||||
const handleCancelBtnClick = () => {
|
||||
history.push('/customers');
|
||||
};
|
||||
return (
|
||||
<DashboardInsider name={'import-customers'}>
|
||||
<ImportView
|
||||
resource={'customers'}
|
||||
onImportSuccess={handleImportSuccess}
|
||||
onCancelClick={handleCancelBtnClick}
|
||||
exampleTitle="Customers Example"
|
||||
/>
|
||||
</DashboardInsider>
|
||||
);
|
||||
}
|
||||
@@ -95,6 +95,11 @@ function CustomerActionsBar({
|
||||
addSetting('customers', 'tableSize', size);
|
||||
};
|
||||
|
||||
// Handle import button click.
|
||||
const handleImportBtnClick = () => {
|
||||
history.push('/customers/import');
|
||||
};
|
||||
|
||||
return (
|
||||
<DashboardActionsBar>
|
||||
<NavbarGroup>
|
||||
@@ -142,6 +147,7 @@ function CustomerActionsBar({
|
||||
<Button
|
||||
className={Classes.MINIMAL}
|
||||
icon={<Icon icon="file-import-16" iconSize={16} />}
|
||||
onClick={handleImportBtnClick}
|
||||
text={<T id={'import'} />}
|
||||
/>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user