mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: paper template customize
This commit is contained in:
@@ -7,6 +7,7 @@ import { EstimateCustomizeContentFields } from './EstimateCustomizeFieldsContent
|
||||
import { EstimatePaperTemplate } from './EstimatePaperTemplate';
|
||||
import { EstimateCustomizeValues } from './types';
|
||||
import { initialValues } from './constants';
|
||||
import { useFormikContext } from 'formik';
|
||||
|
||||
export default function EstimateCustomizeContent() {
|
||||
const handleFormSubmit = (values: EstimateCustomizeValues) => {};
|
||||
@@ -18,7 +19,7 @@ export default function EstimateCustomizeContent() {
|
||||
onSubmit={handleFormSubmit}
|
||||
>
|
||||
<ElementCustomize.PaperTemplate>
|
||||
<EstimatePaperTemplate />
|
||||
<EstimatePaperTemplateFormConnected />
|
||||
</ElementCustomize.PaperTemplate>
|
||||
|
||||
<ElementCustomize.FieldsTab id={'general'} label={'General'}>
|
||||
@@ -36,3 +37,9 @@ export default function EstimateCustomizeContent() {
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
function EstimatePaperTemplateFormConnected() {
|
||||
const { values } = useFormikContext<EstimateCustomizeValues>();
|
||||
|
||||
return <EstimatePaperTemplate {...values} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user