mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
feat: configuring import services on more resources
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// @ts-nocheck
|
||||
import { DashboardInsider } from '@/components';
|
||||
import { ImportView } from '@/containers/Import';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
||||
export default function CreditNotesImport() {
|
||||
const history = useHistory();
|
||||
|
||||
const handleCancelBtnClick = () => {
|
||||
history.push('/credit-notes');
|
||||
};
|
||||
const handleImportSuccess = () => {
|
||||
history.push('/credit-notes');
|
||||
};
|
||||
|
||||
return (
|
||||
<DashboardInsider name={'import-credit-notes'}>
|
||||
<ImportView
|
||||
resource={'credit_note'}
|
||||
onCancelClick={handleCancelBtnClick}
|
||||
onImportSuccess={handleImportSuccess}
|
||||
/>
|
||||
</DashboardInsider>
|
||||
);
|
||||
}
|
||||
@@ -69,6 +69,11 @@ function CreditNotesActionsBar({
|
||||
addSetting('creditNote', 'tableSize', size);
|
||||
};
|
||||
|
||||
// Handle import button click.
|
||||
const handleImportBtnClick = () => {
|
||||
history.push('/credit-notes/import');
|
||||
};
|
||||
|
||||
return (
|
||||
<DashboardActionsBar>
|
||||
<NavbarGroup>
|
||||
@@ -111,6 +116,7 @@ function CreditNotesActionsBar({
|
||||
className={Classes.MINIMAL}
|
||||
icon={<Icon icon={'file-import-16'} />}
|
||||
text={<T id={'import'} />}
|
||||
onClick={handleImportBtnClick}
|
||||
/>
|
||||
<Button
|
||||
className={Classes.MINIMAL}
|
||||
|
||||
Reference in New Issue
Block a user