diff --git a/packages/webapp/src/components/App.tsx b/packages/webapp/src/components/App.tsx
index a962d88f7..8e3ace04f 100644
--- a/packages/webapp/src/components/App.tsx
+++ b/packages/webapp/src/components/App.tsx
@@ -40,7 +40,7 @@ const PaymentPortalPage = lazy(
const theme = {
...defaultTheme,
- // Customize your theme here
+ bpPrefix: 'bp4',
}
/**
diff --git a/packages/webapp/src/containers/Sales/CreditNotes/CreditNoteForm/CreditNoteFormHeaderFields.tsx b/packages/webapp/src/containers/Sales/CreditNotes/CreditNoteForm/CreditNoteFormHeaderFields.tsx
index 3c89f2f04..ad5bca1df 100644
--- a/packages/webapp/src/containers/Sales/CreditNotes/CreditNoteForm/CreditNoteFormHeaderFields.tsx
+++ b/packages/webapp/src/containers/Sales/CreditNotes/CreditNoteForm/CreditNoteFormHeaderFields.tsx
@@ -5,6 +5,8 @@ import styled from 'styled-components';
import { FormGroup, InputGroup, Position } from '@blueprintjs/core';
import { DateInput } from '@blueprintjs/datetime';
import { FastField, ErrorMessage, useFormikContext } from 'formik';
+import { css } from '@emotion/css';
+import { useTheme } from '@emotion/react';
import { CLASSES } from '@/constants/classes';
import {
@@ -14,6 +16,7 @@ import {
CustomerDrawerLink,
FFormGroup,
CustomersSelect,
+ Stack,
} from '@/components';
import { customerNameFieldShouldUpdate } from './utils';
@@ -28,12 +31,31 @@ import {
} from '@/utils';
import { useCustomerUpdateExRate } from '@/containers/Entries/withExRateItemEntriesPriceRecalc';
+const getCreditNoteFieldsStyle = (theme: Theme) => css`
+ .${theme.bpPrefix}-form-group {
+ margin-bottom: 0;
+
+ &.${theme.bpPrefix}-inline {
+ max-width: 450px;
+ }
+ .${theme.bpPrefix}-label {
+ min-width: 150px;
+ }
+ .${theme.bpPrefix}-form-content {
+ width: 100%;
+ }
+ }
+`;
+
/**
* Credit note form header fields.
*/
-export default function CreditNoteFormHeaderFields({}) {
+export default function CreditNoteFormHeaderFields() {
+ const theme = useTheme();
+ const styleClassName = getCreditNoteFieldsStyle(theme);
+
return (
-
+
{/* ----------- Customer name ----------- */}
@@ -65,24 +87,15 @@ export default function CreditNoteFormHeaderFields({}) {
)}
+
{/* ----------- Credit note # ----------- */}
{/* ----------- Reference ----------- */}
-
- {({ field, meta: { error, touched } }) => (
- }
- inline={true}
- className={classNames('form-group--reference', CLASSES.FILL)}
- intent={inputIntent({ error, touched })}
- helperText={}
- >
-
-
- )}
-
-
+ } name={'reference_no'} inline>
+
+
+
);
}
diff --git a/packages/webapp/src/containers/Sales/Estimates/EstimateForm/EstimateFormHeaderFields.tsx b/packages/webapp/src/containers/Sales/Estimates/EstimateForm/EstimateFormHeaderFields.tsx
index eba6eb5da..fb04e904f 100644
--- a/packages/webapp/src/containers/Sales/Estimates/EstimateForm/EstimateFormHeaderFields.tsx
+++ b/packages/webapp/src/containers/Sales/Estimates/EstimateForm/EstimateFormHeaderFields.tsx
@@ -1,10 +1,10 @@
// @ts-nocheck
import styled from 'styled-components';
import classNames from 'classnames';
-import { FormGroup, InputGroup, Position, Classes } from '@blueprintjs/core';
+import { FormGroup, Position, Classes } from '@blueprintjs/core';
import { DateInput } from '@blueprintjs/datetime';
import { FastField, ErrorMessage, useFormikContext } from 'formik';
-
+import { css } from '@emotion/css';
import {
FeatureCan,
FFormGroup,
@@ -13,6 +13,8 @@ import {
Icon,
CustomerDrawerLink,
CustomersSelect,
+ FInputGroup,
+ Stack,
} from '@/components';
import {
momentFormatter,
@@ -31,15 +33,36 @@ import {
import { EstimateFormEstimateNumberField } from './EstimateFormEstimateNumberField';
import { useEstimateFormContext } from './EstimateFormProvider';
import { useCustomerUpdateExRate } from '@/containers/Entries/withExRateItemEntriesPriceRecalc';
+import { useTheme } from '@emotion/react';
+import { Theme } from '@xstyled/emotion';
+
+const getEstimateFieldsStyle = (theme: Theme) => css`
+ .${theme.bpPrefix}-form-group {
+ margin-bottom: 0;
+
+ &.${theme.bpPrefix}-inline {
+ max-width: 470px;
+ }
+ .${theme.bpPrefix}-label {
+ min-width: 160px;
+ font-weight: 500;
+ }
+ .${theme.bpPrefix}-form-content {
+ width: 100%;
+ }
+ }
+`;
/**
* Estimate form header.
*/
export default function EstimateFormHeader() {
+ const theme = useTheme();
const { projects } = useEstimateFormContext();
+ const styleClassName = getEstimateFieldsStyle(theme);
return (
-
+
{/* ----------- Customer name ----------- */}
@@ -106,19 +129,9 @@ export default function EstimateFormHeader() {
{/* ----------- Reference ----------- */}
-
- {({ form, field, meta: { error, touched } }) => (
- }
- inline={true}
- className={classNames('form-group--reference', CLASSES.FILL)}
- intent={inputIntent({ error, touched })}
- helperText={}
- >
-
-
- )}
-
+ } inline fill>
+
+
{/*------------ Project name -----------*/}
@@ -136,7 +149,7 @@ export default function EstimateFormHeader() {
/>
-
+
);
}
diff --git a/packages/webapp/src/containers/Sales/Invoices/InvoiceForm/InvoiceForm.tsx b/packages/webapp/src/containers/Sales/Invoices/InvoiceForm/InvoiceForm.tsx
index 2a410aed3..8359be8d9 100644
--- a/packages/webapp/src/containers/Sales/Invoices/InvoiceForm/InvoiceForm.tsx
+++ b/packages/webapp/src/containers/Sales/Invoices/InvoiceForm/InvoiceForm.tsx
@@ -22,7 +22,7 @@ import withDashboardActions from '@/containers/Dashboard/withDashboardActions';
import withSettings from '@/containers/Settings/withSettings';
import withCurrentOrganization from '@/containers/Organization/withCurrentOrganization';
-import { AppToaster } from '@/components';
+import { AppToaster, Box } from '@/components';
import { compose, orderingLinesIndexes, transactionNumber } from '@/utils';
import { useInvoiceFormContext } from './InvoiceFormProvider';
import { InvoiceFormActions } from './InvoiceFormActions';
@@ -166,20 +166,23 @@ function InvoiceFormRoot({
initialValues={initialValues}
onSubmit={handleSubmit}
>
-