diff --git a/stores/calculation/options/index.ts b/stores/calculation/options/index.ts index 0ea7283..ddc77d2 100644 --- a/stores/calculation/options/index.ts +++ b/stores/calculation/options/index.ts @@ -7,20 +7,6 @@ import { makeAutoObservable } from 'mobx'; import type RootStore from 'stores/root'; import type { CalculationOptions } from './types'; -const AUTO_SET_VALUE_ELEMENTS: Elements[] = [ - 'selectProduct', - 'selectLeaseObjectType', - 'selectBrand', - 'selectModel', - 'selectConfiguration', - 'selectTracker', - 'selectTelematic', - 'selectTechnicalCard', - 'selectFuelCard', - 'selectRegistration', - 'selectTownRegistration', -]; - export default class OptionsStore { root: RootStore; options: CalculationOptions = defaultOptions; @@ -63,18 +49,6 @@ export default class OptionsStore { this.options[elementName] = options as BaseOption[]; this.checkValueInOptions(elementName); - - /** - * Если в новом списке одна запись, то указываем ее - * (для элементов из списка {@link AUTO_SET_VALUE_ELEMENTS}) - */ - if (options?.length === 1 && AUTO_SET_VALUE_ELEMENTS.includes(elementName)) { - const optionValue = options.at(0)?.value; - - if (optionValue) { - this.root.$calculation.setElementValue(elementName, optionValue); - } - } }; resetOptions = (elementName: T) => {