mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
FIx : setupSubscription & OrganizationForm
This commit is contained in:
@@ -17,7 +17,6 @@ import { TimezonePicker } from '@blueprintjs/timezone';
|
|||||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||||
import { DateInput } from '@blueprintjs/datetime';
|
import { DateInput } from '@blueprintjs/datetime';
|
||||||
import { momentFormatter, tansformDateValue } from 'utils';
|
import { momentFormatter, tansformDateValue } from 'utils';
|
||||||
import AppToaster from 'components/AppToaster';
|
|
||||||
import { ListSelect, ErrorMessage, FieldRequiredHint } from 'components';
|
import { ListSelect, ErrorMessage, FieldRequiredHint } from 'components';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
|
|
||||||
@@ -29,7 +28,6 @@ import { compose, optionsMapToArray } from 'utils';
|
|||||||
function SetupOrganizationForm({ requestSubmitOptions, requestSeedTenant }) {
|
function SetupOrganizationForm({ requestSubmitOptions, requestSeedTenant }) {
|
||||||
const { formatMessage } = useIntl();
|
const { formatMessage } = useIntl();
|
||||||
const [selected, setSelected] = useState();
|
const [selected, setSelected] = useState();
|
||||||
const history = useHistory();
|
|
||||||
|
|
||||||
const baseCurrency = [
|
const baseCurrency = [
|
||||||
{ id: 0, name: 'LYD - Libyan Dinar', value: 'LYD' },
|
{ id: 0, name: 'LYD - Libyan Dinar', value: 'LYD' },
|
||||||
@@ -177,7 +175,6 @@ function SetupOrganizationForm({ requestSubmitOptions, requestSeedTenant }) {
|
|||||||
const options = optionsMapToArray(values).map((option) => {
|
const options = optionsMapToArray(values).map((option) => {
|
||||||
return { key: option.key, ...option, group: 'organization' };
|
return { key: option.key, ...option, group: 'organization' };
|
||||||
});
|
});
|
||||||
console.log(options, 'Op');
|
|
||||||
requestSubmitOptions({ options })
|
requestSubmitOptions({ options })
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
setSubmitting(false);
|
setSubmitting(false);
|
||||||
|
|||||||
@@ -23,7 +23,12 @@ function SetupSubscriptionForm({
|
|||||||
plan_slug: Yup.string()
|
plan_slug: Yup.string()
|
||||||
.required()
|
.required()
|
||||||
.label(formatMessage({ id: 'plan_slug' })),
|
.label(formatMessage({ id: 'plan_slug' })),
|
||||||
license_code: Yup.string().trim(),
|
license_code: Yup.string()
|
||||||
|
.min(7)
|
||||||
|
.max(7)
|
||||||
|
.required()
|
||||||
|
.label(formatMessage({ id: 'license_code_' }))
|
||||||
|
.trim(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const initialValues = useMemo(
|
const initialValues = useMemo(
|
||||||
@@ -70,6 +75,4 @@ function SetupSubscriptionForm({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default compose(
|
export default compose(withBillingActions)(SetupSubscriptionForm);
|
||||||
withBillingActions,
|
|
||||||
)(SetupSubscriptionForm);
|
|
||||||
|
|||||||
@@ -704,7 +704,7 @@ export default {
|
|||||||
pro: 'PRO',
|
pro: 'PRO',
|
||||||
monthly: 'Monthly',
|
monthly: 'Monthly',
|
||||||
yearly: 'Yearly',
|
yearly: 'Yearly',
|
||||||
license_code: 'License code',
|
license_code: 'License Code',
|
||||||
year: 'Year',
|
year: 'Year',
|
||||||
please_enter_your_preferred_payment_method:
|
please_enter_your_preferred_payment_method:
|
||||||
'Please enter your preferred payment method below. You can use a credit / debit card or prepay through PayPal. ',
|
'Please enter your preferred payment method below. You can use a credit / debit card or prepay through PayPal. ',
|
||||||
@@ -764,4 +764,5 @@ export default {
|
|||||||
date_start_: 'Date start',
|
date_start_: 'Date start',
|
||||||
something_wentwrong: 'Something went wrong.',
|
something_wentwrong: 'Something went wrong.',
|
||||||
new_password: 'New password',
|
new_password: 'New password',
|
||||||
|
license_code_: 'License code',
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user