move calculate action and parts to folder
This commit is contained in:
parent
7bd4308185
commit
28a8cdbfce
@ -3,12 +3,12 @@ import { openNotification } from 'client/Elements/Notification';
|
||||
import CalculationService from 'client/services/CalculationService';
|
||||
import { resultsValues } from 'core/types/Calculation/Store/values';
|
||||
import { ElementStatus } from 'core/types/statuses';
|
||||
import CalculationStore from '../..';
|
||||
import getAdditionalData from '../lib/additionalData';
|
||||
import checkValidation from '../lib/checkValidation';
|
||||
import prepareCalculationData from '../lib/prepareData';
|
||||
import results from '../lib/results';
|
||||
import validate from '../lib/validate';
|
||||
import CalculationStore from '../../..';
|
||||
import getAdditionalData from './additionalData';
|
||||
import checkValidation from './checkValidation';
|
||||
import prepareCalculationData from './prepareData';
|
||||
import results from './results';
|
||||
import validate from './validate';
|
||||
|
||||
const cleanResults = () => {
|
||||
for (let resultValue of resultsValues) {
|
||||
@ -32,7 +32,7 @@ function unlockButtons() {
|
||||
}, BUTTONS_TIMEOUT);
|
||||
}
|
||||
|
||||
export default () => {
|
||||
export default async () => {
|
||||
validate();
|
||||
const { invalidElements, invalidTables } = checkValidation();
|
||||
if (invalidElements.length > 0 || invalidTables.length > 0) {
|
||||
@ -1,4 +1,4 @@
|
||||
import { calcPrice } from './tools';
|
||||
import { calcPrice } from '../../lib/tools';
|
||||
import valuesConstants from 'core/constants/values';
|
||||
import { PaymentRow, PreparedValues } from 'core/types/Calculation/Prepare';
|
||||
import { IPreparedData } from 'core/types/Calculation/Requests';
|
||||
@ -1,6 +1,6 @@
|
||||
import { elementsValues } from 'client/Containers/Calculation/lib/elements/values';
|
||||
import { TElements } from 'core/types/Calculation/Store/elements';
|
||||
import CalculationStore from '../..';
|
||||
import CalculationStore from '../../..';
|
||||
|
||||
const VALIDATIONS = {
|
||||
IS_NULL: valueName => !CalculationStore.getValue(valueName),
|
||||
@ -21,7 +21,7 @@ const elementsValidations: TElements<any> = {
|
||||
selectRegionRegistration: VALIDATIONS.IS_NULL,
|
||||
selectTownRegistration: VALIDATIONS.IS_NULL,
|
||||
selectTarif: VALIDATIONS.IS_NULL,
|
||||
selectRate: VALIDATIONS.IS_NULL,
|
||||
// selectRate: VALIDATIONS.IS_NULL,
|
||||
selectRegistration: VALIDATIONS.IS_NULL,
|
||||
selectLeaseObjectCategory: VALIDATIONS.IS_NULL,
|
||||
tbxLeasingPeriod: valueName => CalculationStore.getValue(valueName) < 7,
|
||||
@ -9,7 +9,7 @@ import staticData from './Data/static';
|
||||
import modal from './Data/modal';
|
||||
|
||||
import computedEffects from './Effects/computed';
|
||||
import actionsEffects from 'client/stores/CalculationStore/Effects/actions';
|
||||
import actionsEffects from './Effects/actions';
|
||||
import autorunEffects from './Effects/autorun';
|
||||
import reactionEffects from './Effects/reactions';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user