mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
fix: publish status in expense.
This commit is contained in:
@@ -45,7 +45,7 @@ const defaultInitialValues = {
|
|||||||
description: '',
|
description: '',
|
||||||
reference_no: '',
|
reference_no: '',
|
||||||
currency_code: '',
|
currency_code: '',
|
||||||
is_published:'',
|
publish:'',
|
||||||
categories: [...repeatValue(defaultCategory, MIN_LINES_NUMBER)],
|
categories: [...repeatValue(defaultCategory, MIN_LINES_NUMBER)],
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ function ExpenseForm({
|
|||||||
|
|
||||||
const form = {
|
const form = {
|
||||||
...values,
|
...values,
|
||||||
is_published: submitPayload.publish,
|
publish: submitPayload.publish,
|
||||||
categories,
|
categories,
|
||||||
};
|
};
|
||||||
// Handle request success.
|
// Handle request success.
|
||||||
@@ -214,7 +214,7 @@ function ExpenseForm({
|
|||||||
<ExpenseFloatingFooter
|
<ExpenseFloatingFooter
|
||||||
isSubmitting={isSubmitting}
|
isSubmitting={isSubmitting}
|
||||||
expense={expenseId}
|
expense={expenseId}
|
||||||
expensePublished={values.is_published}
|
expensePublished={values.publish}
|
||||||
onCancelClick={handleCancelClick}
|
onCancelClick={handleCancelClick}
|
||||||
onSubmitClick={handleSubmitClick}
|
onSubmitClick={handleSubmitClick}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const Schema = Yup.object().shape({
|
|||||||
.max(DATATYPES_LENGTH.TEXT)
|
.max(DATATYPES_LENGTH.TEXT)
|
||||||
.nullable()
|
.nullable()
|
||||||
.label(formatMessage({ id: 'description' })),
|
.label(formatMessage({ id: 'description' })),
|
||||||
is_published: Yup.boolean(),
|
publish: Yup.boolean(),
|
||||||
categories: Yup.array().of(
|
categories: Yup.array().of(
|
||||||
Yup.object().shape({
|
Yup.object().shape({
|
||||||
index: Yup.number().min(1).max(DATATYPES_LENGTH.INT_10).nullable(),
|
index: Yup.number().min(1).max(DATATYPES_LENGTH.INT_10).nullable(),
|
||||||
|
|||||||
Reference in New Issue
Block a user