mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
Merge remote-tracking branch 'origin/feature/exchange_rates'
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
import { Select } from '@blueprintjs/select';
|
||||
import { pick } from 'lodash';
|
||||
import * as Yup from 'yup';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { useFormik } from 'formik';
|
||||
import { compose } from 'utils';
|
||||
import { useQuery, queryCache } from 'react-query';
|
||||
@@ -165,7 +165,7 @@ function ItemCategoryDialog({
|
||||
return (
|
||||
<Dialog
|
||||
name={name}
|
||||
title={payload.action === 'edit' ? 'Edit Category' : ' New Category'}
|
||||
title={payload.action === 'edit' ? <T id={'edit_category'}/> : <T id={'new_category'}/>}
|
||||
className={classNames({
|
||||
'dialog--loading': fetchList.isFetching,
|
||||
},
|
||||
@@ -180,7 +180,7 @@ function ItemCategoryDialog({
|
||||
<form onSubmit={handleSubmit}>
|
||||
<div className={Classes.DIALOG_BODY}>
|
||||
<FormGroup
|
||||
label={'Category Name'}
|
||||
label={<T id={'category_name'}/>}
|
||||
labelInfo={requiredSpan}
|
||||
className={'form-group--category-name'}
|
||||
intent={(errors.name && touched.name) && Intent.DANGER}
|
||||
@@ -195,7 +195,7 @@ function ItemCategoryDialog({
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup
|
||||
label={'Parent Category'}
|
||||
label={<T id={'parent_category'}/>}
|
||||
labelInfo={infoIcon}
|
||||
className={classNames(
|
||||
'form-group--select-list',
|
||||
@@ -215,7 +215,6 @@ function ItemCategoryDialog({
|
||||
onItemSelect={onChangeParentCategory}
|
||||
>
|
||||
<Button
|
||||
rightIcon='caret-down'
|
||||
text={selectedParentCategory
|
||||
? selectedParentCategory.name : 'Select Parent Category'}
|
||||
/>
|
||||
@@ -223,7 +222,7 @@ function ItemCategoryDialog({
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup
|
||||
label={'Description'}
|
||||
label={<T id={'description'}/>}
|
||||
className={'form-group--description'}
|
||||
intent={(errors.description && touched.description) && Intent.DANGER}
|
||||
helperText={(<ErrorMessage name="description" {...{errors, touched}} />)}
|
||||
@@ -239,9 +238,9 @@ function ItemCategoryDialog({
|
||||
|
||||
<div className={Classes.DIALOG_FOOTER}>
|
||||
<div className={Classes.DIALOG_FOOTER_ACTIONS}>
|
||||
<Button onClick={handleClose}>Close</Button>
|
||||
<Button onClick={handleClose}><T id={'close'}/></Button>
|
||||
<Button intent={Intent.PRIMARY} type='submit' disabled={isSubmitting}>
|
||||
{payload.action === 'edit' ? 'Edit' : 'Submit'}
|
||||
{payload.action === 'edit' ? <T id={'edit'}/> : <T id={'submit'}/>}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user