mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: checkbox show negative in red.
This commit is contained in:
@@ -115,6 +115,19 @@ export default function NumberFormatFields({
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
{/*------------ show negative in red-----------*/}
|
||||
<FastField name={'show_in_red'} type={'checkbox'}>
|
||||
{({ field }) => (
|
||||
<FormGroup inline={true}>
|
||||
<Checkbox
|
||||
inline={true}
|
||||
label={<T id={'show_negative_in_red'} />}
|
||||
name={'show_in_red'}
|
||||
{...field}
|
||||
/>
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
{/*------------ Divide on 1000 -----------*/}
|
||||
<FastField name={'divide_on_1000'} type={'checkbox'}>
|
||||
{({ field }) => (
|
||||
|
||||
@@ -6,6 +6,7 @@ import { defaultTo } from 'lodash';
|
||||
const Schema = Yup.object().shape({
|
||||
format_money: Yup.string(),
|
||||
show_zero: Yup.boolean(),
|
||||
show_in_red: Yup.boolean(),
|
||||
divide_on_1000: Yup.boolean(),
|
||||
negative_format: Yup.string(),
|
||||
precision: Yup.string(),
|
||||
|
||||
@@ -14,6 +14,7 @@ function NumberFormats() {
|
||||
() => ({
|
||||
format_money: '',
|
||||
show_zero: '',
|
||||
show_in_red: '',
|
||||
divide_on_1000: '',
|
||||
negative_format: '',
|
||||
precision: '',
|
||||
@@ -21,8 +22,7 @@ function NumberFormats() {
|
||||
[],
|
||||
);
|
||||
// Handle cancel button click.
|
||||
const handleCancelClick = useCallback(() => {
|
||||
}, []);
|
||||
const handleCancelClick = useCallback(() => {}, []);
|
||||
|
||||
// Handle form submit.
|
||||
const handleFormSubmit = (values, { setSubmitting }) => {
|
||||
|
||||
Reference in New Issue
Block a user