mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat: quick create action on select/suggest items fields.
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
import { customersFieldShouldUpdate, accountsFieldShouldUpdate } from './utils';
|
||||
import {
|
||||
CurrencySelectList,
|
||||
ContactSelecetList,
|
||||
CustomerSelectField,
|
||||
AccountsSelectList,
|
||||
FieldRequiredHint,
|
||||
Hint,
|
||||
@@ -78,6 +78,7 @@ export default function ExpenseFormHeader() {
|
||||
defaultSelectText={<T id={'select_payment_account'} />}
|
||||
selectedAccountId={value}
|
||||
filterByParentTypes={[ACCOUNT_PARENT_TYPE.CURRENT_ASSET]}
|
||||
allowCreate={true}
|
||||
/>
|
||||
</FormGroup>
|
||||
)}
|
||||
@@ -137,13 +138,14 @@ export default function ExpenseFormHeader() {
|
||||
helperText={<ErrorMessage name={'assign_to_customer'} />}
|
||||
inline={true}
|
||||
>
|
||||
<ContactSelecetList
|
||||
contactsList={customers}
|
||||
<CustomerSelectField
|
||||
contacts={customers}
|
||||
selectedContactId={value}
|
||||
defaultSelectText={<T id={'select_customer_account'} />}
|
||||
onContactSelected={(customer) => {
|
||||
form.setFieldValue('customer_id', customer.id);
|
||||
}}
|
||||
allowCreate={true}
|
||||
/>
|
||||
</FormGroup>
|
||||
)}
|
||||
|
||||
@@ -113,6 +113,7 @@ export function useExpenseFormTableColumns({ landedCost }) {
|
||||
disableSortBy: true,
|
||||
width: 40,
|
||||
filterAccountsByRootTypes: ['expense'],
|
||||
fieldProps: { allowCreate: true },
|
||||
},
|
||||
{
|
||||
Header: ExpenseAmountHeaderCell,
|
||||
|
||||
Reference in New Issue
Block a user